Agricultural knowledge service method and system

By constructing an agricultural knowledge graph model that integrates triplet information from user interaction, project association, and social relationships, and utilizing recurrent neural networks and attention mechanisms to extract user preference features, the cold start problem for new users is solved, thereby improving the personalization and timeliness of agricultural knowledge services.

CN116109435BActive Publication Date: 2026-02-03BEIJING RES CENT FOR INFORMATION TECH & AGRI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211615188.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-14
Publication Date
2026-02-03
Estimated Expiration
2042-12-14

AI Technical Summary

Technical Problem

Existing knowledge graph-based recommendation algorithms in agricultural production suffer from weak targeting of information services due to the cold start problem for new users, and are unable to effectively capture the interests and preferences of new users.

Method used

By constructing an agricultural knowledge graph model, integrating triplet information of agricultural production projects, user interaction relationships, project association relationships, and user social relationships, and using recurrent neural networks and attention mechanisms to extract user preference features, knowledge service content that matches the interest prediction results is pushed.

Benefits of technology

This improves the relevance and timeliness of agricultural knowledge services, effectively avoids the cold start problem for new users, and enables accurate prediction and personalized recommendations of potential preferences for new users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116109435B_ABST
    Figure CN116109435B_ABST
Patent Text Reader

Abstract

The application provides an agricultural knowledge service method and system, the method comprises the following steps: crawling an agricultural information data source to obtain heterogeneous knowledge information of a target agricultural knowledge user; inputting the heterogeneous knowledge information into an agricultural knowledge graph model to obtain an interest prediction result output by the agricultural knowledge graph model; and pushing knowledge service content matched with the interest prediction result to the target agricultural knowledge user. The agricultural knowledge service method and system provided by the application realize automatic identification and extraction of user preferences through a multi-layer neural network, and the user preference prediction is more accurate. In particular for new users who have not interacted, the potential preferences of the new users can be represented through users having social relationships, effectively avoiding the problem of new user cold start, and greatly improving the pertinence and timeliness of agricultural knowledge service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an agricultural knowledge service method and system. Background Technology

[0002] Recommender systems, as information filtering systems, can effectively solve the problem of information overload in agricultural knowledge services. Furthermore, they can provide targeted and precise information resources of interest to agricultural producers and operators based on their individual preferences, which is of great significance for agricultural practitioners to correctly and promptly grasp relevant agricultural knowledge and apply it to the agricultural field. In recent years, with the development of knowledge graph technology, applying knowledge graphs to recommender systems has become a major research hotspot. A knowledge graph (KG) is a heterogeneous graph where nodes represent entities and edges represent relationships between entities. It contains rich semantic relationships, which, when applied to recommender systems, can not only alleviate the data sparsity and cold start problems for new users and items in traditional recommender algorithms, but also significantly improve the interpretability of recommender systems.

[0003] Knowledge graph-based recommendation algorithms are mainly divided into three categories: path-based recommendation algorithms, knowledge graph embedding-based recommendation algorithms, and hybrid recommendation algorithms. Path-based recommendation algorithms require manual construction of meta-paths, and the quality of the recommendation results heavily depends on the manually designed meta-paths, making optimization difficult in practical applications. Knowledge graph embedding-based recommendation algorithms learn the representations of entities and relationships in the knowledge graph using graph embedding algorithms and integrate them into the recommendation framework. While this approach is easy to implement, it cannot fully utilize the structural information in the knowledge graph and struggles to discover higher-order relationships between entities. Both of these methods only utilize one aspect of information from the knowledge graph. To fully leverage the information in the knowledge graph to improve recommendation performance, hybrid recommendation algorithms are becoming increasingly widely used.

[0004] However, in terms of capturing user preference features, agricultural production has characteristics such as regionality, timeliness, and cyclicality, and the preferences of agricultural producers and operators also have corresponding characteristics. Therefore, the aforementioned knowledge graph-based recommendation algorithms have a relatively singular perspective in extracting agricultural user features. Most of them rely on historical interaction information and association information between agricultural users and agricultural projects. However, since new users have no interaction records, capturing user interests and preferences solely based on project-side information is not very friendly to new users and is prone to cold start problems for new users, resulting in weak targeting of information services. Summary of the Invention

[0005] This invention provides an agricultural knowledge service method and system to address the shortcomings of existing technologies, such as weak targeting of information services due to the cold start problem for new users.

[0006] This invention provides an agricultural knowledge service method, comprising:

[0007] Crawl agricultural information data sources to obtain heterogeneous knowledge information from target agricultural knowledge users;

[0008] The heterogeneous knowledge information is input into the agricultural knowledge graph model to obtain the interest prediction results output by the agricultural knowledge graph model;

[0009] Push knowledge service content that matches the interest prediction results to the target agricultural knowledge users;

[0010] The agricultural knowledge graph model is trained based on heterogeneous knowledge information from samples and the interest tags corresponding to the heterogeneous knowledge information. The heterogeneous knowledge information includes second and third triplet information linked by a first triplet. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationship between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the association relationship between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationship between two agricultural knowledge users.

[0011] According to an agricultural knowledge service method provided by the present invention, the agricultural knowledge graph model includes a first extraction layer, a second extraction layer, and a feature fusion layer;

[0012] The first triplet information, the second triplet information, and the third triplet information are input into the first extraction layer to obtain the user preference features output by the first extraction layer;

[0013] The heterogeneous knowledge information is input into the second extraction layer for aggregation to obtain the agricultural project features output by the second extraction layer;

[0014] The user preference features and the agricultural project features are input into the feature fusion layer to obtain the interest prediction results output by the feature fusion layer.

[0015] According to an agricultural knowledge service method provided by the present invention, the step of inputting the first triplet information, the second triplet information, and the third triplet information into the first extraction layer to obtain the user preference features output by the first extraction layer includes:

[0016] Based on the information of the first triplet and the information of the second triplet, the seed items are gradually expanded outward to obtain the first preference feature;

[0017] Based on the first preference feature and the third triplet information, the preference features of neighboring user entities are aggregated to form a second preference feature;

[0018] The user preference features are determined based on the first preference feature and the second preference feature;

[0019] The neighboring user entity is an agricultural knowledge user whose social influence with the target agricultural knowledge user is greater than or equal to a first preset threshold.

[0020] According to an agricultural knowledge service method provided by the present invention, determining the user preference features based on the first preference feature and the second preference feature includes:

[0021] The interaction behavior sequence is input into the recurrent neural network model to obtain the third preference feature output by the recurrent neural network model;

[0022] The first preference feature, the second preference feature, and the third preference feature are merged into the user preference feature;

[0023] The interaction behavior sequence is determined based on the first triplet information of the triplet entity for the target agricultural knowledge user; the recurrent neural network model includes one of the following: Long Short-Term Memory Network (LSTM), Gated Recurrent Unit (GRU), and LSTM variants.

