Agricultural socialization service information recommendation method and system, storage medium and product

By using noise-enhanced contrastive learning and multi-task learning in the agricultural social service information recommendation system, combined with multi-head cross-attention and cross-domain data fusion, the popularity bias and long-tail problems in the recommendation system are solved, and recommendations to farmers are improved. Accuracy to meet the needs of featured industries.

CN118551841APending Publication Date: 2024-08-27AGRI INFORMATION INST OF CHINESE ACAD OF AGRI SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410634292.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

The agricultural socialization service information recommendation system ignores local specialty industries when recommending, resulting in low accuracy of recommendations for farmers and inability to effectively match supply and demand information.

Method used

Contrastive learning and multi-task learning methods based on noise enhancement are used, combined with multi-head cross-attention and cross-domain data fusion, to generate more balanced farmer and information features and improve the accuracy of recommendations.

Benefits of technology

By generating more balanced farmers and information characteristics, the accuracy of agricultural social service information recommendation is improved, the popularity bias and long-tail problems in the recommendation system are solved, and the social service needs of featured industries are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551841A
    Figure CN118551841A
Patent Text Reader

Abstract

The invention discloses an agricultural socialization service information recommendation method and system, a storage medium and a product, and relates to the technical field of agricultural information recommendation. The method comprises the following steps: obtaining a multi-task learning loss function value according to the feature representation of each farmer and the feature representation of each piece of information by adopting contrast learning and multi-task learning based on noise enhancement; fusing the multi-task learning loss function value with the feature representation of each common node to obtain a fusion vector of each common node; processing the fusion vector of each common node by adopting a multi-head cross attention method to obtain multi-head attention scores of the common nodes; processing the multi-head attention scores of the common nodes and the fusion vectors of the common nodes by adopting a cross-domain data fusion method to obtain fusion features; and obtaining a recommendation result of the common farmers according to the fusion features of the common farmers in each field and the fusion features of all the common information in each field. According to the invention, the accuracy of farmer recommendation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural information recommendation, and in particular to a method, system, storage medium and product for recommending agricultural socialized service information. Background Art

[0002] Agricultural social services are comprehensive supporting services provided by various social service organizations for farmers' production, sales and other links throughout the entire process. Agricultural social services are an important symbol of agricultural modernization. The development of social services will help promote advanced technology and equipment, improve the input structure and quality of resource factors, and promote standardized agricultural production and large-scale operations. It is an important means to promote agricultural transformation and upgrading and achieve high-quality agricultural development. How to achieve information matching of supply and demand for agricultural social services has become a new technical issue.

[0003] An intelligent recommendation system is a system that uses artificial intelligence technology to analyze and predict user interests and needs, and recommends personalized information to users based on this. The system mines and analyzes data such as user behavior, preferences, and social relationships to achieve personalized recommendations for users. Currently, intelligent recommendation systems have been widely used in many online businesses such as video streaming websites and e-commerce, but are still in their infancy in the field of agricultural social service information services.

[0004] At present, the distribution of supply and demand data of agricultural social service information is extremely uneven, which leads to the fact that agricultural social service information recommendation methods usually ignore those services that are more suitable for local characteristic industries when recommending agricultural social service information. The existence of this problem makes the system only retrieve popular service types, which is not friendly to farmers with niche information recommendation needs, resulting in low accuracy of recommendations for farmers. Summary of the invention

[0005] The purpose of the present invention is to provide a method, system, storage medium and product for recommending agricultural social service information, which can improve the accuracy of recommendations to farmers.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] A method for recommending agricultural social service information, comprising:

[0008] Obtaining the characteristic representation of each farmer corresponding to each social service information resource field and the characteristic representation of each agricultural social service information corresponding to each social service information resource field;

[0009] For any social service information resource field, noise-enhanced contrastive learning and multi-task learning are used to obtain the multi-task learning loss function value corresponding to the social service information resource field according to the characteristic representation of each farmer corresponding to the social service information resource field and the characteristic representation of each agricultural social service information corresponding to the social service information resource field;

[0010] The multi-task learning loss function value corresponding to the social service information resource field is respectively fused with the feature representation of each common node corresponding to the social service information resource field to obtain the fusion vector of each common node corresponding to the social service information resource field; the common node includes farmers shared by all social service information resource fields and agricultural social service information shared by the social service information resource field;

