Next Article in Journal
Machine Learning-Powered Segmentation of Forage Crops in RGB Imagery Through Artificial Sward Images
Next Article in Special Issue
Health Risk Assessment of Tetracyclines Contamination in Soil-Cabbage (Brassica campestris L. ssp. chinensis) System
Previous Article in Journal
Optimizing Cassava Growth with Localized Struvite Application: Root Proliferation and Fertilization Efficiency
Previous Article in Special Issue
Phenological Assessment of Hops (Humulus lupulus L.) Grown in Semi-Arid and Subtropical Climates Through BBCH Scale and a Thermal-Based Growth Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research and Implementation of Agronomic Entity and Attribute Extraction Based on Target Localization

1
Agricultural Information Institute, Chinese Academy of Agricultural Sciences, Beijing 100081, China
2
Information Technology Research Center, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China
*
Author to whom correspondence should be addressed.
Agronomy 2025, 15(2), 354; https://doi.org/10.3390/agronomy15020354
Submission received: 4 January 2025 / Revised: 22 January 2025 / Accepted: 27 January 2025 / Published: 29 January 2025

Abstract

:
The agronomic knowledge graph can provide accurate and reliable service support for agricultural production management. Agronomic knowledge often comes from unstructured text data, and efficient annotation of agricultural text data and construction of knowledge extraction models suitable for the characteristics of agronomic knowledge are two key points to create an agronomic knowledge graph. The proportion of attributes in agronomic knowledge is relatively high, but currently, the attribute annotation function of existing annotation tools is incomplete, and the annotation function and process are unclear. A scalable natural language annotation framework was proposed, which was able to flexibly configure the annotation process and annotation objects as needed, and the named entity was annotated in the corresponding mode. The current knowledge extraction models are mostly based on input text sequences, which has the problem of low feature utilization. However, the entities and attributes in agronomic knowledge have high similarity, and the position and type of entities and attributes can be directly calculated through their common features. An entity and attribute recognition model based on target localization, EntityDetectModel, was proposed. Firstly, Bert was used to extract text features with contextual information. Then, convolutional neural networks were used to extract features at different depths, and inter layer feature fusion was used to improve feature expression ability. Finally, the corresponding positions and types of named entities with different sizes were calculated based on the features at different depths. EntityDetectModel was compared with the other entity and relationship extraction models published in recent years and the results showed that the precision, recall, and F1 of EntityDetectModel were 91.0%, 83.4%, and 87.0%, respectively, which were superior to other comparison models. Using EntityDetectModel, a wheat agronomic knowledge graph was constructed.

1. Introduction

Knowledge graphs organize entities, attributes, and relationships in the real world in the form of graphs, and describe their connections through rich attributes and semantic relationships [1,2]. Knowledge graphs can present the connections between knowledge in a highly structured form and have been widely applied in various fields [3]. In the field of agriculture, knowledge graphs have received widespread attention in planting management [4], crop variety knowledge [5], pest and disease control [6,7], cultivation management [8,9], and many other aspects.
The agronomic knowledge graph can provide accurate and reliable support for intelligent control of crop growth. In practical agricultural production applications, it can serve as a backend system to provide comprehensive optimization services for crop cultivation and planting plans. Intelligent question answering systems or intelligent search engines based on knowledge graphs can also be developed to help agricultural practitioners improve their decision-making level and control efficiency. Most agricultural knowledge exists in unstructured data in textual form. This article deeply analyzed the data structure and characteristics of agricultural knowledge, focusing on two key issues in the construction of agronomic knowledge graphs: data annotation and named entity extraction models. A scalable natural language annotation system was proposed and implemented to solve incomplete attribute annotation functions and unclear annotation processes of the existing annotation tools, and an entity and attribute recognition model based on target localization, EntityDetectModel, was created to solve the problem of low feature utilization.
Data annotation is an important means of constructing datasets, which can provide essential support for model training and the extraction of agronomic knowledge. Some text annotation tools have already emerged, such as brat [10], Doccano [11], Label Studio [12], Chinese-Annotator, and IEPY. These tools have demonstrated superior performance in entity and relationship annotation, but in terms of entity attribute annotation, they either lacked functionality or failed to achieve satisfactory results. Attributes refer to the attribute names and values associated with entities that appear in unstructured or semi-structured data sources. The extraction of attributes is crucial for enriching the data layer information in the knowledge graph, enhancing its completeness and quality. Neither Chinese-Annotator nor Doccano have the entity attribute annotation functionality. IEPY is an open-source tool focused on relation extraction. Both brat and Label Studio have entity attribute annotation capabilities, but they require attribute values to be preset and fixed options, which means they cannot annotate parts of the text as attributes. Many entity attribute values came from the text itself and were not fixed options, which did not meet the annotating requirements for many texts. Currently, there is no tool that provides efficient entity attribute annotation functionality. Attributes are an important part of the agronomic knowledge graph, and many pieces of information are presented as attributes, such as the time, type, quantity, method, and precautions of fertilization, so the current annotation tool cannot meet the annotation requirements for agronomic knowledge. With the continuous development of natural language processing technology, there is a growing demand for diverse requirements regarding the categories, quantities, and annotation order of annotated objects. Establishing an easily extensible text annotation method can meet different annotation needs and enable on-demand custom annotation. A scalable natural language annotation system was proposed and developed, which was able to flexibly configure the annotation process and annotation objects as needed, and the named entity was annotated in the corresponding mode.
Named entity recognition refers to identifying entities with specific names from natural language text, providing support for downstream tasks such as information extraction and knowledge graph construction. With the emergence and development of long short-term memory models and language model Bert, deep learning has received widespread attention in named entity recognition. Takanobu et al. [13] proposed a hierarchical joint extraction architecture to enhance the interaction between entities and relationships. The model first identified relationships in high-level learning, and then identified entities with corresponding relationships after determining the relationships. The joint extraction model based on the supervised multihead self-attention mechanism proposed by Liu et al. [14] consisted of two parts: the entity extraction module and the relationship detection module. The entity extraction module used conditional random fields to generate entity annotation sequences to obtain entity sets in the text. The relationship detection module considered each relationship type as an independent subspace and used the self-attention mechanism to calculate the probability of relationships between each word instance. The SpERT model proposed by Eberts et al. [15] was a joint entity and relationship extraction method based on span, which took input text of any span as candidate entities, concatenated the features of two entities as their relationship features, and used Bert to extract their features. In response to the problems of data imbalance and excessive computational complexity in span-based named entity and relationship extraction models, Tang et al. [16] used boundary regression to calculate the offset of named entities, without exhausting all spans, only requiring fewer rough named entity boundaries. It can be concluded from the relevant studies recently published [13,14,15,16,17,18,19,20,21] that most existing research recognized entities and relationships based on input sequence, the input was divided into segments, and the corresponding features of each segment were extracted at a higher level (Figure 1a). This method based on input sequence could cause two problems. Firstly, named entities and their corresponding attributes of the same category shared common features, which needed to be reflected in the features of each named entity, resulting in redundancy in feature extraction. Secondly, named entity recognition and classification based on local features required dividing the text in advance into segments to be recognized, and the segmentation method and the corresponding relationship between the segment and the final feature was closely related to named entity recognition. In fact, some large models such as Bert could extract rich contextual features. Based on these models with strong contextual extraction capabilities, it was more important to focus on the common features of entities and relationships, and directly calculated the location information of entities and their corresponding attributes (Figure 1b).
A named entity recognition method, EntityDetectModel, based on target localization was proposed, which did not require pre-partitioning of the initial text and directly determined the position and category of named entities based on text features.
Based on the above research content, we select wheat as a crop and achieve annotation of wheat-related text. Taking the Gaoyou 2018 wheat variety, which had a wide planting area in Hebei Province, China, as an example, EntityDetectModel was used to extract the agronomic data for wheat production, and a Gaoyou 2018 wheat agronomic knowledge graph was constructed.

