Information retrieval method and device for three-agriculture data and processor

By obtaining the text information input by the user, mapping it into matching data retrieval requests, and performing a data query operation using the preset target mapping relationship, combining the multimodal sorting model for results fusion sorting, solving the problem of inaccurate cross-type data retrieval in the existing technology, and achieving efficient and accurate retrieval of rural data information in rural areas.

CN120448519APending Publication Date: 2025-08-08ABC FINANCIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510546070.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently and accurately retrieve cross-type data from rural data, which leads to inaccurate and time-consuming and labor-intensive search results, making it difficult to meet the information retrieval needs in complex scenarios in rural areas.

Method used

By obtaining the text information input by the user, mapping it into a matching data search request, and performing a data query operation using the preset target mapping relationship, combining the multimodal sorting model for results fusion and sorting to generate target information search results.

Benefits of technology

It has achieved the ability to greatly improve the information retrieval efficiency of rural data while ensuring the accuracy of search, and meet the information retrieval needs in complex scenarios in rural areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448519A_ABST
    Figure CN120448519A_ABST
Patent Text Reader

Abstract

The invention discloses an information retrieval method and device for rural, rural and rural data and a processor. In the scheme, text information input by a user is mapped into a data retrieval request matched with a query intention; if it is determined that the retrieval type of the data retrieval request is mixed data query, determining a target data query path corresponding to the mixed data query from a plurality of data query paths; executing a data query operation based on the target mapping relationship through the target data query path to obtain a query result comprising three-agriculture structured data and three-agriculture non-structured data; and performing fusion sorting on the query results according to the query intention and generating a target information retrieval result. According to the technical scheme, one-time query and simultaneous retrieval of the three-agriculture structured data and the three-agriculture non-structured data are realized through the cross-modal target mapping relationship, and the information retrieval efficiency of the three-agriculture data is greatly improved on the premise of ensuring the retrieval accuracy, so that the information retrieval requirement in a complex scene in the three-agriculture field is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an information retrieval method, device and processor for agriculture, rural areas and farmers data. Background Art

[0002] With the rapid development of information technology, a vast amount of data resources has accumulated in the fields of agriculture, rural areas, and farmers. This data includes not only traditional structured data, such as crop yield statistics and economic income reports, but also a large amount of unstructured data, such as policy documents, agricultural research reports, land use images, meteorological data records, video footage, and social media content. Faced with such a diverse range of data types and ever-increasing data volumes, efficiently and accurately retrieving useful information from this data has become a major challenge.

[0003] Currently, traditional information retrieval methods for agricultural data are often limited to processing a single type of data query request: either queries targeting structured data or searches targeting unstructured data. However, users often need to perform multiple queries when searching across different data types, which is not only time-consuming and labor-intensive, but can also lead to inaccurate search results due to data redundancy and inconsistencies. This makes it difficult to meet the information retrieval needs of the complex agricultural sector.

[0004] Therefore, there is an urgent need for an efficient information retrieval method for agriculture, rural areas and farmers data to meet the information retrieval needs in complex scenarios in the agriculture, rural areas and farmers fields. Summary of the Invention

[0005] Based on the above problems, this application provides an information retrieval method, device and processor for agricultural data, with the aim of improving the information retrieval efficiency of agricultural data while ensuring retrieval accuracy, so as to meet the information retrieval needs in complex scenarios in the agricultural field.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] In a first aspect, the present application provides an information retrieval method for agriculture, rural areas and farmers data, the method comprising:

[0008] Obtaining text information input by a user; the text information includes the user's query intention;

[0009] Mapping the text information into a data retrieval request that matches the query intent; the retrieval type of the data retrieval request is any one of a structured data query, an unstructured data query, and a mixed data query, wherein the mixed data query includes the structured data query and the unstructured data query;

[0010] If it is determined that the retrieval type is the hybrid data query, a target data query path corresponding to the hybrid data query is determined from multiple data query paths, and a target mapping relationship is obtained; the target mapping relationship includes a mapping relationship between multiple primary keys in the Sannong structured database and metadata in the corresponding Sannong unstructured database;

[0011] Performing a data query operation based on the target mapping relationship through the target data query path to obtain a query result; the query result includes the three rural structured data and the three rural unstructured data that match the query intent;

[0012] The query results are fused and sorted according to the query intent, and target information retrieval results are generated.

[0013] In an optional implementation, fusing and sorting the query results according to the query intent and generating target information retrieval results includes:

[0014] Obtaining historical search information corresponding to the user;

[0015] Inputting the historical search information, the query intent, and the query results into a multimodal ranking model, and having the multimodal ranking model perform a fusion ranking on the query results based on the historical search information and the query intent to obtain a ranked query result;

[0016] Determining the result weights of the "Three Rural Issues" structured data and the "Three Rural Issues" unstructured data based on the query intent; the result weights are used to quantify the importance of the "Three Rural Issues" structured data and the "Three Rural Issues" unstructured data in the target information retrieval results;

[0017] adjusting the presentation order of the data in the sorted query results based on the result weights to obtain adjusted query results;

[0018] The target information retrieval result is generated according to the adjusted query result.

[0019] In an optional implementation, the information retrieval method for agriculture, rural areas and farmers data also includes:

[0020] If the retrieval type is the structured data query, determining a first data query path corresponding to the structured data query from a plurality of data query paths;

[0021] Performing a data query operation through the first data query path to query the "Three Rural Issues" structured database for "Three Rural Issues" structured data that matches the query intent, and obtaining a first query result;

[0022] Inputting the first query result and the query intent into a relevance calculation model, and using the relevance calculation model to sort the presentation order of the data in the first query result based on the query intent to obtain a sorted first query result;

[0023] A first information retrieval result is generated according to the sorted first query result.

[0024] In an optional implementation, the information retrieval method for agriculture, rural areas and farmers data also includes:

[0025] If the retrieval type is the unstructured data query, determining a second data query path corresponding to the unstructured data query from a plurality of data query paths;

[0026] Performing a data query operation through the second data query path to query the "Three Rural Issues" unstructured database for "Three Rural Issues" unstructured data that matches the query intent, and obtaining a second query result;

[0027] Calculating a similarity score between each data in the second query result and the query intent;

[0028] sorting the presentation order of the data in the second query result based on the similarity score to obtain a sorted second query result;

[0029] A second information retrieval result is generated according to the sorted second query result.

[0030] In an optional implementation, the step of searching the "Three Rural Issues" unstructured database for "Three Rural Issues" unstructured data that matches the query intent to obtain a second query result includes:

[0031] Calculating the similarity between each piece of unstructured agricultural data in the unstructured agricultural database and the query intention respectively;

[0032] The unstructured data on agriculture, rural areas and farmers with a similarity greater than a preset threshold are used as the unstructured data on agriculture, rural areas and farmers that match the query intention, and the second query result is obtained.

[0033] In an optional implementation, before obtaining the text information input by the user, the method further includes:

[0034] Obtaining the primary key in each of the three rural structured databases and the metadata in the three rural unstructured database corresponding to the three rural structured database;

[0035] Based on the primary key and the corresponding metadata, a mapping relationship is established between the three rural structured database and the three rural unstructured database to obtain a joint index;

[0036] The joint index is mapped to a unified semantic space to obtain the target mapping relationship.

[0037] In an optional implementation, after obtaining the text information input by the user, the method further includes:

[0038] The text information is input into a reinforcement learning model, and the reinforcement learning model predicts a data query path that matches the query intent; the reinforcement learning model is a machine learning model obtained through model training based on historical text information input by multiple users and the corresponding actual data query paths;

[0039] Executing a data query operation through the data query path to obtain a target query result; the target query result includes the "Three Rural Issues" structured data and / or "Three Rural Issues" unstructured data that matches the query intent;

[0040] An information retrieval result is generated according to the target query result.

[0041] In a second aspect of the present application, a device for information retrieval of agricultural data is provided, the device comprising:

[0042] An acquisition module, configured to acquire text information input by a user; the text information includes the user's query intention;

[0043] a mapping module, configured to map the text information into a data retrieval request that matches the query intent; the retrieval type of the data retrieval request being any one of a structured data query, an unstructured data query, and a mixed data query, wherein the mixed data query includes the structured data query and the unstructured data query;

[0044] a determination module configured to, if it is determined that the retrieval type is the hybrid data query, determine a target data query path corresponding to the hybrid data query from a plurality of data query paths, and obtain a target mapping relationship; the target mapping relationship includes a mapping relationship between a plurality of primary keys in the "Three Rural Areas" structured database and metadata in the corresponding "Three Rural Areas" unstructured database;

[0045] An execution module is used to execute a data query operation based on the target mapping relationship through the target data query path to obtain a query result; the query result includes the three rural structured data and the three rural unstructured data that match the query intent;

[0046] The sorting module is used to integrate and sort the query results according to the query intent and generate target information retrieval results.

[0047] In a third aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the above-mentioned information retrieval method for agriculture, rural areas and farmers data is implemented.

[0048] In a fourth aspect of the present application, a processor is provided for running a computer program, which executes the above-mentioned information retrieval method for agriculture, rural areas and farmers data when the computer program is running.

[0049] Compared with the existing technology, this application has the following beneficial effects:

[0050] In the technical solution of the present application, firstly, the text information input by the user is obtained, and the text information includes the user's query intention; secondly, the text information is mapped into a data retrieval request that matches the query intention, and the retrieval type of the data retrieval request is any one of structured data query, unstructured data query and mixed data query, and the mixed data query includes structured data query and unstructured data query; then, if it is determined that the retrieval type is a mixed data query, the optimal data query path (i.e., the target data query path) corresponding to the mixed data query is determined from multiple data query paths; since the preset target mapping relationship includes multiple primary keys in the three rural structured database , and the mapping relationship between the metadata in the corresponding Sannong unstructured database. Therefore, by performing a data query operation using the target mapping relationship through the target data query path, the query results including Sannong structured data and Sannong unstructured data that match the query intent can be obtained, avoiding the waste of resources caused by multiple queries and reducing the time of data query; finally, the query results are fused and sorted according to the query intent to generate the target information retrieval results, ensuring that the information finally presented to the user is both comprehensive and accurate, thereby achieving a significant improvement in the information retrieval efficiency of Sannong data while ensuring the retrieval accuracy, thereby meeting the information retrieval needs in complex scenarios in the Sannong field. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0052] Figure 1 A flowchart of an information retrieval method for agriculture, rural areas and farmers data provided in an embodiment of the present application;

[0053] Figure 2 A flowchart of a target mapping relationship construction process provided in an embodiment of the present application;

[0054] Figure 3 A flowchart of a process for generating target information retrieval results provided in an embodiment of the present application;

[0055] Figure 4 A flowchart of an information retrieval process in a structured data query scenario provided by an embodiment of the present application;

[0056] Figure 5 A flowchart of an information retrieval process in an unstructured data query scenario provided by an embodiment of the present application;

[0057] Figure 6 A schematic structural diagram of an information retrieval device for agriculture, rural areas and farmers data provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] As previously described, traditional information retrieval methods for agricultural data are often limited to processing a single type of data query request: either queries targeting structured data or searches targeting unstructured data. However, users often need to perform multiple queries when searching across different data types, which is not only time-consuming and labor-intensive, but can also lead to inaccurate search results due to data redundancy and inconsistencies. This makes it difficult to meet the information retrieval needs of the complex scenarios in the agricultural sector. Therefore, there is an urgent need for an efficient information retrieval method for agricultural data to meet the information retrieval needs in this complex scenario.

[0059] After research, the inventors proposed an information retrieval method for agricultural data, rural areas and farmers. In this scheme, first, the text information input by the user is obtained, and the text information includes the user's query intention; secondly, the text information is mapped into a data retrieval request that matches the query intention, and the retrieval type of the data retrieval request is any one of structured data query, unstructured data query and mixed data query, and the mixed data query includes structured data query and unstructured data query; then, if it is determined that the retrieval type is a mixed data query, the optimal data query path (i.e., the target data query path) corresponding to the mixed data query is determined from multiple data query paths; since the preset target mapping relationship includes multiple three The mapping relationship between the primary key in the agricultural structured database and the metadata in the corresponding three rural unstructured database is established. Therefore, by performing a data query operation using the target mapping relationship through the target data query path, the query results including the three rural structured data and the three rural unstructured data that match the query intent can be obtained, avoiding the waste of resources caused by multiple queries and reducing the time of data query; finally, the query results are fused and sorted according to the query intent to generate the target information retrieval results, ensuring that the information finally presented to the user is both comprehensive and accurate, thereby achieving a significant improvement in the information retrieval efficiency of the three rural data while ensuring the retrieval accuracy, thereby meeting the information retrieval needs in complex scenarios in the three rural areas.

[0060] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0061] Keyword definitions:

[0062] The ETL process involves extracting, transforming, and loading data from a source system into a target system (such as a data warehouse). It's a crucial component of data integration and processing, and is widely used in data warehouses, big data platforms, and other scenarios requiring data migration or consolidation.

[0063] B-Tree technology: A self-balancing tree data structure widely used in databases and file systems for efficient data access. B-Trees are particularly well-suited for large datasets requiring frequent lookups, sequential access, insertions, and deletions, especially for data stored on disk or external storage.

[0064] Milvus is an open-source vector database designed for efficient storage, indexing, and management of massive feature vector data, while providing fast and accurate similarity search capabilities. It is designed to support a variety of artificial intelligence and machine learning applications, particularly those processing and retrieving high-dimensional data in areas such as image recognition, video analysis, natural language processing, and recommendation systems.

[0065] Method Example

[0066] The embodiment of the present application provides an embodiment of an information retrieval method for agricultural data. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0067] See also Figure 1 , which is a flow chart of an information retrieval method for agriculture, rural areas and farmers data provided by an embodiment of the present application, as shown in FIG. Figure 1 As shown, the method includes the following steps:

[0068] Step S101: obtaining text information input by a user; the text information includes the user's query intention.

[0069] In an optional embodiment, an information retrieval system for agricultural data can serve as the execution subject of the information retrieval method for agricultural data in the embodiment of the present application. For the convenience of description, the information retrieval system for agricultural data will be referred to as the system below. Among them, the information retrieval system for agricultural data can store structured and unstructured data based on the Hadoop Distributed File System (HDFS), and use Spark for parallel processing of large-scale data to support multi-user concurrent queries. The system uses the Nginx tool to achieve load balancing to ensure high system availability, and combines Redis caching technology to cache hot query results to speed up response speed.

[0070] In this embodiment of the present application, after a user enters text information in the system's interactive interface, the system can access the text information through a unified API interface and accurately parse the query intent of the text information. For example, if a user enters the text information "What are the latest agricultural subsidy policies?", the system can parse the text information to determine the query intent is: to query the latest agricultural subsidy policies.

[0071] It should be noted that the unified API interface in this application can support users to perform cross-modal queries through natural language input.

[0072] Step S102: Map the text information into a data retrieval request that matches the query intent.

[0073] In step S102, the retrieval type of the data retrieval request is any one of structured data query (such as SQL query statement), unstructured data query (such as vector retrieval request) and hybrid data query, and the hybrid data query includes structured data query and unstructured data query.

[0074] In an embodiment of the present application, structured data query is used to query structured data in the field of agriculture, rural areas and farmers from a structured database of agriculture, rural areas and farmers (e.g., a predefined SQL database); unstructured data query is used to query unstructured data in the field of agriculture, rural areas and farmers from an unstructured database of agriculture, rural areas and farmers (e.g., a predefined Milvus vector database of the field of agriculture, rural areas and farmers); hybrid data query is used to query structured data and unstructured data at the same time. The system can map text information to a data retrieval request that matches the query intent according to the user's query intent through a query parsing module. For example, if the user intends to query structured data, the system can map the text information to an SQL query statement; if the user intends to query unstructured data, the system can map the text information to a vector retrieval request; if the user intends to query structured data and unstructured data, the system can map the text information to a hybrid data query.

[0075] In an embodiment of the present application, the system can regularly extract structured data in the agricultural, rural and agricultural fields, such as planting records, climate data, policies and regulations, and other structured data from the SQL database through the ETL process, and remove redundant information and outliers in the above data to obtain processed structured data; then the system can use B-Tree technology or Hash technology to establish indexes for high-frequency search fields in the processed structured data, and store the indexed structured data in the SQL database to improve data query efficiency.

[0076] Optionally, the system can also regularly extract unstructured data related to agriculture, rural areas, and farmers, such as agricultural news, expert advice, and social media content, from unstructured data sources such as text, images, and videos. It then uses pre-trained deep learning models (such as BERT or GPT) to convert unstructured data into high-dimensional vector representations while preserving their semantic information. The system can then use a vector database (such as Milvus) to store the processed vector representations and optimize similarity retrieval algorithms.

[0077] Step S103: If it is determined that the retrieval type is a hybrid data query, a target data query path corresponding to the hybrid data query is determined from the multiple data query paths, and a target mapping relationship is obtained.

[0078] In step S103, the target mapping relationship includes mapping relationships between primary keys in multiple Sannong structured databases and metadata in corresponding Sannong unstructured databases.

[0079] In the embodiment of the present application, the predefined multiple data query paths include at least a structured data query path, an unstructured data query path, and a hybrid data query path. When the retrieval type is determined to be a hybrid data query, the system may use the hybrid data query path as the target data query path.

[0080] In order to achieve the goal of executing a data query operation and simultaneously obtaining the structured data and unstructured data of the three rural areas that match the query intent, in the embodiment of the present application, the system can establish a deep association between the structured data and the unstructured data before obtaining the text information input by the user, and map the structured data fields and the unstructured data vector representations to a unified semantic space, thereby obtaining the mapping relationship between multiple structured databases of the three rural areas and the unstructured databases of the three rural areas. Specifically, see Figure 2 , which is a flowchart of a process for constructing a target mapping relationship provided in an embodiment of the present application, and the process includes the following steps:

[0081] Step S201: obtaining the primary key in each "Three Rural Issues" structured database and the metadata in the "Three Rural Issues" unstructured database corresponding to the "Three Rural Issues" structured database.

[0082] In this embodiment of the application, the primary key is a key field used to uniquely identify each piece of structured data in the "Three Rural Issues" structured database. For example, in a farmer information table, an ID number or family ID number might be used as the primary key. Metadata is information associated with each primary key. Metadata may include file name, path, creation time, description, etc., and is used to describe additional information about unstructured data (such as agricultural research reports, land use images, etc.).

[0083] Step S202: Based on the primary key and the corresponding metadata, a mapping relationship is established between the "Three Rural Issues" structured database and the "Three Rural Issues" unstructured database to obtain a joint index.

[0084] In an embodiment of the present application, the system can determine the mapping relationship between structured data and unstructured data based on the primary key and the corresponding metadata, and associate the three rural structured database and the three rural unstructured database through the primary key according to the mapping relationship to construct a joint index, thereby accelerating cross-database queries (that is, executing a data query operation once can simultaneously obtain the three rural structured data and the three rural unstructured data that match the query intent), and support rapid positioning and retrieval of related data.

[0085] Step S203: Map the joint index to a unified semantic space to obtain a target mapping relationship.

[0086] In an embodiment of the present application, the system can use cross-modal alignment technology to map the joint index to a unified semantic space to obtain a target mapping relationship. For example, cross-modal alignment technology can be used to map SQL fields and vector representations to the same semantic space to enhance the semantic consistency of the data.

[0087] Step S104: performing a data query operation based on the target mapping relationship through the target data query path to obtain a query result.

[0088] In step S104, the query results include the "Three Rural Issues" structured data and "Three Rural Issues" unstructured data that match the query intent.

[0089] In an embodiment of the present application, the system can dynamically call structured data queries and unstructured data queries through the target data query path, and based on the target mapping relationship, accurately query the three rural structured data and the three rural unstructured data that match the user's query intention from the three rural structured database and the three rural unstructured database, and merge the queried three rural structured data and the three rural unstructured data to obtain the query results.

[0090] It should be noted that since the preset target mapping relationship includes the mapping relationship between multiple primary keys in the "Three Rural Issues" structured database and the metadata in the corresponding "Three Rural Issues" unstructured database, a data query operation can be performed once using the target mapping relationship through the target data query path to obtain query results including the "Three Rural Issues" structured data and "Three Rural Issues" unstructured data that match the query intent, avoiding the waste of resources caused by multiple queries, reducing the time of data queries, and thus improving data query efficiency.

[0091] In step S105, the query results are fused and sorted according to the query intent, and a target information retrieval result is generated.

[0092] In the embodiment of the present application, the system can use the pre-trained multimodal ranking model to integrate and sort the query results according to the query intent, and generate the final target information retrieval results based on the result weights, ensuring that the information presented to the user is both comprehensive and accurate, thereby achieving a significant improvement in the information retrieval efficiency of the "Three Rural Areas" data while ensuring the accuracy of the retrieval, thereby meeting the information retrieval needs in complex scenarios in the "Three Rural Areas" field. Specifically, see Figure 3 , which is a flowchart of a process for generating target information retrieval results provided by an embodiment of the present application, the process includes the following steps:

[0093] Step S1051: Obtain historical search information corresponding to the user.

[0094] In the embodiment of the present application, the historical search information is N pieces of related information or content that the user has viewed before the current search.

[0095] In step S1052, the historical search information, query intent, and query results are input into a multimodal ranking model, and the multimodal ranking model performs fusion ranking on the query results based on the historical search information and query intent to obtain a ranked query result.

[0096] In an embodiment of the present application, the multimodal ranking model is a machine learning model (e.g., Learning to Rank) obtained through model training based on multiple users' historical search information, query intent, query results corresponding to the query intent, and the actual ranking results corresponding to the query results (i.e., the actual ranked query results). The system can use the multimodal ranking model to fuse and sort query results based on historical search information and query intent to obtain query results (i.e., ranked query results) that can accurately meet the user's search needs.

[0097] Step S1053: Determine the result weights of the "Three Rural Issues" structured data and the "Three Rural Issues" unstructured data based on the query intent.

[0098] In step S1053 , the result weight is used to quantify the importance of the "Three Rural Issues" structured data and the "Three Rural Issues" unstructured data in the target information retrieval results.

[0099] For example, the user's query intention is "to find unstructured data such as specific technical guidance and case studies on improving apple yields, as well as structured data such as the average apple yields in different regions and specific numbers in success cases." At this time, the system can determine based on the above query intention that unstructured data (such as technical documents written by agricultural experts, video tutorials, farmer interview records, etc.) directly provide the practical technologies and methods required by users, which are very helpful for solving practical problems. Therefore, the system can set the result weight of the unstructured data on agriculture, rural areas and farmers to 0.75; while structured data (such as the average yield of specific varieties of apples in different regions, data tables of optimal fertilizer application amount and time, etc.) can only provide additional supporting information for "best practices" queries, such as verifying the effectiveness of certain practices. Therefore, the system can set the result weight of the structured data on agriculture, rural areas and farmers to 0.25.

[0100] Step S1054: adjusting the presentation order of the data in the sorted query results based on the result weights to obtain adjusted query results.

[0101] For example, the system may prioritize displaying the unstructured data with a result weight of 0.75 on the system's interactive interface, and set the display position of the structured data with a result weight of 0.25 after the unstructured data, so that users can find the required information faster, thereby improving the user experience.

[0102] Step S1055: Generate target information retrieval results based on the adjusted query results.

[0103] In an embodiment of the present application, the system can convert the structured data in the adjusted query results into statistical charts (such as line charts, bar charts), highlight the keywords in the unstructured data, and perform sentiment analysis visualization to generate multimodal sentiment analysis charts to obtain the final retrieval results (i.e., target information retrieval results), thereby realizing the visualization of the retrieval results and providing users with more intuitive result display and analysis support, which is particularly valuable in agricultural decision-making scenarios, thereby enhancing the user experience.

[0104] In order to accurately meet the information retrieval needs in complex scenarios in the agricultural sector and reduce the waste of system resources, in the embodiment of the present application, the system can also perform information retrieval for data retrieval requests of a single retrieval type (such as structured data query or = unstructured data query). Specifically, see Figure 4 , which is a flowchart of an information retrieval process in a structured data query scenario provided by an embodiment of the present application, and the process includes the following steps:

[0105] Step S401: If the search type is a structured data query, a first data query path corresponding to the structured data query is determined from a plurality of data query paths.

[0106] In an embodiment of the present application, when the retrieval type is a structured data query, the system may use the structured data query path as the first data query path, which may execute multi-table association and aggregation queries in an SQL database.

[0107] Step S402: performing a data query operation through the first data query path to query the "Three Rural Issues" structured database for "Three Rural Issues" structured data that matches the query intent, and obtaining a first query result.

[0108] For example, the system can perform data query operations through the first data query path to perform multi-table association and aggregation queries in the SQL database to obtain the three rural structured data that matches the user's query intention, and use the queried three rural structured data as the first query result.

[0109] In step S403, the first query result and the query intent are input into a relevance calculation model, and the relevance calculation model sorts the presentation order of the data in the first query result based on the query intent to obtain a sorted first query result.

[0110] In an embodiment of the present application, the correlation calculation model may be a TF-IDF model, through which the presentation order of the data in the first query result can be sorted based on the query intent. For example, for the query intent "how to increase wheat yield", the system can calculate the TF-IDF values of keywords such as "wheat" and "yield" in the query intent through the correlation calculation model, and sort the presentation order of the data in the first query result from high to low according to the TF-IDF value to obtain the sorted first query result.

[0111] Step S404: Generate a first information retrieval result based on the sorted first query result.

[0112] In an embodiment of the present application, the system may convert the structured data in the sorted first query result into a statistical chart (eg, a line chart, a bar chart) to obtain the final first information retrieval result.

[0113] See also Figure 5 , which is a flowchart of an information retrieval process in an unstructured data query scenario provided by an embodiment of the present application, and the process includes the following steps:

[0114] Step S501: If the search type is an unstructured data query, a second data query path corresponding to the unstructured data query is determined from multiple data query paths.

[0115] In an embodiment of the present application, when the search type is an unstructured data query, the system may use the unstructured data query path as the second data query path, which can perform efficient similarity search through the vector database.

[0116] Step S502: Execute a data query operation through the second data query path to query the "Three Rural Issues" unstructured database for unstructured data matching the query intent, and obtain a second query result.

[0117] In an embodiment of the present application, the system can respectively calculate the similarity between each piece of unstructured agricultural data in the unstructured agricultural database and the query intent; then the unstructured agricultural data with a similarity greater than a preset threshold is regarded as the unstructured agricultural data that matches the query intent, and obtain a second query result.

[0118] Step S503: Calculate the similarity score between each data in the second query result and the query intent.

[0119] In an embodiment of the present application, the system may calculate the similarity score between each data in the second query result and the query intent through cosine similarity or Euclidean distance.

[0120] Step S504 : sorting the presentation order of the data in the second query result based on the similarity score to obtain a sorted second query result.

[0121] In an embodiment of the present application, the system may sort the presentation order of the data in the second query result in descending order of similarity scores to obtain a sorted second query result.

[0122] Step S505: Generate a second information retrieval result based on the sorted second query result.

[0123] In an embodiment of the present application, the system can highlight the keywords in the unstructured data in the sorted second query result, and perform sentiment analysis visualization to generate a multimodal sentiment analysis graph to obtain a second information retrieval result.

[0124] To further improve retrieval efficiency, after obtaining the text information input by the user, the system can use a pre-trained reinforcement learning model to quickly predict a data query path that matches the query intent based on the text information input by the user, execute a data query operation based on the data query path, and generate information retrieval results. Specifically, the above process includes the following steps:

[0125] Step S1: input text information into a reinforcement learning model, and the reinforcement learning model predicts a data query path that matches the query intent.

[0126] In step S1, the reinforcement learning model is a machine learning model obtained through model training based on historical text information input by multiple users and corresponding actual data query paths.

[0127] Step S2: Execute the data query operation through the data query path to obtain the target query result.

[0128] In step S2, the target query results include the "Three Rural Issues" structured data and / or "Three Rural Issues" unstructured data that match the query intent.

[0129] In an embodiment of the present application, if the data query path is a structured data query path, the target query result of the query includes the three rural structured data; if the data query path is an unstructured data query path, the target query result of the query includes the three rural unstructured data; if the data query path is a mixed data query path, the target query result of the query includes the three rural structured data and the three rural unstructured data.

[0130] Step S3: Generate information retrieval results based on the target query results.

[0131] In an embodiment of the present application, if the target query results include structured data on agriculture, rural areas and farmers and unstructured data on agriculture, rural areas and farmers, the system can integrate and sort the target query results according to the query intent, and adjust the presentation order of the data in the sorted target query results based on the result weight; the system can also convert the structured data in the adjusted target query results into statistical charts (such as line charts, bar charts), highlight the keywords in the unstructured data, and perform sentiment analysis visualization to generate a multimodal sentiment analysis chart to obtain the final retrieval results (i.e., the target information retrieval results), thereby realizing the visual presentation of the retrieval results, providing users with more intuitive result display and analysis support, and thus enhancing the user experience.

[0132] Optionally, if the target query results include structured data on agriculture, rural areas and farmers or unstructured data on agriculture, rural areas and farmers, the system can integrate and sort the target query results according to the query intent, and generate information retrieval results based on the sorted target query results.

[0133] Optionally, the system can also predict the resource allocation of the query load through a reinforcement learning model, and dynamically adjust the resource allocation of the system query load based on the resource allocation.

[0134] It should be noted that the above steps S1 to S3 are not shown in the figure.

[0135] In an optional embodiment, the information retrieval method for the "Three Rural Issues" data provided in the embodiment of the present application can be applied to various application scenarios in the "Three Rural Issues" field, such as agricultural policy interpretation, precise planting guidance, and market price trend analysis. For example, when a user enters "What are the latest agricultural subsidy policies?", the system can automatically retrieve relevant content from the policy and regulations library and display the most relevant entries by semantic similarity sorting; when a user enters "Corn planting suggestions suitable for the Northeast region", the system integrates climate data (structured data) and expert literature (unstructured data) to provide suggestions on planting time and methods. When a user enters "Corn planting suggestions suitable for the Northeast region", the system integrates climate data (structured data) and expert literature (unstructured data) to provide suggestions on planting time and methods.

[0136] The information retrieval method for the three rural data provided by the embodiment of the present application realizes the simultaneous retrieval of the three rural structured data and the three rural unstructured data in one query. Under the premise of ensuring the retrieval accuracy, the information retrieval efficiency of the three rural data is greatly improved, thereby meeting the information retrieval needs in complex scenarios in the three rural areas. The information retrieval method for the three rural data provided by the embodiment of the present application realizes the significant improvement of the efficiency and accuracy of cross-modal information retrieval by constructing a unified data fusion and retrieval architecture, optimizing semantic understanding and retrieval path design, especially in the field of agricultural information management, which can provide technical support for agricultural policy interpretation and smart agricultural decision-making, and significantly improve the level of agricultural informatization and intelligence.

[0137] Device embodiment

[0138] The embodiment of the present application provides an information retrieval device for agriculture, rural areas and farmers data, wherein: Figure 6 This is a structural diagram of an information retrieval device for agriculture, rural areas and farmers data provided by an embodiment of the present application, such as Figure 6 As shown, the device includes: an acquisition module 11, a mapping module 12, a determination module 13, an execution module 14 and a sorting module 15. Figure 6 You can see the connection relationship between several modules.

[0139] The acquisition module 11 is used to acquire text information input by the user; the text information includes the user's query intention;

[0140] A mapping module 12 is configured to map text information into a data retrieval request that matches the query intent; the retrieval type of the data retrieval request is any one of a structured data query, an unstructured data query, and a mixed data query, wherein the mixed data query includes a structured data query and an unstructured data query;

[0141] Determination module 13 is configured to, if the retrieval type is determined to be a hybrid data query, determine a target data query path corresponding to the hybrid data query from the multiple data query paths and obtain a target mapping relationship; the target mapping relationship includes mapping relationships between multiple primary keys in the "Three Rural Areas" structured database and metadata in the corresponding "Three Rural Areas" unstructured database;

[0142] An execution module 14 is configured to execute a data query operation based on a target mapping relationship through a target data query path to obtain a query result; the query result includes structured data and unstructured data related to agriculture, rural areas and farmers that match the query intent;

[0143] The sorting module 15 is used to integrate and sort the query results according to the query intent and generate target information retrieval results.

[0144] Optionally, the sorting module includes:

[0145] An acquisition unit, used to acquire historical search information corresponding to the user;

[0146] A ranking unit is used to input historical search information, query intent, and query results into a multimodal ranking model, and the multimodal ranking model integrates and ranks the query results based on the historical search information and query intent to obtain ranked query results;

[0147] The first determining unit is used to determine the result weights of the "Three Rural Issues" structured data and the "Three Rural Issues" unstructured data based on the query intent; the result weights are used to quantify the importance of the "Three Rural Issues" structured data and the "Three Rural Issues" unstructured data in the target information retrieval results;

[0148] An adjustment unit, configured to adjust the presentation order of data in the sorted query results based on the result weights, to obtain adjusted query results;

[0149] The generating unit is used to generate a target information retrieval result according to the adjusted query result.

[0150] Optionally, the information retrieval device for agriculture, rural areas and farmers data further includes:

[0151] a first determining module configured to determine, if the retrieval type is a structured data query, a first data query path corresponding to the structured data query from a plurality of data query paths;

[0152] A first execution module is configured to execute a data query operation through a first data query path to query the "Three Rural Issues" structured database for "Three Rural Issues" structured data that matches the query intent, and obtain a first query result;

[0153] A first ranking module is configured to input the first query result and the query intent into a relevance calculation model, and the relevance calculation model sorts the presentation order of the data in the first query result based on the query intent to obtain a sorted first query result;

[0154] The first generating module is used to generate a first information retrieval result according to the sorted first query result.

[0155] Optionally, the information retrieval device for agriculture, rural areas and farmers data further includes:

[0156] a second determining module, configured to determine, if the retrieval type is an unstructured data query, a second data query path corresponding to the unstructured data query from the plurality of data query paths;

[0157] A second execution module is configured to execute a data query operation through a second data query path to query the "Three Rural Issues" unstructured database for unstructured agricultural data that matches the query intent, and obtain a second query result;

[0158] A calculation module, configured to calculate a similarity score between each data in the second query result and the query intent;

[0159] A second sorting module is used to sort the presentation order of the data in the second query result based on the similarity score to obtain a sorted second query result;

[0160] The second generating module is used to generate a second information retrieval result according to the sorted second query result.

[0161] Optionally, the second execution module includes:

[0162] A calculation unit, used to respectively calculate the similarity between each piece of unstructured agricultural data in the unstructured agricultural database and the query intention;

[0163] The second determining unit is used to take the unstructured agricultural data with a similarity greater than a preset threshold as the unstructured agricultural data matching the query intention and obtain a second query result.

[0164] Optionally, the information retrieval device for agriculture, rural areas and farmers data further includes:

[0165] The first acquisition module is used to acquire the primary key in each "Three Rural Issues" structured database and the metadata in the "Three Rural Issues" unstructured database corresponding to the "Three Rural Issues" structured database before acquiring the text information input by the user;

[0166] A construction module is used to establish a mapping relationship between the "Three Rural Issues" structured database and the "Three Rural Issues" unstructured database based on the primary key and the corresponding metadata to obtain a joint index;

[0167] The mapping module is used to map the joint index to a unified semantic space to obtain the target mapping relationship.

[0168] Optionally, the information retrieval device for agriculture, rural areas and farmers data further includes:

[0169] The third determination module is configured to, after obtaining text information input by the user, input the text information into a reinforcement learning model, and have the reinforcement learning model predict a data query path that matches the query intent; the reinforcement learning model is a machine learning model obtained through model training based on historical text information input by multiple users and the corresponding actual data query paths;

[0170] The third execution module is configured to execute a data query operation through the data query path to obtain a target query result; the target query result includes structured data and / or unstructured data on agriculture, rural areas and farmers that match the query intent;

[0171] The third generation module is used to generate information retrieval results based on the target query results.

[0172] Storage medium embodiment

[0173] The present application provides a computer-readable storage medium having a program stored thereon, wherein, when executed by a processor, the program implements some or all of the steps of the information retrieval method for agricultural data described in the aforementioned method embodiment of the present application. The storage medium can be any medium capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0174] Processor Embodiments

[0175] An embodiment of the present application provides a processor for running a program, wherein, when the program is running, some or all of the steps of the information retrieval method for agriculture, rural areas and farmers data described in the aforementioned method embodiment are executed.