[0024] According to an agricultural knowledge service method provided by the present invention, the step of inputting an interaction behavior sequence into a recurrent neural network model to obtain a third preference feature output by the recurrent neural network model includes:

[0025] The last element of the interaction behavior sequence is taken as the short-term preference feature;

[0026] The long-term preference features are obtained by weighted summation of the short-term preference features with each element in the interaction behavior sequence through a self-attention mechanism.

[0027] The third preference feature is determined based on the short-term preference feature and the long-term preference feature.

[0028] According to an agricultural knowledge service method provided by the present invention, the step of inputting the heterogeneous knowledge information into a second extraction layer for aggregation and obtaining agricultural project features output by the second extraction layer includes:

[0029] Based on the heterogeneous knowledge information, the first-order neighborhood project entities of the target project are determined.

[0030] If the total number of the first-order neighborhood project entities is greater than or equal to the second preset threshold, the first-order neighborhood project entities are aggregated to obtain the agricultural project characteristics.

[0031] If the total number of first-order neighborhood project entities is less than a second preset threshold, the first-order and second-order neighborhood project entities of the target project are aggregated to obtain the agricultural project characteristics.

[0032] This invention also provides an agricultural knowledge service system, comprising:

[0033] The raw data extraction module is used to crawl agricultural information data sources to obtain heterogeneous knowledge information from target agricultural knowledge users;

[0034] The interest feature prediction module is used to input the heterogeneous knowledge information into the agricultural knowledge graph model and obtain the interest prediction results output by the agricultural knowledge graph model.

[0035] The preference content push module is used to push knowledge service content that matches the interest prediction results to the target agricultural knowledge user;

[0036] The agricultural knowledge graph model is trained based on heterogeneous knowledge information from samples and the interest tags corresponding to the heterogeneous knowledge information. The heterogeneous knowledge information includes second and third triplet information linked by a first triplet. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationship between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the association relationship between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationship between two agricultural knowledge users.

[0037] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the agricultural knowledge service method as described above.

[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the agricultural knowledge service method as described above.

[0039] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the agricultural knowledge service method as described above.

[0040] The agricultural knowledge service method and system provided by this invention, based on raw information crawled from agricultural information data sources, integrates user social relationships to fuse user-side and project-side stored graph knowledge into heterogeneous knowledge information. This heterogeneous knowledge information is then used as input to an agricultural knowledge graph model, and the output is a prediction of user interests. Furthermore, based on this prediction, knowledge service content corresponding to the predicted interests is pushed to users in real time. This achieves automatic identification and extraction of user preferences through multi-layered neural networks, resulting in more accurate user preference predictions. Especially for new users who have not interacted, it can characterize their potential preferences through user associations with social relationships, effectively avoiding the cold start problem for new users. This significantly improves the targeting and timeliness of agricultural knowledge services. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0042] Figure 1 This is one of the flowcharts illustrating the agricultural knowledge service method provided by the present invention;

[0043] Figure 2 This is a schematic diagram of the structure of heterogeneous knowledge information provided by the present invention;

[0044] Figure 3 This is one of the partial flowcharts of the process for obtaining user preference features provided by the present invention;

[0045] Figure 4 This is the second schematic diagram of a partial process for obtaining user preference features provided by the present invention;

[0046] Figure 5 This is the third schematic diagram of a partial process for obtaining user preference features provided by the present invention;

[0047] Figure 6 This is the second flowchart illustrating the agricultural knowledge service method provided by the present invention;

[0048] Figure 7 This is a schematic diagram of the structure of the agricultural knowledge service system provided by the present invention;

[0049] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0051] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more.

[0052] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” are intended to include the plural forms.

[0053] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0054] Figure 1 This is one of the flowcharts illustrating the agricultural knowledge service method provided by this invention. For example... Figure 1 As shown, the agricultural knowledge service method provided in this embodiment of the invention includes: step 101, crawling agricultural information data sources to obtain heterogeneous knowledge information of target agricultural knowledge users.

[0055] The heterogeneous knowledge information includes second and third triplet information linked through the first triplet information. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationships between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the relationships between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationships between two agricultural knowledge users.

[0056] It should be noted that the agricultural knowledge service method provided in this embodiment of the invention is executed by an agricultural knowledge service system.

[0057] The agricultural knowledge service method provided in this application is applicable to users' use of electronic devices to access the connections between projects recorded on agricultural websites, as well as the interactions between users and projects. It incorporates social information relationships between users and captures the potential preference characteristics of new users by leveraging the different influences of social friends on the interests and preferences of new users.

[0058] The aforementioned electronic devices can be implemented in various forms. For example, the electronic devices described in the embodiments of this application may include mobile terminals such as mobile phones, smartphones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), navigation devices, smart bracelets, smartwatches, etc., as well as fixed terminals such as digital TVs, desktop computers, etc. Hereinafter, it is assumed that the electronic device is a mobile terminal. However, those skilled in the art will understand that, in addition to elements specifically designed for mobile purposes, the construction according to the embodiments of this application can also be applied to fixed-type terminals.

[0059] It should be noted that agricultural information data sources refer to websites that can provide the latest agricultural dynamics, agricultural news, agricultural technology, agricultural product price trends, agricultural product supply and demand, agricultural forums, agricultural planting, agricultural breeding, pictures, videos, and other content in real time. These include, but are not limited to, agricultural information publication and announcement platforms and agricultural technology extension platforms.

[0060] Specifically, in step 101, the agricultural knowledge service system collects raw information about the target agricultural knowledge user from one or more agricultural information data sources using web crawling technology, then processes the unstructured raw information into structured heterogeneous knowledge information, and stores the newly acquired heterogeneous knowledge information in a graph knowledge base.

[0061] The embodiments of the present invention do not specifically limit the acquisition and storage methods of heterogeneous knowledge information.

[0062] For example, Figure 2 This is a schematic diagram of the structure of heterogeneous knowledge information provided by the present invention. For example... Figure 2 As shown, this paper presents a specific implementation method for a graph knowledge base maintained based on external knowledge (such as heterogeneous knowledge information), using knowledge recommendation services for greenhouse tomatoes and cucumbers as an example:

[0063] (1) The dynamic interactive behaviors of agricultural knowledge users (i.e. agricultural producers and operators) on a website regarding a certain agricultural production project, such as historical questions, comments, and access times, are crawled out. The agricultural knowledge users and the agricultural production project are respectively regarded as two entities in the first triplet information, and the interactive behaviors between the two are recorded as the relationship between the two entities in the first triplet information, so as to construct and maintain a user-project graph.

[0064] (2) Crawling agricultural production projects involved in the agricultural production process from the website, taking the agricultural production projects with related relationships and another agricultural production project as two entities in the second triplet information, and recording the relationship between the two as the relationship between the two entities in the second triplet information, so as to construct and maintain an agricultural project graph.