2. Materials and Methods

2.1. Schema Layer of Wheat Agronomic Knowledge Graph

Knowledge and data related to wheat agronomy were obtained by combining literature research and expert consultation in the field of wheat agronomy. The two methods complemented and optimized each other to improve the accuracy and reliability of the data. The top-down approach was used to establish a wheat agronomy knowledge graph schema layer, extracting 27 named entities in wheat production: pests and diseases, weather, location, fertilizer formula and proportion, climate disasters, pest control, season of occurrence, seed treatment, sowing, chemical regulation, fertilization, controlling seedling, harvesting, hoeing, watering, growth stage, weeding, ploughing, remedying seedling, suppression, drug formula and proportion, grass pests, pest and disease control, weeds, soil preparation, returning straw to the field, and other agronomy. The attributes of each named entity were extracted; for example, the attributes of fertilization include fertilization depth, prerequisite conditions, application amount, fertilization method, time, fertilization effect, precautions, etc. Five relationships were extracted, including treatment, use, prevention, occurrence season, and reproductive stage. The constructed knowledge graph pattern layer was shown in Figure 2.

2.2. Natural Language Annotation Method

According to the schema layer of the wheat agronomic knowledge graph, the proportion of attributes was relatively high, and the attribute identification and classification was an important part of establishing an agronomic knowledge graph. Some current studies annotated attributes as a special relationship [22,23,24], which had certain limitations. When it was necessary to annotate both entity attributes and relationships between entities, if the relationships between entities were simple and the number was small, this “attribute” relationship annotation method was able to achieve certain results. As the number of entity relationships increased, this “attribute” relationship annotation might greatly affect the information extraction performance. There are two main reasons. Firstly, attributes are used to describe entities, which are usually located closer to their subordinate entities, while the distance between the two entities represented by the relationship is farther. Secondly, entity attributes and entity relationships are hierarchical relationships, where entities and attributes belong to the same category within the same entity, while entity relationships reflect the relationships between different entities.
There is a certain correlation and dependency between textual annotation information; for example, attribute annotation and relationship annotation both rely on entity annotation, and the annotation process has a hierarchical structure. Aiming at the problems of incomplete attribute annotation, unclear annotation processes, and poor scalability in current annotation tools, a hierarchical entity, entity attribute, and entity relationship annotation method was proposed(Figure 3). Based on the type of target information to be annotated, multiple modes such as entity, entity attribute, and entity relationship were set to achieve annotation of the corresponding category information in each mode.
Due to the dependency relationship between annotation targets, the annotation mode was able to be set and changed as needed. For example, when annotating entity attributes in attribute annotation mode, it was able to be changed to entity annotation mode as needed to complete entity annotation. In order to facilitate expansion, different types of target information were set with corresponding configuration files, which stored the types of target annotation information. For example, entity configuration files stored entity type information, attribute annotation files stored entity type information that attributes depended on, and the attribute types and value requirements of entity types. During the file annotation process, the configuration file was able to be modified to expand the annotation target type and enhance the schema layer. Configuration files were able to be added as needed to expand the annotation target types. The annotation process for named entity, attribute, and relationship was shown below.
  • Entity annotation process:
    (a)
    If corresponding entity record file does not exist, create entity record file and go to (c).
    (b)
    Read the record file and highlight the text and its type based on the record.
    (c)
    Read entity configuration file and obtain entity type set E.
    (d)
    Select target text w.
    (e)
    If w is not target object, then display the selected text normally, delete the annotated entity type, and delete its record information in the entity record file, go to (i).
    (f)
    Display all entity types in E, and suppose w’s type is c.
    (g)
    If c E , then add a new entity type c and modify the entity configuration file.
    (h)
    Set the selected text type to c and highlight it, and record the location and type of target text to complete the annotation for w.
    (i)
    If there exist any unlabeled entities, then go to (d).
    (j)
    Complete the annotation for all entities.
  • Entity attribute annotation process:
    (a)
    If corresponding entity attribute record file does not exist, then create a new entity attribute record file.
    (b)
    Extract the annotated entity set S and its corresponding type F from the entity annotation record file.
    (c)
    If S is empty, go to (j).
    (d)
    Read the entity attribute record file, highlight the attribute and its corresponding entity, and annotate the type of attribute.
    (e)
    Select target attribute text a to be annotated. If a is not an attribute of any entity in S, go to (k).
    (f)
    a is an attribute of entity b, if b S , complete the entity annotation to which the attribute belongs, go to (j).
    (g)
    Let the entity type of b be el and b be of type sl, read the attribute set of el from the configuration file, denoted by at. If s l a t , add a new attribute type sl and modify the entity attribute configuration file.
    (h)
    Set the selected text type to sl and highlight it, pointing to the entity it belongs to. Modify the entity attribute record file to record a’s location and attribute type and the entity b a belongs to, and complete the annotation for a.
    (i)
    If there exists any unlabeled entity attribute, go to (e), otherwise go to (k).
    (j)
    Display the selected text normally, delete the annotated entity attribute type, and delete its record in the entity attribute record file.
    (k)
    Complete the annotation of all entity attributes.
  • Entity relation annotation process:
    (a)
    If corresponding entity relation record file does not exist, create a new entity relation record file.
    (b)
    Extract the annotated entity set S and its corresponding type F from the entity annotation record file.
    (c)
    If S is empty, no entities exist for relationship annotation, prompt to complete entity annotation first, go to (l).
    (d)
    Read the entity relation record file, highlight the relations and their corresponding entities, the type of entity, and the type of relation.
    (e)
    Select an entity pair text that has a relation to be annotated ra and rb. If N O T ( r b S a n d r a S ) , complete entity annotation for ra and rb, go to (j).
    (f)
    If no relations exist between ra and rb, go to (j).
    (g)
    Suppose the entity type of ra and rb was la and lb, respectively, and their relation type is lr. Read the entity relationship configuration file and search for the relationship type set lx between la and lb.
    (h)
    If l r l x , then add a new entity relation type <la,lr,lb>, modify the entity relation configuration file, and go to (l).
    (i)
    Annotate the relationship between ra and rb as lr, and write the location information of ra and rb and lr into the relationship record file to complete the relation annotation between ra and rb. Go to (k).
    (j)
    Remove the relationship connection and relationship type label between ra and rb, delete its record in the entity relation record file.
    (k)
    If there exist any unlabeled entity relations, go to (e).
    (l)
    Complete annotation of all entity relationships.

