A method and device for recommending new varieties of animals and plants

By matching new varieties with historical varieties and determining target users, the problem of not being able to effectively recommend new varieties of animals and plants in the existing technology is solved, and personalized and accurate new variety recommendations are achieved.

CN118656484BActive Publication Date: 2025-05-30BEIJING RES CENT FOR INFORMATION TECH & AGRI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410728881.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2025-05-30
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

New animal and plant varieties cannot be effectively recommended in the prior art, and there is a problem of cold start.

Method used

By matching the new varieties with all historical varieties in the variety library, multiple historical varieties similar to the new varieties are determined, and target users are determined based on these historical varieties, and new varieties are recommended to target users. The specific steps include preprocessing the resource data of the new variety, determining similar historical varieties using the text similarity measurement model, and determining the target users through the user variety recommendation model.

Benefits of technology

It solves the cold start problem, improves the personalization and accuracy of new variety recommendations, reduces the recommended search space, and takes into account the user's historical preferences and interests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656484B_ABST
    Figure CN118656484B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for recommending new plant and animal varieties, belonging to the field of agricultural technology. The method includes: matching the new variety with all historical varieties in the variety library to obtain multiple historical varieties similar to the new variety; determining multiple target users based on the multiple historical varieties, where the target users are users matching the multiple historical varieties; and recommending the new variety to the multiple target users. The method and device for recommending new plant and animal varieties provided by the present invention, by matching the new variety with historical varieties to obtain historical varieties similar to the new variety, can accurately determine the potential recommendation scope. In the subsequent steps, only users matching the similar historical varieties need to be searched, reducing the recommendation search space, and considering the user's historical preferences and interests, solving the cold start problem, and improving the personalization degree and accuracy of variety recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural technologies, and in particular, to a method and device for recommending new plant and animal varieties. Background Art

[0002] With the development of technology and the transformation of agricultural production methods, agricultural information has shown a trend of rapid growth. The research and development, promotion of new variety resources, and the update of related technologies have generated a large amount of information. This information involves aspects such as planting, breeding, disease prevention and control, and breeding technologies, which are of great significance to farmers and those engaged in agricultural production. Although the amount of information is huge, the effective information is often buried in the vast amount of data. Farmers and agricultural practitioners often face problems such as difficult information retrieval, scattered information, and difficulty in ensuring the authenticity of information when obtaining the required information, making it difficult for them to find accurate and reliable information. Plant and animal variety resources are the basis of agricultural production and play an important role in improving the yield and quality of agricultural products and promoting the sustainable development of agriculture. Therefore, timely understanding and promoting the application of new plant and animal variety resources is of great significance for enhancing agricultural efficiency.

[0003] Currently, the recommendation of agricultural products is usually based on the historical behavior data of users to recommend existing agricultural products to users. Although this method can recommend agricultural products to users, it cannot recommend new varieties and has a cold start problem.

[0004] Therefore, how to recommend new plant and animal varieties has become a technical problem to be solved urgently. Summary of the Invention

[0005] The present invention provides a method and device for recommending new plant and animal varieties to solve the defect in the prior art that new plant and animal varieties cannot be recommended.

[0006] In a first aspect, the present invention provides a method for recommending new plant and animal varieties, including:

[0007] Matching the new variety with all historical varieties in the variety library to obtain a plurality of historical varieties similar to the new variety; based on the plurality of historical varieties, determining a plurality of target users, where the target users are users matching the plurality of historical varieties;

[0008] Recommending the new variety to the plurality of target users.

[0009] According to the method for recommending new plant and animal varieties provided by the present invention, the step of matching the new variety with all historical varieties in the variety library to obtain a plurality of historical varieties similar to the new variety includes:

[0010] Preprocess the resource data of the new variety to obtain the text sequence of the new variety, where the resource data includes text data representing the attributes of the new variety;

[0011] Input the text sequence of the new variety and the text sequence of any historical variety in the variety library into the text similarity measurement model to obtain the similarity output by the text similarity measurement model;

[0012] Based on the similarities between each historical variety in the variety library and the new variety, determine multiple historical varieties similar to the new variety.

[0013] According to a method for recommending new plant and animal varieties provided by the present invention, the text similarity measurement model determines the similarity between the new variety and the historical variety based on the following steps:

[0014] Use the first BERT network to vectorize the text sequence of the new variety to obtain the first feature vector;

[0015] After using the bidirectional maximum matching algorithm to perform entity recognition on the text sequence of the new variety, vectorize the entity recognition result to obtain the first dictionary feature vector;