[0065] For example, the agricultural production process may involve a pesticide supply chain, thus requiring the use of suppliers and pesticide products with supply relationships to characterize the second ternary information. For instance, the second ternary information could be ["Thor 2", merchant, "Li Ming"].

[0066] For example, the agricultural production process may involve plant protection techniques, so it is necessary to use the agricultural products and plant protection measures with the relationship of plant protection operation to characterize the second ternary information. For example, the second ternary information could be ["tomato", plant protection, "seedling care"].

[0067] (3) Crawl user social relationship information (such as following, friends, likes and other social behaviors) from the website, take the agricultural knowledge user with social relationship and another agricultural knowledge user as two entities in the third triplet information, and record the social relationship between the two as the relationship between the two entities in the third triplet information to construct and maintain a user social graph.

[0068] (4) And using the user-project graph as a bridge, the agricultural project graph, the user-project graph, and user social interaction are connected. Figure 3 The individual graphs are linked together to form a comprehensive and complete heterogeneous information graph. This graph contains heterogeneous knowledge information from multiple groups of agricultural knowledge users, which can provide a data foundation for graph-based agricultural knowledge service methods.

[0069] Step 102: Input heterogeneous knowledge information into the agricultural knowledge graph model and obtain the interest prediction results output by the agricultural knowledge graph model.

[0070] Among them, the agricultural knowledge graph model is trained based on heterogeneous knowledge information of samples and the interest tags corresponding to the heterogeneous knowledge information of samples.

[0071] It should be noted that the agricultural knowledge graph model can be a neural network model. The structure and parameters of the neural network include, but are not limited to, the number of input layers, hidden layers, and output layers, as well as the weight parameters of each layer. This invention does not specifically limit the type and structure of the neural network.

[0072] For example, an agricultural knowledge graph model can be a neural network model, consisting of an input layer, hidden layers, and an output layer, wherein:

[0073] The input layer is at the very front of the entire network. It directly receives heterogeneous knowledge information from the target agricultural knowledge users and represents the entities and relationships contained therein in a low-dimensional continuous vector space through embedding processing.

[0074] Hidden layers can have one or more layers, and they perform operations on the continuous input vectors by their own neurons in a weighted summation manner.

[0075] The output layer is the last layer, used to decode the vector obtained after weighted summation and output the interest prediction result.

[0076] It should be noted that the sample data includes sample heterogeneous knowledge information corresponding to the sample data, as well as interest tags labeled on the sample heterogeneous knowledge information.

[0077] The sample data includes positive and negative samples, and the proportion of positive and negative samples is not specifically limited in this embodiment of the invention.

[0078] Optionally, the proportion of positive samples in the sample data is greater than or equal to 50%.

[0079] Furthermore, the sample data is divided into training and test sets according to a certain ratio.

[0080] For example, the ratio of training set to test set in sample data includes, but is not limited to, 9:1, 8:2, etc., and the embodiments of the present invention do not specifically limit this.

[0081] Specifically, in step 102, the agricultural knowledge service system initializes the weight coefficients between each layer of the constructed agricultural knowledge graph model. Then, it inputs a set of heterogeneous knowledge information from the training set, along with the labeled content of that heterogeneous knowledge information, into the neural network under the current weight coefficients. The outputs of each node in the input layer, hidden layer, and output layer are calculated sequentially. The cumulative error between the final output of the output layer and its actual connection position state type is used to correct the weight coefficients between each node in the input layer and hidden layer using the gradient descent method. Following this process, the weight coefficients between the input layer and hidden layer can be obtained by traversing all samples in the training set.

[0082] The agricultural knowledge service system reconstructs the agricultural knowledge graph model in step 102 based on the weight coefficients of the input layer and hidden layer of the neural network, and inputs a set of sample data from the test set into the trained agricultural knowledge graph model to obtain the interest prediction results extracted by the target agricultural knowledge user from heterogeneous knowledge information.

[0083] The interest prediction result can be a classification vector value, a continuous value generated like linear regression, or other complex types of values ​​or vectors. This embodiment of the invention does not specifically limit this.

[0084] An activation function is a function that runs on neurons in an artificial neural network. It is responsible for mapping the input of the neuron to the output. Logistic regression is performed using activation functions, which converts the weighted sum of the outputs of the hidden layer into a non-linear prediction result of the recommendation success rate. This embodiment of the invention does not specifically limit the types of activation functions.

[0085] Preferably, the Sigmoid function is used for logistic regression processing. The formula for the Sigmoid function is as follows:

[0086]

[0087] Where x is the weighted sum of the hidden layer outputs, and S(x) is the predicted interest of the target agricultural knowledge user in a certain agricultural production project.

[0088] If the interest prediction result can be a label result, then an intermediate numerical result can be obtained through the model. If the numerical result meets the pre-set target conditions, then the corresponding label result can be assigned to the target agricultural knowledge user corresponding to the numerical result.

[0089] For example, an intermediate numerical result can be obtained through an agricultural knowledge graph model to represent the probability that a target user is a normal user. Based on pre-set target conditions, when this probability is greater than a preset threshold, a label description expressing that the user is a normal user is generated and the label is assigned to the user.

[0090] Step 103: Push knowledge service content that matches the interest prediction results to the target agricultural knowledge users.

[0091] Specifically, in step 103, the agricultural knowledge service system compares the predicted interest results obtained in step 102. When it is determined that the interest prediction results indicate that the target agricultural knowledge user is interested in a certain agricultural production project, the system matches the corresponding knowledge service content in the database of a certain website backend and pushes and displays the knowledge service content on the front-end page of the target agricultural knowledge user on the website.

[0092] This invention, based on raw information crawled from agricultural information data sources, integrates user social relationships to fuse user-side and project-side stored graph knowledge into heterogeneous knowledge information. This heterogeneous knowledge information is then used as input to an agricultural knowledge graph model, outputting user interest predictions. Furthermore, based on these predictions, knowledge service content corresponding to the predicted interests is pushed to users in real time. This achieves automatic identification and extraction of user preferences through multi-layered neural networks, resulting in more accurate user preference predictions. Especially for new users who have not interacted with the platform, the potential preferences can be represented through user associations with social relationships, effectively avoiding the cold start problem for new users. This significantly improves the targeting and timeliness of agricultural knowledge services.

[0093] Based on any of the above embodiments, the agricultural knowledge graph model includes a first extraction layer, a second extraction layer, and a feature fusion layer.

[0094] The information of the first triplet, the information of the second triplet, and the information of the third triplet are input into the first extraction layer to obtain the user preference features output by the first extraction layer.

[0095] Heterogeneous knowledge information is input into the second extraction layer for aggregation, and the agricultural project features output by the second extraction layer are obtained.

[0096] User preference features and agricultural project features are input into the feature fusion layer to obtain the interest prediction results output by the feature fusion layer.