2.3. Named Entity Recognition

2.3.1. Network Structure for EntityDetectModel

Most agronomy knowledge is gradually formed and generated by farmers with lower knowledge levels through long-term accumulation of experience. Therefore, compared with other fields, agronomy knowledge has the characteristics of non-standard terminology, weak professionalism, and strong colloquialism, which leads to the uneven length and difficulty in understanding of named entities in agronomy. For example, irrigation operations may include “watering”, “the first watering of spring“, ”flowering water“, etc., all of which represent one named entity and cannot be separated. It can be seen from the above that agronomic text data have stronger contextual relevance, which requires network models to have stronger semantic and contextual feature extraction capabilities. At the same time, there is often a temporal correlation between agricultural practices, and two or more agricultural practices sometimes need to be carried out simultaneously or sequentially. This is mainly reflected in the presence of more short sentences in each sentence in agricultural knowledge texts, which results in a strong local correlation between agricultural practices, but low correlation over longer distance. Finally, agronomic named entities have different lengths, and network models need to have feature extraction capabilities at different scales to obtain feature representations of named entities at different scales.
A named entity and its attribute recognition method based on target localization was proposed, which focused on the common features of named entities and their attributes after fully extracting text features with contextual information. Based on the common features, the position and category of named entities and their attributes were directly determined (Figure 4). Firstly, the text was converted into a token sequence and digitally encoded, and the Bert model was used to extract the features with contextual information. Then, the local features of the token were fused to extract the global features of the text fragment, fully reflecting the common features of the named entity. Finally, the named entity was located and recognized. The Fnet module using Convolutional Neural Network (CNN) to fuse Bert features was shown in Figure 5. Since the Bert features of tokens were one-dimensional, one-dimensional convolution was used. Firstly, adjacent token features were fused using a convolution kernel with a size of 2 and a step size of 1. The number of convolution kernels was the same as the length of the input token features to obtain features with the same dimension as the input features. Then, a convolution kernel with a size of 2 was used to further extract features and set the step size to 2 for downsampling. At the same time, the number of channels was expanded to twice the original size to enrich semantic information. Then, the same structure was repeated to obtain features with a size of 1/4 of the original size. Batch normalization BatchNorm and non-linear transformation ReLu were performed after each convolution. Due to the varying lengths of named entities, in order to improve the localization and recognition performance of named entities of different sizes, the Fnet module was repeated to obtain multi-scale features with sizes of 1/8 and 1/16 of the input features, respectively. Given that high-level features had stronger semantic expression capabilities, they were downsampled and fused with the lower-level features to improve the expression ability of lower-level features. The concatenated results were used as the final features for named entity localization and recognition of lower-level features.
In the positioning and classification layer of named entities, linear transformation was used to calculate the starting position offset, length, and category of named entities, as shown in Formula (1), where ic represented the dimension of the final feature, y0, y1, and y2, respectively, represented the offset, length, and category of the starting position of the named entity. The offset of a named entity was defined as the difference between the center position of the named entity and the center position of the corresponding text-encoding segment (Figure 6).
y j = i = 0 i c 1 w i j x i + β j

