Agricultural knowledge graph data expansion and correction method and system

By using word frequency calculation model and fluctuation calculation model in the agricultural knowledge graph, the problems of inefficiency and disordered sorting in the process of data expansion and correction are solved, the comprehensiveness and accuracy of data expansion are achieved, and agricultural production efficiency and agricultural scientific and technological innovation are improved.

CN119557459AActive Publication Date: 2025-03-04AGRI INFORMATION & RURAL ECONOMIC INST SICHUAN ACAD OF AGRI SCI

Patent Information

Application Number
CN202510100782.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-03-04
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The agricultural knowledge graph has problems such as inefficiency, data redundancy and irrelevance in the process of data expansion and correction, and the categories to be expanded are chaotic, affecting user retrieval and user experience.

Method used

The method based on word frequency calculation model and fluctuation calculation model is adopted to calculate the word frequency indicators of various categories of words and sort them, identify significant fluctuations in the word frequency sequence, filter the word frequency indicators to be processed, and formulate expansion strategies based on the second threshold to correct the location of the data set to improve the comprehensiveness and accuracy of data expansion.

Benefits of technology

It improves the comprehensiveness and accuracy of data expansion, avoids the introduction of redundant and irrelevant data, enables new data sets to be integrated into relevant categories in the knowledge graph more quickly, improves agricultural production efficiency and agricultural scientific and technological innovation, and provides strong support for agricultural knowledge management and services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557459A_ABST
    Figure CN119557459A_ABST
Patent Text Reader

Abstract

The invention discloses an agricultural knowledge graph data expansion and correction method and system, and relates to the technical field of data processing, and the method comprises the steps: obtaining a to-be-expanded category, extracting category words, and obtaining a new data set which comprises text data; obtaining a word frequency index corresponding to each category word, and obtaining a word frequency sequence; obtaining a decline degree index, and judging whether a decline degree index greater than a first threshold exists or not; if the decline degree index greater than the first threshold value does not exist, sequentially adding the newly-added data set into a plurality of different to-be-expanded categories, and correcting the position of the newly-added data set; if the decline degree index greater than the first threshold exists, taking adjacent word frequency indexes corresponding to the decline degree index as two word frequency indexes to be processed; and judging whether the to-be-processed word frequency index is smaller than a second threshold value or not, and obtaining an expansion strategy according to a judgment result. The method has the advantages of sequential transmission, high transmission efficiency, good stability and dynamic correction and adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for expanding and correcting agricultural knowledge graph data. Background Art

[0002] With the rapid development of agricultural informatization, the construction and updating of agricultural knowledge graphs, as an important carrier of agricultural knowledge management and services, are of great significance for improving agricultural production efficiency and promoting agricultural scientific and technological innovation. However, the operation and maintenance of agricultural knowledge graphs, especially their expansion and revision, face many technical challenges and practical difficulties.

[0003] Traditional agricultural knowledge graph data expansion methods mostly rely on manual screening and manual addition. This process is not only inefficient, but also easily affected by subjective factors, making it difficult to ensure the comprehensiveness and accuracy of data expansion. With the continuous emergence of new knowledge in the agricultural field, some automated expansion methods have emerged, but these methods often lack a sophisticated screening mechanism, which can easily lead to redundancy and irrelevance of the expanded data, thereby affecting the overall quality and application value of the knowledge graph. How to quickly and accurately integrate this new knowledge into the existing knowledge graph has become a key issue that needs to be solved urgently; at the same time, the sorting of categories to be expanded in the agricultural knowledge graph has an important impact on user retrieval and use of knowledge. Traditional sorting methods may lack scientific basis and dynamic adjustment mechanism, resulting in chaotic category sorting, making it difficult for users to quickly locate the required information, reducing the practicality and user experience of the knowledge graph. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a method and system for expanding and correcting agricultural knowledge graph data.

[0005] A method for expanding and correcting agricultural knowledge graph data comprises: obtaining a plurality of different categories to be expanded based on the agricultural knowledge graph and extracting category words corresponding to the categories to be expanded, and obtaining a newly added data set, wherein the newly added data set includes text data; obtaining a word frequency index corresponding to each category word based on a word frequency calculation model and the newly added data set, and sorting the plurality of word frequency indexes in a descending order to obtain a word frequency sequence; obtaining a decrease degree index of adjacent word frequency indexes in the word frequency sequence based on a fluctuation calculation model and the word frequency sequence, and judging whether there is a decrease degree index greater than a first threshold; if there is no decrease degree index greater than the first threshold, adding the newly added data set to a plurality of different categories to be expanded in sequence, and correcting the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded; if there is a decrease degree index greater than the first threshold, selecting the first decrease degree index greater than the first threshold in the order of the word frequency sequence and taking the adjacent word frequency index corresponding to the decrease degree index as two word frequency indexes to be processed; judging whether the word frequency index to be processed is less than a second threshold, obtaining an expansion strategy according to the judgment result, and correcting the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded.