[0097] Specifically, the agricultural knowledge graph model built into the agricultural knowledge service system consists of an input layer, a hidden layer, and an output layer. The hidden layer's function is to extract and combine heterogeneous knowledge information to obtain corresponding interest prediction results.

[0098] The embodiments of the present invention do not specifically limit the structure of the hidden layer.

[0099] Preferably, the hidden layer comprises at least three layers: a first extraction layer, a second extraction layer, and a feature fusion layer. Wherein:

[0100] The role of the first extraction layer is to introduce the third triplet information contained in the user social graph, based on the first triplet information contained in the user-item graph and the second triplet information contained in the agricultural project graph, considering that the user's preferences are similar to those of their directly connected social friends. This represents the user's preference characteristics from two different directions: the social dimension and the project dimension.

[0101] The role of the second extraction layer is to find the entity corresponding to the agricultural production project and its neighboring entities in the heterogeneous knowledge graph containing heterogeneous knowledge information, and obtain the agricultural project features corresponding to a certain agricultural production project through aggregation.

[0102] The function of the feature fusion layer is to process the received user preference features of the target agricultural knowledge user and the agricultural project features of a certain agricultural production project in sequence using fully connected processing and activation function processing to map them into a two-dimensional vector, and then perform binary classification processing based on this two-dimensional vector to obtain the interest prediction result.

[0103] This invention extracts user preference features from first, second, and third triplet information using a first extraction layer. A second extraction layer aggregates and samples neighboring entities from heterogeneous knowledge information to obtain agricultural project features. A feature fusion layer then maps the features extracted by the first and second extraction layers into interest prediction results. This achieves the capture of user preference features from the perspectives of interaction behavior, project side, and user side using a neural network, overcoming the shortcomings of capturing incomplete user preferences from a single perspective. Furthermore, it captures rich agricultural project features by aggregating and sampling neighboring entities on the project side. This effectively improves the accuracy of model predictions by fully capturing both user preference features and agricultural project features. It provides an effective solution to the problems of insufficient targeting and timeliness in agricultural knowledge information services.

[0104] Based on any of the above embodiments, the first triplet information, the second triplet information, and the third triplet information are input into the first extraction layer to obtain the user preference features output by the first extraction layer, including: based on the first triplet information and the second triplet information, the seed items are gradually expanded outward to obtain the first preference features.

[0105] Specifically, the agricultural knowledge service system can analyze the user-item graph containing the first triplet information, and regard the agricultural production projects that the target agricultural knowledge user has interacted with as projects of interest to them, and designate them as seed projects. On the agricultural project graph containing the second triplet information, the system will obtain user preferences from the project perspective and integrate them into the first preference feature through the multi-hop propagation process from the seed project to other projects.

[0106] The specific implementation process of this invention is not specifically limited.

[0107] For example, Figure 3 This is one of the schematic diagrams of a partial process for obtaining user preference features provided by the present invention. For example... Figure 3 As shown, this method employs the preference propagation concept from the RippleNet model. During the k-hop propagation from the seed item v to other items, for each triple (h,t,r) obtained in each outward expansion, the relevance score between the seed item v and the corresponding triple is calculated. Then, softmax is used to normalize the relevance score. The specific steps are as follows:

[0108] Define the set of entities corresponding to all historical records of the target agricultural knowledge user u, and the set of entities corresponding to all k-th hops:

[0109]

[0110] Where G represents the agricultural project graph, (h,t,r) represents the second triplet information, h and t are the head entity and tail entity, and r represents the relationship between them. Based on this relationship, we define the set of all triples corresponding to the (k-1)th hop and the kth hop to obtain the set of all triples for each additional hop:

[0111]

[0112] Steps for implementing preference propagation:

[0113] (1) For the target agricultural knowledge user u, the direct interaction information of the user is used as the seed project v. The user-project graph and agricultural project graph that have been constructed are processed and analyzed. The first propagation (h,r)-->t is carried out with the user entity and interaction relationship as the starting point.

[0114] (2) Calculate the similarity weight p between the seed project v and the i-th agricultural production project in the project set obtained from the k=1th jump. i :

[0115]

[0116] Where v is the embedding vector of the seed item, R is the embedding vector of the relation, and h is the embedding vector of the head entity.

[0117] All The weighted sum of the similarities between the corresponding tail entity t and the i-th agricultural production project and seed project v in the project set is calculated:

[0118]

[0119] (3) With all The corresponding tail entity t becomes the head entity of the next hop, and steps (1) and (2) above are repeated. After k (to reduce computational resources, k is taken as a maximum of 4) propagations, until the result is obtained. Summing the k vectors yields the user's first preference feature from the perspective of the project space:

[0120]

[0121] Based on the first preference feature and the third triplet information, the preference features of neighboring user entities are aggregated to form the second preference feature.

[0122] Among them, the neighboring user entity is an agricultural knowledge user whose social influence with the target agricultural knowledge user is greater than a first preset threshold.

[0123] It should be noted that "neighborhood user entities" refers to entities whose social behavior information is collected from target agricultural knowledge users. The frequency of these interactions is mapped to a social influence level. If the social influence level is greater than or equal to a first preset threshold, it indicates close interaction between the two entities, and they are classified as neighborhood user entities capable of influencing the target agricultural knowledge user. Conversely, if the social influence level is low, it indicates relatively distant interaction, and they are classified as non-neighborhood user entities.

[0124] Specifically, the agricultural knowledge service system can analyze the user social graph containing third triplet information, aggregate basic information and behavioral characteristics of neighboring user entities from the user social graph, and introduce an attention mechanism on the basis of graph convolutional networks to highlight the different degrees of influence of neighboring user entities' preferences on the target agricultural knowledge user. User preferences obtained from the user social perspective will be integrated into second preference features.

[0125] The formula for calculating the feature aggregation of neighboring user entities is as follows:

[0126]

[0127] in, Let N(u) represent the second preference feature of the target agricultural knowledge user u, and let N(u) represent the set of neighboring users of the target agricultural knowledge user u. j Let N(u) represent the first preference feature of the j-th neighboring user, and Aggre(·) represent the aggregation function operation for the neighboring user. W and b are the weight and bias terms set for the aggregation calculation, respectively.

[0128] Preferably, to highlight the different levels of influence of neighboring users, an attention mechanism is used to learn the attention weights β of neighboring users. u Therefore, the formula for calculating the aggregation function Aggre(·) for neighboring users is:

[0129]

[0130] User preference features are determined based on the first and second preference features.

[0131] Specifically, the agricultural knowledge service system can at least integrate the first and second preference features captured from different perspectives to generate the final user preference features of the target agricultural knowledge user.