2.3.2. Positive and Negative Sample Determination and Loss Function

The determination of positive and negative samples was the basis for calculating the starting position offset, the length and category of named entities, and was an important step in calculating the loss function, implementing model training, and obtaining the optimal model. The method for determining positive and negative samples was as follows:
(1)
Set the positive sample list to z = [], the actual named entity list for positive sample predictions to zm = [], and the negative sample list to f = [].
(2)
Given the input Bert feature length as bw and the final feature length as fw, the text interval length is set to interval = Γbw/fw˥.
(3)
Using interval as the spacing, divide the input text length into fw intervals, and form a set QT with all intervals as elements: QT = {[0, interval-1], [interval, 2*interval-1], …}.
(4)
Form a range from the start and end position indices of the actual named entities, form a set GT consisting of the ranges of all named entities, and obtain DT by taking the Cartesian product of GT and QT.
(5)
For each element in DT, calculate the intersection-over-union (the ratio of intersection length to the total length, abbreviated as IOU in the following text) between the two intervals to form a set DT1. Set a positive sample selection threshold α and set the values in DT1 with an IOU value less than α to 0.
(6)
For each element g in GT, select the element p in QT with the highest IOU value as the positive sample, remove p from QT, add it to z, and add g to zm.
(7)
For each element q in QT, let the element in GT with the highest IOU value be g1. If the corresponding IOU value o > α, then remove q from QT, add it to z, and add g1 to zm.
(8)
Treat the remaining elements in QT as negative samples and add them to f.
In agronomy text data, named entities and their attributes were often closely related in terms of syntax or semantics. Attribute features with contextual environmental features were able to characterize the information of the entities they belong to. The loss function included three types: named entity localization loss function (Formula (2)), classification loss function (Formula (3)), and distance loss between named entities and their entities (Formula (4)). The sum of the three was regard as the loss function of the model (Formula (5)). Among them, only positive samples had localization loss and distance loss. Localization loss included named entity offset loss and named entity size loss. Distance loss was used to calculate the distance loss between the target named entity and the entity it belonged to. The classification loss function included positive sample classification loss and negative sample classification loss. The loss function formula was as follows:
L o s s l o c = 1 N p i ( s m o o t h L 1 ( b c a c ) + s m o o t h L 1 ( b w ) )
L o s s c l a s s i f y = 1 N p + N n i CrossEntropyLoss ( bt - at )
L o s s d i s = 1 N p i smooth L 1 ( bd - ad )
L o s s = L o s s l o c + L o s s c l a s s i f y + L o s s d i s
The positioning offset loss and size loss of named entities both used smooth L1 loss, where bc represented the center point position of the positive sample, ac represented the center point position corresponding to the prediction interval, and bw represented the width of the positive sample. Np and Nn represented the number of positive and negative samples, respectively. The classification loss adopted a cross-loss function, where bt and at represented the predicted category and the actual category, respectively. The distance loss also used smooth L1 loss, where bd and ad represented the actual distance and predicted distance of the named entity to which the target named entity belonged, respectively.

2.4. Data Collection and Processing

Compared to other fields, there were fewer vertical websites in agriculture that could provide information about crop cultivation. This article mainly obtained 1315 wheat agronomic text files from the open knowledge service platform China National Knowledge Infrastructure (CNKI), Wanfang database, national and local standards, and wheat production guidance documents from provincial and county agricultural and rural bureaus. Due to the scattered distribution of wheat agronomic text data in files, the obtained file content could not be directly used. Firstly, the commonly used keywords in wheat agronomy, such as “fertilization”, “watering”, “irrigation”, “sowing”, etc., were summarized. Then, a string search method was used to extract wheat agronomic data from the text. Finally, a total of 1432 wheat agronomic data points were obtained by manually refining the text data item by item. The method described in Section 2.2 was used for data annotation. Because only named entities and their attributes were focused in wheat agronomic data, the annotation system was set to named entities and attributes mode to complete the annotation of wheat agronomic data. We divided the 1432 pieces of data into the training set, the validation set, and the test set in a 4:1:1 ratio to train, validate, and analyze the EntityDetectModel model.
The wheat variety Gaoyou 2018, which had a wide planting area in Hebei Province, China, was selected to construct a wheat agronomic knowledge graph. A total of 332 agronomic data files were obtained from CNKI, Wanfang Data, and the websites of agricultural and rural bureaus in multiple counties in Hebei Province, China. A total of 402 agronomic texts of the Gaoyou 2018 variety were extracted and used to identify the agronomic named entities and attributes.