[0011] For any common node, a multi-head cross attention method is used to process the fusion vector of the common node corresponding to each social service information resource field to obtain the multi-head attention score of the common node corresponding to each social service information resource field;

[0012] A cross-domain data fusion method is used to process the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field to obtain the fusion features of the common nodes in each social service information resource field;

[0013] For any shared farmer, the recommendation result of the shared farmer's agricultural social service information in each social service information resource field is obtained according to the integration characteristics of the shared farmer in each social service information resource field and the integration characteristics of all shared agricultural social service information in each social service information resource field.

[0014] Optionally, for any social service information resource field, contrastive learning and multi-task learning based on noise enhancement are adopted, and the multi-task learning loss function value corresponding to the social service information resource field is obtained according to the feature representation of each farmer corresponding to the social service information resource field and the feature representation of each agricultural social service information corresponding to the social service information resource field, specifically including:

[0015] For any node corresponding to any social service information resource field, a first white noise and a second white noise are respectively added to the feature representation of the node to obtain a first node noise representation of the node and a second node noise representation of the node; the node is a farmer or social service information;

[0016] Using contrast learning, according to the first node noise representation of each node corresponding to the social service information resource field and the second node noise representation of each node, the farmer contrast loss value of the social service information resource field and the social service information contrast loss value of the social service information resource field are obtained;

[0017] Multi-task learning is adopted to obtain the multi-task learning loss function value of the social service information resource field according to the latent vectors of each farmer corresponding to the social service information resource field, the latent vectors of each agricultural social service information corresponding to the social service information resource field, the farmer contrast loss value of the social service information resource field and the social service information contrast loss value of the social service information resource field.

[0018] Optionally, a cross-domain data fusion method is used to process the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field to obtain the fusion features of the common nodes in each social service information resource field, specifically including:

[0019] Obtaining domain common feature vectors of the common nodes and specific feature vectors of the common nodes in each social service information resource field according to the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field;

[0020] The domain common feature vectors of the shared nodes are respectively fused with the specific feature vectors of the shared nodes in each social service information resource field to obtain the fusion features of the shared nodes in each social service information resource field.

[0021] Optionally, the domain common feature vector of the common nodes and the specific feature vector of the common nodes in each social service information resource field are obtained according to the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vector of the common nodes corresponding to each social service information resource field, specifically:

[0022] According to the formula Calculate the common feature vector of the common nodes, where E Δr represents the common feature vector of the domain with common node r, represents the multi-head attention score of the common node r corresponding to the social service information resource field α, represents the multi-head attention score of the common node r corresponding to the social service information resource field β, represents the fusion vector of the common node r corresponding to the social service information resource domain α, represents the fusion vector of the common nodes r corresponding to the social service information resource domain β;

[0023] According to the formula Calculate the specific feature vector of the shared nodes in the field of social service information resources, where E αr represents the specific feature vector of the shared node r in the social service information resource domain α, λ α represents the parameter of farmer retention rate in the field of socialized service information resources;

[0024] According to the formula Calculate the specific feature vector of the shared nodes in the field of social service information resources, where E βr represents the specific feature vector of the shared node r in the social service information resource field β, λ β It represents the parameter of β social service information retention rate in the field of social service information resources.

[0025] Optionally, the domain common feature vectors of the shared nodes are fused with the specific feature vectors of the shared nodes in each social service information resource domain to obtain the fusion features of the shared nodes in each social service information resource domain, specifically:

[0026] According to the formula Calculate the fusion characteristics of the shared nodes in the social service information resource field α, where represents the fusion characteristics of the shared node r in the social service information resource domain α, W α represents the weight matrix of the attention network on the social service information resource domain α, E αr represents the specific feature vector of the shared node r in the social service information resource domain α, E Δr represents the common feature vector of the domain with common node r;

[0027] Calculate the integration characteristics of shared nodes in the field of social service information resources, where: represents the fusion characteristics of the shared node r in the social service information resource domain β, W β represents the weight matrix of the attention network on the social service information resource domain β, E βr Represents the specific feature vector of the shared node r in the social service information resource field β.

[0028] Optionally, multi-task learning is adopted to obtain the multi-task learning loss function value of the social service information resource field according to the latent vectors of each farmer corresponding to the social service information resource field, the latent vectors of each agricultural social service information corresponding to the social service information resource field, the farmer contrast loss value of the social service information resource field, and the social service information contrast loss value of the social service information resource field, specifically including:

[0029] Obtaining a benchmark loss value for the social service information resource field according to the latent vectors of each farmer corresponding to the social service information resource field and the latent vectors of each agricultural social service information corresponding to the social service information resource field;

[0030] The multi-task learning loss function value in the social service information resource field is obtained according to the farmer comparison loss value, the social service information comparison loss value and the benchmark loss value in the social service information resource field.

[0031] A computer system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned agricultural social service information recommendation method.

[0032] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned agricultural social service information recommendation method.

[0033] A computer program product includes a computer program, which implements the above-mentioned agricultural social service information recommendation method when executed by a processor.

[0034] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0035] The present invention adopts contrastive learning and multi-task learning based on noise enhancement, and obtains the multi-task learning loss function value corresponding to the social service information resource field according to the feature representation of each farmer corresponding to the social service information resource field and the feature representation of each agricultural social service information corresponding to the social service information resource field; the multi-task learning loss function value corresponding to the social service information resource field is respectively fused with the feature representation of each common node corresponding to the social service information resource field to obtain the fusion vector of each common node corresponding to the social service information resource field; the multi-head cross attention method is used to process the fusion vector of each common node corresponding to the social service information resource field to obtain the multi-head attention score of each common node corresponding to the social service information resource field; and the multi-head cross attention method is used to process the fusion vector of each common node corresponding to the social service information resource field. The cross-domain data fusion method processes the multi-head attention scores of each common node corresponding to each social service information resource field and the fusion vectors of each common node corresponding to each social service information resource field to obtain the fusion characteristics of the common nodes in each social service information resource field; for any shared farmer, the agricultural social service information recommendation results of the shared farmer in each social service information resource field are obtained according to the fusion characteristics of the shared farmer in each social service information resource field and the fusion characteristics of all shared agricultural social service information in each social service information resource field. More balanced farmers and information are generated by noise-enhanced contrastive learning and multi-task learning, and then multi-head cross-attention method and cross-domain data fusion method are used for cross-domain fusion, which can improve the accuracy of farmer recommendation. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 A flow chart of a method for recommending agricultural social service information provided by an embodiment of the present invention;

[0038] Figure 2 A diagram of the internal structure of a computer system. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.

[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] The embodiment of the present invention provides a method for recommending agricultural social service information, comprising:

[0042] Acquire the characteristic representation of each farmer household corresponding to each social service information resource field and the characteristic representation of each agricultural social service information corresponding to each social service information resource field.

[0043] For any social service information resource field, noise-enhanced contrastive learning and multi-task learning are adopted. According to the feature representation of each farmer corresponding to the social service information resource field and the feature representation of each agricultural social service information corresponding to the social service information resource field, the multi-task learning loss function value corresponding to the social service information resource field is obtained.

[0044] The multi-task learning loss function values ​​corresponding to the social service information resource field are respectively fused with the feature representations of the common nodes corresponding to the social service information resource field to obtain the fusion vectors of the common nodes corresponding to the social service information resource field; the common nodes include farmers shared by all social service information resource fields and agricultural social service information shared by the social service information resource field.

[0045] For any common node, a multi-head cross-attention method is used to process the fusion vector of the common node corresponding to each social service information resource field to obtain the multi-head attention score of the common node corresponding to each social service information resource field.

[0046] A cross-domain data fusion method is used to process the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field to obtain the fusion characteristics of the common nodes in each social service information resource field.

[0047] For any shared farmer, the recommendation result of the shared farmer's agricultural social service information in each social service information resource field is obtained according to the integration characteristics of the shared farmer in each social service information resource field and the integration characteristics of all shared agricultural social service information in each social service information resource field.

[0048] In practical applications, for any social service information resource field, contrastive learning and multi-task learning based on noise enhancement are adopted, and the multi-task learning loss function value corresponding to the social service information resource field is obtained according to the feature representation of each farmer corresponding to the social service information resource field and the feature representation of each agricultural social service information corresponding to the social service information resource field, which specifically includes:

[0049] For any node corresponding to any social service information resource field, the first white noise and the second white noise are respectively added to the characteristic representation of the node to obtain the first node noise representation of the node and the second node noise representation of the node; the node is a farmer or social service information.

[0050] By adopting contrast learning, the farmer contrast loss value of the social service information resource field and the social service information contrast loss value of the social service information resource field are obtained according to the first node noise representation of each node corresponding to the social service information resource field and the second node noise representation of each node.

