An in-depth retrieval method and system for agricultural product information based on an AI model

Through the in-depth search method of agricultural product information based on AI model, a database is built and a similarity discrimination model is trained, and the user input information is used to determine similarity, which solves the problems of low efficiency and insufficient accuracy of existing agricultural product search, and achieves efficient and accurate information acquisition, improving user experience.

CN120067424BActive Publication Date: 2025-07-29SHENZHEN SINOAGRI E-COMMERCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510542259.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-07-29
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

The existing agricultural product search methods are inefficient and insufficiently accurate, which cannot meet users' needs for accurate information, resulting in poor user experience.

Method used

The in-depth search method of agricultural product information based on AI model is adopted. By constructing the database to be retrieved, the neural network model is used to train the agricultural product similarity discrimination model, and the target agricultural product matrix is constructed based on the text and image information input by the user, similarity discrimination and screening are carried out to obtain the most relevant agricultural product information.

Benefits of technology

It improves the accuracy and efficiency of agricultural product search, ensures the comprehensiveness and accuracy of search results, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067424B_ABST
    Figure CN120067424B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of agricultural product information retrieval. An in-depth retrieval method and system for agricultural product information based on an AI model includes: constructing a database to be retrieved, training the AI model using the database to be retrieved to obtain an agricultural product similarity discrimination model, obtaining user input data, constructing a target agricultural product matrix according to the user input data, identifying the retrieved agricultural product matrix in the retrieved agricultural product data group, using the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieved agricultural product matrix to obtain the agricultural product similarity, identifying an effective similarity group in the agricultural product similarity set according to the retrieved output quantity, and obtaining an effective agricultural product group corresponding to the effective similarity group. The present invention can improve the accuracy and efficiency of the agricultural product retrieval process and enhance the user experience.
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 product information retrieval, and particularly to a method and system for in-depth retrieval of agricultural product information based on an AI model. Background Art

[0002] With the continuous development of the agricultural industry and the increasing requirements of consumers for the quality of agricultural products, the importance of agricultural product information retrieval has become increasingly prominent. Consumers not only need to quickly find the required agricultural products, but also expect to obtain comprehensive and accurate product information, including origin, quality, nutritional components, etc. In addition, the complexity and diversity of the agricultural product market make it difficult for traditional retrieval methods to meet the user's demand for accurate information.

[0003] Currently, existing agricultural product retrieval methods mainly rely on keyword matching and simple database query technologies. Although these methods can meet the basic retrieval needs of users to a certain extent, they have obvious limitations. First, the retrieval efficiency of these methods is low and they cannot quickly process a large amount of complex and diverse agricultural product information. Second, the retrieval accuracy for diverse agricultural product information is insufficient, often unable to accurately understand the user's true intention, resulting in low relevance of retrieval results and poor user experience. Summary of the Invention

[0004] The present invention provides a method and system for in-depth retrieval of agricultural product information based on an AI model, and its main purpose is to improve the accuracy and efficiency of the agricultural product retrieval process and enhance the user experience.

[0005] To achieve the above object, a method for in-depth retrieval of agricultural product information based on an AI model provided by the present invention includes:

[0006] Receiving an agricultural product retrieval instruction, and constructing a database to be retrieved based on the agricultural product retrieval instruction, wherein the database to be retrieved includes a set of retrieved agricultural product data groups, and the set of retrieved agricultural product data groups includes multiple retrieved agricultural product data groups, and each retrieved agricultural product data group includes: the name of the agricultural product and the agricultural product matrix corresponding to the name of the agricultural product;

[0007] Training a pre-obtained AI model using the database to be retrieved to obtain an agricultural product similarity discrimination model, wherein the AI model is a neural network model, and the output value of the agricultural product similarity discrimination model is a probability value;

[0008] Obtaining user input data, wherein the user input data includes: user text information and user image information;

[0009] Constructing a target agricultural product matrix according to the user input data;

[0010] Successively extract the retrieved agricultural product data groups in the database to be retrieved, and confirm the retrieved agricultural product matrix in the retrieved agricultural product data groups;

[0011] Use the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieved agricultural product matrix to obtain the agricultural product similarity;

[0012] Summarize the agricultural product similarities to obtain an agricultural product similarity set, and identify the effective similarity groups in the agricultural product similarity set according to the preset number of retrieved outputs. Among them, the number of effective similarities in the effective similarity groups is the same as the number of retrieved outputs;

[0013] Obtain the effective agricultural product groups corresponding to the effective similarity groups, and complete the in-depth retrieval of agricultural product information based on the AI model based on the effective agricultural product groups.

[0014] Optionally, constructing the database to be retrieved based on the agricultural product retrieval instruction includes:

[0015] Determine the agricultural product data source set in the agricultural product retrieval instruction;

[0016] Successively extract the agricultural product data sources in the agricultural product data source set, and obtain the original agricultural product data from the agricultural product data sources. Among them, the original agricultural product data includes: agricultural product names and agricultural product characteristic information, and the agricultural product characteristic information includes: text information and image information;

[0017] According to the preset retrieval direction and agricultural product characteristic information, perform feature recognition on the agricultural product name to obtain the original agricultural product matrix, where the original agricultural product matrix includes: agricultural product feature word vectors and agricultural product feature number vectors;

[0018] Pair the original agricultural product matrix and the agricultural product name to obtain the original agricultural product data group;

[0019] Summarize the original agricultural product data groups to obtain the original agricultural product data group set, perform merging of similar data on the original agricultural product data group set to obtain the retrieved agricultural product data group set, and store the retrieved agricultural product data group set in a pre-constructed cloud platform to obtain the retrieval database.

[0020] Optionally, the performing feature recognition on the agricultural product name according to the preset retrieval direction and agricultural product characteristic information to obtain the original agricultural product matrix includes:

[0021] Set the empty position feature word vector and the empty position feature number vector according to the retrieval direction, and construct the agricultural product feature word set and the agricultural product feature number set according to the agricultural product characteristic information, where the vector dimensions of the empty position feature word vector and the empty position feature number vector are the same;

[0022] Using the set of agricultural product characteristic words and the set of agricultural product characteristic numbers, fill the vacant characteristic word vector and the vacant characteristic number vector respectively to obtain the agricultural product characteristic word vector and the agricultural product characteristic number vector;

[0023] According to the agricultural product characteristic word vector and the agricultural product characteristic number vector, construct an original agricultural product matrix, where the original agricultural product matrix is expressed as:

[0024]

[0025] Among them, represents the original agricultural product matrix, represents the agricultural product characteristic word vector, represents the vector dimension of the agricultural product characteristic word vector or the vector dimension of the agricultural product characteristic number vector, represents the first agricultural product characteristic word in the agricultural product characteristic word vector, represents the th agricultural product characteristic word, represents the agricultural product characteristic number vector, represents the first agricultural product characteristic number in the agricultural product characteristic number vector, represents the th agricultural product characteristic number.

[0026] Optionally, the constructing the set of agricultural product characteristic words and the set of agricultural product characteristic numbers according to the agricultural product characteristic information includes:

[0027] Using a preset natural language processing technology to extract text features from the text information in the agricultural product characteristic information to obtain a set of text feature words and a set of text feature numbers, and using a preset computer vision technology to extract image features from the image information in the agricultural product characteristic information to obtain a set of image feature words and a set of image feature numbers;

[0028] Summarize the set of text feature words and the set of image feature words to obtain a set of agricultural product characteristic words, and summarize the set of text feature numbers and the set of image feature numbers to obtain a set of agricultural product characteristic numbers.