[0006] Optionally, obtaining an expansion strategy based on the judgment result includes: if the word frequency index to be processed is less than a second threshold, obtaining all word frequency indicators before the word frequency index to be processed in the word frequency sequence, and finding the corresponding category to be expanded based on the category words corresponding to the obtained word frequency indicators, and adding the newly added data sets to the obtained categories to be expanded in sequence.

[0007] Optionally, obtaining an expansion strategy based on the judgment result also includes: if the word frequency index to be processed is not less than a second threshold, then selecting a second decrease degree index greater than the first threshold in the order of the word frequency sequence and using the adjacent word frequency indicators corresponding to the decrease degree index as two new word frequency indicators to be processed, and continuing to judge whether the new word frequency index to be processed is less than the second threshold.

[0008] Optionally, the word frequency index corresponding to each category word is obtained based on the word frequency calculation model and the newly added data set as follows: ;in, is the word frequency index corresponding to the i-th category word, is the number of occurrences of the i-th category word in the text data of the newly added dataset, The total number of words in the text data of the newly added dataset.

[0009] Optionally, obtaining a decrease degree indicator of adjacent word frequency indicators in a word frequency sequence based on a fluctuation calculation model and a word frequency sequence includes: obtaining the i-th word frequency indicator and the i+1-th word frequency indicator in the word frequency sequence; obtaining a decrease value based on the i-th word frequency indicator and the i+1-th word frequency indicator; and obtaining a decrease degree indicator based on the decrease value and the i-th word frequency indicator.

[0010] Optionally, obtaining a decrease degree indicator according to the decrease value and the i-th word frequency indicator includes: ;in, is the decrease degree index of the i-th word frequency index and the i+1-th word frequency index, is the i-th word frequency index, is the i+1th word frequency index.

[0011] Optionally, correcting the position of the newly added dataset according to the word frequency index size of the newly added dataset under the category to be expanded includes: obtaining the correlation between the position range of the current category to be expanded and the word frequency index based on the agricultural knowledge graph; obtaining the position range to be corrected of the newly added dataset in the current category to be expanded according to the correlation relationship and the word frequency index of the newly added dataset, and correcting the position of the newly added dataset according to the position range to be corrected.

[0012] Optionally, the system includes: an acquisition module, which is used to acquire multiple different categories to be expanded based on the agricultural knowledge graph and extract category words corresponding to the categories to be expanded, and acquire a new data set, wherein the new data set includes text data; a calculation module, which is used to acquire the word frequency index corresponding to each category word based on the word frequency calculation model and the new data set, and sort the multiple word frequency indicators in order from large to small and acquire a word frequency sequence; a calculation and judgment module, which is used to acquire the decline degree index of adjacent word frequency indicators in the word frequency sequence based on the fluctuation calculation model and the word frequency sequence, and judge whether there is a decline degree index greater than a first threshold; a first judgment execution module, which is used to execute the judgment when there is no decline degree index greater than the first threshold. When a degree of decrease index is to be processed, the newly added data set is sequentially added to a plurality of different categories to be expanded, and the position of the newly added data set is corrected according to the word frequency index size of the newly added data set under the category to be expanded; the second judgment execution module is used for, when there is a degree of decrease index greater than the first threshold, filtering out the first degree of decrease index greater than the first threshold in the order of the word frequency sequence and taking the adjacent word frequency indicators corresponding to the degree of decrease index as two word frequency indicators to be processed; the third judgment execution module is used for judging whether the word frequency indicator to be processed is less than the second threshold, obtaining the expansion strategy according to the judgment result, and correcting the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded.

[0013] Optionally, the third judgment execution module is also used to: if the word frequency index to be processed is less than the second threshold, then obtain all the word frequency indicators before the word frequency index to be processed in the word frequency sequence, and find the corresponding category to be expanded according to the category word corresponding to the obtained word frequency indicator, and add the newly added data set to the obtained category to be expanded in sequence.

[0014] Optionally, the third judgment execution module is also used for: if the word frequency index to be processed is not less than the second threshold, then filtering out a second decrease degree index greater than the first threshold in the order of the word frequency sequence and using the adjacent word frequency indicators corresponding to the decrease degree index as two new word frequency indicators to be processed, and continuing to judge whether the new word frequency index to be processed is less than the second threshold.

[0015] The beneficial effects of the present invention are embodied in: In the entire agricultural knowledge graph data expansion and correction method, the word frequency index of each category of words is first calculated based on the newly added data set, and sorted to form a word frequency sequence. Then, the significant fluctuation points in the word frequency sequence are identified through the fluctuation calculation model, and the word frequency index to be processed is screened out accordingly; further, the second threshold is used to further subdivide the importance of the word frequency index to be processed, so as to formulate a more reasonable expansion strategy, improve the comprehensiveness and accuracy of data expansion, avoid the introduction of redundant and irrelevant data, and enable the newly added data set to be integrated into the relevant categories in the knowledge graph more quickly. At the same time, it ensures that these categories are arranged in order according to the correlation with the newly added data set, thereby improving agricultural production efficiency, promoting agricultural scientific and technological innovation, and providing strong support for agricultural knowledge management and services. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.