[0051] Multi-task learning is adopted to obtain the multi-task learning loss function value of the social service information resource field according to the latent vectors of each farmer corresponding to the social service information resource field, the latent vectors of each agricultural social service information corresponding to the social service information resource field, the farmer contrast loss value of the social service information resource field and the social service information contrast loss value of the social service information resource field.

[0052] In practical applications, a cross-domain data fusion method is used to process the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field to obtain the fusion features of the common nodes in each social service information resource field, specifically including:

[0053] According to the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field, the domain common feature vectors of the common nodes and the specific feature vectors of the common nodes in each social service information resource field are obtained.

[0054] The domain common feature vectors of the shared nodes are respectively fused with the specific feature vectors of the shared nodes in each social service information resource field to obtain the fusion features of the shared nodes in each social service information resource field.

[0055] In practical applications, the domain common feature vectors of the common nodes and the specific feature vectors of the common nodes in each social service information resource field are obtained according to the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field, specifically:

[0056] According to the formula Calculate the common feature vector of the domain of common nodes, where E Δr represents the common feature vector of the domain with common node r, represents the multi-head attention score of the common node r corresponding to the social service information resource field α, represents the multi-head attention score of the common node r corresponding to the social service information resource field β, represents the fusion vector of the common node r corresponding to the social service information resource domain α, Represents the fusion vector of the common nodes r corresponding to the social service information resource field β.

[0057] According to the formula Calculate the specific feature vector of the shared nodes in the field of social service information resources, where E αr represents the specific feature vector of the shared node r in the social service information resource domain α, λ α It represents the farmer retention rate parameter in the field of socialized service information resources.

[0058] According to the formula Calculate the specific feature vector of the shared nodes in the field of social service information resources, where E βr represents the specific feature vector of the shared node r in the social service information resource field β, λ β It represents the parameter of β social service information retention rate in the field of social service information resources.

[0059] In practical applications, the common feature vectors of the common nodes in the field are fused with the specific feature vectors of the common nodes in each social service information resource field to obtain the fusion features of the common nodes in each social service information resource field, specifically:

[0060] According to the formula Calculate the fusion characteristics of the shared nodes in the social service information resource field α, where represents the fusion characteristics of the shared node r in the social service information resource domain α, W α represents the weight matrix of the attention network on the social service information resource domain α, E αr represents the specific feature vector of the shared node r in the social service information resource domain α, E Δr Represents the common feature vector of the community with common node r.

[0061] Calculate the integration characteristics of shared nodes in the field of social service information resources, where: represents the fusion characteristics of the shared node r in the social service information resource domain β, W β represents the weight matrix of the attention network on the social service information resource domain β, E βr Represents the specific feature vector of the shared node r in the social service information resource field β.

[0062] In practical applications, multi-task learning is adopted to obtain the multi-task learning loss function value of the social service information resource field according to the latent vectors of each farmer corresponding to the social service information resource field, the latent vectors of each agricultural social service information corresponding to the social service information resource field, the farmer contrast loss value of the social service information resource field and the social service information contrast loss value of the social service information resource field, specifically including:

[0063] A benchmark loss value of the social service information resource field is obtained according to the latent vectors of each farmer corresponding to the social service information resource field and the latent vectors of each agricultural social service information corresponding to the social service information resource field.

[0064] The multi-task learning loss function value in the social service information resource field is obtained according to the farmer comparison loss value, the social service information comparison loss value and the benchmark loss value in the social service information resource field.

[0065] In practical applications, contrastive learning is adopted to obtain the farmer contrast loss value in the social service information resource field and the social service information contrast loss value in the social service information resource field according to the first node noise representation of each node corresponding to the social service information resource field and the second node noise representation of each node, specifically including:

[0066] The first node noise representation of each node corresponding to the social service information resource field and the second node noise representation of each node are input into Multiple values ​​are obtained in the formula, and the smallest value is taken as the comparative loss value of farmers in the field of social service information resources.

[0067] The first node noise representation of each node corresponding to the social service information resource field and the second node noise representation of each node are input into A plurality of values ​​are obtained in the formula, and the smallest value is taken as the social service information comparison loss value in the social service information resource field.