[0016] Fuse the first feature vector and the first dictionary feature vector to obtain the variety feature vector of the new variety; use the second BERT network to vectorize the text sequence of the historical variety to obtain the second vector;

[0017] After using the bidirectional maximum matching algorithm to perform entity recognition on the text sequence of the historical variety, vectorize the entity recognition result to obtain the second dictionary feature vector;

[0018] Fuse the second feature vector and the second dictionary feature vector to obtain the variety feature vector of the historical variety; based on the variety feature vector of the new variety and the variety feature vector of the historical variety, determine the similarity between the new variety and the historical variety.

[0019] According to a method for recommending new plant and animal varieties provided by the present invention, determining multiple target users based on the multiple historical varieties includes:

[0020] Input the user data of multiple users and the resource data of the multiple historical varieties into the user variety recommendation model to obtain multiple predicted scores output by the user variety recommendation model, where any one of the multiple predicted scores is a predicted value of a user's score for any one of the multiple historical varieties;

[0021] Based on the multiple predicted scores, determine multiple target users.

[0022] According to a method for recommending new varieties of animals and plants provided by the present invention, the user variety recommendation model determines a prediction score based on the following steps:

[0023] Extract features from the user data of a user to obtain user features;

[0024] Extract features from the resource data of the new variety to obtain variety features;

[0025] Based on the user features and the variety features, determine the prediction score of the user for the new variety.

[0026] According to a method for recommending new varieties of animals and plants provided by the present invention, the determining the prediction score of the user for the new variety based on the user features and the variety features includes:

[0027] Calculate the attention weight between the user features and the variety features to obtain an attention weight matrix;

[0028] Based on the attention weight matrix, perform weighted aggregation processing on the user features and the variety features to obtain weighted features;

[0029] Input the weighted features into a fully connected layer network to obtain the prediction score output by the fully connected layer network.

[0030] In a second aspect, the present invention also provides an apparatus for recommending new varieties of animals and plants, including:

[0031] A variety matching module, configured to: match the new variety with all historical varieties in the variety library to obtain a plurality of historical varieties similar to the new variety;

[0032] A user matching module, configured to: based on the plurality of historical varieties, determine a plurality of target users, where the target users are users matching the plurality of historical varieties;

[0033] A variety recommendation module, configured to: recommend the new variety to the plurality of target users.

[0034] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, the steps of any one of the above-mentioned methods for recommending new varieties of animals and plants are implemented.

[0035] In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above-mentioned methods for recommending new varieties of animals and plants are implemented.

[0036] Fifth aspect, the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, it realizes the steps of any one of the above-mentioned methods for recommending new plant and animal varieties.

[0037] The method and device for recommending new plant and animal varieties provided by the present invention match the new variety with all historical varieties in the variety library to obtain multiple historical varieties similar to the new variety; based on the multiple historical varieties, multiple target users are determined, and the target users are users who match the multiple historical varieties; the new variety is recommended to the multiple target users. By matching the new variety with historical varieties to obtain historical varieties similar to the new variety, the potential recommendation scope can be accurately determined. In the subsequent steps, only users who match the similar historical varieties need to be searched, reducing the recommendation search space, and considering the user's historical preferences and interests, solving the cold start problem, and improving the personalization degree and accuracy of variety recommendation. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0039] Figure 1 is one of the flow diagrams of the method for recommending new plant and animal varieties provided by the present invention.

[0040] Figure 2 is the second flow diagram of the method for recommending new plant and animal varieties provided by the present invention.

[0041] Figure 3 is the third flow diagram of the method for recommending new plant and animal varieties provided by the present invention.

[0042] Figure 4 is the structural diagram of the text similarity measurement model provided by the present invention.

[0043] Figure 5 is the structural diagram of the user variety recommendation model provided by the present invention.

[0044] Figure 6 is the structural diagram of the device for recommending new plant and animal varieties provided by the present invention.

[0045] Figure 7 is the structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.

[0047] It should be noted that in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element. The orientation or positional relationship indicated by terms such as "upper", "lower", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "mounted", "connected" and "coupled" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0048] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and do not limit the number of objects. For example, the first object may be one or more. In addition, "and / or" indicates at least one of the connected objects, and the character " / " generally represents an "or" relationship between the associated objects before and after.

[0049] The following will be combined with Figures 1-7 Describe the method and device for recommending new varieties of animals and plants provided by the present invention.

[0050] Figure 1 is a schematic flowchart of the method for recommending new varieties of animals and plants provided by the present invention, as Figure 1As shown, it includes but is not limited to the following steps:

[0051] S110. Match the new variety with all historical varieties in the variety library to obtain multiple historical varieties similar to the new variety;

[0052] S120. Based on the multiple historical varieties, determine multiple target users, where the target users are users matching the multiple historical varieties;

[0053] S130. Recommend the new variety to the multiple target users.

[0054] It should be noted that the execution subject of the method for recommending new animal and plant varieties provided by the embodiments of the present invention can be a server, a computer device, such as a mobile phone, a tablet computer, a notebook computer, a handheld computer, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc.

[0055] It should be understood that the method for recommending new animal and plant varieties provided by the present invention can be applied to the recommendation of new animal varieties and can also be applied to the recommendation of new plant varieties. That is to say, the method for recommending new animal and plant varieties provided by the present invention can be applied to the variety recommendation in agriculture, forestry, animal husbandry, and fishery.

[0056] In S110, the variety library stores all existing animal and / or plant varieties and their related resource data, which can include, for example, information such as the names, classifications, and characteristic descriptions of animals and plants. The method used for matching the new variety with the historical varieties is not limited herein.

[0057] In S120, the target users, that is, the users interested in the multiple historical varieties, can be users interested in any one of the multiple historical varieties, or users interested in at least n historical varieties, where n is a positive integer and 1 < n ≤ the number of multiple historical varieties, and can be specifically set according to actual usage requirements.

[0058] Optionally, based on the user's historical behavior data, determine whether the user is interested in a historical variety. For example, based on the user's historical behavior data, determine the scores of the user for each historical variety, and then determine the historical varieties that the user is interested in.

[0059] The method and device for recommending new plant and animal varieties provided by the embodiments of the present invention match the new variety with all historical varieties in the variety library to obtain multiple historical varieties similar to the new variety; based on the multiple historical varieties, multiple target users are determined, and the target users are users matching the multiple historical varieties; and the new variety is recommended to the multiple target users. By matching the new variety with historical varieties and obtaining historical varieties similar to the new variety, the potential recommendation range can be accurately determined. In the subsequent steps, only users matching the similar historical varieties need to be searched, reducing the recommendation search space, and considering the historical preferences and interests of users, solving the cold start problem, and improving the personalization degree and accuracy of variety recommendation.

[0060] In an optional embodiment, the matching the new variety with all historical varieties in the variety library to obtain multiple historical varieties similar to the new variety includes:

[0061] Preprocess the resource data of the new variety to obtain the text sequence of the new variety, where the resource data includes text data representing the attributes of the new variety;

[0062] Input the text sequence of the new variety and the text sequence of any historical variety in the variety library into a text similarity measurement model to obtain the similarity output by the text similarity measurement model;

[0063] Based on the similarity between each historical variety in the variety library and the new variety, determine multiple historical varieties similar to the new variety.

[0064] Here, the resource data of the new variety includes text data representing the attributes of the new variety, such as text information including the description, label, attributes, etc. of the new variety.

[0065] Before preprocessing the resource data of the new variety, it further includes: cleaning the data to remove duplicate data and unify the format.

[0066] Preprocessing the resource data may specifically include processes such as word segmentation, stop word removal, and stemming to form a tokenized text sequence, which contains special tokens CLS (a special token representing the start of the sequence) and SEP (a special token representing sequence segmentation).

[0067] Here, the text similarity measurement model is a model for measuring the similarity of two text sequences, and the specific type of model used is not limited.

[0068] In the embodiments of the present invention, there is no limitation on the method used to determine multiple historical varieties similar to the new variety based on similarity. For example, it can be to select the top several historical varieties with the highest similarity, or it can be to select historical varieties with similarity greater than a preset threshold.

[0069] Further, the text similarity measurement model determines the similarity between the new variety and the historical variety based on the following steps:

[0070] Use the first BERT network to perform vector representation on the text sequence of the new variety to obtain the first feature vector;

[0071] After using the bidirectional maximum matching algorithm to perform entity recognition on the text sequence of the new variety, vectorize the entity recognition result to obtain the first dictionary feature vector;

[0072] Fuse the first feature vector and the first dictionary feature vector to obtain the variety feature vector of the new variety; use the second BERT network to perform vector representation on the text sequence of the historical variety to obtain the second vector;

[0073] After using the bidirectional maximum matching algorithm to perform entity recognition on the text sequence of the historical variety, vectorize the entity recognition result to obtain the second dictionary feature vector;

[0074] Fuse the second feature vector and the second dictionary feature vector to obtain the variety feature vector of the historical variety; determine the similarity between the new variety and the historical variety based on the variety feature vector of the new variety and the variety feature vector of the historical variety.