[0017] Figure 1 A schematic diagram of the steps of the agricultural knowledge graph data expansion and correction method of the present invention; Figure 2 It is a schematic diagram of some steps of S6 in the method for expanding and correcting agricultural knowledge graph data of the present invention; Figure 3 It is a schematic diagram of some steps of S3 in the method for expanding and correcting agricultural knowledge graph data of the present invention; Figure 4 This is a schematic diagram of some steps of S4 in the agricultural knowledge graph data expansion and correction method of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0019] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. In addition, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0021] like Figure 1 As shown, a method for expanding and correcting agricultural knowledge graph data is provided, including: S1. Based on the agricultural knowledge graph, a plurality of different categories to be expanded are obtained, and the category words corresponding to the categories to be expanded are extracted, and a new data set is obtained, wherein the new data set includes text data; S2. Obtain the word frequency index corresponding to each category word based on the word frequency calculation model and the newly added data set, and sort the multiple word frequency indexes in order from large to small to obtain a word frequency sequence; S3, obtaining a decrease degree index of adjacent word frequency indexes in the word frequency sequence based on the fluctuation calculation model and the word frequency sequence, and determining whether there is a decrease degree index greater than a first threshold; S4. If there is no decrease degree index greater than the first threshold, the newly added data set is sequentially added to a plurality of different categories to be expanded, and the position of the newly added data set is corrected according to the word frequency index size of the newly added data set under the category to be expanded; S5. If there is a decrease degree index greater than the first threshold, the first decrease degree index greater than the first threshold is selected in the order of the word frequency sequence and the adjacent word frequency indexes corresponding to the decrease degree index are used as two word frequency indexes to be processed; S6. Determine whether the word frequency index to be processed is less than a second threshold, obtain an expansion strategy according to the determination result, and correct the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded.

[0022] In this embodiment, it should be noted that in S1, it is first necessary to identify and extract multiple different categories to be expanded from the constructed agricultural knowledge graph. These categories to be expanded are pre-defined in the knowledge graph and are used to classify and organize various knowledge and information in the agricultural field. For example, the categories to be expanded may include "rice planting technology", "pest control", "agricultural machinery and equipment", etc. Each category to be expanded corresponds to a category word, such as the category word of "rice planting technology" is "rice planting". By traversing the hierarchical structure and node information of the knowledge graph, these categories to be expanded can be automatically identified, and the foundation for subsequent data expansion and correction work can be laid.

[0023] Next, it is necessary to obtain the new data set and use it as the raw material for data expansion and correction. The new data set can come from a variety of channels, such as the latest research results released by agricultural research institutions, the empirical data accumulated in agricultural production practices, and the updates of agricultural policies and regulations. These data sets usually exist in the form of text data and contain rich agricultural knowledge and information. After obtaining the new data set, it needs to be preprocessed, including deduplication, cleaning, formatting and other operations. At the same time, it is also necessary to extract the category words related to the category to be expanded from the new data set. These category words are the key link between the new data set and the category to be expanded. For example, if the new data set contains an article about "new rice planting technology", then the category word "rice planting" needs to be extracted from it so that it can be associated and expanded with the "rice planting technology" category in the knowledge graph later.

[0024] In S2, the word frequency calculation model is needed to process the newly added data set and calculate the word frequency index corresponding to each category word. The word frequency calculation model is a model based on text data analysis, which can count the frequency of specific words in the text, thereby reflecting the relevance of the word to the text data. In S2, the number of times each category word appears in the newly added data set is then counted, that is, the word frequency index corresponding to each category word. For example, the category words corresponding to the categories to be expanded in S1 include "rice planting", "pest control", and "agricultural machinery". In the newly added data set, the word frequency of "rice planting" is relatively high, followed by "pest control", and "agricultural machinery" is the least. According to the size of the word frequency, the word frequency indicators of multiple category words are sorted to form a word frequency sequence from large to small. This sequence reflects the importance and relevance of each category word in the newly added data set.

[0025] Assume that the number of occurrences of each category word is counted in the newly added data set. The result shows that the frequency index of the word "rice planting" in the text data is 0.03; the frequency index of the word "pest control" in the text data is 0.01; and the frequency index of the word "agricultural machinery" in the text data is 0.005. Then, based on these frequency data, the three category words "rice planting", "pest control" and "agricultural machinery" are arranged in descending order of frequency to form a frequency sequence.

[0026] In S3, it is necessary to further analyze the fluctuation of adjacent word frequency indicators in the word frequency sequence based on the fluctuation calculation model and the word frequency sequence that has been obtained. The fluctuation calculation model is a tool for quantifying the degree of difference between adjacent elements in a data sequence. Here, it is used to evaluate the decline degree index of adjacent word frequency indicators. The specific operation is to calculate the difference between each pair of adjacent word frequency indicators in the word frequency sequence, and then obtain the decline degree index reflecting the change range of the word frequency indicator from one category to the next category through these differences. Then, compare these differences with the preset first threshold to determine whether there is a significant fluctuation. The first threshold is a critical value determined by experience or statistical methods, which is used to distinguish normal word frequency changes from significant fluctuations.