[0132] This invention selects seed nodes for user interests based on the first triplet information. Then, based on the relationships between items in the second triplet information, and combining the idea of ​​preference propagation, it autonomously expands the user's potential first preference features layer by layer outwards. Next, using the user's social relationships indicated by the third triplet information, it aggregates the first preference features of neighboring users directly connected to the user to represent the user's potential second preference features within social relationships. This allows for the fusion of at least the first and second preference features into a multi-dimensional representation of user preference features. By combining the preference propagation idea with user social relationships, on the one hand, it can automatically discover possible paths from the user to candidate items based on the links in the knowledge graph from the user's historical interactions with items, effectively combining path-based recommendation and knowledge graph-embedded recommendation. On the other hand, it fully utilizes the preferences of neighboring users to extract the user's interests, improving the cold-start problem for new items and new users.

[0133] Based on any of the above embodiments, user preference features are determined based on the first preference features and the second preference features, including: inputting the interaction behavior sequence into the recurrent neural network model to obtain the third preference features output by the recurrent neural network model.

[0134] Among them, the interaction behavior sequence is determined based on the first triplet information of the target agricultural knowledge user based on the triplet entity; the recurrent neural network model includes one of the following: Long Short-Term Memory Network (LSTM), Gated Recurrent Unit (GRU), and LSTM variants.

[0135] It should be noted that the recurrent neural network model set up in the agricultural knowledge service system will bring the output results of the previous time into the hidden layer of the next time for training.

[0136] The embodiments of the present invention do not impose specific limitations on the recurrent neural network model.

[0137] Alternatively, the recurrent neural network model can be a Long Short-Term Memory (LSTM) network, which introduces memory cells to record additional information. Three types of gates are needed to control the memory cells.

[0138] The output gate is used to output entries from the cell.

[0139] The input gate is used to determine when to read data into the cell.

[0140] The forget gate is used to reset the contents of a unit through a mechanism. The motivation for this design is the same as that of the gated loop unit, which can determine when to remember or ignore input in the hidden state through a dedicated mechanism.

[0141] Alternatively, the recurrent neural network model can be a gated recurrent unit (GRU), which combines the forget gate and the input gate into an "update gate" that combines the neuron state and the hidden state and also makes some adaptive changes.

[0142] Alternatively, the recurrent neural network model can also be an LSTM variant. LSTM variants include, but are not limited to, bidirectional gated recurrent units (BiGRU), bidirectional long short-term memory networks (BiLSTM), etc.

[0143] It should be noted that before step 102, it is also necessary to extract the triplet in the user-project graph that identifies the entity of the first triplet as the target agricultural knowledge user, and generate an interaction behavior sequence according to the order in which the user accesses the project.

[0144] Specifically, the agricultural knowledge service system inputs the interactive behavior sequence into a recurrent neural network model for processing. Each feature vector in the sequence is treated as a node, and the corresponding hidden state for each feature dimension can be obtained. Based on the hidden state of the node, the hidden state of the next node is predicted. The hidden state of the last node is output as the intermediate hidden state corresponding to the global feature map. The intermediate hidden states at each time step are continuously iterated and recursively processed to obtain the weights and biases of the recurrent neural network model. The recurrent neural network model is configured using the trained model parameters to perform temporal correlation and automatic weight allocation. The agricultural production information predicted for the next time that the target agricultural knowledge user wants to know is used as the third preference feature.

[0145] The first preference feature, the second preference feature, and the third preference feature are merged into a user preference feature.

[0146] Specifically, the agricultural knowledge service system, based on the first and second preference features, also incorporates a third preference feature to generate user preference features for the target agricultural knowledge users.

[0147] Figure 4 This is the second schematic diagram of a partial process for obtaining user preference features provided by the present invention. For example... Figure 4 As shown, a method for generating user preference features u is presented.f Detailed implementation method:

[0148]

[0149] Where O represents the first preference feature extracted from the project space dimension. c represents the second preference feature extracted in the social space dimension. l,s This refers to the third preference feature extracted from the project space dimension.

[0150] This invention is based on inputting the interaction behavior sequence corresponding to the interaction time into a recurrent neural network model. Through recursive loops using its intermediate hidden states, and leveraging multiple parallel computations, a third preference feature is obtained from multiple angles and levels. Then, the first, second, and third preference features are fused into a user preference feature. This invention utilizes the advantage of recurrent neural networks in extracting temporal information, combined with the temporal information of users' historical access records, to capture users' long-term and short-term preference features that change over time. It achieves multi-angle capture of user interests and preferences from time series, project association, and user social relationship perspectives, overcoming the shortcomings of capturing user preference features from a single angle.

[0151] Based on any of the above embodiments, the interaction behavior sequence is input into the recurrent neural network model to obtain the third preference feature output by the recurrent neural network model, including: taking the last element of the interaction behavior sequence as the short-term preference feature.

[0152] It should be noted that the BiGRU model can effectively alleviate the gradient explosion problem in neural network models and has fewer parameters compared to the BiLSTM model. Therefore, a BiGRU variant can be used to build recurrent neural network models.

[0153] Specifically, the agricultural knowledge service system provides an interactive behavior sequence V = {v1, v2, ..., v...} n Select the last access record v n As a short-term preference feature of users s , denoted as u s =v n .

[0154] The long-term preference features are obtained by weighted summation of short-term preference features and each element in the interaction behavior sequence through a self-attention mechanism.

[0155] Specifically, the agricultural knowledge service system uses a self-attention mechanism to apply short-term preference features. s The user's long-term preference feature u is obtained by multiplying the weight of each access record in the interaction behavior sequence and summing them up. l .

[0156] Based on short-term and long-term preference characteristics, the third preference characteristic is determined.

[0157] Specifically, the agricultural knowledge service system will incorporate users' long-term preference characteristics. l and short-term preference characteristics u s Perform linear concatenation to obtain the user's third preference feature that changes over time.

[0158] The embodiments of the present invention do not specifically limit the application of the recurrent neural network model.

[0159] For example, Figure 5 This is the third schematic diagram of a partial process for obtaining user preference features provided by the present invention. For example... Figure 5 As shown in the figure, this embodiment of the invention provides a specific implementation process of a recurrent neural network model based on BiGRU:

[0160] v′ x =q T σ(W1u s +W2v x +d) (3.1)

[0161]

[0162] Among them, v x v′ is the x-th element in the sequence of interactive behaviors. x Let q be the hidden state of the x-th element in the interaction sequence in BiGRU, and let W1, W2, and q be the weights set by the attention mechanism.

[0163] Long-term user preference characteristics u l and short-term preference characteristics u s Perform linear fusion:

[0164] c l,s =W3[u l ;u s (3.3)

[0165] Among them, c l,s W3 is the weight term set for linear fusion, representing the third preference feature.

[0166] This invention uses a BIGRU model to capture the sequence of interaction behaviors before and after access records in a user-item graph. By introducing a self-attention mechanism, the model focuses on the correlation between historical and current access records. Then, short-term preference features are multiplied by the weight of each access record and summed to obtain long-term preference features. Finally, long-term and short-term preferences are linearly concatenated to obtain a third preference feature. This approach better captures the temporal characteristics of user interests and preferences corresponding to agricultural production.

[0167] Based on any of the above embodiments, heterogeneous knowledge information is input into the second extraction layer for aggregation to obtain agricultural project features output by the second extraction layer, including: determining the first-order neighborhood project entities of the target project based on heterogeneous knowledge information.

[0168] Specifically, the agricultural knowledge service system uses Knowledge Graph Convolutional Networks (KGCN) to capture high-order structural and semantic information in the knowledge graph where heterogeneous knowledge information is located, in order to obtain the entity corresponding to the target project and the first-order neighboring project entity.

[0169] If the total number of first-order neighborhood project entities is greater than or equal to the second preset threshold, the first-order neighborhood project entities are aggregated to obtain agricultural project characteristics.

[0170] If the total number of first-order neighborhood project entities is less than a second preset threshold, the first-order and second-order neighborhood project entities of the target project are aggregated to obtain agricultural project characteristics.

[0171] It should be noted that the second preset threshold is a hyperparameter set for the number of first-order neighbor entities to limit the degree of association between the features of higher-order neighbor items and the item.

[0172] Specifically, the agricultural knowledge service system first compares the number of first-order neighbor entities of a project entity with a second preset threshold:

[0173] If the number of first-order neighbor entities is greater than or equal to the second preset threshold, it means that the current expanded neighbor order has a sufficient number of closely related neighbor entities, and then the first-order neighbor entities of the project and the project itself are aggregated.

[0174] If the number of first-order neighbor entities is less than the second preset threshold, it means that the current expanded neighbor order does not have a sufficient number of closely related neighbor entities, and the order needs to be expanded. In this case, the first-order neighbor entities, second-order neighbor entities, and the project itself are aggregated.

[0175] The calculation formula is as follows:

[0176]

[0177] Among them, E y e represents the agricultural project characteristics of the y-th agricultural production project. y Let e ​​represent the entity of the y-th agricultural production project. neighbor1 Indicates item e y First-order neighbor entity, e neighbor2 Indicates item ey The second-order neighbor entity. N neighbor1 Indicates item e y The number of first-order neighbor entities, z is the second preset threshold. W4, W5, b1 and b2 are the weights and configuration items set for neighborhood aggregation, respectively.

[0178] Figure 6 This is the second flowchart illustrating the agricultural knowledge service method provided by this invention. For example... Figure 6 As shown in the figure, an embodiment of the present invention provides a complete flow of an agricultural knowledge service method:

[0179] Step 1: Data Collection

[0180] Using web crawling technology, agricultural production information was scraped from mainstream agricultural websites such as China Agricultural Information and China Agricultural Technology Extension Platform to construct an agricultural project graph. User social relationship information was used to construct a user social graph. Dynamic behaviors of agricultural producers and operators, such as historical questions, comments, and visit times, were selected as interactive information to construct a user-project graph. The user-project interaction graph then served as a bridge connecting the project graph, the user-project interaction graph, and the user social graph. Figure 3 The individual graphs are connected to form a comprehensive and complete heterogeneous information graph, providing heterogeneous knowledge information for graph-based recommendation.

[0181] Step 2: User Preference Feature Extraction

[0182] Social theories suggest that users' preferences are similar to those of their directly connected social friends. Therefore, in order to fully capture user characteristics, this patent will introduce a social relationship graph between users based on the user-item interaction graph, learning user information from two different perspectives: social space and item space.

[0183] (1) Based on the first preference characteristics of the project

[0184] To obtain user preferences from a project perspective, the preference propagation idea from the RippleNet model is mainly adopted. Taking projects of interest to agricultural producers and operators as seeds, the preference propagation is carried outward from the seed project v through k hops on the project knowledge graph. For each triple (h,r,t) obtained in each outward expansion, the relevance score between project v and each triple is calculated, and then softmax is used to normalize the relevance score.

[0185] (2) Second preference features based on user social interaction

[0186] Social aggregation mainly analyzes user preferences from the perspective of user social interaction. It aggregates the basic information and behavioral characteristics of neighboring users from the user social graph and introduces an attention mechanism on the basis of graph convolutional network to highlight the different influences of neighboring users on their preferences.

[0187] (3) Based on the long and short-term third preference features of BiGRU

[0188] Agricultural production is time-series shaped by the fact that farmers' preferences may change over time. Therefore, while capturing user preference information from the two perspectives mentioned above, we need to integrate short-term and long-term user preferences to use the BIGRU model to predict the agricultural production information that farmers will want to know next.

[0189] (4) User preference feature fusion

[0190] The user preference features captured from different perspectives are fused together to form the final user preference feature vector.

[0191] Step 3: Feature Extraction of Agricultural Projects

[0192] The KGCN algorithm is used to find the entity corresponding to the project and its first-order neighbor entities in the heterogeneous knowledge graph. Then, the first-order neighbor entities of the project entity and the project entity itself are aggregated to obtain the agricultural project features of the project.

[0193] Step 4: User Interest Prediction

[0194] Interest prediction results are obtained by calculating the inner product of agricultural project characteristics and user preference characteristics.

[0195]

[0196]

[0197] This invention, based on the relationship between the total number of first-order neighboring project entities and a second preset threshold, decides to directly aggregate the first-order neighboring entities and the project itself when the threshold condition is met; otherwise, it expands to aggregate second-order neighboring entities. This achieves the expansion of the recommended features of a project through the quantity of first-order neighboring entities, reducing the number of noisy entities while still fusing features from closely related neighboring entities, thus avoiding the problem of inaccurate feature extraction due to an insufficient number of neighboring entities.

[0198] Figure 7 This is a schematic diagram of the agricultural knowledge service system provided by the present invention. Based on any of the above embodiments, such as... Figure 7 As shown, the system includes a raw data extraction module 710, an interest feature prediction module 720, and a preference content push module 730, wherein:

[0199] The raw data extraction module 710 is used to crawl agricultural information data sources to obtain heterogeneous knowledge information of target agricultural knowledge users.

[0200] The interest feature prediction module 720 is used to input heterogeneous knowledge information into the agricultural knowledge graph model and obtain the interest prediction results output by the agricultural knowledge graph model.

[0201] The preference content push module 730 is used to push knowledge service content that matches the interest prediction results to target agricultural knowledge users.

[0202] The agricultural knowledge graph model is trained based on heterogeneous knowledge information from samples and the corresponding interest tags. The heterogeneous knowledge information includes second and third triplet information linked by the first triplet information. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationships between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the relationships between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationships between two agricultural knowledge users.

[0203] Specifically, the raw data extraction module 710, the interest feature prediction module 720, and the preference content push module 730 are electrically connected in sequence.

[0204] The raw data extraction module 710 collects raw information about the target agricultural knowledge user from one or more agricultural information data sources using web crawling technology. Then, it processes the unstructured raw information into structured heterogeneous knowledge information and stores the newly acquired heterogeneous knowledge information in a graph knowledge base.

[0205] The interest feature prediction module 720 reconstructs the agricultural knowledge graph model based on the weight coefficients of the input layer and hidden layer of the neural network, and inputs a set of sample data from the test set into the trained agricultural knowledge graph model to obtain the interest prediction results extracted by the target agricultural knowledge user from heterogeneous knowledge information.

[0206] The preference content push module 730 compares the predicted interest prediction results with those in the interest feature prediction module 720. When the interest prediction result indicates that the target agricultural knowledge user is interested in a certain agricultural production project, the module matches the corresponding knowledge service content in the database of a certain website backend and pushes and displays the knowledge service content on the front-end page of the target agricultural knowledge user on the website.

[0207] Optionally, the agricultural knowledge graph model includes a first extraction layer, a second extraction layer, and a feature fusion layer.

[0208] Accordingly, the interest feature prediction module 720 includes a first extraction submodule, a second extraction submodule, and a feature fusion submodule, wherein:

[0209] The first extraction submodule is used to input the first triplet information, the second triplet information, and the third triplet information into the first extraction layer to obtain the user preference features output by the first extraction layer.

[0210] The second extraction submodule is used to input heterogeneous knowledge information into the second extraction layer for aggregation, and obtain the agricultural project features output by the second extraction layer.

[0211] The feature fusion submodule is used to input user preference features and agricultural project features into the feature fusion layer and obtain the interest prediction results output by the feature fusion layer.

[0212] Optionally, the first extraction submodule includes a first preference extraction unit, a second preference extraction unit, and a user preference extraction unit, wherein:

[0213] The first preference extraction unit is used to gradually expand outward from the seed items based on the information of the first triplet and the information of the second triplet to obtain the first preference feature.

[0214] The second preference extraction unit is used to aggregate the preference features of neighboring user entities to form the second preference feature based on the first preference feature and the third triplet information.

[0215] The user preference extraction unit is used to determine user preference features based on the first preference feature and the second preference feature.

[0216] Among them, the neighboring user entity is an agricultural knowledge user whose social influence with the target agricultural knowledge user is greater than or equal to a first preset threshold.

[0217] Optionally, the user preference extraction unit includes a third preference extraction subunit and a feature fusion subunit, wherein:

[0218] The third preference extraction subunit is used to input the interaction behavior sequence into the recurrent neural network model to obtain the third preference feature output by the recurrent neural network model.

[0219] The feature fusion subunit is used to fuse the first preference feature, the second preference feature, and the third preference feature into a user preference feature.

[0220] The interaction behavior sequence is determined based on the first triplet information of the triplet entity targeting the agricultural knowledge user. The recurrent neural network model includes Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), and LSTM variants.