[0068] The embodiment of the present invention takes two characteristic fields of social service information resources as examples to introduce the above method in detail, namely, fields α and β, and defines the farmer set as P = {p1, p2, ... p m}, m is the number of farmers; the agricultural social service information set is Q = {q1, q2, ...q n}, n is the number of agricultural social service information; the set of agricultural social service information in the α and β fields is Q α , Q β The farmer sets are P α , P β ,s ij is the score given by farmer j to information i in the information resource. To obtain the characteristic vector of farmers and agricultural social service information in various fields based on the total loss and the initial node representation. The general steps are: First, according to s ij Construct a heterogeneous graph and obtain the feature representation of each node in the heterogeneous graph based on the score. Domain α heterogeneous graph G α =(u α ,v α ) and the heterogeneous graph G of domain β β =(u β ,v β ), where the node set u α = {P α ,Q α},u β = {P β , Q β},v α represents the rating of farmers in field α on the social service information corresponding to field α and field β, v βIt is the score given by farmers in domain β to the agricultural social service information corresponding to domain α and domain β. The farmers with more balanced data distribution and the agricultural social service information to be recommended are generated through the contrastive learning method based on noise enhancement. That is, on the basis of the graph neural network encoder, random uniform noise is added to the original feature representation (feature representation of the node); secondly, different agricultural social service information is compared to learn a more balanced feature expression; thirdly, the multi-head cross-attention transfer method is introduced, so that the system can extract the common characteristics of farmers and the characteristics of the social service information resource field that farmers are concerned about from multiple angles, and perform two-way knowledge transfer; finally, the cross-domain data fusion method is established to dynamically allocate the weights of the common characteristics of farmers and the social service information resource field that they are concerned about. The specific process is as follows: Figure 1 As shown:

[0069] Step 1: Comparative learning fusion of social service information based on noise enhancement

[0070] The present invention fuses random uniform data noise to create a contrast view. Since applying different random noises will produce differences between contrast views, the present invention will generate a fusion matrix ε of farmers and agricultural social service information in each social service information resource field through pre-training. This step mainly includes three core contents, namely data enhancement, contrastive learning and multi-task learning.

[0071] For any field, do the following:

[0072] (1) Data augmentation

[0073] Random uniform noise is added to the original data (feature representation) for data enhancement in order to make the subsequent fused data more evenly distributed in space. Specific method: First, a heterogeneous graph is constructed based on the scores of each farmer on each agricultural social service information, and the feature representation of each node in the heterogeneous graph is calculated using the existing method. Given any node z in the heterogeneous graph and its feature representation ρ in the fusion space, z , the following representation-level enhancements can be achieved:

[0074] f(ρ z ,μ′)→ρ′ z

[0075] f(ρ z ,μ”)→ρ' z'

[0076] Wherein f is the encoder function that encodes the connection information, namely the graph neural network encoder. μ' and μ" are randomly generated white noises, namely the first white noise and the second white noise. A graph neural network is used to perform a convolution operation on the input data, and the node preference is captured and the influence of variance is amplified by propagating data between adjacent nodes. In each layer of the graph neural network, different random noises are integrated into the current node. The views of the same node can be regarded as positive samples of each other, and the views of any two different nodes can be regarded as negative samples of each other. If the impact of the integrated noise is too large, the enhanced sample will lose the performance characteristics of the original sample. Therefore, it is necessary to control the integrated noise not to deviate too much from the sample. The present invention selects randomly generated white noise as the noise to be integrated.

[0077] (2) Contrastive Learning

[0078] Farmer P = {p1, p2, ... p m The contrast loss function of} is expressed as follows, which means to determine The minimum value of the formula is ε P :

[0079]

[0080] Among them, ε P Represents the farmer's comparative loss value, ρ' p and ρ″ p Respectively represent the feature representations of farmer p adding two white noises (the first node noise representation and the second node noise representation), ρ″ q The second node noise representation of agricultural social service information q, the superscript T represents transposition, and ω is an adjustable parameter. The purpose of this loss function is to make ρ' p and ρ″ p can have differentiated characteristics between them, and can also be distinguished from the agricultural social service information that other farmers want to obtain. Represents ρ' p and ρ″ p The similarity between Expressed as ρ' of all farmers in a certain range p and ρ″ q The goal of the contrast loss function is to make the feature vectors of the demand information of the same farmer in different agricultural production or sales scenarios as close as possible, while separating the feature vectors of the demand information of different farmers as much as possible. By maximizing the similarity between two feature vectors of the same farmer, the features extracted by the farmer in different scenarios can be made more consistent and reliable. Minimizing the similarity between the feature vectors of different farmers can increase the system's resolution and thus better distinguish the needs of different farmers.