[0075] Specifically, simple text matching algorithms such as tf-idf and ngram algorithms count the word frequencies to obtain the numerical vectors of sentences, and then calculate the distances. However, due to the large number of word categories, the obtained vectors are sparse vectors with too high dimensions, and the word frequency matching is basically a literal matching. The more the same words appear, the more similar the two texts are, ignoring the semantic information of the sentences themselves, which has certain limitations. And BERT, as a pre-trained language model for deep semantic information representation, also has very good effects in the task of text matching. Therefore, the present invention uses the Siamese BERT network for variety similarity matching recommendation.

[0076] Figure 4 is a schematic structural diagram of the text similarity measurement model provided by the present invention, as Figure 4As shown in the figure, the Siamese network consists of two BERT sub-networks with the same structure, sharing parameters. The two text features are vectorized respectively through the BERT network, and each sub-network inputs a variety. Optionally, the BERT-Base version is used, and the dimension of the vector is 768. The segmented vector has only two directions. According to the input statement, the first vector is assigned to the word vectors in the first sentence, and the second vector is assigned to the word vectors in the second sentence. The position vector gives the vector representation of the position of each word in the sentence, and the words in the same position have the same vector representation. The input vector is submitted to the core module TRM (Transformer Encoder) of BERT. After passing through the self-attention module and residual operation, the vector is linearly transformed to complete the work of the TRM layer. Through the stacking process of multiple TRMs, finally, for the text sequence of each input variety, the vector corresponding to the CLS token is extracted as the feature vector of the variety resource.

[0077] Furthermore, since new varieties of agricultural animals and plants contain rich domain vocabulary information, the present invention constructs a vocabulary library of animal and plant variety resources, obtains the dictionary feature vector of variety information, and fuses it with the feature vector obtained by the BERT network to more comprehensively represent the variety information resources. Specifically:

[0078] Extract and organize relevant vocabulary in the field of animal and plant varieties, including information such as the names, classifications, and feature descriptions of animals and plants, organize these vocabularies into a dictionary, and store them using a hash table;

[0079] Use the bidirectional maximum matching algorithm for entity recognition;

[0080] Vectorize the entity recognition results to obtain the dictionary feature vector of the entire article;

[0081] Fuse the feature vector obtained by the BERT layer with the dictionary feature vector to obtain the final variety feature vector.

[0082] Here, the method used to fuse the feature vector with the dictionary feature vector is not limited. For example, methods such as splicing and weighting can be used for feature fusion.

[0083] Using the bidirectional maximum matching algorithm for entity recognition specifically includes:

[0084] S1, set the first character of sequence A as the current character;

[0085] S2. Starting from the current character, split 10 characters (the default maximum entity length) in sequence from left to right to obtain a phrase S. Search for the phrase S in the dictionary. If it exists, mark it as an entity recognition result and execute S3. If it does not exist, reduce the number of split characters by one and continue to search in the dictionary until it is found or the phrase length is 1.

[0086] S3. Set the next character of the phrase S as the current character and return to S2.

[0087] S4. Repeat S2 and S3 until the last character of sequence A to obtain the forward matching result.

[0088] S5. Similarly starting from the current position, take several adjacent words in reverse order to form a phrase and perform dictionary matching until it is found or the phrase length is 1 to obtain the reverse matching result.

[0089] S6. Compare the forward matching result and the reverse matching result, merge them, and remove duplicates to obtain the final entity recognition result.

[0090] In the embodiments of the present invention, the method used for vectorization is not limited. For example, vectorization can be performed through Word2Vec to obtain the dictionary feature vector.

[0091] The method for recommending new plant and animal varieties provided by the embodiments of the present invention combines the Siamese BERT twin network and the bidirectional maximum matching algorithm, which can effectively capture the semantic features of the text context and the feature vectors of the variety dictionary, and improve the accurate judgment ability of the similarity between new plant and animal varieties and historical varieties.

[0092] In an alternative embodiment, the text similarity metric model is trained based on the following steps:

[0093] Collect the resource data of new plant and animal varieties and clean and preprocess the data.

[0094] For each new plant and animal variety, generate positive sample pairs and negative sample pairs. Specifically, for each new plant and animal variety, the sample pair of itself and itself is labeled as similar (for example, set the corresponding label value to 1). For each new plant and animal variety, randomly select sample pairs of other different varieties and label them as dissimilar (for example, set the corresponding label value to 0) to ensure that the model does not misidentify data of different varieties as similar during learning.