[0027] For example, suppose the word frequency sequence is "rice planting" (0.03), "pest control" (0.01), and "agricultural machinery" (0.005), and the differences of adjacent word frequency indicators are 0.03-0.01=0.02 and 0.01-0.005=0.005 respectively. If the preset first threshold is 0.001, then the first difference 0.02 and the second difference 0.005 are both greater than the first threshold, indicating that there is a significant fluctuation in the word frequency indicators between "rice planting" and "pest control", and there is also a significant fluctuation in the word frequency indicators between "pest control" and "agricultural machinery". In this case, it is considered that the correlation between the newly added data set and the "rice planting" category is significantly higher than that of the "pest control" category, so different expansion strategies may be needed to handle these two categories. On the contrary, if the differences of all adjacent word frequency indicators are less than the first threshold, it is considered that the correlation between the newly added data set and all the categories to be expanded is relatively uniform, or the difference is not enough to serve as a basis for classification.

[0028] In S4, based on the previous fluctuation analysis results, if it is determined that there is no decline degree indicator greater than the first threshold, that is, the fluctuations of adjacent word frequency indicators in the word frequency sequence are kept within the normal range, this indicates that the correlation between the new data set and all categories to be expanded is relatively uniform, without obvious preference or significant difference. At this time, a comprehensive expansion strategy will be adopted to add the new data set to multiple different categories to be expanded in turn. During the adding process, the position of the new data set will be corrected according to the size of the word frequency indicator of the new data set under the category to be expanded, ensuring that categories with higher word frequency indicators can give priority to displaying relevant new data. Doing so not only ensures the comprehensiveness of data expansion, but also improves the retrieval efficiency and user experience of the knowledge graph through word frequency sorting.

[0029] For example, suppose that the word frequency sequence analyzed in S3 is "rice planting" (such as 0.03), "pest control" (such as 0.028), and "agricultural machinery" (such as 0.027), and the difference between adjacent word frequency indicators does not exceed the preset first threshold (such as 0.002). This means that the correlation between the newly added data set and the three categories to be expanded, "rice planting", "pest control" and "agricultural machinery" is relatively close, without significant fluctuations. Therefore, in step S4, the newly added data set will be fully expanded to these three categories. At the same time, according to the size of the word frequency index, it will ensure that the newly added data set under the "rice planting" category is relatively advanced, followed by "pest control" and finally "agricultural machinery". In this way, when users search or browse related knowledge, they can first see the newly added content most related to "rice planting", thereby improving the practicality and user satisfaction of the knowledge graph.

[0030] In S5, the fluctuation calculation model has been used to determine that there is a decline degree index greater than the first threshold in the word frequency sequence, which means that the correlation between the newly added data set and some categories to be expanded is significantly higher than that of other categories. Therefore, it is necessary to screen out the first decline degree index greater than the first threshold in the order of the word frequency sequence, and use the adjacent word frequency index corresponding to the decline degree index as two word frequency indicators to be processed. Assume that the word frequency sequence is "rice planting" (0.03), "pest control" (0.01), and "agricultural machinery" (0.005), and the preset first threshold is 0.015. Calculate the difference between adjacent word frequency indicators and find that the difference from "rice planting" to "pest control" is 0.02 (greater than the first threshold), while the difference from "pest control" to "agricultural machinery" is 0.005 (less than the first threshold). At this time, the first decline degree index greater than the first threshold, that is, 0.02, will be screened out, and the word frequency indicators corresponding to the two category words "rice planting" and "pest control" will be used as word frequency indicators to be processed.

[0031] In S6, the introduction of the second threshold is indeed to help more finely judge the importance of the word frequency index to be processed and the word frequency index after it, and to formulate a more reasonable expansion strategy accordingly. Specifically, the second threshold here plays the role of a "screening threshold". After the word frequency index to be processed is determined, it will be checked whether these indicators are all less than the second threshold. If the word frequency index to be processed is all less than the second threshold, this usually means that in the word frequency sequence, starting from the word frequency index to be processed, the subsequent word frequency indicators are also relatively small, that is, the correlation between the newly added data set and these subsequent categories is not strong. Therefore, it may be decided not to consider these subsequent categories, but to focus on the categories associated with the word frequency index to be processed, and a relatively conservative expansion strategy will be adopted, such as expanding with a lower priority or in a small range. On the contrary, if any one or two of the word frequency indicators to be processed are greater than or equal to the second threshold, this indicates that the correlation between the new data set and these categories is not only significantly higher than other categories, but also reaches a higher level. At this time, a more active expansion strategy may be adopted, such as adding the new data set to these categories with a higher priority, and considering further screening subsequent word frequency indicators in the word frequency sequence so as to add the new data set to more relevant categories. This can ensure the comprehensiveness and accuracy of the knowledge graph, while improving the efficiency of users' retrieval and use of knowledge.