[0081] According to the same principle, the loss function of agricultural social service information q is expressed as:

[0082]

[0083] Among them, ρ' q The first node noise representation of agricultural social service information q, ε Q represents the comparison loss value of social service information. For each agricultural social service information q, this loss function represents the characteristics of farmers' social service demand information by maximizing the similarity between positive samples and negative samples. Specifically, the numerator in the formula Represents the similarity between the positive sample and the agricultural social service information q, the denominator It represents the similarity between the negative sample and the agricultural social service information q. By taking the minimum value of the above two formulas, the item representation of the similarity between different agricultural social service information can be effectively distinguished.

[0084] (3) Multi-task learning

[0085] The present invention uses multi-task learning to jointly optimize the recommendation function of agricultural social service information. The specific multi-task learning method is:

[0086]

[0087]

[0088] in, Indicates agricultural social service information i a The hidden variable, Indicates agricultural social service information The hidden variable, ρ p represents the hidden variable of farmer p, Represents the calculation of ρ p The transpose of ε0 is the benchmark loss function, k(P,i a ,i b ) is the farmer p's response to agricultural social service information i a The score is higher than that of agricultural social service information b is the score identifier, σ is the Sigmoid function, ε is the loss function after multi-task learning, that is, the multi-task learning loss function value, which is used to maximize the difference between high-scoring information and low-scoring information, η1 and η2 are the comparative learning rates of farmers and agricultural social service information, which are used to adjust the ratio of baseline loss and agricultural social information service information loss. It is a regularization term used to control the complexity of the model and prevent overfitting. θ is the parameter of ε0, and η3 is a hyperparameter that controls regularization.

[0089] Step 2: Multi-head attention feature crossover

[0090] In order to better associate the relevance of farmers' demands for socialized services in different fields and improve the ability to analyze the association of sharable information in different fields, the present invention adopts a multi-head cross-attention method to learn the potential factors of farmers' demands for agricultural socialized service information in two fields by utilizing shared farmers with interaction history, so that all agricultural socialized service information can be fully displayed in a shared space.

[0091] In a certain field (such as a specific field α), the fusion vector of each shared farmer is obtained according to the ε obtained in step 1 and the characteristic representation of each shared farmer in field α (the shared farmer in all social service information resource fields). For example, for a shared farmer p, the ε and ρ of field α are combined. p Fusion Will Projection obtains three vectors, query vector The key vector is Value vector The calculation formula is as follows:

[0092]

[0093]

[0094]

[0095] in, is a learnable matrix.

[0096] Similarly, we can get the projection vector of the common farmer p on the specific field β

[0097] Similarly, the projection vectors of the shared agricultural social service information (the shared agricultural social service information in all social service information resource fields) on domain α and domain β can be obtained. For example, in domain α, for the shared agricultural social service information q, the projection vectors of ε and ρ in domain α can be obtained. q Fusion Calculate the fusion vector of the shared agricultural social service information q Then The three vectors after projection are the same as the field β, which will not be described here.

[0098] The domain single-head cross attention can be expressed as:

[0099]

[0100]

[0101] in is the single-head attention function, Ψ is the normalized exponential function (Softmax function), d k Represents the vector dimension. This formula realizes the cross-fusion of features from different domains and extracts cross-domain feature information from them.

[0102] The single-head attention cross is further extended to multi-head attention cross, so that the invention can fuse and extract cross-domain features from multiple angles. The multi-head attention cross formula is:

[0103]

[0104]

[0105] According to this multi-head attention cross formula and get Then Decompose to get and Among them, h represents the number of longs. is the matrix parameter used to divide the input vector into heads, and Ω is the matrix parameter used to connect the heads. Concat means connecting all heads to form the final output. The cross attention score of each head can be calculated. i , and then connect the cross attention scores of all heads to form the final output. The same is true for the shared agricultural social service information, which will not be repeated here.

[0106] Step 3: Cross-domain feature fusion

[0107] By integrating multi-head attention cross-talk with contrastive learning in different fields, we can obtain common features and specific features in different fields. The formula is as follows:

[0108]

[0109]

[0110]