[0095] Calculate the similarity between the feature vectors of two varieties through the above steps. For example, use cosine similarity to measure the similarity between two vectors:

[0096]

[0097] Among them, Similarity(1,2) represents the similarity between variety feature vector 1 and variety feature vector 2.

[0098] The contrast loss function is used to learn the representation so that similar species information is closer in the representation space and dissimilar species information is farther away. The contrast loss function is defined as:

[0099]

[0100] Where N is the number of training samples, Yi is the similarity label (1 for similarity, 0 for dissimilarity), d is the similarity between the two varieties’ feature vectors, and m is the margin hyperparameter in the loss function. Optionally, based on the performance on the validation set, the m value is selected as 0.5.

[0101] Furthermore, Stochastic Gradient Descent (SGD) is used to update the parameters. Through continuous iterative training, the Siamese BERT network will learn to bring the feature vectors of similar sample pairs closer and push the feature vectors of dissimilar sample pairs farther, thereby achieving the task of similar matching of animal and plant species resources.

[0102] Based on any of the above embodiments, the determining of multiple target users based on the multiple historical varieties includes: inputting user data of multiple users and resource data of the multiple historical varieties into a user variety recommendation model to obtain multiple predicted scores output by the user variety recommendation model, wherein any one of the multiple predicted scores is a predicted value of a user's score for any one of the multiple historical varieties;

[0103] Based on the multiple predicted scores, multiple target users are determined.

[0104] Specifically, user data includes user static resource data and behavior data:

[0105] User static resource data includes static information registered by users on the recommendation platform, such as name, gender, age, region, identity type, and industry; among them, industries are further divided into plantation, animal husbandry, forestry, fishery, and sideline industries, and each industry can be specifically divided into different industries, such as plantation can be further divided into grain, oil, cotton, hemp, beans, etc.; identity types include small farmers, family farms, professional large farmers, farmers' cooperatives, social service organizations, leading enterprises, agricultural researchers, agricultural technology extension personnel, and agricultural management personnel;

[0106] Behavior data is generated by all the operations of users on the recommendation platform, including the browsing, liking, commenting of users on variety resources, and the duration of stay.

[0107] Variety resource data includes the name, identifier, corresponding crop category, variety characteristics, applicable regions, and yields of the variety; among them, variety characteristics include distinctiveness, adaptability, uniformity, stability, regionality, temporality, and limitations; applicable regions include the Northeast, Northwest, North China, etc.

[0108] The new plant and animal variety recommendation method provided by the embodiments of the present invention comprehensively considers the static attribute characteristics, behavioral characteristics of users, and the characteristics of plant and animal variety resources. By analyzing the industry differences and habit differences of users, it proposes a characterization method for user characteristics and variety characteristics for plant and animal variety recommendation. It determines the scores of users for historical varieties through the user variety recommendation model, and then recommends new varieties based on the scores, comprehensively considering user needs and variety characteristics, providing personalized and accurate recommendation services, thereby significantly improving the user experience and satisfaction.

[0109] Further, the user variety recommendation model determines the predicted score based on the following steps:

[0110] Extract features from the user data of a user to obtain user features;

[0111] Extract features from the resource data of the new variety to obtain variety features;

[0112] Based on the user features and the variety features, determine the predicted score of the user for the new variety.

[0113] Figure 5 It is a schematic structural diagram of the user variety recommendation model provided by the present invention, as Figure 5 shown. Optionally, user feature extraction first obtains a feature vector with a dimension of 16 through an embedding layer. For example, gender, age, and industry are h{gender}, h{age}, and h{industry} respectively. Input it into the first fully connected layer, and output a feature vector with a dimension of 128. Then input it into the second fully connected layer, and finally output a user feature with a dimension of 256. Through multiple fully connected layers, the model combines and transforms low-dimensional user features, learns richer high-order feature representations, and obtains user features.

[0114] Optionally, for variety feature extraction, first, other attribute features except the variety name are used to obtain a feature vector with a dimension of 16 through an embedding layer, and then it is input into the first fully connected layer to output a feature vector with a dimension of 128. The variety name obtains features through text convolution. The first layer of the network is a word embedding layer, which consists of an embedding matrix composed of the embedding vectors of each word. The next layer uses convolution kernels of multiple different sizes (window sizes) to perform convolution on the embedding matrix. The window size is set to slide 2, 3, 4, and 5 words each time. The third layer of the network is a max pooling layer to obtain a long vector. And in each training iteration, the outputs of some neurons are randomly set to zero. Through this dropout for regularization, the feature vector of the variety name is finally obtained. The variety name features and other variety features are transformed through multiple hidden layers and finally connected through 1 fully connected layer to form a 256-dimensional variety feature.