[0176] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0177] The above is only one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. An information retrieval method for agriculture, rural areas and farmers data, characterized by: include: Obtaining text information input by a user; the text information includes the user's query intention; Mapping the text information into a data retrieval request that matches the query intent; the retrieval type of the data retrieval request is any one of a structured data query, an unstructured data query, and a mixed data query, wherein the mixed data query includes the structured data query and the unstructured data query; If it is determined that the retrieval type is the hybrid data query, determining a target data query path corresponding to the hybrid data query from multiple data query paths, and obtaining a target mapping relationship; The target mapping relationship includes a mapping relationship between the primary keys in the three rural structured databases and the metadata in the corresponding three rural unstructured databases; Execute a data query operation based on the target mapping relationship through the target data query path to obtain a query result; The query results include structured data and unstructured data matching the query intent. The query results are fused and sorted according to the query intent, and target information retrieval results are generated.

2. The method according to claim 1, characterized in that The step of fusing and sorting the query results according to the query intent and generating target information retrieval results includes: Obtaining historical search information corresponding to the user; Inputting the historical search information, the query intent, and the query results into a multimodal ranking model, and having the multimodal ranking model perform a fusion ranking on the query results based on the historical search information and the query intent to obtain a ranked query result; Determining the result weights of the "Three Rural Issues" structured data and the "Three Rural Issues" unstructured data based on the query intent; the result weights are used to quantify the importance of the "Three Rural Issues" structured data and the "Three Rural Issues" unstructured data in the target information retrieval results; adjusting the presentation order of the data in the sorted query results based on the result weights to obtain adjusted query results; The target information retrieval result is generated according to the adjusted query result.

3. The method according to claim 1, characterized in that The method further comprises: If the retrieval type is the structured data query, determining a first data query path corresponding to the structured data query from a plurality of data query paths; Performing a data query operation through the first data query path to query the "Three Rural Issues" structured database for "Three Rural Issues" structured data that matches the query intent, and obtaining a first query result; Inputting the first query result and the query intent into a relevance calculation model, and using the relevance calculation model to sort the presentation order of the data in the first query result based on the query intent to obtain a sorted first query result; A first information retrieval result is generated according to the sorted first query result.

4. The method according to claim 1, wherein The method further comprises: If the retrieval type is the unstructured data query, determining a second data query path corresponding to the unstructured data query from a plurality of data query paths; Performing a data query operation through the second data query path to query the "Three Rural Issues" unstructured database for "Three Rural Issues" unstructured data that matches the query intent, and obtaining a second query result; Calculating a similarity score between each data in the second query result and the query intent; sorting the presentation order of the data in the second query result based on the similarity score to obtain a sorted second query result; A second information retrieval result is generated according to the sorted second query result.

5. The method according to claim 4, characterized in that The step of searching the "Three Rural Issues" unstructured database for "Three Rural Issues" unstructured data that matches the query intent to obtain a second query result includes: Calculating the similarity between each piece of unstructured agricultural data in the unstructured agricultural database and the query intention respectively; The unstructured data on agriculture, rural areas and farmers with a similarity greater than a preset threshold are taken as the unstructured data on agriculture, rural areas and farmers that match the query intention, and the second query result is obtained.

6. The method according to claim 1, characterized in that Before obtaining the text information input by the user, the method further includes: Obtaining the primary key in each of the three rural structured databases and the metadata in the three rural unstructured database corresponding to the three rural structured database; Based on the primary key and the corresponding metadata, a mapping relationship is established between the three rural structured database and the three rural unstructured database to obtain a joint index; The joint index is mapped to a unified semantic space to obtain the target mapping relationship.

7. The method according to claim 1, characterized in that After obtaining the text information input by the user, the method further includes: The text information is input into a reinforcement learning model, and the reinforcement learning model predicts a data query path that matches the query intent; the reinforcement learning model is a machine learning model obtained through model training based on historical text information input by multiple users and the corresponding actual data query paths; Executing a data query operation through the data query path to obtain a target query result; the target query result includes the "Three Rural Issues" structured data and / or "Three Rural Issues" unstructured data that matches the query intent; An information retrieval result is generated according to the target query result.

8. An information retrieval device for agriculture, rural areas and farmers data, characterized by: include: An acquisition module, configured to acquire text information input by a user; the text information includes the user's query intention; a mapping module, configured to map the text information into a data retrieval request that matches the query intent; the retrieval type of the data retrieval request being any one of a structured data query, an unstructured data query, and a mixed data query, wherein the mixed data query includes the structured data query and the unstructured data query; a determination module configured to, if it is determined that the retrieval type is the hybrid data query, determine a target data query path corresponding to the hybrid data query from a plurality of data query paths, and obtain a target mapping relationship; The target mapping relationship includes a mapping relationship between the primary keys in the three rural structured databases and the metadata in the corresponding three rural unstructured databases; An execution module, configured to execute a data query operation based on the target mapping relationship through the target data query path to obtain a query result; The query results include structured data and unstructured data matching the query intent. The sorting module is used to integrate and sort the query results according to the query intent and generate target information retrieval results.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the information retrieval method for agriculture, rural areas and farmers data according to any one of claims 1 to 7 is implemented.

10. A processor, characterized in that: Used to run a computer program, which, when running, executes the information retrieval method for agriculture, rural areas and farmers data as described in any one of claims 1 to 7.