3. Results and Discussion

3.1. Scalable Text Annotation System

A hierarchical and scalable annotation system was designed and developed to address the problems of chaotic annotation objects and annotation processes, as well as incomplete attribute annotation functions in current text annotation systems. The system mainly included functions such as custom configuration, annotation mode control, text annotation, and storage of annotation results. Users can configure the annotation content and annotation process according to their needs, and set different annotation modes such as named entities, attributes, and relationships. During the annotation process, users can switch between annotation modes based on their annotation requirements. The management configuration of named entities, attributes, and relationships is shown in Figure 7. The system was used to annotate the obtained wheat agronomic data.
This system is suitable for annotating all textual data, especially for texts with high attribute proportions. At present, the system only has a standalone version, but the system process is clear and concise, making it easy to develop into a multiplayer version. By using the B/S architecture and deploying servers in the cloud, the system’s computing and storage can be easily scalable, enabling the annotation of big data text. Meanwhile, cloud-based shared text can ensure collaborative operations among multiple users.

3.2. Performance Analysis for EntityDetectModel

To evaluate the performance of EntityDetectModel, comparative experiments were conducted with related named entity and relationship extraction models. The hardware environment for the experiment was as follows: the CPU model was Intel Core i7-6700K, 32 GB of memory, and a GPU model of Geforce GTX TITAN X. The installed CUDA version was 10.0 and the operating system was Ubuntu 18. Due to the lack of specialized attribute recognition in the other entity relationship recognition models, attributes were treated as a special type of relationship and converted into relationships as inputs for the model during training and validation. Compared with several existing entity relationship extraction models, the recognition accuracy, recall rate, and F1 were calculated, and the results are shown in Table 1. In order to address the issue of imbalanced class distribution, a data sampling method was adopted during the training process. At the beginning of training, the classification and proportion of named entities were calculated and statistically analyzed. During the training process, samples with correct prediction results and high proportion were removed from the training set, enhancing the training of named entities with a small proportion of classes. This solved the problem of low accuracy in small sample recognition caused by imbalanced classes, and the process is shown below:
(1)
Count the types and quantities of named entities and attributes of different categories in the training dataset;
(2)
Sort them in descending order of quantity, and label their category list as Clist and quantity list as Alist;
(3)
Train the model in pre-set quantity of epochs to obtain model weights;
(4)
Validate the trained model on the training set and set the set of correctly predicted entities as U;
(5)
Take the first category from Clist and record it as Cm;
(6)
Take the first number from Alist and record it as Af, and take the last number and record it as Al;
(7)
If Af/Al < 2, go to 11;
(8)
Extract all predictions of category Cm from U and arrange them in descending order of prediction probability, denoted as list P with length Pl;
(9)
Compute d = Af − Al, if Pl < d, then PG = P; otherwise, take the first d ground truths from P and denote them as Pd, PG = Pd;
(10)
Modify the training set and remove the ground truth annotation in PG from the training set;
(11)
The end.
From the comparison results, it can be seen that on the whole, the EntityDetectModel model achieved the best recognition performance, with recognition precision, recall rate, and F1 scores of 91.0%, 83.4%, and 0.870, respectively. Due to the high number of short sentences and weak overall logical coherence in agricultural text data, the pattern of identifying relationships first and then entities cannot achieve good results [13]. Liu et al. (2020) used a bidirectional long short-memory network to extract features, and shared these features to construct entity extraction modules and relationship extraction modules. This method of extracting entity and relationships can simultaneously compensate for each other’s shortcomings, and the performance was improved [14]. The models with better recognition performance were the SpERT model [15] based on text span feature extraction, and the optimized models [16] based on the SpERT model. The SpERT model divided the text into sections based on text span, and extracted the feature of each section to classify it; the entity and attribute features in agronomic data had significant similarity, such as the commonly used “fertilizer”, “base fertilizer”, and “jointing fertilizer” in fertilization, which had obvious common features and were easy to identify agronomic entities in text fragment feature extraction. ElementDetectModel was built based on the characteristics of agricultural text knowledge, so it could achieve excellent performance. There is a high correlation between named entities and attributes, and it requires the model to have high contextual feature extraction capabilities. ElementDetectModel used the Bert model to fully extract contextual features from agricultural texts. At the same time, the length of named agricultural entities and the distance between attributes and entities in agricultural texts are both variable, requiring the model to have the ability to extract multi-scale features. ElementDetectModel constructed features of different scales through convolutional neural networks to recognize named entities with different lengths and attributes with different distances from their named entities.
Ablation experiments were added to verify the performance of multi-scale feature fusion in named entity and attribute extraction. We trained and tested models under five network structures, including two cases of feature fusion and feature non-fusion, and three cases of single-layer features (as shown in Table 2). According to the results of the ablation experiment, the precision and recall of the feature fusion network were improved by 5.7% and 3.7%, respectively, compared to the network without feature fusion, which improved the performance of named entity prediction.
The model was created based on the characteristics of crop agronomic text, so it is suitable for text data with similar features to agronomic knowledge. In fact, in agricultural production, agronomy has similar data structure characteristics, that is, there are more structures of entities and attributes, with a higher proportion of attributes, and there are close correlations between named entities, attributes, and the relation between named entities and attributes in agronomy. These features will not change due to changes in the types of agricultural products or changes in text language. Whether it is crops or other agricultural products such as vegetables, their agricultural processes have similar structural characteristics, for example, they all have some common agricultural operations such as “fertilization”, “sowing”, “irrigation”, “watering”, “harvesting”, etc., and the proportion of attributes is relatively large. The differences are mainly reflected in the specific agronomic content of different agricultural products, such as the differences in agronomy between rice and wheat, which may include “transplanting” and “seedling cultivation”. Similarly, for the same language with the same grammatical structure, the structural characteristics of agricultural knowledge will not change, and this model is also applicable to different languages. As long as a training set with sufficiently big data can be constructed to make the model fully learn the named entities and attribute features in different agricultural products or languages, the model can always exhibit excellent performance.
At the same time, the model also encountered some challenges and made some incorrect identifications. For example, when the model was used to recognize the attributes from the text “After wheat begins to sprout, timely disease prevention and control should be carried out, and a 0.3% amino acid solution of 450 mL/hm2 should be applied as foliar fertilizer to avoid premature leaf senescence and yield reduction.“, the attribute “0.3% amino acid solution of 450 mL/hm2” of the named entity “foliar fertilizer” was mistakenly identified as an attribute of agronomic “disease prevention and control”. This may be caused by fewer named entities related to “foliar fertilizers” or “amino acid solutions” in the training data, and the model has not fully learned their own and the associated features between them and other named entities. By expanding the agricultural text training dataset, the model can fully learn the features of named entities, sentence structures, and syntax, which can improve recognition performance.