[0029] Optionally, the merging the original agricultural product data set groups of the same type to obtain a retrieved agricultural product data set group includes:

[0030] Classify the original agricultural product data set groups of the same type to obtain multiple groups of agricultural product data of the same type, where the groups of agricultural product data of the same type in the same group of agricultural product data of the same type have the same agricultural product name;

[0031] Extract the groups of agricultural product data of the same type in multiple groups of agricultural product data of the same type in sequence, and identify the set of matrices of agricultural product data of the same type in the groups of agricultural product data of the same type;

[0032] Extract a set of homogeneous matrix element groups from the homogeneous agricultural product matrix set. Among them, the number of homogeneous matrix element groups in the set of homogeneous matrix element groups is the same as the number of matrix elements in the homogeneous agricultural product matrix. The homogeneous matrix elements in the homogeneous matrix element group come from different homogeneous agricultural product matrices in the homogeneous agricultural product matrix set, and the positions of the homogeneous matrix elements in the homogeneous matrix element group in their respective corresponding homogeneous agricultural product matrices are the same;

[0033] Based on the set of homogeneous matrix element groups, merge the homogeneous agricultural product matrix set to obtain a merged agricultural product matrix;

[0034] Pair the merged agricultural product matrix with the corresponding agricultural product names to obtain a set of retrieved agricultural product data groups, and summarize the set of retrieved agricultural product data groups to obtain a set of retrieved agricultural product data groups.

[0035] Optionally, the merging of the homogeneous agricultural product matrix set based on the set of homogeneous matrix element groups to obtain a merged agricultural product matrix includes:

[0036] Successively determine the element categories of each homogeneous matrix element group in the set of homogeneous matrix element groups. Among them, the element categories include: text category and numerical category;

[0037] If the element category of the homogeneous matrix element group is the text category, count the matrix elements in the homogeneous matrix element group and record the matrix elements as merged matrix elements;

[0038] If the element category of the homogeneous matrix element group is the numerical category, calculate the average matrix element of the homogeneous matrix element group and record the average matrix element as the merged matrix element;

[0039] Summarize the merged matrix elements to obtain a set of merged matrix elements, and construct a merged agricultural product matrix based on the set of merged matrix elements.

[0040] Optionally, the training of the pre-acquired AI model using the database to be retrieved to obtain an agricultural product similarity discrimination model includes:

[0041] Generate a test input data set, and successively extract test input data from the test input data set. Among them, the test input data includes: test text information and test image information;

[0042] Determine the test output agricultural products of the test input data, extract the test agricultural product matrix based on the test input data, successively extract the retrieved agricultural product data groups from the database to be retrieved, and confirm the retrieved agricultural product matrices in the retrieved agricultural product data groups;

[0043] Pair the test output agricultural products, the test agricultural product matrix and the retrieved agricultural product matrix to obtain a set of test agricultural products;

[0044] Summarize the test agricultural product groups to obtain a set of test agricultural product groups. Use the set of test agricultural product groups to train the AI model to obtain a trained neural network model, and record the loss function value in the training step. Determine whether the loss function value is greater than a preset standard loss value;

[0045] If the loss function value is greater than the standard loss value, record the trained neural network model as the AI model, and return to the step of generating the test input data set until the loss function value is not greater than the standard loss value;

[0046] If the loss function value is not greater than the standard loss value, record the trained neural network model as the agricultural product similarity discrimination model.

[0047] Optionally, the recording of the loss function value in the training step includes:

[0048] Confirm the composition structure of the neural network model in the AI model. Among them, the composition structure includes: an input layer, a hidden layer, and an output layer. The number of neurons in the input layer is the same as the number of elements in the retrieved agricultural product matrix. The number of neurons in the output layer is 1, and the output value of the output layer is a probability value;

[0049] Record the number of iterations of the training step, and obtain the most recent output value in the training step. Among them, the most recent output value is the output value of the output layer in the last iteration;

[0050] Calculate the loss function value using the following formula:

[0051]

[0052] Among them, represents the loss function value, represents the number of iterations, represents the most recent output value, represents the natural logarithm.

[0053] Optionally, the obtaining of the most recent output value in the training step includes:

[0054] Confirm the activation function and the hidden neuron group in the hidden layer, and obtain the hidden layer activation value group of the hidden neuron group. Among them, the hidden neurons and the hidden layer activation values correspond one by one;

[0055] According to the activation function and the hidden layer activation value group, calculate the most recent output value using the following formula:

[0056]

[0057] Among them, denotes an activation function, denotes the number of hidden neurons in the hidden neuron group, denotes the weight coefficient from the th hidden neuron in the hidden neuron group to the output layer, denotes the th activation value of the hidden layer in the hidden layer activation value group,

[0058] To achieve the above object, the present invention further provides an AI model-based in-depth retrieval system for agricultural product information, including:

[0059] A retrieval database construction module, configured to receive an agricultural product retrieval instruction and construct a database to be retrieved based on the agricultural product retrieval instruction. Among them, the database to be retrieved includes a set of retrieval agricultural product data groups, and the set of retrieval agricultural product data groups includes multiple retrieval agricultural product data groups. Each retrieval agricultural product data group includes: an agricultural product name and an agricultural product matrix corresponding to the agricultural product name;

[0060] An agricultural product model training module, configured to train a pre-obtained AI model using the database to be retrieved to obtain an agricultural product similarity discrimination model. Among them, the AI model is a neural network model, and the output value of the agricultural product similarity discrimination model is a probability value. Obtain user input data, where the user input data includes: user text information and user image information;

[0061] An agricultural product similarity calculation module, configured to construct a target agricultural product matrix according to the user input data, sequentially extract retrieval agricultural product data groups in the database to be retrieved, confirm the retrieval agricultural product matrix in the retrieval agricultural product data group, and use the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieval agricultural product matrix to obtain the agricultural product similarity;

[0062] An effective agricultural product output module, configured to summarize the agricultural product similarities to obtain a set of agricultural product similarities, identify effective similarity groups in the set of agricultural product similarities according to a preset retrieval output quantity. Among them, the number of effective similarities in the effective similarity group is the same as the retrieval output quantity, and obtain an effective agricultural product group corresponding to the effective similarity group.

[0063] To solve the above problems, the present invention further provides an electronic device, and the electronic device includes:

[0064] A memory that stores at least one instruction;

[0065] A processor that executes the instructions stored in the memory to implement the above-mentioned AI model-based in-depth retrieval method for agricultural product information.

[0066] To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned method for in-depth retrieval of agricultural product information based on an AI model.

[0067] To solve the problems described in the background art, the present invention first constructs a database to be retrieved by receiving an agricultural product retrieval instruction, which can ensure that the data in the retrieval database is highly relevant to the user's retrieval needs. At the same time, the data is organized in the form of agricultural product names and corresponding agricultural product matrices, making the data structure clear and facilitating subsequent model processing and analysis. By using the database to be retrieved to train the AI model, the model can learn the internal characteristics and patterns of agricultural product data, thus obtaining a model that can accurately discriminate the similarity of agricultural products. Then, a target agricultural product matrix is constructed based on the user input data, and the multi-modal data input by the user is converted into a target agricultural product matrix, which can unify different types of data into a format that can be processed by the agricultural product similarity discrimination model. This process not only retains the rich information input by the user but also enables this information to be effectively utilized by the subsequent AI model. The construction of the target agricultural product matrix provides a clear input for the model, facilitating the model to perform similarity discrimination and improving the overall performance and efficiency of the retrieval system. Then, the retrieval agricultural product data groups in the database to be retrieved are extracted in sequence, and the retrieval agricultural product matrices therein are confirmed. This step can ensure the systematicness and integrity of the retrieval process, while ensuring that each data group in the database is fully considered, avoiding omission of any agricultural product information that may be relevant to the user's needs, and guaranteeing the comprehensiveness and accuracy of the retrieval results. By using the agricultural product similarity discrimination model to discriminate between the target agricultural product matrix and the retrieval agricultural product matrix, the similarity between the two matrices can be quantitatively evaluated. This model-based similarity discrimination makes full use of the knowledge and patterns learned by the model in the training step, making the calculation of similarity more accurate and objective. The agricultural product similarity output by the agricultural product similarity discrimination model helps to quickly screen out the agricultural product information that best matches the user's needs from a large amount of data. Finally, the effective similarity groups are identified according to the number of retrieval outputs, and the effective agricultural product groups corresponding to the effective similarity groups are obtained. This step can ensure that the number of retrieval results meets the user's needs, avoiding the trouble caused to the user by too many or too few results. This process realizes the effective screening and optimization of the retrieval results, improves the practicality and pertinence of the retrieval results, and enables the user to quickly obtain the most relevant information. Therefore, the present invention can improve the accuracy and efficiency of the agricultural product retrieval process and enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 It is a schematic flowchart of a method for in-depth retrieval of agricultural product information based on an AI model provided by an embodiment of the present invention;

[0069] Figure 2 Function module diagram of the agricultural product information in-depth retrieval system based on the AI model provided by an embodiment of the present invention;

[0070] Figure 3 Structural schematic diagram of an electronic device for implementing the agricultural product information in-depth retrieval method based on the AI model provided by an embodiment of the present invention.

[0071] Explanation of reference numerals:

[0072] 1. Electronic device; 10. Processor; 11. Memory; 12. Bus.

[0073] The realization, functional features and advantages of the object of the present invention will be further described in conjunction with the embodiments with reference to the accompanying drawings. Specific embodiments

[0074] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0075] An embodiment of the present application provides an agricultural product information in-depth retrieval method based on an AI model. The execution subject of the agricultural product information in-depth retrieval method based on the AI model includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the agricultural product information in-depth retrieval method based on the AI model can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0076] Refer to Figure 1 As shown, it is a flowchart of the agricultural product information in-depth retrieval method based on the AI model provided by an embodiment of the present invention. In this embodiment, the agricultural product information in-depth retrieval method based on the AI model includes:

[0077] S1. Receive an agricultural product retrieval instruction, and construct a database to be retrieved based on the agricultural product retrieval instruction. Among them, the database to be retrieved includes a set of retrieved agricultural product data groups, and the set of retrieved agricultural product data groups includes a plurality of retrieved agricultural product data groups. The retrieved agricultural product data group includes: the name of the agricultural product and the agricultural product matrix corresponding to the name of the agricultural product.

[0078] It is understandable that the agricultural product retrieval instruction refers to an instruction for artificially constructing a specific database, and the database to be retrieved refers to the specific database pointed out in the agricultural product retrieval instruction. The particularity of the above-mentioned specific database lies in that since the information of agricultural products includes multiple categories, for example, the functions of agricultural products, the planting costs of agricultural products, the sales information of agricultural products, etc., the data in the database to be retrieved constructed from different categories are also different. For example, when it is required that the database to be retrieved can provide users with detailed sales information of agricultural products, more attention should be paid to the selling prices of agricultural products during the construction of the database to be retrieved, including: the selling prices of agricultural products in different seasons and different regions. The type of agricultural product information that the above-mentioned database to be retrieved is more inclined to is the retrieval direction. The agricultural product name refers to the specific name of the agricultural product, for example: Red Jade Apple, Red Fuji Apple, Sand Flesh Tomato, etc. The agricultural product matrix refers to the feature matrix of the agricultural product represented by the agricultural product name. This agricultural product matrix can represent each feature of the agricultural product in the retrieval direction. The detailed structure of this agricultural product matrix will be given later.

[0079] Specifically, constructing the database to be retrieved based on the agricultural product retrieval instruction includes:

[0080] Determine the set of data sources of agricultural products in the agricultural product retrieval instruction;

[0081] Sequentially extract the data sources of agricultural products from the set of data sources of agricultural products, and obtain the original agricultural product data from the data sources of agricultural products. Among them, the original agricultural product data includes: the agricultural product name and the agricultural product feature information, and the agricultural product feature information includes: text information and image information;

[0082] According to the preset retrieval direction and the agricultural product feature information, perform feature recognition on the agricultural product name to obtain the original agricultural product matrix, where the original agricultural product matrix includes: the agricultural product feature word vector and the agricultural product feature number vector;

[0083] Pair the original agricultural product matrix and the agricultural product name to obtain the original agricultural product data group;

[0084] Summarize the original agricultural product data groups to obtain the set of original agricultural product data groups, merge the same-type data in the set of original agricultural product data groups to obtain the set of retrieved agricultural product data groups, and store the set of retrieved agricultural product data groups in a pre-constructed cloud platform to obtain the retrieval database.

[0085] It is understandable that the source of the agricultural product data refers to the source of data when constructing the database to be retrieved subsequently. For example: agricultural databases, e-commerce platforms, social media, government announcements, agricultural research institutions, and third-party data providers, etc. The agricultural product feature information refers to information related to the names of agricultural products. The retrieval direction refers to the types of agricultural product information set by humans. The pairing means putting the original agricultural product matrix and the agricultural product names into the same array, and the array after putting them in is the original agricultural product data group. The merging of similar data means: merging multiple original agricultural product data groups that belong to the same agricultural product name in the original agricultural product data group, so as to obtain a retrieved agricultural product data group used to describe the characteristics of the corresponding agricultural product name, that is, the agricultural product names included in different retrieved agricultural product data groups in the retrieved agricultural product data group are the same.

[0086] Specifically, the feature recognition of the agricultural product name according to the preset retrieval direction and agricultural product feature information to obtain the original agricultural product matrix includes:

[0087] Set the empty position feature word vector and the empty position feature number vector according to the retrieval direction, and construct the agricultural product feature word set and the agricultural product feature number set according to the agricultural product feature information, where the vector dimensions of the empty position feature word vector and the empty position feature number vector are the same;

[0088] Use the agricultural product feature word set and the agricultural product feature number set to fill the empty position feature word vector and the empty position feature number vector respectively to obtain the agricultural product feature word vector and the agricultural product feature number vector;

[0089] Construct the original agricultural product matrix according to the agricultural product feature word vector and the agricultural product feature number vector, where the original agricultural product matrix is expressed as:

[0090]

[0091] Among them, represents the original agricultural product matrix, represents the agricultural product feature word vector, represents the vector dimension of the agricultural product feature word vector or the vector dimension of the agricultural product feature number vector, represents the first agricultural product feature word in the agricultural product feature word vector, represents the th agricultural product feature word, represents the agricultural product feature number vector, represents the first agricultural product feature number in the agricultural product feature number vector, represents the th agricultural product feature number.

[0092] It is understandable that the vacant feature word vector refers to a vector artificially set to describe the text features of agricultural products. The setting of the vacant feature word vector is related to the retrieval direction. For example, when the retrieval direction is agricultural product sales information, the vacant feature word vector can be set as: (the area with the highest selling price, the area with the highest sales volume, the area with the lowest sales volume). Similarly, the vacant feature number vector refers to a vector artificially set to describe the numerical features of agricultural products. The setting of the vacant feature number vector is also the same as the retrieval direction. When the retrieval direction is agricultural product sales information, the vacant feature number vector can be set as: (the selling price of area 1 during period c, the selling price of area 2 during period c, the selling price of area 1 during period d, the selling price of area 2 during period d).

[0093] It should be explained that the agricultural product feature word set refers to a set of text words used to describe the features of agricultural products. For example: some words describing the color features of agricultural products: red, yellow, etc., and some words describing the functional features of agricultural products: supplement nutrition, promote sleep, etc. The agricultural product feature number set refers to a set of numerical values used to describe the features of agricultural products. For example: some numerical values describing the production cycle of agricultural products: it takes 3 years for a certain apple to start bearing fruit from planting. After entering the full fruit-bearing period, the annual growth cycle is about 180 days. Then the agricultural product features are: 3, 180. Some numerical values describing the sales of agricultural products: during period c, the selling price of a certain apple in area 1 is c1, and in area 2 is c2. During period d, the selling price of the apple in area 1 is d1, and in area 2 is d2. Then the agricultural product features are: c1, c2, d1, d2.

[0094] Furthermore, filling the vacant feature word vector and the vacant feature number vector means: filling the information in the agricultural product feature word set and the agricultural product feature number set into the corresponding positions in the vacant feature word vector and the vacant feature number vector respectively. The filled vacant feature word vector and vacant feature number vector respectively refer to the agricultural product feature word vector and the agricultural product feature number vector.

[0095] It should be noted that since there are empty feature word vectors and information not in the empty feature number vectors in the agricultural product feature word set and the agricultural product feature number set, when filling, these information need to be processed. For example, the empty feature word vector is: (the area with the highest selling price, the area with the highest sales volume, the area with the lowest sales volume), and in addition to the information in the above empty feature word vector, the agricultural product feature word set also includes some morphological information, such as: yellow, round, etc., then these morphological information do not need to be filled into the empty feature word vector. In addition to the above redundant information, the agricultural product feature word set and the agricultural product feature number set will also lack the information contained in the empty feature word vector and the empty feature number vector. For example, the empty feature word vector is: (the area with the highest selling price, the area with the highest sales volume, the area with the lowest sales volume), and the agricultural product feature word set only includes: the area with the highest selling price is area 1, the area with the highest sales volume is area 2, and the information on the area with the lowest sales volume is missing. In this case, a preset neutral character needs to be filled in the missing information position, where the neutral character is a character artificially set to represent no information. For example, "missing" is used as the neutral character. Similarly, when filling the agricultural product feature number set into the empty feature number vector, if the above situation of missing information in the agricultural product feature number set is encountered, a neutral value such as 0 can be set and filled into the missing information position.

[0096] Specifically, constructing the agricultural product feature word set and the agricultural product feature number set according to the agricultural product feature information includes:

[0097] Using a preset natural language processing technology to perform text feature extraction on the text information in the agricultural product feature information to obtain a text feature word set and a text feature number set, and using a preset computer vision technology to perform image feature extraction on the image information in the agricultural product feature information to obtain an image feature word set and an image feature number set;

[0098] Summarize the text feature word set and the image feature word set to obtain the agricultural product feature word set, and summarize the text feature number set and the image feature number set to obtain the agricultural product feature number set.

[0099] It can be understood that the text information is the agricultural product feature information in text form, and the image information is the agricultural product feature information in image form. The natural language processing technology refers to the technology that can automatically segment and extract text, such as: jieba library, NLTK, etc. The text feature word set and the text feature number set respectively refer to the keywords and key numbers obtained after text feature extraction. The computer vision technology refers to the technology that can identify the information in the image, such as: AlexNet, VGGNet, etc. The image feature word set and the image feature number set respectively refer to the keywords and key numbers obtained after image feature extraction.

[0100] Specifically, the process of merging similar data in the original agricultural product data set to obtain a retrieved agricultural product data set includes:

[0101] Classify the original agricultural product data set into similar agricultural products to obtain multiple similar agricultural product data sets. Among them, the similar agricultural product data groups in the same similar agricultural product data set have the same agricultural product name;

[0102] Successively extract the similar agricultural product data sets from the multiple similar agricultural product data sets to identify the similar agricultural product matrix sets in the similar agricultural product data sets;

[0103] Extract a set of similar matrix element groups from the similar agricultural product matrix sets. Among them, the number of similar matrix element groups in the set of similar matrix element groups is the same as the number of matrix elements in the similar agricultural product matrix. The similar matrix elements in the similar matrix element groups come from different similar agricultural product matrices in the similar agricultural product matrix sets, and the positions of the similar matrix elements in the similar matrix element groups in their respective corresponding similar agricultural product matrices are the same;

[0104] Based on the set of similar matrix element groups, merge the similar agricultural product matrix sets to obtain a merged agricultural product matrix;

[0105] Pair the merged agricultural product matrix with the corresponding agricultural product name to obtain a retrieved agricultural product data group, and summarize the retrieved agricultural product data groups to obtain a retrieved agricultural product data set.

[0106] It can be understood that the set of similar agricultural product data groups refers to the set of multiple original agricultural product data groups with the same agricultural product name. The set of similar agricultural product matrices refers to the set of agricultural product matrices in each similar agricultural product data group in the set of similar agricultural product data groups. The set of similar matrix element groups refers to the set of multiple similar matrix element groups. Among them, the similar matrix element group refers to the set of matrix elements in the same position of each similar agricultural product matrix in the set of similar agricultural product matrices. For example: if a set of similar agricultural product matrices includes Matrix 1: (1, 2, 3) and Matrix 2: (4, 5, 6), then the set of similar matrix element groups includes 3 similar matrix element groups, which are (1, 4), (2, 5), and (3, 6) respectively.

[0107] It should be explained that the "merging" refers to merging all the similar agricultural product matrices in the set of similar agricultural product matrices into one matrix, and the merged matrix is the merged agricultural product matrix.

[0108] Specifically, the process of merging the similar agricultural product matrix sets based on the set of similar matrix element groups to obtain a merged agricultural product matrix includes:

[0109] Successively determine the element categories of each group of like matrix elements in the set of like matrix element groups, where the element categories include: text category and numerical category;

[0110] If the element category of the group of like matrix elements is the text category, then count the multiple matrix elements in the group of like matrix elements, and record the multiple matrix elements as combined matrix elements;

[0111] If the element category of the group of like matrix elements is the numerical category, then calculate the average matrix element of the group of like matrix elements, and record the average matrix element as the combined matrix element;

[0112] Summarize the combined matrix elements to obtain a group of combined matrix elements, and construct a combined agricultural product matrix based on the group of combined matrix elements.

[0113] It can be understood that the multiple matrix elements refer to the like matrix elements that appear most frequently in the group of like matrix elements, and the average matrix element refers to the average value of all like matrix elements in the group of like matrix elements. The positions of the matrix elements in the combined agricultural product matrix are the same as those of the matrix elements in the like agricultural product matrix.

[0114] S2. Use the database to be retrieved to train the pre-acquired AI model to obtain an agricultural product similarity discrimination model, where the AI model is a neural network model, and the output value of the agricultural product similarity discrimination model is a probability value.

[0115] It can be understood that the AI model refers to a neural network model, where the neural network model can discriminate the similarity between two matrices and output this similarity. The neural network model includes an input layer, a hidden layer, and an output layer. The number of neurons in the input layer is the same as the number of elements in the agricultural product matrix. The output value of the output layer is one, and the output value is the similarity between two input agricultural product matrices. The process of working with the AI model is as follows: First, receive the text information and image information input by the user, then use natural language processing technology and computer vision technology to analyze the text information and image information input by the user respectively, so as to obtain an agricultural product matrix input by the user. Then, input the agricultural product matrix and a retrieved agricultural product matrix in the database to be retrieved into the trained AI model (i.e., the agricultural product similarity discrimination model), so as to obtain the similarity between the two matrices, and this similarity is the output value output by the agricultural product similarity discrimination model.

[0116] Specifically, the process of using the database to be retrieved to train the pre-acquired AI model to obtain an agricultural product similarity discrimination model includes:

[0117] Generate a test input data set, and sequentially extract test input data from the test input data set. Among them, the test input data includes: test text information and test image information;

[0118] Determine the test output agricultural products of the test input data, extract a test agricultural product matrix based on the test input data, sequentially extract a retrieved agricultural product data group from the database to be retrieved, and confirm the retrieved agricultural product matrix in the retrieved agricultural product data group;

[0119] Pair the test output agricultural products, the test agricultural product matrix, and the retrieved agricultural product matrix to obtain a test agricultural product group;

[0120] Summarize the test agricultural product groups to obtain a set of test agricultural product groups, use the set of test agricultural product groups to train the AI model to obtain a trained neural network model, record the loss function value in the training step, and determine whether the loss function value is greater than a preset standard loss value;

[0121] If the loss function value is greater than the standard loss value, record the trained neural network model as the AI model, and return to the step of generating the test input data set until the loss function value is not greater than the standard loss value;

[0122] If the loss function value is not greater than the standard loss value, record the trained neural network model as an agricultural product similarity discrimination model.

[0123] It should be explained that the test input data set refers to a set of multiple test input data set artificially set. Among them, the test input data is set by relevant test personnel themselves and is used to simulate the data input by users in the actual application environment. For example, if a user wants to know the best-selling fruit agricultural products in Region 1, relevant test personnel can generate the following test input data: Test text information: Determine the fruit agricultural products with the highest sales volume in the region in the image. Test image information: An image of the region.

[0124] Further, the test output agricultural product refers to the agricultural product that should be output by the agricultural product similarity discrimination model after artificially setting the input test input data. For example, in the above example of test input data, if the fruit agricultural product with the highest actual sales volume is an apple, then the apple can be used as the test output agricultural product. The test agricultural product matrix refers to the agricultural product matrix representing the agricultural product feature information in the test input data. The steps for extracting the test agricultural product matrix based on the test input data are the same as those for the original agricultural product matrix, which will not be elaborated here. The loss function value refers to a quantitative index that measures the difference between the model prediction result and the true target during the training of the AI model. It is used to evaluate the performance of the model and guide model optimization. Among them, the prediction result is the agricultural product corresponding to the output value of the AI model, and the true target is the test output agricultural product. The standard loss value refers to a constant set artificially.

[0125] Specifically, recording the loss function value in the training step includes:

[0126] Identifying the composition structure of the neural network model in the AI model. Among them, the composition structure includes an input layer, a hidden layer, and an output layer. The number of neurons in the input layer is the same as the number of elements in the retrieved agricultural product matrix. The number of neurons in the output layer is 1, and the output value of the output layer is a probability value;

[0127] Recording the number of iterations in the training step and obtaining the most recent output value in the training step. Among them, the most recent output value is the output value of the output layer in the last iteration;

[0128] Calculating the loss function value using the following formula:

[0129]

[0130] Among them, represents the loss function value, represents the number of iterations, represents the most recent output value, represents the natural logarithm.

[0131] It can be understood that the most recent output value refers to the output value of the output layer in the last iteration of the training step.

[0132] Specifically, obtaining the most recent output value in the training step includes:

[0133] Identifying the activation function and the hidden neuron group in the hidden layer, and obtaining the hidden layer activation value group of the hidden neuron group, where the hidden neurons and the hidden layer activation values correspond one by one;

[0134] Calculating the most recent output value using the following formula according to the activation function and the hidden layer activation value group:

[0135]

[0136] Among them, represents the activation function, represents the number of hidden neurons in the hidden neuron group, represents the th weight coefficient from the hidden neuron in the hidden neuron group to the output layer, represents the th hidden layer activation value in the hidden layer activation value group, represents the bias parameter of the output layer.

[0137] It can be understood that the activation function refers to the function used to introduce non - linear factors in the neural network model. It can convert the linear output of neurons in the neural network model into non - linear output, so that the neural network model can learn and simulate complex functional relationships. In this solution, the activation function can be selected as ReLU, Leaky ReLU, etc. The hidden neuron group refers to the combination of all neurons in the hidden layer, the hidden layer activation value group refers to the combination of multiple hidden activation values, and the hidden activation value refers to the output value of neurons in the hidden layer.

[0138] S3. Obtain user input data, where the user input data includes: user text information and user image information.

[0139] It can be understood that the user input data refers to the data related to agricultural product information input by the user in the actual application process. Among them, the user text information and the user image information respectively represent the text and image in the user input data.

[0140] S4. Construct a target agricultural product matrix according to the user input data.

[0141] It should be explained that the construction process of the target agricultural product matrix is the same as that of the above - mentioned original agricultural product matrix, which will not be elaborated here. This target agricultural product matrix contains the characteristic information of the agricultural products that the user needs to query.

[0142] S5. Sequentially extract the retrieved agricultural product data groups in the database to be retrieved, and identify the retrieved agricultural product matrix in the retrieved agricultural product data groups.

[0143] It is understandable that by comparing the retrieved agricultural product matrix with the target agricultural product matrix, the similarity between the two matrices can be identified, which is the subsequent agricultural product similarity. This similarity represents the degree of matching between the agricultural products required by the user and the retrieved agricultural product matrix. The higher the agricultural product similarity, the higher the degree of matching between the agricultural products required by the user and the retrieved agricultural product matrix, that is, the higher the probability that the agricultural products corresponding to the retrieved agricultural product matrix are the agricultural products required by the user.

[0144] S6. Use the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieved agricultural product matrix to obtain the agricultural product similarity.

[0145] It is understandable that the agricultural product similarity refers to the output value of the agricultural product similarity discrimination model. The use of the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieved agricultural product matrix means: inputting the target agricultural product matrix and the retrieved agricultural product matrix into the agricultural product similarity discrimination model, and the output value of this agricultural product similarity discrimination model is the agricultural product similarity.

[0146] S7. Aggregate the agricultural product similarities to obtain an agricultural product similarity set, and identify the effective similarity groups in the agricultural product similarity set according to the preset retrieval output quantity. Among them, the number of effective similarities in the effective similarity groups is the same as the retrieval output quantity.

[0147] It is understandable that the retrieval output quantity refers to a constant set by humans, which is used to specify the number of effective similarities in the subsequent given effective similarity groups. The identification of the effective similarity groups in the agricultural product similarity set means: identifying the largest e agricultural product similarities in the agricultural product similarity set, and recording the largest e agricultural product similarities as the effective similarity groups, where e represents the retrieval output quantity.

[0148] S8. Obtain the effective agricultural product groups corresponding to the effective similarity groups, and complete the in-depth retrieval of agricultural product information based on the AI model based on the effective agricultural product groups.

[0149] It should be explained that the effective agricultural product groups refer to the combination of multiple effective agricultural products. Among them, the effective agricultural products refer to the agricultural products corresponding to the retrieved agricultural product matrix in the input of the agricultural product similarity discrimination model when the output is the effective similarity. The effective agricultural product groups can represent the combination of multiple agricultural products that best match the user input data.

[0150] To solve the problems described in the background art, the present invention first constructs a database to be retrieved by receiving an agricultural product retrieval instruction, which can ensure that the data in the retrieval database is highly relevant to the user's retrieval needs. At the same time, the data is organized in the form of agricultural product names and corresponding agricultural product matrices, making the data structure clear and facilitating subsequent processing and analysis by the model. By using the database to be retrieved to train the AI model, the model can learn the internal characteristics and patterns of agricultural product data, thus obtaining a model that can accurately discriminate the similarity of agricultural products. Then, a target agricultural product matrix is constructed based on the user input data. Converting the multi-modal data input by the user into a target agricultural product matrix can unify different types of data into a format that can be processed by the agricultural product similarity discrimination model. This process not only retains the rich information input by the user but also enables this information to be effectively utilized by the subsequent AI model. The construction of the target agricultural product matrix provides a clear input for the model, facilitating the model to perform similarity discrimination and improving the overall performance and efficiency of the retrieval system. Then, the retrieval agricultural product data groups in the database to be retrieved are extracted in sequence, and the retrieval agricultural product matrices therein are confirmed. This step can ensure the systematicness and integrity of the retrieval process, while ensuring that each data group in the database is fully considered, avoiding omission of any agricultural product information that may be relevant to the user's needs, and guaranteeing the comprehensiveness and accuracy of the retrieval results. By using the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieval agricultural product matrix, the similarity between the two matrices can be quantitatively evaluated. This model-based similarity discrimination makes full use of the knowledge and patterns learned by the model in the training step, making the calculation of similarity more accurate and objective. The agricultural product similarity output by the agricultural product similarity discrimination model helps to quickly screen out the agricultural product information that best matches the user's needs from a large amount of data. Finally, the effective similarity groups are identified according to the number of retrieval outputs, and the corresponding effective agricultural product groups of the effective similarity groups are obtained. This step can ensure that the number of retrieval results meets the user's needs, avoiding the trouble caused to the user by too many or too few results. This process realizes the effective screening and optimization of the retrieval results, improves the practicability and pertinence of the retrieval results, and enables the user to quickly obtain the most relevant information. Therefore, the present invention can improve the accuracy and efficiency of the agricultural product retrieval process and enhance the user experience.

[0151] As Figure 2 shown, it is a functional module diagram of an in-depth retrieval system for agricultural product information based on an AI model provided by an embodiment of the present invention.

[0152] The AI model-based in-depth agricultural product information retrieval system 100 described in the present invention can be installed in an electronic device. According to the functions implemented, the AI model-based in-depth agricultural product information retrieval system 100 may include a retrieval database construction module 101, an agricultural product model training module 102, an agricultural product similarity calculation module 103, and an effective agricultural product output module 104. The modules described in the present invention may also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

[0153] The retrieval database construction module 101 is configured to receive an agricultural product retrieval instruction and construct a database to be retrieved based on the agricultural product retrieval instruction. Among them, the database to be retrieved includes a set of retrieval agricultural product data groups. The set of retrieval agricultural product data groups includes multiple retrieval agricultural product data groups, and each retrieval agricultural product data group includes: the name of an agricultural product and the agricultural product matrix corresponding to the name of the agricultural product.

[0154] The agricultural product model training module 102 is configured to train a pre-acquired AI model using the database to be retrieved to obtain an agricultural product similarity discrimination model. Among them, the AI model is a neural network model, and the output value of the agricultural product similarity discrimination model is a probability value. Obtain user input data, where the user input data includes: user text information and user image information.

[0155] The agricultural product similarity calculation module 103 is configured to construct a target agricultural product matrix according to the user input data, sequentially extract retrieval agricultural product data groups in the database to be retrieved, identify the retrieval agricultural product matrix in the retrieval agricultural product data groups, and use the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieval agricultural product matrix to obtain the agricultural product similarity.

[0156] The effective agricultural product output module 104 is configured to summarize the agricultural product similarities to obtain a set of agricultural product similarities, identify effective similarity groups in the set of agricultural product similarities according to a preset retrieval output quantity. The number of effective similarities in the effective similarity groups is the same as the retrieval output quantity, and obtain the corresponding set of effective agricultural products for the effective similarity groups.

[0157] Specifically, each module in the AI model-based in-depth agricultural product information retrieval system 100 in the embodiment of the present invention adopts the same technical means as the Figure 1 in-depth agricultural product information retrieval method based on the AI model described above, and can produce the same technical effects, which will not be elaborated here.

[0158] As Figure 3As shown, it is a schematic structural diagram of an electronic device for implementing a method for in-depth retrieval of agricultural product information based on an AI model provided by an embodiment of the present invention.

[0159] The electronic device 1 may include a processor 10, a memory 11, and a bus 12, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a program for the method for in-depth retrieval of agricultural product information based on an AI model.

[0160] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disc, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as the mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 1. Further, the memory 11 also includes the internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software installed on the electronic device 1 and various types of data, such as the code of the program for the method for in-depth retrieval of agricultural product information based on an AI model, but also be used to temporarily store data that has been output or will be output.

[0161] In some embodiments, the processor 10 may be composed of integrated circuits. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines, and by running or executing programs or modules stored in the memory 11 (such as the program for the method for in-depth retrieval of agricultural product information based on an AI model, etc.), and calling data stored in the memory 11, to execute various functions of the electronic device 1 and process data.

[0162] The bus 12 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to implement connection communication between the memory 11, at least one processor 10, and the like.

[0163] Figure 3 Only an electronic device with components is shown. Those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have a different component layout.

[0164] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for powering each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management system, so as to implement functions such as charge management, discharge management, and power consumption management through the power management system. The power source may also include any components such as one or more DC or AC power sources, a recharge system, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The electronic device 1 may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0165] Furthermore, the electronic device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0166] Optionally, the electronic device 1 may further include a user interface. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visual user interface.

[0167] The program of the deep retrieval method for agricultural product information based on the AI model stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve the following:

[0168] Receive an agricultural product retrieval instruction, and construct a database to be retrieved based on the agricultural product retrieval instruction. Among them, the database to be retrieved includes a set of retrieval agricultural product data groups. The set of retrieval agricultural product data groups includes multiple retrieval agricultural product data groups, and each retrieval agricultural product data group includes: the name of the agricultural product and the agricultural product matrix corresponding to the name of the agricultural product;

[0169] Use the database to be retrieved to train a pre-acquired AI model to obtain an agricultural product similarity discrimination model. Among them, the AI model is a neural network model, and the output value of the agricultural product similarity discrimination model is a probability value;

[0170] Obtain user input data. Among them, the user input data includes: user text information and user image information;

[0171] Construct a target agricultural product matrix according to the user input data;

[0172] Sequentially extract the retrieval agricultural product data groups in the database to be retrieved, and identify the retrieval agricultural product matrices in the retrieval agricultural product data groups;

[0173] Use the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieval agricultural product matrix to obtain the agricultural product similarity;

[0174] Summarize the agricultural product similarities to obtain a set of agricultural product similarities. According to the preset number of retrieval outputs, identify the effective similarity groups in the set of agricultural product similarities. The number of effective similarities in the effective similarity groups is the same as the number of retrieval outputs;

[0175] Obtain the effective agricultural product groups corresponding to the effective similarity groups, and complete the deep retrieval of agricultural product information based on the AI model based on the effective agricultural product groups.

[0176] Specifically, for the specific implementation method of the above instructions by the processor 10, reference can be made to Figures 1 to 3 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0177] Furthermore, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or system capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory).

[0178] The present invention also provides a computer-readable storage medium storing a computer program, which when executed by a processor of an electronic device, can implement:

[0179] Receiving an agricultural product retrieval instruction, constructing a database to be retrieved based on the agricultural product retrieval instruction, wherein the database to be retrieved includes a set of retrieval agricultural product data groups, and the set of retrieval agricultural product data groups includes multiple retrieval agricultural product data groups, and each retrieval agricultural product data group includes: the name of the agricultural product and the agricultural product matrix corresponding to the name of the agricultural product;

[0180] Training a pre-acquired AI model using the database to be retrieved to obtain an agricultural product similarity discrimination model, wherein the AI model is a neural network model, and the output value of the agricultural product similarity discrimination model is a probability value;

[0181] Obtaining user input data, wherein the user input data includes: user text information and user image information;

[0182] Constructing a target agricultural product matrix according to the user input data;

[0183] Sequentially extracting retrieval agricultural product data groups from the database to be retrieved, and identifying the retrieval agricultural product matrices in the retrieval agricultural product data groups;

[0184] Using the agricultural product similarity discrimination model to discriminate between the target agricultural product matrix and the retrieval agricultural product matrix to obtain the agricultural product similarity;

[0185] Summarizing the agricultural product similarities to obtain a set of agricultural product similarities, and identifying valid similarity groups in the set of agricultural product similarities according to a preset retrieval output quantity, wherein the number of valid similarities in the valid similarity groups is the same as the retrieval output quantity;

[0186] Obtaining the corresponding valid agricultural product groups of the valid similarity groups, and completing in-depth retrieval of agricultural product information based on the AI model based on the valid agricultural product groups.

[0187] In several embodiments provided by the present invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and there may be other partitioning methods in actual implementation.

[0188] The modules described as separate components may or may not be physically separated. The components shown as modules 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.

[0189] In addition, each functional module in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.

[0190] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.

[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An in-depth retrieval method for agricultural product information based on an AI model, characterized in that, The method includes: Receiving an agricultural product retrieval instruction, and constructing a database to be retrieved based on the agricultural product retrieval instruction. Among them, the database to be retrieved includes a set of retrieved agricultural product data groups. The set of retrieved agricultural product data groups includes multiple retrieved agricultural product data groups, and each retrieved agricultural product data group includes: the name of the agricultural product and the agricultural product matrix corresponding to the name of the agricultural product; The constructing of the database to be retrieved based on the agricultural product retrieval instruction includes: Determining the set of agricultural product data sources in the agricultural product retrieval instruction; Sequentially extracting agricultural product data sources from the set of agricultural product data sources, and obtaining original agricultural product data from the agricultural product data sources. Among them, the original agricultural product data includes: the name of the agricultural product and agricultural product feature information, and the agricultural product feature information includes: text information and image information; Performing feature recognition on the name of the agricultural product according to the preset retrieval direction and agricultural product feature information to obtain an original agricultural product matrix. The original agricultural product matrix includes: an agricultural product feature word vector and an agricultural product feature number vector, and the original agricultural product matrix is composed of the agricultural product feature word vector and the agricultural product feature number vector; Pairing the original agricultural product matrix and the name of the agricultural product to obtain an original agricultural product data group; Summarizing the original agricultural product data groups to obtain a set of original agricultural product data groups, performing merging of similar data on the set of original agricultural product data groups to obtain a set of retrieved agricultural product data groups, and storing the set of retrieved agricultural product data groups in a pre-constructed cloud platform to obtain a retrieval database; The agricultural product feature word vector and the agricultural product feature number vector include: Setting a blank space feature word vector and a blank space feature number vector according to the retrieval direction, and constructing an agricultural product feature word set and an agricultural product feature number set according to the agricultural product feature information. The vector dimensions of the blank space feature word vector and the blank space feature number vector are the same; Using the agricultural product feature word set and the agricultural product feature number set to fill the blank space feature word vector and the blank space feature number vector respectively to obtain an agricultural product feature word vector and an agricultural product feature number vector; Training a pre-obtained AI model using the database to be retrieved to obtain an agricultural product similarity discrimination model. Among them, the AI model is a neural network model, and the output value of the agricultural product similarity discrimination model is a probability value; Obtaining user input data. Among them, the user input data includes: user text information and user image information; Constructing a target agricultural product matrix according to the user input data; Sequentially extracting retrieved agricultural product data groups from the database to be retrieved, and identifying the retrieved agricultural product matrices in the retrieved agricultural product data groups; Using the agricultural product similarity discrimination model to discriminate between the target agricultural product matrix and the retrieved agricultural product matrix to obtain an agricultural product similarity; Summarizing the agricultural product similarities to obtain a set of agricultural product similarities, and identifying effective similarity groups in the set of agricultural product similarities according to the preset retrieval output quantity. The number of effective similarities in the effective similarity groups is the same as the retrieval output quantity; Obtaining the effective agricultural product groups corresponding to the effective similarity groups, and completing in-depth retrieval of agricultural product information based on the AI model based on the effective agricultural product groups.

2. The method for in-depth retrieval of agricultural product information based on an AI model according to claim 1, characterized in that, The method performs feature recognition on the agricultural product names according to the preset search direction and the agricultural product feature information to obtain an original agricultural product matrix, including: According to the agricultural product feature word vector and the agricultural product feature number vector, an original agricultural product matrix is constructed, wherein the original agricultural product matrix is expressed as: , Among them, represents the original agricultural product matrix, represents the agricultural product feature word vector, represents the vector dimension of the agricultural product feature word vector or the vector dimension of the agricultural product feature number vector, represents the first agricultural product feature word in the agricultural product feature word vector, represents the th agricultural product feature word, represents the agricultural product feature number vector, represents the first agricultural product feature number in the agricultural product feature number vector, represents the th agricultural product feature number.

3. The method for in-depth retrieval of agricultural product information based on an AI model according to claim 2, wherein, The agricultural product feature word set and the agricultural product feature number set are constructed based on the agricultural product feature information, including: Using a preset natural language processing technology to perform text feature extraction on the text information in the agricultural product feature information to obtain a text feature word set and a text feature number set, and using a preset computer vision technology to perform image feature extraction on the image information in the agricultural product feature information to obtain an image feature word set and an image feature number set; The text feature word set and the image feature word set are aggregated to obtain the agricultural product feature word set, and the text feature number set and the image feature number set are aggregated to obtain the agricultural product feature number set.

4. The method for in-depth retrieval of agricultural product information based on an AI model according to claim 3, wherein, The original agricultural product data set is subjected to similar data merging to obtain a retrieved agricultural product data set, including: Classifying the original agricultural product data set into similar agricultural products to obtain multiple similar agricultural product data sets, wherein the similar agricultural product data sets in the same similar agricultural product data set have the same agricultural product name; sequentially extracting similar agricultural product data sets from a plurality of similar agricultural product data sets, and identifying similar agricultural product matrix sets in the similar agricultural product data sets; Extracting a set of similar matrix element groups from a matrix set of similar agricultural products, wherein the number of similar matrix element groups in the set of similar matrix element groups is the same as the number of matrix elements in the matrix of similar agricultural products, the similar matrix elements in the similar matrix element groups come from different similar agricultural product matrices in the matrix set of similar agricultural products, and the similar matrix elements in the similar matrix element groups have the same position in their respective corresponding matrices of similar agricultural products; Based on the set of similar matrix element groups, similar agricultural product matrices are merged to obtain a merged agricultural product matrix; The merged agricultural product matrix is paired with the corresponding agricultural product name to obtain a retrieved agricultural product data group, and the retrieved agricultural product data groups are summarized to obtain a retrieved agricultural product data group set.

5. The method for in-depth retrieval of agricultural product information based on an AI model according to claim 4, characterized in that, The method of merging the similar agricultural product matrix sets based on the similar matrix element groups to obtain the merged agricultural product matrix includes: sequentially determining the element category of each similar matrix element group in the similar matrix element group set, wherein the element category includes: text category and numerical category; If the element category of the similar matrix element group is a text category, counting the majority matrix elements in the similar matrix element group and recording the majority matrix elements as merged matrix elements; If the element category of the similar matrix element group is a numerical category, calculating the average matrix element of the similar matrix element group, and recording the average matrix element as the merged matrix element; The merged matrix elements are aggregated to obtain a merged matrix element group, and a merged agricultural product matrix is constructed based on the merged matrix element group.

6. The method for in-depth retrieval of agricultural product information based on an AI model according to claim 5, wherein The method of using the database to be searched to train the pre-acquired AI model to obtain an agricultural product similarity discrimination model includes: Generate a test input data set, and sequentially extract test input data from the test input data set, where the test input data includes: test text information and test image information; Determine the test output agricultural products of the test input data, extract a test agricultural product matrix based on the test input data, sequentially extract a retrieved agricultural product data group from the database to be retrieved, and confirm the retrieved agricultural product matrix in the retrieved agricultural product data group; Pair the test output agricultural products, the test agricultural product matrix, and the retrieved agricultural product matrix to obtain a test agricultural product group; Summarize the test agricultural product groups to obtain a set of test agricultural product groups, use the set of test agricultural product groups to train an AI model to obtain a trained neural network model, record the loss function value in the training step, and determine whether the loss function value is greater than a preset standard loss value; If the loss function value is greater than the standard loss value, record the trained neural network model as the AI model, and return to the step of generating the test input data set until the loss function value is not greater than the standard loss value; If the loss function value is not greater than the standard loss value, record the trained neural network model as an agricultural product similarity discrimination model.

7. The method for in-depth retrieval of agricultural product information based on an AI model according to claim 6, characterized in that, The recording of the loss function value in the training step includes: Confirm the composition structure of the neural network model in the AI model, where the composition structure includes: an input layer, a hidden layer, and an output layer, and the number of neurons in the input layer is the same as the number of elements in the retrieved agricultural product matrix, the number of neurons in the output layer is 1, and the output value of the output layer is a probability value; Record the number of iterations of the training step and obtain the most recent output value in the training step, where the most recent output value is the output value of the output layer in the last iteration; Calculate the loss function value using the following formula: , Among them, represents the loss function value, represents the number of iterations, represents the most recent output value, represents the natural logarithm.

8. The method for in-depth retrieval of agricultural product information based on an AI model according to claim 7, wherein The obtaining of the most recent output value in the training step includes: Confirm the activation function and the hidden neuron group in the hidden layer, and obtain the hidden layer activation value group of the hidden neuron group, where the hidden neurons correspond one-to-one with the hidden layer activation values; Calculate the most recent output value using the following formula based on the activation function and the hidden layer activation value group: , Among them, represents the activation function, represents the number of hidden neurons in the hidden neuron group, represents the -th hidden neuron in the hidden neuron group to the weight coefficient of the output layer, represents the -th activation value of the hidden layer in the hidden layer activation value group, represents the bias parameter of the output layer.

9. An in-depth retrieval system for agricultural product information based on an AI model, characterized in that, The system includes: A retrieved database construction module for receiving an agricultural product retrieval instruction and constructing a database to be retrieved based on the agricultural product retrieval instruction, where the database to be retrieved includes a set of retrieved agricultural product data groups, and the set of retrieved agricultural product data groups includes multiple retrieved agricultural product data groups, and the retrieved agricultural product data group includes: an agricultural product name and the agricultural product matrix corresponding to the agricultural product name, and the constructing of the database to be retrieved based on the agricultural product retrieval instruction includes: Determine the set of agricultural product data sources in the agricultural product retrieval instruction; Sequentially extract agricultural product data sources from the set of agricultural product data sources, and obtain original agricultural product data from the agricultural product data sources, where the original agricultural product data includes: an agricultural product name and agricultural product feature information, and the agricultural product feature information includes: text information and image information; Based on the preset retrieval direction and agricultural product characteristic information, perform characteristic recognition on the agricultural product name to obtain an original agricultural product matrix, where the original agricultural product matrix includes: an agricultural product characteristic word vector and an agricultural product characteristic number vector, and the original agricultural product matrix is composed of the agricultural product characteristic word vector and the agricultural product characteristic number vector; Pair the original agricultural product matrix and the agricultural product name to obtain an original agricultural product data group; Summarize the original agricultural product data groups to obtain a set of original agricultural product data groups, merge the same-type data in the set of original agricultural product data groups to obtain a set of retrieved agricultural product data groups, and store the set of retrieved agricultural product data groups in a pre-constructed cloud platform to obtain a retrieval database; The agricultural product characteristic word vector and the agricultural product characteristic number vector include: Set a blank characteristic word vector and a blank characteristic number vector according to the retrieval direction, and construct an agricultural product characteristic word set and an agricultural product characteristic number set according to the agricultural product characteristic information, where the vector dimensions of the blank characteristic word vector and the blank characteristic number vector are the same; Use the agricultural product characteristic word set and the agricultural product characteristic number set to fill the blank characteristic word vector and the blank characteristic number vector respectively to obtain the agricultural product characteristic word vector and the agricultural product characteristic number vector; An agricultural product model training module is used to train a pre-obtained AI model using a database to be retrieved to obtain an agricultural product similarity discrimination model, where the AI model is a neural network model, and the output value of the agricultural product similarity discrimination model is a probability value. Obtain user input data, where the user input data includes: user text information and user image information; An agricultural product similarity calculation module is used to construct a target agricultural product matrix according to the user input data, sequentially extract retrieved agricultural product data groups from the database to be retrieved, confirm the retrieved agricultural product matrix in the retrieved agricultural product data groups, and use the agricultural product similarity discrimination model to discriminate the target agricultural product matrix and the retrieved agricultural product matrix to obtain the agricultural product similarity; An effective agricultural product output module is used to summarize the agricultural product similarities to obtain a set of agricultural product similarities, identify effective similarity groups in the set of agricultural product similarities according to the preset retrieval output quantity, where the number of effective similarities in the effective similarity groups is the same as the retrieval output quantity, and obtain an effective agricultural product group corresponding to the effective similarity groups.

Citation Information

Patent Citations

  • Cross-modal retrieval method and device, electronic device and storage medium

    CN113157739A

  • Image retrieval method and device, equipment and storage medium

    CN115495610A