[0111] They represent the multi-head attention scores of farmer p in domain α, the multi-head attention scores of farmer p in domain β, and λ α , β It is a parameter that controls the retention rate of farmer characteristics in the corresponding field, and the parameter value is between 0 and 1. Δp is the common feature vector of the field of farmer p, E αp 、E βp is the specific domain feature of farmer p in domain α, β, that is, the specific feature vector.

[0112] Use the element attention component to fuse common features, i.e., domain common feature vectors, and domain-specific features as follows:

[0113]

[0114]

[0115] Where * is the matrix element multiplication operation, W α , W β is the weight matrix of the attention network in domains α and β. Similarly, the shared agricultural social service information can be calculated as and The calculation process will not be described here.

[0116] Step 4: Intelligent recommendation based on multi-layer perceptron

[0117] In the multi-layer perception layer of the present invention, the recommendation result in domain α is calculated by the cosine function.

[0118]

[0119] in, They are the farmer integration and agricultural social service information in the domain α after multi-layer perception training, and It is the representation obtained after regularization.

[0120] Similarly, the recommendation results in domain β can be obtained.

[0121] The present invention proposes a cross-domain recommendation method, which can solve the long-tail problem and popularity deviation problem in the recommendation system, thereby improving the personalized performance of the intelligent recommendation system, meeting the use of social services in some characteristic industries, and using the social service information of rich domains to improve the accuracy of farmers' recommendations, so as to better capture the farmers' needs for information use.

[0122] The agricultural social service information recommendation method provided by the present invention is a cross-domain recommendation method based on feature embedding and multi-head cross-attention transfer based on noise-enhanced contrast. First, a more balanced farmer and social service information is generated based on noise-enhanced contrast learning fusion to solve the problems of inconsistent data embedding spatial distribution and recommendation popularity deviation. At the same time, a multi-head cross-attention transmission method is adopted to allow multi-head cross-attention to extract public and personalized information features of farmers in a specific area from multiple angles, and to perform cross-regional bidirectional information transmission. Finally, a cross-domain data fusion method is used to dynamically assign weights to general farmer features and specific field features, so that the recommendation system can learn the interest preferences of general farmers more effectively.

[0123] In one embodiment, a computer system is also provided, including a memory and a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the agricultural social service information recommendation method described in the above method embodiments is implemented. The computer system may be a database, and its internal structure diagram may be as follows: Figure 2 As shown. The computer system includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer system is used to provide computing and control capabilities. The memory of the computer system includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer system is used to store pending transactions. The input / output interface of the computer system is used to exchange information between the processor and an external system. The communication interface of the computer system is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing method is implemented.

[0124] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the agricultural social service information recommendation method described in the above-mentioned method embodiments is implemented.

[0125] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the agricultural social service information recommendation method described in the above-mentioned method embodiments.

[0126] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0128] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0129] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for recommending agricultural social service information, characterized in that: include: Obtaining the characteristic representation of each farmer corresponding to each social service information resource field and the characteristic representation of each agricultural social service information corresponding to each social service information resource field; For any social service information resource field, noise-enhanced contrastive learning and multi-task learning are used to obtain the multi-task learning loss function value corresponding to the social service information resource field according to the characteristic representation of each farmer corresponding to the social service information resource field and the characteristic representation of each agricultural social service information corresponding to the social service information resource field; The multi-task learning loss function value corresponding to the social service information resource field is respectively fused with the feature representation of each common node corresponding to the social service information resource field to obtain the fusion vector of each common node corresponding to the social service information resource field; the common node includes farmers shared by all social service information resource fields and agricultural social service information shared by the social service information resource field; For any common node, a multi-head cross attention method is used to process the fusion vector of the common node corresponding to each social service information resource field to obtain the multi-head attention score of the common node corresponding to each social service information resource field; A cross-domain data fusion method is used to process the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field to obtain the fusion features of the common nodes in each social service information resource field; For any shared farmer, the recommendation result of the shared farmer's agricultural social service information in each social service information resource field is obtained according to the integration characteristics of the shared farmer in each social service information resource field and the integration characteristics of all shared agricultural social service information in each social service information resource field.