[0221] Optionally, the third preference extraction subunit includes a short-term preference extraction microunit, a short-term preference extraction microunit, and a splicing microunit, wherein:

[0222] Short-term preference extraction micro-units are used to extract the last element of the interaction behavior sequence as a short-term preference feature.

[0223] The short-term preference extraction micro-unit is used to obtain the long-term preference feature by weighted summing of the short-term preference feature with each element in the interaction behavior sequence through a self-attention mechanism.

[0224] The splicing micro-units are used to determine the third preference feature based on short-term and long-term preference features.

[0225] Optionally, the second extraction submodule includes a first-order neighborhood determination unit and a decision unit, wherein:

[0226] The first-order neighborhood determination unit is used to determine the first-order neighborhood project entities of the target project based on heterogeneous knowledge information.

[0227] The decision unit is used to aggregate the first-order neighborhood project entities and obtain agricultural project characteristics when the total number of first-order neighborhood project entities is greater than or equal to a second preset threshold.

[0228] The decision-making unit is also used to aggregate the first-order and second-order neighboring project entities of the target project to obtain agricultural project characteristics when the total number of first-order neighboring project entities is less than a second preset threshold.

[0229] The agricultural knowledge service system provided in this embodiment of the invention is used to execute the agricultural knowledge service method described above. Its implementation method is consistent with that of the agricultural knowledge service method provided by this invention, and it can achieve the same beneficial effects, so it will not be described again here.

[0230] This invention, based on raw information crawled from agricultural information data sources, integrates user social relationships to fuse user-side and project-side stored graph knowledge into heterogeneous knowledge information. This heterogeneous knowledge information is then used as input to an agricultural knowledge graph model, outputting user interest predictions. Furthermore, based on these predictions, knowledge service content corresponding to the predicted interests is pushed to users in real time. This achieves automatic identification and extraction of user preferences through multi-layered neural networks, resulting in more accurate user preference predictions. Especially for new users who have not interacted with the platform, the potential preferences can be represented through user associations with social relationships, effectively avoiding the cold start problem for new users. This significantly improves the targeting and timeliness of agricultural knowledge services.

[0231] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute an agricultural knowledge service method. This method includes: crawling agricultural information data sources to obtain heterogeneous knowledge information of target agricultural knowledge users; inputting the heterogeneous knowledge information into an agricultural knowledge graph model to obtain interest prediction results output by the agricultural knowledge graph model; and pushing knowledge service content matching the interest prediction results to the target agricultural knowledge users. The agricultural knowledge graph model is trained based on sample heterogeneous knowledge information and the corresponding interest tags labeled with that information. The heterogeneous knowledge information includes second and third triplet information linked through a first triplet. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationship between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the association relationship between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationship between two agricultural knowledge users.

[0232] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0233] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the agricultural knowledge service method provided by the above methods. The method includes: crawling agricultural information data sources to obtain heterogeneous knowledge information of target agricultural knowledge users; inputting the heterogeneous knowledge information into an agricultural knowledge graph model to obtain interest prediction results output by the agricultural knowledge graph model; and pushing knowledge service content matching the interest prediction results to the target agricultural knowledge users. The agricultural knowledge graph model is trained based on sample heterogeneous knowledge information and the corresponding interest tags labeled on the sample heterogeneous knowledge information. The heterogeneous knowledge information includes second and third triplet information associated with a first triplet. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationship between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the association relationship between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationship between two agricultural knowledge users.

[0234] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to perform the agricultural knowledge service method provided by the above-described methods. The method includes: crawling agricultural information data sources to obtain heterogeneous knowledge information of target agricultural knowledge users; inputting the heterogeneous knowledge information into an agricultural knowledge graph model to obtain interest prediction results output by the agricultural knowledge graph model; and pushing knowledge service content matching the interest prediction results to the target agricultural knowledge users. The agricultural knowledge graph model is trained based on sample heterogeneous knowledge information and the corresponding interest tags labeled on the sample heterogeneous knowledge information. The heterogeneous knowledge information includes second and third triplet information associated through a first triplet. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationship between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the association relationship between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationship between two agricultural knowledge users.