[0032] In summary, in the entire agricultural knowledge graph data expansion and correction method, first, the word frequency index of each category of words is calculated based on the newly added data set, and the word frequency sequence is formed by sorting, and then the significant fluctuation points in the word frequency sequence are identified through the fluctuation calculation model, and the word frequency index to be processed is screened out accordingly; further, the importance of the word frequency index to be processed is further subdivided by the second threshold, so as to formulate a more reasonable expansion strategy, improve the comprehensiveness and accuracy of data expansion, avoid the introduction of redundant and irrelevant data, and enable the newly added data set to be integrated into the relevant categories in the knowledge graph more quickly, while ensuring that these categories are arranged in order according to the degree of relevance to the newly added data set, thereby improving agricultural production efficiency, promoting agricultural scientific and technological innovation, and providing strong support for agricultural knowledge management and services.

[0033] like Figure 2 As shown, in one embodiment, obtaining the expansion strategy according to the judgment result in S6 includes: S61. If the word frequency index to be processed is less than the second threshold, all word frequency indexes before the word frequency index to be processed in the word frequency sequence are obtained, and the corresponding category to be expanded is found according to the category words corresponding to the obtained word frequency indexes, and the newly added data sets are added to the obtained categories to be expanded in sequence.

[0034] In this embodiment, it should be noted that in S61, the word frequency index to be processed identified in S6 will be further analyzed in detail. When the word frequency index to be processed is less than the second threshold, this usually means that starting from the word frequency index to be processed, the values ​​of subsequent word frequency indicators in the word frequency sequence are relatively small, reflecting that the correlation between the newly added data set and these subsequent categories is not strong, and then the word frequency sequence will be traced back to obtain all the word frequency indicators before the word frequency index to be processed. The category words corresponding to these word frequency indicators actually represent the categories to be expanded that are most correlated with the newly added data set. Subsequently, the corresponding categories to be expanded in the agricultural knowledge graph will be found based on these category words, and the newly added data set will be added to these screened categories to be expanded that have a high correlation with the newly added data set.

[0035] Assume that "rice planting" (word frequency index 0.03) and "pest control" (word frequency index 0.01) have been determined as the word frequency indicators to be processed, and the second threshold is set to 0.015. If the word frequency index of "pest control" is less than the second threshold, then in step S61, the word frequency sequence will be traced back to obtain all the word frequency indicators before the word frequency indicator "rice planting" to be processed. In this example, since "rice planting" is the first word frequency indicator in the word frequency sequence, the word frequency indicator obtained is "rice planting". Next, according to the category word "rice planting", the corresponding "rice planting technology" to be expanded category will be found in the agricultural knowledge graph, and the new data set will be added to the category to be expanded that has a high correlation with the new data set. In this way, it can ensure that the new data set is accurately integrated into the relevant categories in the knowledge graph, avoiding the introduction of redundant and irrelevant data, and improving the accuracy and efficiency of data expansion.

[0036] like Figure 2 As shown, in one embodiment, obtaining the expansion strategy according to the judgment result in S6 also includes: S62. If the word frequency index to be processed is not less than the second threshold, a second decrease degree index greater than the first threshold is selected in the order of the word frequency sequence and the adjacent word frequency indexes corresponding to the decrease degree index are used as two new word frequency indexes to be processed, and it is further determined whether the new word frequency index to be processed is less than the second threshold.

[0037] In this embodiment, it should be noted that in S62, when it is determined that the word frequency index to be processed is not less than the preset second threshold, it will be examined one by one according to the word frequency sequence (that is, the order in which each keyword is arranged from high to low or from low to high according to the frequency of occurrence) to find the second indicator whose degree of decline exceeds the first threshold. Once such a degree of decline indicator is found, the indicator and its next adjacent word frequency indicator (that is, the word frequency after the decline) will be jointly marked as the new word frequency indicator to be processed. Subsequently, it will be evaluated again whether the two new word frequency indicators to be processed are still not less than the second threshold. If so, iterative screening will continue according to the above logic until a pair of word frequency indicators that meet the conditions is found, or the word frequency sequence is completely traversed. This can ensure that the newly added data set is integrated into more relevant categories in the knowledge graph that meet the requirements, and even if there are large fluctuations in adjacent word frequency indicators, it will not cause expansion omissions of the newly added data set.

[0038] Taking actual operation as an example, suppose that in a text analysis task, the word frequency sequence is [50, 45, 15, 10, 8], the first threshold is set to 20, and the second threshold is set to 10. Initially, the word frequency index to be processed is 50 (assuming it is the first value in the sequence). Because 50 is much larger than the second threshold 10, step S62 is entered. First, it is found that the degree of decrease from 45 to 15 (30) exceeds the first threshold 20, so 15 and the subsequent 10 are used as new word frequency indicators to be processed. Next, it is determined whether the two new indicators (15 and 10) are not less than the second threshold 10. It is found that both conditions are met, but because the degree of decrease from 10 to 8 (2) does not exceed the first threshold, the iteration stops. At this time, 50, 45, 15 and 10 are selected as the basis to find the category words and categories to be expanded corresponding to these word frequency indicators, which not only reflect a significant decrease in word frequency, but also meet the condition of not less than the second threshold.