2. The agricultural social service information recommendation method according to claim 1, characterized in that: For any social service information resource field, noise-enhanced contrastive learning and multi-task learning are used to obtain the multi-task learning loss function value corresponding to the social service information resource field according to the characteristic representation of each farmer corresponding to the social service information resource field and the characteristic representation of each agricultural social service information corresponding to the social service information resource field, specifically including: For any node corresponding to any social service information resource field, a first white noise and a second white noise are respectively added to the feature representation of the node to obtain a first node noise representation of the node and a second node noise representation of the node; the node is a farmer or social service information; Using contrast learning, according to the first node noise representation of each node corresponding to the social service information resource field and the second node noise representation of each node, the farmer contrast loss value of the social service information resource field and the social service information contrast loss value of the social service information resource field are obtained; Multi-task learning is adopted to obtain the multi-task learning loss function value of the social service information resource field according to the latent vectors of each farmer corresponding to the social service information resource field, the latent vectors of each agricultural social service information corresponding to the social service information resource field, the farmer contrast loss value of the social service information resource field and the social service information contrast loss value of the social service information resource field.

3. The agricultural social service information recommendation method according to claim 1, characterized in that: The cross-domain data fusion method is used to process the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field to obtain the fusion features of the common nodes in each social service information resource field, specifically including: Obtaining domain common feature vectors of the common nodes and specific feature vectors of the common nodes in each social service information resource field according to the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field; The domain common feature vectors of the shared nodes are respectively fused with the specific feature vectors of the shared nodes in each social service information resource field to obtain the fusion features of the shared nodes in each social service information resource field.

4. The agricultural social service information recommendation method according to claim 3, characterized in that: According to the multi-head attention scores of the common nodes corresponding to each social service information resource field and the fusion vectors of the common nodes corresponding to each social service information resource field, the common feature vectors of the common nodes and the specific feature vectors of the common nodes in each social service information resource field are obtained, specifically: According to the formula Calculate the common feature vector of the common nodes, where E Δr represents the common feature vector of the domain with common node r, represents the multi-head attention score of the common node r corresponding to the social service information resource field α, represents the multi-head attention score of the common node r corresponding to the social service information resource field β, represents the fusion vector of the common node r corresponding to the social service information resource domain α, represents the fusion vector of the common nodes r corresponding to the social service information resource domain β; According to the formula Calculate the specific feature vector of the shared nodes in the field of social service information resources, where E αr represents the specific feature vector of the shared node r in the social service information resource domain α, λ α represents the parameter of farmer retention rate in the field of socialized service information resources; According to the formula Calculate the specific feature vector of the shared nodes in the field of social service information resources, where E βr represents the specific feature vector of the shared node r in the social service information resource field β, λ β It represents the parameter of β social service information retention rate in the field of social service information resources.

5. The agricultural social service information recommendation method according to claim 3, characterized in that: The common feature vectors of the common nodes in the field are respectively fused with the specific feature vectors of the common nodes in each social service information resource field to obtain the fusion features of the common nodes in each social service information resource field, specifically: According to the formula Calculate the fusion characteristics of the shared nodes in the social service information resource field α, where represents the fusion characteristics of the shared node r in the social service information resource domain α, W α represents the weight matrix of the attention network on the social service information resource domain α, E ar represents the specific feature vector of the shared node r in the social service information resource domain α, E Δr represents the common feature vector of the domain with common node r; Calculate the integration characteristics of shared nodes in the field of social service information resources, where: represents the fusion characteristics of the shared node r in the social service information resource domain β, W β represents the weight matrix of the attention network on the social service information resource domain β, E βr Represents the specific feature vector of the shared node r in the social service information resource field β.

6. The agricultural social service information recommendation method according to claim 2, characterized in that: Using multi-task learning, according to the latent vectors of each farmer corresponding to the social service information resource field, the latent vectors of each agricultural social service information corresponding to the social service information resource field, the farmer contrast loss value in the social service information resource field, and the social service information contrast loss value in the social service information resource field, the multi-task learning loss function value in the social service information resource field is obtained, specifically including: Obtaining a benchmark loss value for the social service information resource field according to the latent vectors of each farmer corresponding to the social service information resource field and the latent vectors of each agricultural social service information corresponding to the social service information resource field; The multi-task learning loss function value in the social service information resource field is obtained according to the farmer comparison loss value, the social service information comparison loss value and the benchmark loss value in the social service information resource field.

7. A computer system comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the agricultural social service information recommendation method described in any one of claims 1-6.

8. A 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 social service information recommendation method described in any one of claims 1-6.

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 social service information recommendation method described in any one of claims 1-6.