3.3. Construction of Wheat Agronomy Knowledge Graph Database

Taking a high-quality wheat variety with a large planting area in Chinese Hebei province, Gaoyou 2018 variety, as an example, EntityDetectModel was used to extract named entities and attributes from its agronomic text data, resulting in a total of 521 named entities and 537 attributes. Using the Neo4j graph database to store the triplet of Gaoyou 2018 knowledge graph, we established a Gaoyou 2018 variety agronomic database. Partial database visualization is shown in Figure 8.

4. Conclusions and Prospect

Reasonable and correct crop agronomic knowledge is an important guarantee for high yield and excellent production of crops, and constructing an agronomic knowledge graph can provide efficient and intelligent support services for agricultural production. This article deeply analyzed the characteristics of agricultural knowledge and conducted research on two key issues: text data annotation and named entity recognition. Agronomic data mostly comes from unstructured text data, and it is crucial to use natural language technology to annotate it to construct a dataset. Due to the high proportion of attributes in agronomic data, attribute has become an important object of agronomic knowledge annotation. The entity features of the same type in agronomic data have high similarity, and the correlation between attributes and entities is stronger. Extracting common features of named entities to locate entities and their attributes is superior compared to traditional recognition based on text input sequences. The main conclusions of this paper are:
  • A scalable natural language annotation method has been proposed, which can annotate multi-level and different objects as needed, solving the problem of diverse annotation functions and lack of attribute annotation in current annotation tools, and developing a corresponding annotation system.
  • An entity and attribute recognition model based on target localization, EntityDetectModel, was proposed. Firstly, Bert was used to extract text features with contextual information, and then convolutional neural networks were used to further extract text features at different depths. The high-level semantic features are fused to the low-level to improve the semantic expression ability of the low-level. At each feature layer, the location information of the entity and its corresponding attributes are directly regressed. Comparing EntityDetectModel with some recently published models, our model had the best recognition performance, with recognition precision, recall rate, and F1 values of 91.0%, 83.4%, and 87.0% respectively.
  • Taking the wheat variety Gaoyou 2018 as an example, a trained model was used to extract its named entities and attributes. A total of 521 entities and 537 attributes were extracted, forming the Gaoyou 2018 agronomic database.
Although some progress has been made, i.e., a corresponding annotation system was developed and an agronomic named entity recognition model was created based on the characteristics of agronomic data, there is still some work to be completed. This work mainly includes (1) the improvement and validation of EntityDetectionModel; there are also relationships such as “use” and “prevention” between named entities, and there is also a temporal correlation between different agricultural practices. The correlation between these relationships is weaker than that between entities and attributes, making it difficult to directly locate the head and tail entities. The next step will investigate the use of hierarchical or parallel module interaction fusion to achieve one-time extraction of entities, attributes, and relationships. Although the structure and characteristics of agricultural knowledge do not change with changes in agricultural products or text language, with the increase of data sources and the expansion of datasets, EntityDetectionModel may encounter problems such as incomplete data and data noise in practical applications. By adopting advanced models with stronger context extraction capabilities to overcome the problem of reduced recognition precision caused by data noise, or by adding data preprocessing methods, we can improve the generalization performance of EntityDetectionModel. We need to verify its recognition performance for different agricultural products and different language texts to expand the application scope of the model, and further explore its feasibility in fields outside agriculture, such as forestry and animal husbandry management. (2) We need to further improve the annotation system based on the extensible text data annotation framework, and build an easily scalable text annotation system that supports multiperson collaboration, which can achieve annotation of large datasets and improve their user friendliness, robustness, and robustness. There is potential to collaborate with research institutions, government projects, etc., to promote its application in the field of agriculture. (3) We can further improve the wheat knowledge graph and integrate it with actual agricultural production to provide practical production guidance for farmers, and a knowledge service system based on the knowledge graph can be developed to guide farmers in agricultural production and improve production efficiency. It can improve the stability and reliability of crop model prescription output by organically combining with crop models as a downstream task, and through feedback mechanisms, it can help crop models optimize and improve to enhance the accuracy of crop model prescription output. The application of the agricultural knowledge graph can improve the production efficiency of agriculture and promote sustainable development of agriculture through energy conservation and efficiency enhancement.