[0115] Further, determining the predicted score of the user for the new variety based on the user features and the variety features includes:

[0116] Calculating the attention weights between the user features and the variety features to obtain an attention weight matrix;

[0117] Based on the attention weight matrix, performing weighted aggregation processing on the user features and the variety features to obtain weighted features;

[0118] Inputting the weighted features into a fully connected layer network to obtain the predicted score output by the fully connected layer network.

[0119] Optionally, the parameters of the user variety recommendation model are trained based on the following steps:

[0120] Preprocess the user data and resource data. Specifically, the user identification and variety identification data remain unchanged, and other feature data are converted into numbers. For example, age data is converted into 8 consecutive numbers 0-7 according to age segments; identity data is converted into numbers from 0 to 8; for text data, first create a dictionary from text to numbers, and then convert the descriptions in the text into a list of numbers. To construct a user-variety association matrix, it is necessary to collect the score data of users for plant and animal varieties. However, there is no formatted data that meets the requirements in the publicly available datasets and Internet systems. Therefore, indirect scoring is performed based on the access behavior of users on the variety resource data of the recommendation platform, and different scores are given through users' browsing, liking and other behaviors to obtain the score data of a specific user for a certain variety resource. Finally, the original user features, variety features, and user-variety association features are combined in the format of Table 1 below.

[0121] Table 1 User-Variety Association Feature Table

[0122]

[0123] After extracting user features and variety features based on the above steps, since the importance of features in user features and plant and animal varieties is different, such as the industry information in user features and the crop category in variety features, an attention mechanism is added to make the model pay more attention to the important features between users and items, thereby improving the performance and effect of the model.

[0124] Specifically, calculate the attention weights between user features and variety features. Use the dot product method to calculate the attention weights:

[0125] Attention(u e ,b e ) = softmax(u e T ,W a ,b e );

[0126] Among them, W a is the learned attention weight matrix, u e is the user feature, b e is the variety feature, and the softmax function is used to normalize the attention weights. Weighted sum of the user feature and the variety feature according to the attention weights to obtain a weighted feature representation:

[0127] F = Attention(u e ,b e )[u e ,;b e .

[0128] Send the weighted feature representation into the fully connected layer for processing to predict the score. The fully connected layer is set with 2 hidden layers, and the output of the fully connected layer is expressed as:

[0129] output = σ(Wx + b);

[0130] Among them, x is the input vector, W is the weight matrix connecting the input and the hidden layer, b is the bias vector, and the output of the model is the predicted value of the user's score for the variety.

[0131] Optionally, design a threshold of 0 - 100, compare the predicted value with the true score, and use the mean squared error (MSE) as the loss function to optimize the model. The definition of the MSE optimization loss function is as follows:

[0132]

[0133] Among them, N is the number of samples, y i is the true score, It is the score predicted by the model. The Adam optimizer is used to minimize the MSE loss function, and the learning rate is adaptively adjusted according to the first-order moment estimate and second-order moment estimate of the gradient.

[0134] The new plant and animal variety recommendation method provided by the embodiments of the present invention constructs a user variety recommendation model based on a CNN interest network model and an attention mechanism. Compared with traditional recommendation systems based on statistical analysis or simple rules, this system can better understand user needs and variety characteristics, provide more personalized and accurate recommendation services, thereby significantly improving user experience and satisfaction.

[0135] Figure 2 It is the second flow schematic diagram of the new plant and animal variety recommendation method provided by the present invention;

[0136] Figure 3 It is the third flow schematic diagram of the new plant and animal variety recommendation method provided by the present invention;

[0137] For ease of understanding, the following combines Figure 2 and Figure 3 , and describes the preferred embodiments of the present invention.

[0138] Collect text information of plant and animal varieties, including descriptions, tags, attributes, etc. Use a pre-trained BERT model to encode the text information of the varieties to obtain the text representations of the varieties. Construct a text similarity measurement model based on Siamese BERT. This model accepts the text representations of two varieties as inputs and outputs the similarity score between them. Use a similarity measurement method in the output layer of the model to measure the similarity score between varieties. Store the feature representations of historical varieties in a vector library to accelerate the retrieval process of similar varieties. As new varieties appear, regularly update the variety similarity matching model.

[0139] Extract user basic attribute features and user behavior features based on user static attribute data and behavior data. Collect plant and animal variety resources and extract variety resource attribute information. Construct a user-variety association matrix based on user and variety resource feature data, where rows represent users, columns represent varieties, and each element represents the degree of preference or association of the user for the variety. Construct a user variety recommendation model. The model accepts the static attribute information, behavior information of the user, and the attribute information of the variety as inputs and outputs the association degree score between the user and the variety.

[0140] Construct a knowledge recommendation service. When a new variety appears, first use the text similarity measurement model to obtain historical varieties similar to the new variety; then, use the user variety recommendation model, input the historical varieties similar to the new variety and user information, and obtain the users who should be recommended. The system actively pushes the new variety to users who meet the user's needs, providing personalized and accurate knowledge services.

[0141] In summary, the method for recommending new plant and animal varieties provided by the present invention adopts an advanced Siamese BERT twin network and a bidirectional maximum matching algorithm, which can efficiently process a large amount of plant and animal variety data, and accurately capture the similarities between varieties through a deep learning model, so as to realize the rapid judgment and recommendation of new and old varieties. Compared with traditional data processing methods, this system can significantly improve the processing speed, and while ensuring accuracy, greatly reduce the error rate, providing users with more reliable and accurate recommendation services; comprehensively consider the static attribute characteristics, behavioral characteristics of users and the characteristics of plant and animal variety resources, and through analyzing the industry differences and habit differences of users, propose a user feature and variety feature representation method for plant and animal variety recommendation, construct a user variety recommendation model based on a CNN interest network model and an attention mechanism. Compared with traditional recommendation systems based on statistical analysis or simple rules, this system can better understand user needs and variety characteristics, provide more personalized and accurate recommendation services, thus significantly improving user experience and satisfaction.

[0142] Next, a plant and animal new variety recommendation device provided by an embodiment of the present invention will be described. The plant and animal new variety recommendation device described below can be correspondingly referred to the plant and animal new variety recommendation method described above.

[0143] Figure 6 is a schematic structural diagram of a plant and animal new variety recommendation device provided by the present invention, as Figure 6 shown. The plant and animal new variety recommendation device may include:

[0144] A variety matching module 610, configured to: match a new variety with all historical varieties in a variety library to obtain a plurality of historical varieties similar to the new variety;

[0145] A user matching module 620, configured to: based on the plurality of historical varieties, determine a plurality of target users, where the target users are users matching the plurality of historical varieties;

[0146] A variety recommendation module 630, configured to: recommend the new variety to the plurality of target users.

[0147] It should be noted that the plant and animal new variety recommendation device provided by the embodiment of the present invention, during specific operation, can execute the plant and animal new variety recommendation method described in any of the above embodiments, and this embodiment will not be elaborated herein.

[0148] Figure 7 is a schematic structural diagram of an electronic device provided by the present invention, as Figure 7As shown in the figure, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740. Among them, the processor 710, the communications interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logical instructions in the memory 730 to execute the method for recommending new plant and animal varieties. The method includes: matching the new variety with all historical varieties in the variety library to obtain a plurality of historical varieties similar to the new variety; determining a plurality of target users based on the plurality of historical varieties, where the target users are users matching the plurality of historical varieties; and recommending the new variety to the plurality of target users.

[0149] In addition, when the logical instructions in the above-mentioned memory 730 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0150] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the method for recommending new plant and animal varieties provided in the above-mentioned various embodiments. The method includes: matching the new variety with all historical varieties in the variety library to obtain a plurality of historical varieties similar to the new variety; determining a plurality of target users based on the plurality of historical varieties, where the target users are users matching the plurality of historical varieties; and recommending the new variety to the plurality of target users.

[0151] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the method for recommending new plant and animal varieties provided in the above embodiments. The method includes: matching the new variety with all historical varieties in the variety library to obtain a plurality of historical varieties similar to the new variety; determining a plurality of target users based on the plurality of historical varieties, where the target users are users who match the plurality of historical varieties; and recommending the new variety to the plurality of target users.

[0152] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts.

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