[0235] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0236] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0237] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An agricultural knowledge service method, characterized in that, include: Crawl agricultural information data sources to obtain heterogeneous knowledge information from target agricultural knowledge users; The heterogeneous knowledge information is input into the agricultural knowledge graph model to obtain the interest prediction results output by the agricultural knowledge graph model; Push knowledge service content that matches the interest prediction results to the target agricultural knowledge users; The agricultural knowledge graph model is trained based on heterogeneous knowledge information from samples and the interest tags corresponding to that heterogeneous knowledge information. The heterogeneous knowledge information includes second and third triplet information linked through a first triplet. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationship between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the association relationship between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationship between two agricultural knowledge users. The agricultural knowledge graph model includes a first extraction layer, a second extraction layer, and a feature fusion layer; The step of inputting the heterogeneous knowledge information into the agricultural knowledge graph model and obtaining the interest prediction results output by the agricultural knowledge graph model includes: The first triplet information, the second triplet information, and the third triplet information are input into the first extraction layer to obtain the user preference features output by the first extraction layer; The heterogeneous knowledge information is input into the second extraction layer for aggregation to obtain the agricultural project features output by the second extraction layer; The user preference features and the agricultural project features are input into the feature fusion layer to obtain the interest prediction result output by the feature fusion layer; The first extraction layer is used to introduce the third triplet information contained in the user's social graph to represent user preference features from two different directions: social dimension and project dimension. The function of the second extraction layer is to find the entity corresponding to the agricultural production project and its neighboring entities in the heterogeneous knowledge graph containing the heterogeneous knowledge information, and obtain the agricultural project features corresponding to the agricultural production project through aggregation.

2. The agricultural knowledge service method according to claim 1, characterized in that, The step of inputting the first triplet information, the second triplet information, and the third triplet information into the first extraction layer to obtain the user preference features output by the first extraction layer includes: Based on the information of the first triplet and the information of the second triplet, the seed items are gradually expanded outward to obtain the first preference feature; Based on the first preference feature and the third triplet information, the preference features of neighboring user entities are aggregated to form a second preference feature; The user preference features are determined based on the first preference feature and the second preference feature; The neighboring user entity is an agricultural knowledge user whose social influence with the target agricultural knowledge user is greater than or equal to a first preset threshold. The methods for obtaining the seed projects include: Based on the user project graph containing the information of the first triplet, agricultural production projects in which the target agricultural knowledge user has interacted are regarded as projects of interest, and these projects of interest are regarded as seed projects.

3. The agricultural knowledge service method according to claim 2, characterized in that, The step of determining the user preference features based on the first preference feature and the second preference feature includes: The interaction behavior sequence is input into the recurrent neural network model to obtain the third preference feature output by the recurrent neural network model; The first preference feature, the second preference feature, and the third preference feature are merged into the user preference feature; The interaction behavior sequence is determined based on the first triplet information of the triplet entity for the target agricultural knowledge user; the recurrent neural network model includes one of the following: Long Short-Term Memory Network (LSTM), Gated Recurrent Unit (GRU), and a variant of LSTM. The method further includes: Extract the triplet that identifies the target agricultural knowledge user as the entity in the first triplet information of the user project graph, and generate an interaction behavior sequence according to the order in which the user accesses the project.

4. The agricultural knowledge service method according to claim 3, characterized in that, The step of inputting the interaction behavior sequence into the recurrent neural network model to obtain the third preference feature output by the recurrent neural network model includes: The last element of the interaction behavior sequence is taken as the short-term preference feature; The long-term preference features are obtained by weighted summation of the short-term preference features with each element in the interaction behavior sequence through a self-attention mechanism. The third preference feature is determined based on the short-term preference feature and the long-term preference feature.

5. The agricultural knowledge service method according to claim 1, characterized in that, The step of inputting the heterogeneous knowledge information into the second extraction layer for aggregation to obtain the agricultural project features output by the second extraction layer includes: Based on the heterogeneous knowledge information, the first-order neighborhood project entities of the target project are determined. If the total number of the first-order neighborhood project entities is greater than or equal to the second preset threshold, the first-order neighborhood project entities are aggregated to obtain the agricultural project characteristics. If the total number of the first-order neighborhood project entities is less than the second preset threshold, the first-order neighborhood project entities and second-order neighborhood project entities of the target project are aggregated to obtain the agricultural project characteristics. The step of determining the first-order neighboring project entities of the target project based on the heterogeneous knowledge information includes: capturing high-order structural and semantic information in the knowledge graph where the heterogeneous knowledge information is located, so as to obtain the entity corresponding to the target project and the first-order neighboring project entities.

6. An agricultural knowledge service system, characterized in that, include: The raw data extraction module is used to crawl agricultural information data sources to obtain heterogeneous knowledge information from target agricultural knowledge users; The interest feature prediction module is used to input the heterogeneous knowledge information into the agricultural knowledge graph model and obtain the interest prediction results output by the agricultural knowledge graph model. The preference content push module is used to push knowledge service content that matches the interest prediction results to the target agricultural knowledge user; The agricultural knowledge graph model is trained based on heterogeneous knowledge information from samples and the interest tags corresponding to that heterogeneous knowledge information. The heterogeneous knowledge information includes second and third triplet information linked through a first triplet. The first triplet information includes agricultural production projects, agricultural knowledge users, and the interaction relationship between agricultural knowledge users and agricultural production projects. The second triplet information includes agricultural production projects and the association relationship between two agricultural production projects. The third triplet information includes agricultural knowledge users and the social relationship between two agricultural knowledge users. The agricultural knowledge graph model includes a first extraction layer, a second extraction layer, and a feature fusion layer; The step of inputting the heterogeneous knowledge information into the agricultural knowledge graph model and obtaining the interest prediction results output by the agricultural knowledge graph model includes: The first triplet information, the second triplet information, and the third triplet information are input into the first extraction layer to obtain the user preference features output by the first extraction layer; The heterogeneous knowledge information is input into the second extraction layer for aggregation to obtain the agricultural project features output by the second extraction layer; The user preference features and the agricultural project features are input into the feature fusion layer to obtain the interest prediction result output by the feature fusion layer; The first extraction layer is used to introduce the third triplet information contained in the user's social graph to represent user preference features from two different directions: social dimension and project dimension. The function of the second extraction layer is to find the entity corresponding to the agricultural production project and its neighboring entities in the heterogeneous knowledge graph containing the heterogeneous knowledge information, and obtain the agricultural project features corresponding to the agricultural production project through aggregation.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the agricultural knowledge service method as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the agricultural knowledge service method as described in any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the agricultural knowledge service method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Recommendation method and system based on adaptive dynamic knowledge graph in heterogeneous network

    CN115329215A