Author Contributions

Conceptualization, X.G. and Y.Z.; methodology, X.G. and S.W.; software, X.G. and Y.E.; validation, X.G.; formal analysis, X.G.; investigation, X.G.; resources, S.L. (Shengping Liu); data curation, Y.E.; writing—original draft preparation, X.G.; writing—review and editing, X.G.; visualization, X.G.; supervision, S.L. (Shijuan Li); project administration, X.G. and S.L. (Shengping Liu); funding acquisition, Y.Z. and S.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Key Research and Development Program of China (No. 2022YFD2001004).

Data Availability Statement

The data used in this study are available upon request. We encourage interested researchers to contact us for further information.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Fensel, D.; Şimşek, U.; Angele, K.; Huaman, E.; Kärle, E.; Panasiuk, O.; Toma, I.; Umbrich, J.; Wahler, A. Introduction: What is a knowledge graph? In Knowledge Graphs: Methodology, Tools and Selected Use Cases; Springer: Berlin/Heidelberg, Germany, 2020; pp. 1–10. [Google Scholar]
  2. Acosta, M.; Zaveri, A.; Simperl, E.; Kontokostas, D.; Auer, S.; Lehmann, J. Crowdsourcing Linked Data Quality Assessment; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar] [CrossRef]
  3. Zou, X. A survey on application of knowledge graph. J. Phys. Conf. Ser. 2020, 1487, 012016. [Google Scholar] [CrossRef]
  4. Peng, Y.N. Development of A Corn Planting Management System Based on Knowledge Graph; Shandong Agricultural University: Tai’an, China, 2023. [Google Scholar]
  5. Xu, X.; Yue, J.Z.; Zhao, J.P.; Wang, Y.K.; Ma, X.M.; Qian, X.L. Construction and Visualization of Knowledge Map of Wheat Varieties. Comput. Syst. Appl. 2021, 30, 286–292. [Google Scholar] [CrossRef]
  6. Zhang, S.W.; Wang, Z.; Wang, Z.L. Prediction of wheat stripe rust disease by combining knowledge graph and bidirectional long short term memory network. Trans. Chin. Soc. Agric. Eng. 2020, 36, 172–178. [Google Scholar]
  7. Li, R.; Su, X.; Zhang, H.; Zhang, X.; Yao, Y.; Zhou, S.; Zhang, B.; Ye, M.; Lv, C. Integration of diffusion transformer and knowledge graph for efficient cucumber disease detection in agriculture. Plants 2024, 13, 2435. [Google Scholar] [CrossRef] [PubMed]
  8. Ge, W.; Zhou, J.; Zheng, P.; Yuan, L.; Rottok, L.T. A recommendation model of rice fertilization using knowledge graph and case-based reasoning. Comput. Electron. Agric. 2024. [Google Scholar] [CrossRef]
  9. Wang, J.L. Research on Knowledge Graph Fusion Method for Fields of Wheat Production; Henan Agricultural University: Zhengzhou, China, 2024. [Google Scholar] [CrossRef]
  10. Syed, M.; Al-Shukri, S.; Syed, S.; Sexton, K.; Greer, M.L.; Zozus, M.; Bhattacharyya, S.; Prior, F. DeIDNER Corpus: Annotation of clinical discharge summary notes for named entity recognition using brat tool. Med. Inform. Eur. Conf. 2021, 281, 432–436. [Google Scholar]
  11. Lu, G.; Liu, Y.; Wang, J.; Wu, H. CNN-BiLSTM-Attention: A multi-label neural classifier for short texts with a small set of labels. Inf. Process. Manag. 2023, 60, 103320. [Google Scholar] [CrossRef]
  12. Wang, C.Q.; Zhou, Y.H.; Zhang, S.X.; Yu, Y.H.; Yu, X.L. Aspect-opinion pair extraction of new energy vehicle complaint text based on context enhancement. J. Comput. Appl. 2024, 44, 2430–2436. [Google Scholar]
  13. Takanobu, R.; Zhang, T.; Liu, J.; Huang, M. A hierarchical framework for relation extraction with reinforcement learning. In Proceedings of the 33rd AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; pp. 7072–7079. [Google Scholar]
  14. Liu, J.; Chen, S.; Wang, B.; Zhang, J.; Li, N.; Xu, T. Attention as relation: Learning supervised multi-head self-attention for relation extraction. In Proceedings of the 29th International Joint Conference on Artificial Intelligence, Yokohama, Japan, 7–15 January 2021; pp. 3787–3793. [Google Scholar]
  15. Eberts, M.; Ulges, A. Span-based joint entity and relation extraction with transformer pre-training. In Proceedings of the 24th European Conference on Artificial Intelligence (ECAI), Santiago de Compostela, Spain, 29 August–8 September 2020; pp. 2006–2013. [Google Scholar]
  16. Tang, R.; Chen, Y.; Qin, Y.; Huang, R.; Zheng, Q. Boundary regression model for joint entity and relation extraction. Expert Syst. Appl. 2023, 229, 120441. [Google Scholar] [CrossRef]
  17. Zeng, X.; Zeng, D.; He, S.; Liu, K.; Zhao, J. Extracting relational facts by an end-to-end neural model with copy mechanism. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, Melbourne, Australia, 15–20 July 2018; pp. 506–514. [Google Scholar]
  18. Tapas, N.; Hwee, T.N. Effective modeling of encoder-decoder architecture for joint entity and relation extraction. CoRR 2019, 34, abs/1911.09886. [Google Scholar] [CrossRef]
  19. Lu, J.; Yang, W.; He, L.; Feng, Q.; Zhang, T.; Yang, S. A Method for Extracting Fine-Grained Knowledge of the Wheat Production Chain. Agronomy 2024, 14, 1903. [Google Scholar] [CrossRef]
  20. Huang, Q.; Tao, Y.; Wu, Z.; Marinello, F. Based on BERT-wwm for Agricultural Named Entity Recognition. Agronomy 2024, 14, 1217. [Google Scholar] [CrossRef]
  21. Cheng, J.R.; Liu, J.X.; Xu, X.B.; Xia, D.; Liu, L.; Sheng, V.S. A review of Chinese named entity recognition. KSII Trans. Internet Inf. Syst. 2021, 15, 2012–2030. [Google Scholar]
  22. Jiang, H.J. Slot Filling via Deep Learning; Zhejiang University: Hangzhou, China, 2017. [Google Scholar]
  23. Detroja, K.; Bhensdadia, C.K.; Bhatt, B.S. A survey on relation extraction. Intell. Syst. Appl. 2023, 19, 200244. [Google Scholar] [CrossRef]
  24. Wang, C.D.; Xu, J.; Zhang, Y. Survey of entity relation extraction. Comput. Eng. Appl. 2020, 56, 25–35. [Google Scholar]