[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements 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. A method for recommending new varieties of animals and plants, characterized in that: include: Matching the new variety with all historical varieties in the variety library to obtain multiple historical varieties similar to the new variety; Based on the multiple historical categories, determining multiple target users, the target users being users matching the multiple historical categories; recommending the new product to the multiple target users; The new variety is matched with all historical varieties in the variety library to obtain multiple historical varieties similar to the new variety, including: Preprocessing the resource data of the new variety to obtain a text sequence of the new variety, wherein the resource data includes text data representing attributes of the new variety; Inputting the text sequence of the new variety and the text sequence of any historical variety in the variety library into a text similarity measurement model to obtain the similarity output by the text similarity measurement model; Based on the similarity between each historical variety in the variety library and the new variety, determining a plurality of historical varieties similar to the new variety; The text similarity measurement model determines the similarity between the new variety and the historical variety based on the following steps: Using a first BERT network to vectorize the text sequence of the new variety to obtain a first feature vector, where the first feature vector represents the semantic features of the text sequence of the new variety; After performing entity recognition on the text sequence of the new product using a bidirectional maximum matching algorithm, the entity recognition result is vectorized to obtain a first dictionary feature vector; fusing the first feature vector and the first dictionary feature vector to obtain a variety feature vector of the new variety; Using a second BERT network to vectorize the text sequence of the historical variety to obtain a second feature vector, wherein the second feature vector represents the semantic features of the text sequence of the historical variety; After using a bidirectional maximum matching algorithm to perform entity recognition on the text sequence of the historical variety, the entity recognition result is vectorized to obtain a second dictionary feature vector; fusing the second feature vector and the second dictionary feature vector to obtain a variety feature vector of the historical variety; Determining the similarity between the new variety and the historical variety based on the variety feature vector of the new variety and the variety feature vector of the historical variety; The determining of a plurality of target users based on the plurality of historical categories comprises: Inputting user data of multiple users and resource data of the multiple historical varieties into a user variety recommendation model to obtain multiple predicted scores output by the user variety recommendation model, wherein any one of the multiple predicted scores is a predicted value of a user's score for any one of the multiple historical varieties; Based on the multiple predicted scores, determining multiple target users; The user data includes user static resource data and behavior data; the user static resource data includes the static information registered by the user on the recommendation platform, including name, gender, age, region, identity type and industry, wherein the industries include plant industry, animal husbandry, forestry, fishery, and sideline industries, each of which includes multiple industries, and the identity types include small farmers, family farms, professional large farmers, farmers' cooperatives, social service organizations, enterprises, agricultural scientific researchers, agricultural technology extension personnel and agricultural management personnel; the behavior data is determined based on the user's operation on the recommendation platform, and the behavior data includes the user's browsing, likes, comments and stay time on the variety resource data; the variety resource data includes the variety name, variety identification, crop category, variety characteristics, applicable area and yield of the variety; The user variety recommendation model determines the predicted score based on the following steps: Extract features from the user data of a user to obtain user features; Extracting features from resource data of the new variety to obtain variety features; Determining a predicted score of the user for the new variety based on the user characteristics and the variety characteristics; The user features are determined based on the following steps: using an embedding layer to embed entities into the user static resource data to obtain a user embedding vector; inputting the user embedding vector into a first user fully connected layer to obtain an intermediate user feature vector output by the first user fully connected layer; inputting the intermediate user feature vector into a second user fully connected layer to obtain user features output by the second user fully connected layer; The variety characteristics are determined based on the following steps: using an embedding layer to embed the variety identification, crop type, variety characteristics, applicable area and yield in the variety resource data to obtain a variety embedding vector; inputting the variety embedding vector into the first variety fully connected layer to obtain an intermediate variety feature vector output by the first variety fully connected layer; using a convolutional network to perform convolution processing on the variety name in the variety resource data to obtain a variety name feature vector; inputting the intermediate variety feature vector and the variety name feature vector into the second variety fully connected layer to obtain the variety characteristics output by the second variety fully connected layer.

2. The method for recommending new animal and plant varieties according to claim 1, characterized in that: The step of determining the user's predicted score for the new variety based on the user characteristics and the variety characteristics includes: Calculating the attention weights between the user features and the product features to obtain an attention weight matrix; Based on the attention weight matrix, weighted aggregation processing is performed on the user features and the product features to obtain weighted features; The weighted features are input into a fully connected layer network to obtain a predicted score output by the fully connected layer network.

3. A device for recommending new species of plants and animals, characterized in that: The method for recommending new animal and plant varieties as claimed in claim 1 comprises: A variety matching module is used to: match the new variety with all historical varieties in the variety library to obtain multiple historical varieties similar to the new variety; A user matching module is used to: determine a plurality of target users based on the plurality of historical categories, wherein the target users are users matching the plurality of historical categories; The variety recommendation module is used to recommend the new variety to the multiple target users.

4. 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 computer program, the steps of the method for recommending new animal and plant varieties as described in any one of claims 1 to 2 are implemented.

5. 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, the steps of the method for recommending new animal and plant varieties as described in any one of claims 1 to 2 are implemented.

6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for recommending new animal and plant varieties as described in any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Medical data processing method and device and storage medium

    CN114550946A

  • Product recommendation method and device

    CN115965420A