[0039] In one embodiment, the word frequency index corresponding to each category word is obtained based on the word frequency calculation model and the newly added data set in S2 and is expressed as: ;in, is the word frequency index corresponding to the i-th category word, is the number of occurrences of the i-th category word in the text data of the newly added dataset, The total number of words in the text data of the newly added dataset.

[0040] In this embodiment, it should be noted that the expression used to quantify the number of occurrences of each classifier in the newly added data set defines how to calculate the frequency index of the i-th classifier. is the frequency index of the i-th category word, which reflects the relative frequency of the word in the newly added data set; It is the number of times the i-th category word actually appears in the text data of the newly added dataset. It is an absolute value, indicating the specific occurrence of the word in the dataset. N is the total number of words in the text data of the newly added dataset, that is, the number of all words in the dataset. It is a denominator used for normalization to ensure that the word frequency index is comparable between datasets of different sizes.

[0041] Assume that the new data set contains 1,000 words, of which "machine learning" appears 50 times and "artificial intelligence" appears 30 times. =0.05; for “artificial intelligence”, =0.03.

[0042] That is to say, in the newly added data set, the word frequency index of "machine learning" is 0.05, while the word frequency index of "artificial intelligence" is 0.03.

[0043] like Figure 3 As shown, in one embodiment, obtaining the decrease degree index of the adjacent word frequency index in the word frequency sequence based on the fluctuation calculation model and the word frequency sequence in S3 includes: S31, obtaining the i-th word frequency index and the i+1-th word frequency index in the word frequency sequence; S32, obtaining a decrease value according to the i-th word frequency index and the i+1-th word frequency index; S33. Obtain a decrease degree index according to the decrease value and the i-th word frequency index.

[0044] In this embodiment, it should be noted that in S31, first, it is necessary to obtain two adjacent word frequency indicators, i.e., the i-th word frequency indicator and the i+1-th word frequency indicator, from the word frequency sequence that has been sorted according to the word frequency size in the order of the sequence. Here, i is a variable, which starts from 1 and increases one by one until the entire word frequency sequence is traversed. In each iteration, the current two adjacent word frequency indicators are recorded to prepare for the subsequent calculation of the decrease degree indicator. If the word frequency sequence is [0.03, 0.01, 0.005], then in the first iteration, the i-th word frequency indicator is 0.03, and the i+1-th word frequency indicator is 0.01.

[0045] In S32, the decline value between the i-th word frequency index and the i+1-th word frequency index obtained in step S31 is calculated. The decline value is calculated by directly subtracting the i+1-th word frequency index from the i-th word frequency index, that is, decline value = i-th word frequency index - i+1-th word frequency index. This decline value reflects the change in the word frequency index from the i-th category word to the i+1-th category word, that is, the difference in the correlation between the new data set and the two category words. Continuing with the above example, the decline value is 0.03-0.01=0.02.

[0046] In S33, the decline degree index is jointly determined based on the decline value calculated in step S32 and the i-th word frequency index. The calculation method of the decline degree index can be diverse, but the core idea is to compare or normalize the decline value with the i-th word frequency index in some form so as to obtain an index that can reflect the decline degree relative to the size of the i-th word frequency index. This is done to make the decline degree index comparable between different word frequency sequences. One possible calculation method is to divide the decline value by the i-th word frequency index, that is, the decline degree index = decline value / i-th word frequency index. In this way, if the decline value is larger than the i-th word frequency index, then the decline degree index will also be larger, otherwise it will be smaller. Continuing with the above example, if this calculation method is used, the decline degree index is 0.02 / 0.03≈0.67, indicating that the decline degree of the word frequency index from "rice planting" to "pest control" is about 67%.

[0047] In one embodiment, obtaining the decline degree indicator according to the decline value and the i-th word frequency indicator in S33 includes: ;in, is the decrease degree index of the i-th word frequency index and the i+1-th word frequency index, is the i-th word frequency index, is the i+1th word frequency index.

[0048] In this embodiment, it should be noted that this expression quantifies the degree of decline by calculating the difference between two adjacent word frequency index values, that is, the decline value, and dividing it by the previous word frequency index. is a value between 0 and 1 (TF(i)>TF(i+1), because the entire word frequency sequence sorts multiple word frequency indicators from large to small), indicating the relative decrease ratio from the i-th word frequency indicator to the i+1-th word frequency indicator.

[0049] like Figure 4 As shown, in one embodiment, the step of correcting the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded in S4 includes: S41, in which the correlation between the position range of the current category to be expanded and the word frequency index is obtained based on the agricultural knowledge graph; S42, obtaining a position range of the newly added data set in the current category to be expanded to be corrected according to the association relationship and the word frequency index of the newly added data set, and correcting the position of the newly added data set according to the position range to be corrected.

[0050] In this embodiment, it should be noted that in S41, it is necessary to obtain the correlation between the position range of the current category to be expanded and the word frequency index based on the agricultural knowledge graph. The core of this step is to understand the organizational structure of each category in the knowledge graph and the relative importance between them. The agricultural knowledge graph is a hierarchical or mesh structure, which contains a large amount of agricultural field knowledge. These knowledge are organized into different categories, and each category has its specific position range in the graph. By analyzing the structure of the knowledge graph and existing data, a mapping relationship between the category position range and the word frequency index can be established. This relationship may be expressed as a function or rule, which describes how the word frequency index affects the position of the category in the knowledge graph. For example, categories with higher word frequency indicators may be placed in a more core or prominent position of the graph, while categories with lower word frequency indicators may be located at the edge of the graph or a less important position. Through such an association relationship, the fit between the newly added data set and the existing knowledge graph can be more accurately understood, providing a basis for subsequent position corrections.

[0051] In S42, the position range to be corrected of the newly added data set in the current category to be expanded is obtained based on the association relationship established in the previous step and the word frequency index of the newly added data set. Specifically, the word frequency index of the newly added data set will be substituted into the previously established association relationship, and the position range where the newly added data set should be in the knowledge graph will be obtained by calculation. This position range may be a specific coordinate range, or it may be a relative position description, such as "located under a subcategory of a category" or "adjacent to a category." After obtaining the position range to be corrected, the actual position of the newly added data set in the knowledge graph will be corrected according to this position range. This may include moving the newly added data set to a more appropriate position, adjusting its relationship with surrounding categories, or adding appropriate labels and descriptions to it. Through such corrections, it can ensure that the newly added data set is accurately integrated into the knowledge graph, forming effective associations and complementarities with existing knowledge, thereby improving the integrity and accuracy of the knowledge graph.

[0052] An agricultural knowledge graph data expansion and correction system is also provided, the system comprising: An acquisition module, used to acquire a plurality of different categories to be expanded based on the agricultural knowledge graph and extract the category words corresponding to the categories to be expanded, and acquire a newly added data set, wherein the newly added data set includes text data; A calculation module is used to obtain the word frequency index corresponding to each category word based on the word frequency calculation model and the newly added data set, and sort the multiple word frequency indexes in order from large to small to obtain the word frequency sequence; A calculation and judgment module, used to obtain a decrease degree index of adjacent word frequency indexes in a word frequency sequence based on a fluctuation calculation model and a word frequency sequence, and to judge whether there is a decrease degree index greater than a first threshold; A first judgment execution module is used to add the newly added data set to a plurality of different categories to be expanded in sequence when there is no decrease degree index greater than the first threshold, and to correct the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded; The second judgment execution module is used for, when there is a decrease degree indicator greater than the first threshold, screening out the first decrease degree indicator greater than the first threshold in the order of the word frequency sequence and taking the adjacent word frequency indicators corresponding to the decrease degree indicator as two word frequency indicators to be processed; The third judgment execution module is used to judge whether the word frequency index to be processed is less than the second threshold, and obtain the expansion strategy according to the judgment result, and correct the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded.

[0053] In one embodiment, the third judgment execution module is also used to: if the word frequency index to be processed is less than the second threshold, then obtain all the word frequency indicators before the word frequency index to be processed in the word frequency sequence, and find the corresponding category to be expanded according to the category words corresponding to the obtained word frequency indicators, and add the newly added data sets to the obtained categories to be expanded in sequence.

[0054] In one embodiment, the third judgment execution module is also used for: if the word frequency index to be processed is not less than the second threshold, then filtering out a second decrease degree index greater than the first threshold in the order of the word frequency sequence and using the adjacent word frequency indicators corresponding to the decrease degree index as two new word frequency indicators to be processed, and continuing to judge whether the new word frequency index to be processed is less than the second threshold.

[0055] In this embodiment, it should be noted that, regarding the above-mentioned agricultural knowledge graph data expansion and correction system, the specific method of performing the operation has been described in detail in the implementation method of the agricultural knowledge graph data expansion and correction method, and will not be elaborated here.

[0056] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0057] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0058] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.

Claims

1. A method for expanding and correcting agricultural knowledge graph data, characterized in that: include: Based on the agricultural knowledge graph, a plurality of different categories to be expanded are obtained, and category words corresponding to the categories to be expanded are extracted, and a new data set is obtained, wherein the new data set includes text data; Based on the word frequency calculation model and the newly added data set, the word frequency index corresponding to each category word is obtained, and multiple word frequency indexes are sorted in descending order to obtain the word frequency sequence; Obtaining a decrease degree index of adjacent word frequency indexes in the word frequency sequence based on the fluctuation calculation model and the word frequency sequence, and determining whether there is a decrease degree index greater than a first threshold; If there is no decrease degree index greater than the first threshold, the newly added data set is sequentially added to a plurality of different categories to be expanded, and the position of the newly added data set is corrected according to the word frequency index size of the newly added data set under the category to be expanded; If there is a decrease degree index greater than the first threshold, the first decrease degree index greater than the first threshold is selected in the order of the word frequency sequence and the adjacent word frequency indexes corresponding to the decrease degree index are used as two word frequency indexes to be processed; It is determined whether the word frequency index to be processed is less than the second threshold, and an expansion strategy is obtained according to the determination result, and the position of the newly added data set is corrected according to the word frequency index size of the newly added data set under the category to be expanded.

2. The agricultural knowledge graph data expansion and correction method according to claim 1, characterized in that: The obtaining of the expansion strategy according to the judgment result includes: If the word frequency index to be processed is less than the second threshold, all word frequency indexes before the word frequency index to be processed in the word frequency sequence are obtained, and the corresponding category to be expanded is found according to the category words corresponding to the obtained word frequency index, and the newly added data sets are added to the obtained category to be expanded in sequence.

3. The agricultural knowledge graph data expansion and correction method according to claim 2, characterized in that: The obtaining of the expansion strategy according to the judgment result further includes: If the word frequency index to be processed is not less than the second threshold, the second decrease degree index greater than the first threshold is selected in the order of the word frequency sequence and the adjacent word frequency indicators corresponding to the decrease degree index are used as two new word frequency indicators to be processed, and the new word frequency indicators to be processed are further judged whether they are less than the second threshold.

4. The agricultural knowledge graph data expansion and correction method according to claim 1, characterized in that: The word frequency index corresponding to each category word obtained based on the word frequency calculation model and the newly added data set is expressed as: ;in, is the word frequency index corresponding to the i-th category word, is the number of occurrences of the i-th category word in the text data of the newly added dataset, The total number of words in the text data of the newly added dataset.

5. The agricultural knowledge graph data expansion and correction method according to claim 4, characterized in that: The method of obtaining the decrease degree index of the adjacent word frequency index in the word frequency sequence based on the fluctuation calculation model and the word frequency sequence includes: Get the i-th word frequency index and the i+1-th word frequency index in the word frequency sequence; Obtain the decrease value according to the i-th word frequency index and the i+1-th word frequency index; Obtain the decline degree index based on the decline value and the i-th word frequency index.

6. The agricultural knowledge graph data expansion and correction method according to claim 5, characterized in that: The step of obtaining the decline degree index according to the decline value and the i-th word frequency index includes: ;in, is the decrease degree index of the i-th word frequency index and the i+1-th word frequency index, is the i-th word frequency index, is the i+1th word frequency index.

7. The agricultural knowledge graph data expansion and correction method according to claim 1, characterized in that: The step of correcting the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded includes: Based on the agricultural knowledge graph, the correlation between the location range of the current category to be expanded and the word frequency index is obtained; The position range of the newly added data set to be corrected in the current category to be expanded is obtained according to the association relationship and the word frequency index of the newly added data set, and the position of the newly added data set is corrected according to the position range to be corrected.

8. An agricultural knowledge graph data expansion and correction system, characterized in that: The system comprises: An acquisition module, used to acquire a plurality of different categories to be expanded based on the agricultural knowledge graph and extract the category words corresponding to the categories to be expanded, and acquire a newly added data set, wherein the newly added data set includes text data; A calculation module is used to obtain the word frequency index corresponding to each category word based on the word frequency calculation model and the newly added data set, and sort the multiple word frequency indexes in order from large to small to obtain the word frequency sequence; A calculation and judgment module, used to obtain a decrease degree index of adjacent word frequency indexes in a word frequency sequence based on a fluctuation calculation model and a word frequency sequence, and to judge whether there is a decrease degree index greater than a first threshold; A first judgment execution module is used to add the newly added data set to a plurality of different categories to be expanded in sequence when there is no decrease degree index greater than the first threshold, and to correct the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded; The second judgment execution module is used for, when there is a decrease degree indicator greater than the first threshold, screening out the first decrease degree indicator greater than the first threshold in the order of the word frequency sequence and taking the adjacent word frequency indicators corresponding to the decrease degree indicator as two word frequency indicators to be processed; The third judgment execution module is used to judge whether the word frequency index to be processed is less than the second threshold, and obtain the expansion strategy according to the judgment result, and correct the position of the newly added data set according to the word frequency index size of the newly added data set under the category to be expanded.

9. The agricultural knowledge graph data expansion and correction system according to claim 8, characterized in that: The third judgment execution module is also used for: If the word frequency index to be processed is less than the second threshold, all word frequency indexes before the word frequency index to be processed in the word frequency sequence are obtained, and the corresponding category to be expanded is found according to the category words corresponding to the obtained word frequency index, and the newly added data sets are added to the obtained category to be expanded in sequence.

10. The agricultural knowledge graph data expansion and correction system according to claim 9, characterized in that: The third judgment execution module is also used for: If the word frequency index to be processed is not less than the second threshold, the second decrease degree index greater than the first threshold is selected in the order of the word frequency sequence and the adjacent word frequency indicators corresponding to the decrease degree index are used as two new word frequency indicators to be processed, and the new word frequency indicators to be processed are further judged whether they are less than the second threshold.

Citation Information

Patent Citations

  • Entity relationship data generating method, apparatus, equipment and storage medium

    CN109325201A

  • Generation method, device and equipment of extended query word and storage medium

    CN112925967A

  • Text theme recognition method and device, equipment and storage medium

    CN115168585A

  • Merchant text recognition method and device, equipment and storage medium

    CN115618871A

  • Keyword extraction system, keyword extraction method, and program

    JP2013069175A

Cited By

  • Fertilization management decision-making method and system based on multi-modal knowledge graph

    CN120851661A