Figure 1. Comparison between the proposed EntityDetectModel and previous methods.
Figure 1. Comparison between the proposed EntityDetectModel and previous methods.
Agronomy 15 00354 g001
Figure 2. Schema layer for wheat agronomy knowledge graph.
Figure 2. Schema layer for wheat agronomy knowledge graph.
Agronomy 15 00354 g002
Figure 3. Annotation process flowchart.
Figure 3. Annotation process flowchart.
Agronomy 15 00354 g003
Figure 4. EntityDetectModel’s network architecture diagram.
Figure 4. EntityDetectModel’s network architecture diagram.
Agronomy 15 00354 g004
Figure 5. Token local feature fusion network Fnet.
Figure 5. Token local feature fusion network Fnet.
Agronomy 15 00354 g005
Figure 6. Named entity length and offset.
Figure 6. Named entity length and offset.
Agronomy 15 00354 g006
Figure 7. Scalable text annotation system.
Figure 7. Scalable text annotation system.
Agronomy 15 00354 g007
Figure 8. Part of Gaoyou 2018 wheat variety agronomy knowledge graph display.
Figure 8. Part of Gaoyou 2018 wheat variety agronomy knowledge graph display.
Agronomy 15 00354 g008
Table 1. Performance analysis of different models in entity attribute extraction (%).
Table 1. Performance analysis of different models in entity attribute extraction (%).
ModelPrecRecF1
Reference [13]51.562.456.4
Reference [14]57.766.761.9
Reference [15]69.175.972.3
Reference [16]71.375.273.2
EntityDetectModel91.083.487.0
Table 2. Comparative analysis of recognition performance of different feature layers (%).
Table 2. Comparative analysis of recognition performance of different feature layers (%).
Feature Layer Used for PredictionPrecRecF1
The top-level single-layer feature52.345.748.8
The mid-level single-layer feature61.853.057.1
The bottom-level single-layer feature55.451.753.5
Non-fused three-layer features85.379.782.4
Fused three-layer features91.083.487.0
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Guo, X.; Zhu, Y.; Li, S.; Wu, S.; E, Y.; Liu, S. Research and Implementation of Agronomic Entity and Attribute Extraction Based on Target Localization. Agronomy 2025, 15, 354. https://doi.org/10.3390/agronomy15020354

AMA Style

Guo X, Zhu Y, Li S, Wu S, E Y, Liu S. Research and Implementation of Agronomic Entity and Attribute Extraction Based on Target Localization. Agronomy. 2025; 15(2):354. https://doi.org/10.3390/agronomy15020354

Chicago/Turabian Style

Guo, Xiuming, Yeping Zhu, Shijuan Li, Sheng Wu, Yue E, and Shengping Liu. 2025. "Research and Implementation of Agronomic Entity and Attribute Extraction Based on Target Localization" Agronomy 15, no. 2: 354. https://doi.org/10.3390/agronomy15020354

APA Style

Guo, X., Zhu, Y., Li, S., Wu, S., E, Y., & Liu, S. (2025). Research and Implementation of Agronomic Entity and Attribute Extraction Based on Target Localization. Agronomy, 15(2), 354. https://doi.org/10.3390/agronomy15020354

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop