Intention recognition and multi-path recall dynamic weighted fusion retrieval method and system

By employing an intent recognition and multi-path recall dynamic weighted fusion retrieval method in the fruit industry, the problems of diverse query adaptation, lack of domain knowledge, and heterogeneous data processing in fruit industry knowledge services have been solved, achieving a highly accurate and reliable intelligent question-answering service.

CN121833929APending Publication Date: 2026-04-10YANAN DATA (GROUP) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing RAG technology in the fruit industry suffers from several problems: a single search path cannot adapt to diverse query types; the general language model lacks domain knowledge, leading to serious illusions; multi-source heterogeneous data is difficult to utilize uniformly; and there is a lack of arbitration mechanism for conflicts in multiple search results. These issues result in insufficient accuracy and reliability of intelligent question answering services.

Method used

A dynamic weighted fusion retrieval method combining intent recognition and multi-path recall is adopted. Heterogeneous data is processed through a unified document object model, an index is built based on semantic boundary slicing, intent recognition is performed in combination with entity sets in the fruit industry, the weights of the three-path retrieval are dynamically adjusted, and conflict arbitration and illusion detection are performed to ensure the accuracy and reliability of the results.

Benefits of technology

It improved the accuracy of retrieval in fruit industry knowledge services by 23.2% to 87.5%, effectively reduced the illusion rate to 6%, ensured the reliability and integrity of information, and solved the problems of unified processing of multi-source heterogeneous data and arbitration of result conflicts in the fruit industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833929A_ABST
    Figure CN121833929A_ABST
Patent Text Reader

Abstract

The invention discloses an intention recognition and multi-path recall dynamic weighted fusion retrieval method and system, and the method comprises the steps: processing heterogeneous data such as PDF and pictures through a fruit industry unified document object model, and constructing a multi-type index through semantic adaptive slicing; after user query is preprocessed, intention categories and confidence coefficients are recognized through a fruit industry fine tuning model; performing keyword, vector and map retrieval in parallel, and dynamically distributing fusion weights based on intentions; performing authority, timeliness and consistency voting arbitration on conflict results; and after the answer is generated, the illusion is inhibited through entity and numerical value verification. According to the method, the problems of poor adaptation, model illusion, data islands and conflict arbitration-free of existing single retrieval are solved, the fruit industry retrieval accuracy and reliability are improved, the agricultural production risk is reduced, and the method is suitable for large-scale fruit industry knowledge service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of interdisciplinary technology of artificial intelligence and agricultural information, specifically relating to an intent recognition and multi-path recall dynamic weighted fusion retrieval method and system. Background Technology

[0002] Retrieval-Augmented Generation (RAG) is a technological paradigm that combines information retrieval with the generative capabilities of large language models. It aims to enhance the factual accuracy and domain specialization of models by introducing external knowledge bases. First proposed by Facebook AI Research in 2020, the core idea of ​​RAG is to retrieve relevant documents from a knowledge base before generating an answer, using the retrieval results as context input to the large language model, thus achieving a "retrieve first, generate later" knowledge enhancement mechanism.

[0003] The core advantages of RAG technology include: dynamic knowledge updates can be achieved by updating the knowledge base without retraining the model, reducing update costs by over 95%; generated content can be traced back to specific document sources, facilitating result verification and attribution of responsibility; by introducing factual constraints, the illusion rate of large language models can be reduced from 23%-35% to 5%-10%; and by building vertical domain knowledge bases, domain customization of general models can be quickly achieved. The current mainstream RAG technology architecture includes three core components: a document indexing module responsible for vectorizing and indexing knowledge base documents; a retriever module responsible for retrieving relevant documents from the index based on user queries; and a generator module responsible for generating the final answer based on the search results. Regarding retrieval strategies, existing technologies mainly employ the dense vector retrieval method, which encodes queries and documents into dense vectors using a pre-trained language model and matches them using vector similarity, achieving a typical recall rate of 75%-85%. However, existing RAG technology has obvious limitations: a single search path is difficult to adapt to diverse query types; the general vector model lacks semantic understanding capabilities in vertical domains, and the recall rate of domain terms is usually below 60%; and there is a lack of arbitration mechanism for conflicting search results, making it impossible to make effective decisions when multiple documents provide contradictory information.

[0004] Multi-Route Retrieval Fusion refers to a technique that employs multiple retrieval strategies simultaneously to retrieve information from a knowledge base, and then integrates the results from each retrieval path using a fusion algorithm. The theoretical basis of this technique stems from the concept of ensemble learning in the field of information retrieval. Its core assumption is that different retrieval methods are complementary, and fusing multiple results can achieve better retrieval performance than using a single path.

[0005] Currently, the mainstream retrieval methods can be divided into three categories: Represented by the BM25 algorithm, this method calculates the matching degree between documents and queries using Term Frequency-Inverse Document Frequency (TF-IDF). This method achieves accuracy exceeding 90% in exact matching scenarios, but its ability to capture semantic similarity is weak, with synonym recall typically below 40%. Another approach uses pre-trained models such as BERT and Sentence-BERT to encode text into dense vectors, utilizing cosine similarity or Euclidean distance for matching. This method excels at capturing semantic similarity, but may introduce noise in exact matching scenarios, with Top-10 accuracy typically ranging from 70% to 80%. A third approach constructs a knowledge graph through entity recognition and relation extraction, using graph traversal algorithms for reasoning and retrieval. This method enables multi-hop reasoning but relies on high-quality graph construction, and coverage is limited by the graph's completeness. A key technical challenge in multi-path retrieval fusion lies in the weight allocation strategy. Existing methods primarily employ static weights (such as simple averaging or linear weighting) or learning-based dynamic weights (such as Learning-to-Rank). Static weighting methods are simple to implement but lack adaptability; learning-based methods require a large amount of labeled data and have limited generalization ability in vertical domains. In addition, existing fusion methods generally lack explicit modeling of query intent and fail to dynamically adjust retrieval strategies according to different query types.

[0006] Fruit industry knowledge services refer to information technology services that provide professional knowledge consultation and decision support to fruit farmers, technicians, and agricultural managers in areas such as fruit tree planting, pest and disease control, and post-harvest processing. With the rapid development of modern agriculture in my country, the fruit industry has become an important pillar industry of the rural economy. Statistics show that in 2023, my country's fruit planting area reached 180 million mu (approximately 12 million hectares), with a yield exceeding 300 million tons and more than 50 million people employed in the industry.

[0007] The demand for knowledge services in the fruit industry exhibits the following characteristics: Covering multiple aspects such as variety selection, cultivation management, pest and disease diagnosis, pesticide use, and post-harvest storage and transportation, the system contains over 100,000 knowledge points. It includes various formats such as technical manuals (PDF), pest and disease atlases (images), policy documents (HTML), and price data (tables), with unstructured data accounting for over 70%. Price information needs to be updated in real time, pest and disease warnings need to be adjusted seasonally, and policy information needs to be synchronized promptly. It involves a large number of agricultural technical terms, such as "bagging," "fruit thinning," and "ring rot," which are difficult for general language models to accurately understand. The main problems currently facing fruit industry knowledge services include: general language models lacking fruit industry expertise, with an accuracy rate of less than 50%, and serious knowledge illusion problems (such as mistakenly recommending fungicides instead of insecticides); traditional keyword retrieval failing to understand farmers' colloquial expressions (such as the association between "leaves are curled" and "leaf rollers"); and a lack of unified management of heterogeneous data, resulting in serious information silos. Therefore, there is an urgent need to develop an intelligent knowledge retrieval and question-answering system for the fruit industry.

[0008] Question 1: A single search path cannot adapt to diverse query types. User queries in the fruit industry can be categorized into several types, including factual queries (such as "What is the price of Fuji apples today?"), diagnostic queries (such as "What disease causes yellowing leaves?"), operational queries (such as "How to prune apple trees?"), and encyclopedic queries (such as "What is physiological fruit drop?"). Different types of queries require different optimal retrieval strategies. Factual queries require exact matching, and keyword retrieval performs best, but vector retrieval may return semantically similar but outdated results. Diagnostic queries require reasoning ability; knowledge graph retrieval can establish a reasoning link of "symptom → cause → treatment," while keyword retrieval struggles to understand the relationship between symptoms and causes. Operational queries require semantic understanding; vector retrieval can capture the semantic equivalence between "spraying pesticides" and "applying pesticides." Experimental data shows that the accuracy of a single retrieval path varies significantly across different query types: keyword retrieval achieves 82% accuracy in factual queries but only 45% in diagnostic queries; vector retrieval achieves 72% accuracy in operational queries but suffers from a 15%-20% timeliness error in factual queries; knowledge graph retrieval achieves 78% accuracy in diagnostic queries, but its coverage is limited by the graph size, handling only about 60% of queries.

[0009] Question 2: The Illusion of Agricultural Knowledge in a General Large Language Model Large Language Models (LLMs) suffer from a severe hallucination problem in the agricultural vertical, generating seemingly reasonable but actually erroneous specialized content. Typical examples include: Recommending human antibiotics (such as penicillin) for plant disease control; confusing pesticides for similar diseases (e.g., incorrectly recommending fungicides for controlling brown spot disease for controlling aphids); fabricating non-existent pesticide brands or usage methods; experimental evaluations show that the general language model has an illusion rate as high as 23%-35% in fruit industry question-answering tasks, with the highest error rate in pesticide recommendation questions, reaching over 40%. Such errors may lead to economic losses for farmers and even agricultural product safety issues. The root cause of the problem is that agricultural expertise accounts for a very low proportion in the pre-training corpus of the general model (estimated to be less than 0.1%), and the model tends to "guess" answers based on language patterns rather than generating them based on facts.

[0010] Question 3: Lack of a unified processing mechanism for heterogeneous data The fruit industry knowledge base contains a variety of heterogeneous data sources, including:

[0011] Existing systems generally employ a separate architecture, with various types of data using independent storage and retrieval systems. This leads to: difficulties in cross-modal retrieval (inability to simultaneously retrieve text and images); severe data redundancy (the same knowledge point may be stored repeatedly in multiple locations); and high update and maintenance costs (requiring simultaneous updates to multiple systems). Statistics show that the data silo problem results in approximately 30% of relevant knowledge being unable to be effectively retrieved.

[0012] Question 4: Lack of arbitration mechanism for conflicting search results When multiple retrieval methods return contradictory information, existing systems lack an effective conflict arbitration mechanism. Typical scenarios include: Agricultural input e-commerce websites recommend a certain brand of pesticide, while agricultural research institute technical manuals recommend a different agent; old versions of technical documents and new versions of policy documents provide inconsistent guidance for the same operation; planting recommendations vary across different regions; and the lack of an arbitration mechanism may cause the system to prioritize information from low-quality sources (such as commercial advertisements) to users, affecting the reliability of the answers. The assessment shows that approximately 12% of queries have multi-source information conflicts, and in 35% of these conflict cases, the system returned a suboptimal answer.

[0013] In summary, there is an urgent need for an intelligent retrieval method that can dynamically select retrieval strategies based on query intent, effectively integrate multiple retrieval results, process heterogeneous data, and conduct authoritative arbitration when results conflict, in order to solve the aforementioned technical bottlenecks in fruit industry knowledge services. Summary of the Invention

[0014] The technical problem to be solved by this invention is to address the shortcomings of the prior art by providing an intent recognition and multi-path recall dynamic weighted fusion retrieval method and system. This method addresses the technical problems that existing retrieval enhancement generation technologies cannot provide accurate, reliable, and comprehensive intelligent question-answering services in vertical applications due to the mismatch between the singularity of retrieval strategies and the diversity of query intents, the lack of domain knowledge in general large models leading to severe illusions, the difficulty in uniformly utilizing multi-source heterogeneous data, and the lack of a reliable arbitration mechanism when multiple retrieval results conflict.

[0015] The present invention adopts the following technical solution: A dynamic weighted fusion retrieval method combining intent recognition and multi-path recall includes the following steps: S1. Standardize multi-source heterogeneous data using a unified document object model for the fruit industry, slice the processed data using an adaptive document slicing algorithm based on semantic boundaries, and construct keyword index, vector index and knowledge graph based on the slicing results. Extract the fruit industry entity set from the unified document object model for the fruit industry. S2. Based on the set of entities in the fruit industry extracted in step S1, the user query is segmented, named entity recognition is performed, error correction is performed, and synonym expansion is performed to obtain a standardized query representation. S3. Use a fine-tuned classification model for the fruit industry to identify the intent of the normalized query obtained in step S2, and output the intent category and the corresponding confidence level. S4. Based on the standardized query and constructed keyword index, vector index and knowledge graph obtained in step S2, execute keyword retrieval, vector retrieval and knowledge graph retrieval in parallel to obtain three candidate document sets respectively; S5. Couple user query intent recognition with retrieval strategy selection, dynamically adjust the fusion weight of the three-way retrieval based on the intent category and confidence level output in step S3, and perform weighted fusion calculation on the three-way candidate document set obtained in step S4 after normalization to obtain the fusion ranking result. S6. Perform conflict detection on the fusion ranking result obtained in step S5. If information conflict is detected, update the fusion ranking result using a multi-factor arbitration mechanism of fusion data source authority score, timeliness decay and consistency voting. S7. Use the fusion ranking result updated in step S6 as context input to the large language model to generate an initial answer, perform hallucination detection on the initial answer, and output the final answer based on the detection result.

[0016] Preferably, in step S1, the structure of the unified document object model for the fruit industry includes: id: A unique identifier for a document; content: The document's text content; source_type: Data source type, with values ​​of PDF, IMAGE, HTML, TABLE; metadata: Metadata includes the source organization, publication date, authority rating, knowledge category, and applicable region; entities: A list of entities in the fruit industry sector, including varieties, diseases, pests, pesticides, symptoms, timing, operations, and regions; Embedding: A 768-dimensional vector representation of a document.

[0017] Preferably, in step S1, the specific steps of the adaptive document slicing algorithm based on semantic boundaries include: The standardized data is segmented into paragraphs based on paragraph tags to obtain multiple paragraph segments. The semantic similarity of sentences in adjacent paragraph segments is calculated. If the semantic similarity is less than 0.7, the position is marked as a semantic breakpoint. The data is segmented according to the semantic breakpoints, and a greedy merging strategy is used to generate document slices with a length not exceeding a preset maximum length L. An overlapping window of 50 tokens is added to adjacent document slices to ensure contextual coherence.

[0018] Preferably, in step S2, the set of entities in the fruit industry sector extracted in step S1 specifically includes: Error correction: By comparing the entity set in the fruit industry field, correct non-standard fruit industry terms in the user query; Synonym expansion: Based on the entity set in the fruit industry, associate the descriptions of spraying pesticides and thinning fruit. Named entity recognition: Labeling varieties, diseases, and pests that match the entity set in the fruit industry field in the user query.

[0019] Preferably, in step S3, the classification model for fine-tuning in the fruit industry adopts BERT Encode and a classification head architecture, specifically including: BERT Encoder: It has a 12-layer Transformer structure and is further pre-trained using fruit industry corpora related to fruit tree planting, pest and disease control, and pesticide application. Classification header: sequentially connects the Linear layer, ReLU activation layer, Dropout layer, and Linear layer; The intent categories include four types: factual, diagnostic, operational, and encyclopedic. The classification model outputs the probability distribution of the four intent categories, and the category with the highest probability is taken as the output intent category. This probability is the corresponding confidence level.

[0020] Preferably, in step S4, the keyword retrieval uses the BM25 algorithm, the vector retrieval uses the DenseRetrieval algorithm, and the graph retrieval uses the Graph Traversal algorithm; the three candidate document sets are all Top-K document sets sorted by retrieval relevance scores.

[0021] Preferably, in step S5, the specific steps for dynamically adjusting the fusion weights of the three-way retrieval include: Based on the intent category query output in step S3, a preset basic weight table is used. In the basic weight table, the keyword retrieval weight is denoted as w1, the vector retrieval weight as w2, and the graph retrieval weight as w3. Factual intentions: w1=0.6, w2=0.3, w3=0.1; Diagnostic intent: w1=0.2, w2=0.3, w3=0.5; Operational intents: w1=0.25, w2=0.45, w3=0.3; Encyclopedic intent: w1=0.2, w2=0.5, w3=0.3; If the confidence level of the output in step S3 is lower than 0.7, then w1, w2, and w3 are adjusted to a uniform distribution: w1=0.33, w2=0.34, w3=0.33; If the normalized query obtained in step S2 contains numbers, then w1 increases by 0.10; if it contains symptom descriptions, then w3 increases by 0.10; if it contains expressions of "how" or "how," then w2 increases by 0.05. Normalize the adjusted w1, w2, and w3 to ensure that w1 + w2 + w3 = 1.

[0022] Preferably, in step S6, the specific steps of the multi-factor arbitration mechanism include: Extract the core answers from the top 3 documents in the fusion ranking result obtained in step S5, calculate the semantic similarity between each pair of core answers, and determine that there is information conflict if the minimum similarity is lower than the conflict threshold. Calculate the document weighted score = document relevance score × The Data source type settings: Government agencies 1.0, Academic institutions 0.9, Agricultural research institutions 0.85, Industry associations 0.75, Media platforms 0.6, General sources 0.4; Calculate the time decay factor = exp(-age / τ), where age is the number of days since the document was published, and τ is set according to the query type: price query τ = 7 days, policy query τ = 180 days, technology query τ = 365 days. Multiply the obtained weighted score by the time decay factor to update the document weighted score. Candidate documents are clustered based on semantic similarity to the core answer, and the voting score for each cluster is calculated as the sum of the updated weighted scores of all documents within the cluster. Select the cluster with the highest voting score as the optimal answer group, update the fusion ranking results, and calculate the arbitration confidence score as the sum of the voting scores of all clusters.

[0023] Preferably, in step S7, the specific steps of hallucination detection include: Extract the entity set and value set from the initial answer, and at the same time extract the entity set and value set of all documents in the fusion sorting result after step S6; If the entity in the initial response exists outside the document entity set, it is marked as an illusion of type UNKNOWN_ENTITY; If the difference between the numerical value in the initial answer and the numerical value set in the document exceeds the 20% tolerance, it is marked as a SUSPICIOUS_NUMBER type illusion; If no hallucination is detected, the final answer has a high confidence level; if there is some supporting evidence, the confidence level is medium; if there is no supporting evidence, the confidence level is low and the answer is regenerated based on the constraints of the fusion ranking result updated in step S6.

[0024] Secondly, embodiments of the present invention provide an intent recognition and multi-path recall dynamic weighted fusion retrieval system, comprising: The data module is used to standardize multi-source heterogeneous data using a unified document object model for the fruit industry, slice the processed data using an adaptive document slicing algorithm based on semantic boundaries, construct keyword indexes, vector indexes and knowledge graphs based on the slicing results, and extract a set of entities in the fruit industry from the unified document object model. The preprocessing module is used to perform word segmentation, named entity recognition, error correction, and synonym expansion on user queries based on the entity set of the fruit industry extracted by the data module, and output a standardized query representation. The identification module is used to identify the intent of the normalized query output by the preprocessing module using a classification model finely tuned in the fruit industry, and output the intent category and the corresponding confidence level. The recall module is used to perform keyword retrieval, vector retrieval and graph retrieval in parallel based on the normalized query output by the preprocessing module and the keyword index, vector index and knowledge graph constructed by the data module, and output a set of three candidate documents. The fusion module is used to couple user query intent recognition with retrieval strategy selection. It dynamically adjusts the fusion weights of the three-way retrieval based on the intent category and confidence level output by the recognition module. After normalizing the three-way candidate document set output by the recall module, it performs weighted fusion calculation and outputs the fusion ranking result. The arbitration module is used to perform conflict detection on the fusion ranking results output by the fusion module. If an information conflict is detected, the fusion ranking results are updated using a multi-factor arbitration mechanism that combines the authority score of the fusion data source, the timeliness decay, and the consistency vote. The detection module is used to take the updated fusion ranking result of the arbitration module as the context input to the large language model to generate an initial answer, perform hallucination detection on the initial answer, and output the final answer.

[0025] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the above-described intention recognition and multi-path recall dynamic weighted fusion retrieval method.

[0026] Fourthly, embodiments of the present invention provide a computer-readable storage medium including a computer program, which, when executed by a processor, implements the steps of the above-described intention recognition and multi-path recall dynamic weighted fusion retrieval method.

[0027] Fifthly, a chip includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the aforementioned intent recognition and multi-path recall dynamic weighted fusion retrieval method.

[0028] In a sixth aspect, embodiments of the present invention provide an electronic device, including a computer program, which, when executed by the electronic device, implements the steps of the above-described intention recognition and multi-path recall dynamic weighted fusion retrieval method.

[0029] Compared with the prior art, the present invention has at least the following beneficial effects: Firstly, a dynamic weighted fusion retrieval method combining intent recognition and multi-path recall is presented. By coupling intent recognition with retrieval strategies, three-way retrieval adapts to different query types, overcoming the limitations of single-path retrieval; it uniformly processes heterogeneous data to eliminate information silos; and conflict arbitration and illusion detection respectively ensure the reliability and factuality of the results. Compared with existing RAG technology, this method achieves full-process customization for the fruit industry, from retrieval to fusion to generation, providing a complete technical framework for subsequent dependent claims. Experimental verification shows an overall accuracy of 87.5%, an improvement of 23.2% compared to the baseline.

[0030] Furthermore, the six core fields of the unified document model for the fruit industry (id, content, source_type, etc.) are clearly defined. Metadata includes authority scores and applicable regions, entities stores eight types of fruit industry entities, and the embedding is a 768-dimensional vector, solving the problem of standardizing heterogeneous data at the data layer. This structure transforms data of different formats, such as PDF technical manuals and images of pests and diseases, into a unified representation, facilitating the parallel construction of multiple indexes. The entities field provides entity support for error correction and synonym expansion in query preprocessing. The authority_score field lays the foundation for authority weighting in subsequent conflict arbitration, effectively eliminating data silos and improving the completeness of cross-modal retrieval information by 40%.

[0031] Furthermore, by calculating the semantic similarity of adjacent sentences to mark breakpoints, the logical coherence of fruit industry knowledge is ensured; greedy merging controls the slice length to avoid redundancy or missing information; and a 50-token overlapping window prevents contextual breaks. This improves the semantic completeness of document slices, providing high-quality candidate fragments for retrieval. In the experiment, the completeness of operation-type queries increased from 72% to 88%, directly supporting the accuracy of subsequent weighted fusion.

[0032] Furthermore, the error correction process corrects non-standard terminology by comparing entity sets to ensure query accuracy; synonym expansion links fruit industry-specific expressions to bridge the gap between farmers' colloquialisms and knowledge base terminology; named entity recognition labels entities such as varieties and diseases, providing a foundation for entity matching in graph retrieval. This achieves a terminology recognition accuracy rate of over 95%, ensuring semantic alignment between the query and the knowledge base and improving subsequent recall relevance.

[0033] Furthermore, domain-specific pre-training of the BERT Encoder enhances its understanding of proprietary terms such as wheel rim disease and bagging; the classification head outputs four types of intent probability distributions through a Linear layer, ReLU activation, and Dropout, ensuring the accuracy of intent recognition. In the experiment, queries with an intent recognition confidence score ≥0.7 accounted for over 85%, providing a reliable basis for dynamic weight allocation. This allowed for the precise setting of keyword weights for factual queries to 0.6 and graph weights for diagnostic queries to 0.5, adapting to the retrieval needs of different queries.

[0034] Furthermore, BM25 ensures precise matching for fact-based queries; Dense Retrieval captures semantic similarity for operational queries; and Graph Traversal enables symptom-cause reasoning for diagnostic queries. Top-K sorting reduces redundant computation, and three-way parallel recall reduces response time by 60%, providing efficient and diverse candidate data for dynamic weighting, covering 92% of fruit industry query scenarios.

[0035] Furthermore, the base weights are customized for four types of intent to ensure initial adaptability; when the confidence level is <0.7, the weights are adjusted to a uniform distribution to reduce the risk of misjudgment; the weights are fine-tuned based on query features to improve targeting; and normalization ensures that the sum of the weights is 1, ensuring rigorous calculation. This design allows the weights to dynamically change with the graph and the query. In experiments, the accuracy rate for fact-based queries reached 91%, an improvement of 11% compared to single-keyword retrieval, achieving adaptive optimization of the retrieval strategy.

[0036] Furthermore, conflict detection uses the similarity of the first three documents to avoid missing conflicts; authority weighting is assigned based on data source type, prioritizing authoritative information from agricultural research institutes; timeliness decay is set with τ based on query type to ensure information freshness; and consistency voting selects the optimal answer group through clustering scores to reduce subjective bias. This increases the optimal answer return rate for 12% of conflicting queries from 65% to 100%, and the proportion of results with an arbitration confidence level ≥0.8 exceeds 90%, ensuring the reliability of the results.

[0037] Furthermore, entity consistency checks verify whether the response entities originate from the retrieved documents, preventing fabricated terminology; numerical reasonableness checks prevent numerical errors; and outputs are categorized into high, medium, and low confidence levels, with regeneration occurring at low confidence levels, providing double assurance of factual accuracy. In experiments, the illusion rate decreased from 23%-35% to 6%, and the pesticide recommendation error rate decreased from 40% to below 5%, effectively avoiding economic losses for farmers or agricultural product safety risks caused by model illusions.

[0038] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.

[0039] In summary, this invention achieves a three-dimensional improvement in the accuracy, reliability, and efficiency of fruit industry retrieval by unifying heterogeneous data, dynamicizing intent-driven processes, multi-factorizing conflict arbitration, and materializing illusion detection. It comprehensively breaks through the bottlenecks of existing technologies and is suitable for large-scale fruit industry knowledge services.

[0040] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0041] Figure 1 This is a flowchart of the present invention; Figure 2 This is a flowchart of the heterogeneous data processing of the present invention; Figure 3 This is a schematic diagram of the fruit industry knowledge graph of this invention; Figure 4 This is a schematic diagram of the consciousness recognition method of the present invention; Figure 5 This is a flowchart of the multi-channel recall and dynamic weighted fusion process of the present invention; Figure 6This is a flowchart of the data preprocessing and index construction process of the present invention; Figure 7 This is a flowchart of the query understanding and intent recognition process of this invention; Figure 8 This is a flowchart of the multi-path parallel recall process of the present invention; Figure 9 This is a flowchart illustrating the integration of sorting and conflict arbitration in this invention. Figure 10 This is a flowchart of the conflict arbitration process of the present invention; Figure 11 Output and hallucination suppression flowchart; Figure 12 A schematic diagram of a computer device provided in an embodiment of the present invention; Figure 13 This is a block diagram of a chip provided according to an embodiment of the present invention.

[0042] Among them, 60. Computer equipment; 61. Processor; 62. Memory; 63. Computer program; 600. Electronic device; 610. Processing unit; 620. Storage unit; 6201. Random access memory unit; 6202. Cache memory unit; 6203. Read-only memory unit; 6204. Program / utility; 6205. Program module; 630. Bus; 640. Display unit; 650. Input / output interface; 660. Network adapter; 700. External device. Detailed Implementation

[0043] This invention provides a dynamic weighted fusion retrieval method for intent recognition and multi-path recall. It constructs an intent-aware retrieval strategy selection mechanism and dynamically allocates fusion weights for multi-path retrieval based on the user's query intent category. It designs an authority-based conflict arbitration algorithm to solve the problem of contradictory multi-source information and establishes a unified representation model for heterogeneous data to achieve joint retrieval and reasoning of cross-modal knowledge.

[0044] Please see Figure 1 The present invention provides a dynamic weighted fusion retrieval method for intent recognition and multi-path recall, comprising the following steps: S1. Query preprocessing: Perform word segmentation, named entity recognition, error correction, and synonym expansion on user input to construct a standardized query representation; Please see Figure 2 The specific steps for constructing heterogeneous data processing and unified indexing are as follows: S101, Multi-Source Data Parsing and Unified Document Model This invention designs a unified document object model (UnifiedDocumentModel) to convert data sources of different formats into a standardized representation. Appropriate parsing strategies are adopted for various data sources: PDF / Word documents: Use a PDF parser to extract text content and use layout analysis to identify heading levels and table structures; Image data: Visual language models are used to extract image descriptions and identify the characteristics of pest and disease symptoms; HTML document: Use a web page parser to extract the main content and filter the navigation bar and advertisements; Structured tables: A table parser is used to convert row and column data into natural language descriptions.

[0045] The pseudocode definition of the unified document model is as follows: Pseudocode: Unified Document Object Model STRUCTUREDocument: id: STRING# Unique Identifier content: STRING#Text content source_type: ENUM # Data source type {PDF, IMAGE, HTML, TABLE} metadata: STRUCTURE# metadata Source: STRING#Source Organization publish_date: DATE# Publication date authority_score: FLOAT# Authority score [0, 1] category: LIST[STRING]# Category region: STRING# Applicable regions ENDSTRUCTURE entities: LIST[Entity] # List of entities to be extracted embedding: VECTOR

[768] # Vector representation ENDSTRUCTURE S102, Adaptive document slicing based on semantic boundaries Traditional fixed-length slicing methods can compromise the semantic integrity of text, leading to the loss of contextual information during retrieval. This invention proposes an adaptive slicing algorithm based on semantic boundaries, which identifies natural breakpoints by detecting the semantic similarity between adjacent sentences, and performs slicing while maintaining semantic integrity.

[0046] The core steps of the algorithm are as follows: First, the document is initially segmented into natural paragraphs. Next, all adjacent sentences are traversed, and a pre-trained model is used to calculate the semantic similarity between each pair. If the similarity is below a preset threshold (e.g., 0.7), a semantic shift is considered, and it is marked as a "semantic breakpoint." Then, the algorithm segments the document into smaller fragments based on these semantic breakpoints and uses a greedy strategy to merge these fragments, ensuring that the length of each merged "slice" does not exceed a preset maximum value to maintain processing efficiency. Finally, to preserve necessary context during retrieval, a fixed-length text overlap is set between the end of each slice and the beginning of the next slice.

[0047] #Pseudocode: Semantic Adaptive Slicing Algorithm FUNCTIONSemanticAwareChunking(documentD, max_chunk_sizeL): #Step 1: Paragraph-level segmentation paragraphs=SplitByParagraphMarkers(D) #Step 2: Semantic Breakpoint Detection semantic_boundaries=[] FORi=0TOLength(paragraphs.sentences)-2: s_i = paragraphs.sentences[i] s_next=paragraphs.sentences[i+1] #Calculate the semantic similarity between adjacent sentences similarity=CosineSimilarity(Embed(s_i),Embed(s_next)) If the similarity is below a threshold, it is marked as a semantic breakpoint. IFsimilarity <THRESHOLD_BREAK:#THRESHOLD_BREAK=0.7 semantic_boundaries.APPEND(i+1) ENDIF ENDFOR #Step 3: Greedy merge to generate slices chunks=[] current_chunk="" FOReachsegmentINSplitByBoundaries(D, semantic_boundaries): IFLength(current_chunk)+Length(segment) <L: current_chunk=current_chunk+segment ELSE: chunks.APPEND(current_chunk) current_chunk=segment ENDIF ENDFOR chunks.APPEND(current_chunk) # Add the last chunk #Step 4: Add overlapping windows to ensure contextual coherence FORi=0TOLength(chunks)-2: overlap=ExtractLastTokens(chunks[i],OVERLAP_SIZE)#OVERLAP_SIZE=50 chunks[i+1]=overlap+chunks[i+1] ENDFOR RETURNchunks ENDFUNCTION S103, Construction of Agricultural Knowledge Graph Please see Figure 3 This invention defines a knowledge graph schema for the fruit industry, comprising 8 entity types and 9 relation types. Entity types include: Variety, Disease, Pest, Pesticide, Symptom, Period, Operation, and Region.

[0048] The automatic construction process of knowledge graphs is as follows: #Pseudocode: Knowledge Graph Construction Process FUNCTIONBuildKnowledgeGraph(corpus): knowledge_graph=InitializeEmptyGraph() FOReachdocumentINcorpus: #Step 1: Named Entity Recognition entities=NERModel.Extract(document.content) #Example output: [(Red Fuji, VAR), (Flowering period, PRD), (Downy mildew, DIS)] #Step 2: Relation Extraction relations=RelationExtractor.Extract(document.content,entities) #Output example: [(Red Fuji, susceptible, downy mildew), (downy mildew, peak incidence, flowering period)] #Step 3: Merge triplet into image FOReach(head,relation,tail)INrelations: #Entity alignment: Merge synonymous entities head_node=EntityAlignment(knowledge_graph, head) tail_node=EntityAlignment(knowledge_graph, tail) #Add or update edge knowledge_graph.AddEdge(head_node, relation, tail_node) ENDFOR #Step 4: Link Documents FOReachentityINentities: knowledge_graph.LinkDocument(entity,document.id) ENDFOR ENDFOR #Step 5: Knowledge Verification ValidateConsistency(knowledge_graph,DOMAIN_RULES) RETURNknowledge_graph ENDFUNCTION.

[0049] Please see Figure 6The system first parses the formats of heterogeneous data sources such as PDFs, images, HTML, and tables, converting them into a unified document object model. Then, it uses a semantic adaptive slicing algorithm to divide long documents into segments of appropriate granularity. Finally, it constructs the BM25 keyword index, the FAISS vector index, and the Neo4j knowledge graph in parallel.

[0050] S2. Intent Recognition: Using a fine-tuned classification model for the agricultural field, queries are divided into four types of intent: factual, diagnostic, operational, and encyclopedic, and the confidence level is output. Please see Figure 4 This invention constructs an intent recognition classifier for the fruit industry, classifying user queries into four intent types: 1. Factual queries: Queries involving objective facts such as prices, output, and policies. Key words include "how much," "price," and "output." 2. Diagnostic queries: Queries involving pest and disease identification and physiological problem diagnosis, with keywords including "what disease," "what's going on," and symptom descriptions. 3. Operational queries: Queries involving planting techniques and prevention methods, with keywords including "how," "method," etc. 4. Encyclopedic (ENCYCLOPEDIC): Queries involving concept explanations and variety descriptions, with keywords including "what is" and "description". The model architecture employs a pre-trained language model plus a classification head, and further pre-training is performed on agricultural domain corpora to enhance the understanding of domain terminology. First, the input user query is segmented and encoded into sub-words, with specific start and end markers added. Then, it is fed into a 12-layer Transformer encoder (BERT structure) pre-trained on fruit industry text to obtain a context-aware vector representation of the entire query. The vector corresponding to the special marker at the beginning of the sequence is extracted as the overall semantic representation of the query. This representation vector is processed by a feedforward neural network classification head (containing linear layers, activation functions, random deactivation layers, and a final linear projection layer), outputting a four-dimensional vector. This vector is then Softmax normalized to obtain the probability distribution of the query belonging to one of four categories: "fact," "diagnosis," "operation," and "encyclopedia." The category with the highest probability is determined as the final intent, and this probability value is the recognition confidence level.

[0051] #Pseudocode: Intent Recognition Model FUNCTIONIntentClassifier(query): #Step 1: Word segmentation encoding tokens=Tokenizer.Encode(query) #Output: [CLS]My apple leaves are curled and turning yellow[SEP] #Step 2: BERT Encoding (Fine-tuning for the agricultural sector) hidden_states=BERT_Encoder(tokens)#12 layer Transformer cls_embedding=hidden_states[0]#[CLS] Position vector, dim=768 #Step 3: Sorting Header h1=ReLU(Linear(cls_embedding, 256)) h2 = Dropout(h1, p = 0.1) logits = Linear(h2, 4) #4 Types of Intents probabilities = Softmax(logits) #Step 4: Output Intent and Confidence intent = ArgMax(probabilities) confidence = Max(probabilities) RETURNintent, confidence ENDFUNCTION.

[0052] Intent-driven dynamic weight allocation Please see Figure 5 The core innovation of this invention lies in dynamically allocating the fusion weights of the three-way retrieval based on the identified intent category. The design principles of the basic weight table are as follows: Fact-based queries prioritize exact matching, while keyword searches have the highest weight (w1=0.6). Diagnostic queries require reasoning ability, and graph retrieval has the highest weight (w3=0.5). Operational queries emphasize semantic understanding, and vector retrieval has the highest weight (w2=0.45). Encyclopedia-type queries emphasize semantic matching, while vector retrieval has the highest weight (w2=0.5). The dynamic weight adjustment algorithm also considers the confidence level of intent recognition and query features: Based on the intent category output by the intent recognition module, a pre-defined "intent-base weight" mapping table is queried to obtain the initial weights for keyword, vector, and graph-based searches. Then, two adjustments are made: First, confidence adjustment: if the confidence of intent recognition is below a threshold (e.g., 0.7), indicating high uncertainty in the classification result, the three weights are adjusted to an approximately uniform distribution to reduce risk. Second, query feature adjustment: the normalized query text is analyzed. If it contains numbers, the weight of keyword search is slightly increased; if it contains symptom descriptions, the weight of graph-based search is increased; if it contains patterns such as "how" or "how to," the weight of vector-based search is increased. Finally, all adjusted weights are normalized to ensure their sum is 1.

[0053] #Pseudocode: Dynamic Weight Allocation Algorithm FUNCTIONDynamicWeightAllocation(intent, confidence, query): #Step 1: Query the basic weight table WEIGHT_TABLE={ FACTUAL: (0.60, 0.30, 0.10), DIAGNOSTIC: (0.20, 0.30, 0.50), OPERATIONAL: (0.25, 0.45, 0.30), ENCYCLOPEDIC: (0.20, 0.50, 0.30) } w1,w2,w3=WEIGHT_TABLE[intent] #Step 2: Confidence Adjustment #When intent identification is uncertain, a tendency towards uniform distribution can reduce risk. IFconfidence <CONFIDENCE_THRESHOLD:#CONFIDENCE_THRESHOLD=0.7 w1, w2, w3=(0.33, 0.34, 0.33) ENDIF #Step 3: Adjusting Query Features IFContainsNumeric(query): # Contains numbers, emphasizing keywords. w1 = w1 + 0.10 ENDIF IFContainsSymptomWords(query): # Contains symptom words, reinforcement graph w3 = w3 + 0.10 ENDIF IFContainsHowToPattern(query): # Contains "how / how", strengthening the vector. w2 = w2 + 0.05 ENDIF #Step 4: Normalize to ensure the sum of weights is 1 total = w1 + w2 + w3 w1, w2, w3=w1 / total, w2 / total, w3 / total RETURN(w1, w2, w3) ENDFUNCTION.

[0054] Please see Figure 7 The system performs word segmentation and named entity recognition on user input, uses an agricultural-specific dictionary for error correction and synonym expansion, then uses an intent recognition classifier to determine the query type, and finally dynamically allocates the fusion weights of the three-way retrieval based on the intent category and query features.

[0055] S3, Multi-path Parallel Recall: Simultaneously execute keyword retrieval (BM25), vector retrieval (DenseRetrieval), and graph retrieval (GraphTraversal) to obtain a set of candidate documents; Please see Figure 8 The system performs three-way retrieval in parallel: keyword retrieval uses the BM25 algorithm for exact matching; vector retrieval uses cosine similarity for semantic matching; and graph retrieval uses entity recognition and graph traversal for inference. Each of the three retrieval methods returns Top-K candidate documents.

[0056] S4. Dynamic weighted fusion: Based on the intent category, the basic weights are obtained from the preset weight table and dynamically adjusted in combination with query features to calculate the fusion score of each document. S5. Conflict Arbitration: Detects information conflicts in candidate results, arbitrates based on the authority and timeliness of the data source, and determines the final ranking; Please see Figure 9 The core formula for fusion sorting is:

[0057] Where S' represents the score after Min-Max normalization. During conflict arbitration, the system checks the semantic consistency among the top results. If contradictions exist, a weighted vote is performed based on the authority and timeliness of the data source to select the optimal answer.

[0058] Please see Figure 10 The pseudocode for the conflict arbitration algorithm is as follows: First, extract the core answer summaries from the top-ranked candidate documents (e.g., the top 3). Calculate the semantic similarity between each pair of these core answers; if the minimum similarity is below a certain conflict threshold, an information contradiction is identified. For all candidate documents, calculate their weighted scores, which are obtained by multiplying the document's original relevance score by its source authority coefficient (pre-set based on the type of publishing institution, e.g., 1.0 for government agencies, 0.6 for media platforms, etc.). Next, calculate a time decay factor based on the document's publication date and use this factor to further adjust the weighted scores. Then, group all documents with semantically similar core answers together, sum the updated weighted scores of all documents within the group, and use this sum as the voting score for that "answer group." Finally, select the answer group with the highest voting score as the most credible answer, and re-rank the search results accordingly.

[0059] #Pseudocode: Conflict Arbitration Algorithm FUNCTIONConflictArbitration(candidate_docs): #Step 1: Collision Detection top_answers=[ExtractKeyAnswer(doc)FORdocINcandidate_docs[:3]] similarity_matrix=PairwiseSimilarity(top_answers) IFMin(similarity_matrix)>=CONFLICT_THRESHOLD: #No conflict RETURNcandidate_docs ENDIF #Step 2: Authority Weighting FOReachdocINcandidate_docs: doc.weighted_score=doc.relevance_score*doc.authority_score ENDFOR #Step 3: Time-sensitive weighting FOReachdocINcandidate_docs: age_days=DaysSince(doc.publish_date) time_decay=Exp(-age_days / DECAY_CONSTANT) #τ is set according to the question type doc.weighted_score=doc.weighted_score*time_decay ENDFOR #Step 4: Consensus Voting answer_groups=ClusterSimilarAnswers(candidate_docs) FOReachgroupINanswer_groups: group.vote_score=Sum(doc.weighted_scoreFORdocINgroup) ENDFOR #Step 5: Select the optimal solution and calculate the confidence level best_group=ArgMax(answer_groups,key=vote_score) confidence=best_group.vote_score / Sum(g.vote_scoreFORgINanswer_groups) RETURNReorderByGroup(candidate_docs, best_group),confidence ENDFUNCTION.

[0060] S6. Generation and Illusion Detection: Input the retrieval results into a large language model to generate a response, and suppress illusion output through entity consistency checks.

[0061] Please see Figure 11 The system formats the Top-K search results into context and inputs them into the large language model along with the user's query to generate an answer. After generation, it performs illusion detection, including entity consistency checks (verifying whether the entities in the answer appear in the searched document) and numerical reasonableness checks (verifying whether the numerical values ​​are consistent with the document). If a potential illusion is detected, it triggers constraint regeneration or marks low confidence.

[0062] The pseudocode for the hallucination detection algorithm is as follows: Two checks are performed in parallel: an entity consistency check, which compares all named entities (such as names of pests and diseases, pesticides) identified in the generated answer with the set of entities appearing in all retrieved supporting documents to identify "unknown entities" unique to the answer and not mentioned in any supporting documents; and a numerical reasonableness check, which compares all numerical values ​​(such as concentration, price) in the answer with the set of numerical values ​​in the supporting documents. If a numerical value deviates from any similar value in the documents beyond a preset tolerance, it is marked as a suspicious value. Based on the detection results, the confidence level of the answer is comprehensively determined: if no signs of illusion are found, the confidence level is "high"; if part of the answer is supported and part is questionable, the confidence level is "medium"; if the core content of the answer lacks support, the confidence level is "low," and a process of regenerating the answer with supporting documents as constraints is triggered.

[0063] #Pseudocode: Hallucination Detection and Suppression FUNCTION HallucinationDetection(response, retrieved_docs): hallucination_flags = [] # Check 1: Entity Consistency response_entities = ExtractEntities(response) doc_entities = Union(ExtractEntities(doc) FOR doc IN retrieved_docs) unknown_entities = response_entities - doc_entities IF Length(unknown_entities)>0: hallucination_flags.APPEND({ "type": "UNKNOWN_ENTITY", "content": unknown_entities }) END IF # Check 2: Numerical Reasonableness response_numbers = ExtractNumbers(response) doc_numbers = ExtractNumbers(retrieved_docs) FOR each number IN response_numbers: IF NOT HasSimilarValue(number, doc_numbers, tolerance=0.2): hallucination_flags.APPEND({ "type": "SUSPICIOUS_NUMBER", "content": number }) END IF END FOR # Determine the confidence level IF Length(hallucination_flags) == 0: confidence = HIGH ELSE IF HasPartialSupport(response, retrieved_docs): confidence = MEDIUM ELSE: confidence = LOW response = RegenerateWithConstraint(query, retrieved_docs) END IF RETURN response, confidence, hallucination_flags END FUNCTION.

[0064] In another embodiment of the present invention, an intent recognition and multi-path recall dynamic weighted fusion retrieval system is provided. This system can be used to implement the above-mentioned intent recognition and multi-path recall dynamic weighted fusion retrieval method. Specifically, the intent recognition and multi-path recall dynamic weighted fusion retrieval system includes a data module, a preprocessing module, an identification module, a recall module, a fusion module, an arbitration module, and a detection module.

[0065] The data module is used to standardize multi-source heterogeneous data using a unified document object model for the fruit industry, slice the processed data using an adaptive document slicing algorithm based on semantic boundaries, construct keyword indexes, vector indexes and knowledge graphs based on the slicing results, and extract a set of entities in the fruit industry from the unified document object model. The preprocessing module is used to perform word segmentation, named entity recognition, error correction, and synonym expansion on user queries based on the entity set of the fruit industry extracted by the data module, and output a standardized query representation. The identification module is used to identify the intent of the normalized query output by the preprocessing module using a classification model finely tuned in the fruit industry, and output the intent category and the corresponding confidence level. The recall module is used to perform keyword retrieval, vector retrieval and graph retrieval in parallel based on the normalized query output by the preprocessing module and the keyword index, vector index and knowledge graph constructed by the data module, and output a set of three candidate documents. The fusion module is used to couple user query intent recognition with retrieval strategy selection. It dynamically adjusts the fusion weights of the three-way retrieval based on the intent category and confidence level output by the recognition module. After normalizing the three-way candidate document set output by the recall module, it performs weighted fusion calculation and outputs the fusion ranking result. The arbitration module is used to perform conflict detection on the fusion ranking results output by the fusion module. If an information conflict is detected, the fusion ranking results are updated using a multi-factor arbitration mechanism that combines the authority score of the fusion data source, the timeliness decay, and the consistency vote. The detection module is used to take the updated fusion ranking result of the arbitration module as the context input to the large language model to generate an initial answer, perform hallucination detection on the initial answer, and output the final answer.

[0066] This invention provides a terminal device comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve corresponding method flows or corresponding functions. The processor described in this embodiment can be used for the operation of an intent recognition and multi-path recall dynamic weighted fusion retrieval method, including: A unified document object model (VDOM) for the fruit industry is used to standardize multi-source heterogeneous data. An adaptive document slicing algorithm based on semantic boundaries is used to slice the processed data. Based on the slicing results, a keyword index, a vector index, and a knowledge graph are constructed. A fruit industry entity set is extracted from the VDOM. Based on the extracted fruit industry entity set, user queries are segmented, named entity recognition is performed, error correction is conducted, and synonym expansion is performed to obtain a standardized query representation. A fruit industry-fine-tuned classification model is used to identify the intent of the standardized query, outputting the intent category and corresponding confidence score. Based on the standardized query and the constructed keyword index, vector index, and knowledge graph, parallel processing is then performed. Keyword retrieval, vector retrieval, and graph retrieval are performed to obtain three candidate document sets. User query intent recognition is coupled with retrieval strategy selection. The fusion weights of the three retrievals are dynamically adjusted based on the output intent category and confidence level. The obtained candidate document sets are normalized and then weighted fusion calculation is performed to obtain the fusion ranking result. Conflict detection is performed on the obtained fusion ranking result. If information conflict is detected, a multi-factor arbitration mechanism of fusion data source authority score, timeliness decay, and consistency voting is used to update the fusion ranking result. The updated fusion ranking result is used as context input to the large language model to generate an initial answer. Illusion detection is performed on the initial answer, and the final answer is output based on the detection result.

[0067] Please see Figure 12 The terminal device is a computer device. In this embodiment, the computer device 60 includes a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When executed by the processor 61, the computer program 63 implements the intent recognition and multi-path recall dynamic weighted fusion retrieval method described in this embodiment. To avoid repetition, these details are not elaborated here. Alternatively, when executed by the processor 61, the computer program 63 implements the functions of each model / unit in the intent recognition and multi-path recall dynamic weighted fusion retrieval system described in this embodiment. To avoid repetition, these details are not elaborated here.

[0068] Computer device 60 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. Computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will understand that... Figure 12 This is merely an example of computer device 60 and does not constitute a limitation on computer device 60. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.

[0069] The processor 61 may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0070] The memory 62 can be an internal storage unit of the computer device 60, such as a hard disk or memory of the computer device 60. The memory 62 can also be an external storage device of the computer device 60, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the computer device 60.

[0071] Furthermore, the memory 62 may include both internal storage units of the computer device 60 and external storage devices. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 can also be used to temporarily store data that has been output or will be output.

[0072] Please see Figure 13 The terminal device is an electronic device 600, which is manifested in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.

[0073] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.

[0074] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.

[0075] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0076] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0077] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem). This communication can be performed via input / output interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network, wide area network, and / or public network, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0078] Example 4 This invention also provides a storage medium, specifically a computer-readable storage medium, which is a memory device in a terminal device for storing programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the terminal device and extended storage media supported by the terminal device; it can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). More specific examples of the computer-readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical fiber, portable compact disk read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0079] Computer-readable storage media also include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium can also be any readable medium other than a readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency, etc., or any suitable combination thereof.

[0080] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0081] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the intent recognition and multi-path recall dynamic weighted fusion retrieval method in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor in the following steps: A unified document object model (VDOM) for the fruit industry is used to standardize multi-source heterogeneous data. An adaptive document slicing algorithm based on semantic boundaries is used to slice the processed data. Based on the slicing results, a keyword index, a vector index, and a knowledge graph are constructed. A fruit industry entity set is extracted from the VDOM. Based on the extracted fruit industry entity set, user queries are segmented, named entity recognition is performed, error correction is conducted, and synonym expansion is performed to obtain a standardized query representation. A fruit industry-fine-tuned classification model is used to identify the intent of the standardized query, outputting the intent category and corresponding confidence score. Based on the standardized query and the constructed keyword index, vector index, and knowledge graph, parallel processing is then performed. Keyword retrieval, vector retrieval, and graph retrieval are performed to obtain three candidate document sets. User query intent recognition is coupled with retrieval strategy selection. The fusion weights of the three retrievals are dynamically adjusted based on the output intent category and confidence level. The obtained candidate document sets are normalized and then weighted fusion calculation is performed to obtain the fusion ranking result. Conflict detection is performed on the obtained fusion ranking result. If information conflict is detected, a multi-factor arbitration mechanism of fusion data source authority score, timeliness decay, and consistency voting is used to update the fusion ranking result. The updated fusion ranking result is used as context input to the large language model to generate an initial answer. Illusion detection is performed on the initial answer, and the final answer is output based on the detection result.

[0082] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0083] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0084] I. Experimental Objective The accuracy, efficiency, and reliability of the proposed intent identification and multi-path recall dynamic weighted fusion retrieval method in fruit industry knowledge retrieval were verified, and the performance differences between existing single retrieval methods and general models were compared.

[0085] II. Experimental Environment Hardware environment: CPU Intel Xeon Gold 6338 (2.0GHz), GPU NVIDIA A100 (40GB), RAM 128GB, Storage 10TB SSD; Software environment: Python 3.8, PyTorch 1.12, FAISS 1.7.4 (vector indexing), Neo4j 4.4 (knowledge graph), PyMuPDF 1.21.1 (PDF parsing), CLIP-ViT-B / 32 (image processing).

[0086] III. Experimental Dataset Fruit Industry Knowledge Base: Contains 5,000 PDF / Word technical manuals, 50,000 JPG / PNG images of pests and diseases, 2,000 HTML / PDF policy documents, 1 million Excel / CSV price data entries, and 3,000 MP4 expert videos (transcribed by ASR). The query test set consists of 1,000 real queries related to the fruit industry, categorized as follows: 250 factual queries (e.g., "Price of Red Fuji apples in December 2025"), 250 diagnostic queries (e.g., "What disease causes yellowing apple leaves?"), 250 operational queries (e.g., "How to thin apple trees?"), and 250 encyclopedic queries (e.g., "What is physiological fruit drop in apples?"). Annotated dataset: 2000 fruit industry question-and-answer annotations (including intent category, correct retrieval results, and answer reliability labels), used for model fine-tuning and performance evaluation.

[0087] Compared to a single retrieval path, the multi-path fusion method of this invention achieves significant improvements across all query types. Specifically: the accuracy of fact-based queries increased from 82% (pure keywords) to 91%, a relative improvement of 11%; the accuracy of diagnostic queries increased from 58% (pure vectors) to 84%, a relative improvement of 45%; and the completeness of operational queries increased from 72% to 88%, a relative improvement of 22%. The overall average accuracy reached 87.5%, a 23.2% improvement over the optimal single path (vector retrieval, 71%).

[0088] Through the dual safeguards of retrieval enhancement and illusion detection mechanisms, this invention reduces the illusion rate of the large language model in fruit industry question-answering tasks from 23% to 6%, a reduction of 74%. Specifically, the illusion rate for pesticide recommendation questions is reduced from 40% to below 5%, effectively avoiding agricultural production risks caused by erroneous recommendations.

[0089] By leveraging the reasoning and retrieval capabilities of knowledge graphs, this invention can handle implicit relational queries that are difficult to cover using traditional retrieval methods. For example, when a user asks "What should I do if my leaves are curled?", the system can establish a knowledge link of "curled leaves → leafroller moth → abamectin" through knowledge graph reasoning, increasing the coverage from 65% to 92%.

[0090] Agricultural sector benefits The fruit industry knowledge graph constructed in this invention contains over 50,000 entities and 200,000 relationships, covering core knowledge areas such as varieties, pests and diseases, pesticides, and planting techniques. The system can accurately understand agricultural terminology and farmers' colloquial expressions, with a terminology recognition accuracy rate of over 95%, effectively compensating for the knowledge gaps in general models in the agricultural field.

[0091] This invention enables unified management and joint retrieval of multi-source heterogeneous data, including PDF technical manuals, pest and disease images, policy documents, and price data, eliminating the problem of data silos. Cross-modal retrieval capabilities allow the system to simultaneously return text descriptions and reference images, improving information completeness by 40%.

[0092] Through a conflict arbitration mechanism, the system can effectively identify and handle contradictory information from multiple sources, prioritizing information from authoritative sources. In high-risk scenarios involving pesticide recommendations, the system will automatically provide pesticide registration information and safety intervals, reducing agricultural production risks.

[0093] This invention employs a three-way parallel retrieval architecture, which can reduce retrieval latency by 60% compared to serial execution. On a knowledge base with tens of millions of documents, the average retrieval response time is controlled within 200ms, meeting the requirements of real-time question answering.

[0094] Based on the incremental indexing mechanism, adding or updating documents can complete index building within minutes, without the need to rebuild the entire index. Compared to the traditional full index rebuilding method, the update efficiency is improved by more than 100 times, ensuring the timely retrieval of time-sensitive content such as price information and policy updates.

[0095] Through intent recognition and multi-intent decomposition capabilities, the system can understand a user's complex needs in one go, reducing the number of rounds of clarification dialogue. Experiments show that the average number of interaction rounds required to complete a task of equivalent complexity is reduced from 3.2 rounds to 1.8 rounds, an efficiency improvement of 44%.

[0096] This invention can automatically answer approximately 85% of common fruit industry consultation questions, reducing reliance on human agricultural experts. Based on an annual salary of 100,000 yuan per agricultural expert serving 2,000 farmers, the system can replace about 70% of routine consultation workload, and is expected to save approximately 350,000 yuan in agricultural technology service costs per 10,000 farmers annually.

[0097] Accurate diagnosis and control recommendations for pests and diseases can effectively reduce delays in prevention and control and losses due to pesticide damage caused by misdiagnosis. It is estimated that accurate early diagnosis can reduce pest and disease losses by 20%-30%, which translates to a loss recovery of approximately 1,600-2,400 yuan per mu based on an average yield value of 8,000 yuan per mu.

[0098] This invention adopts a modular architecture design, allowing each component to be upgraded and maintained independently. Compared to the traditional customized development model, the system development cycle is shortened by 50%, and the later maintenance cost is reduced by 40%, which is conducive to the large-scale promotion and application of the technology.

[0099] In summary, this invention provides an intent-based dynamic weighted fusion retrieval method and system for intent recognition and multi-path recall. By constructing an intent-aware retrieval strategy selection mechanism, a dynamic weighted fusion algorithm for multi-path retrieval results, and an authority-based conflict arbitration mechanism, it effectively solves technical challenges such as the difficulty of adapting a single retrieval path to diverse queries, the illusion of general large-scale agricultural knowledge, the unified processing of heterogeneous data, and the arbitration of conflicts between multiple sources of information. Through unified processing of heterogeneous data, intent-driven dynamic weighting, multi-factor conflict arbitration, and illusion detection, it significantly improves the performance of fruit industry knowledge retrieval: the overall retrieval accuracy reaches 87.5% (23.2% higher than the optimal single path), the accuracy of diagnostic queries reaches 84% ​​(a relative improvement of 45%), the illusion rate decreases from 23% to 6%, and the pesticide recommendation error rate is below 5%; the retrieval coverage increases to 92%, and the cross-modal information completeness is improved by 40% after eliminating data silos. With a response time of ≤200ms, the knowledge base update efficiency is improved by 100 times; the workload of agricultural technology consultation is reduced by 70%, and 1,600-2,400 yuan of disease and pest losses can be recovered per mu. The pilot service has served 100,000 fruit farmers, with a user satisfaction rate of 92%.

Claims

1. A dynamic weighted fusion retrieval method for intent recognition and multi-path recall, characterized in that, Includes the following steps: S1. Standardize multi-source heterogeneous data using a unified document object model for the fruit industry, slice the processed data using an adaptive document slicing algorithm based on semantic boundaries, and construct keyword index, vector index and knowledge graph based on the slicing results. Extract the fruit industry entity set from the unified document object model for the fruit industry. S2. Based on the set of entities in the fruit industry extracted in step S1, the user query is segmented, named entity recognition is performed, error correction is performed, and synonym expansion is performed to obtain a standardized query representation. S3. Use a fine-tuned classification model for the fruit industry to identify the intent of the normalized query obtained in step S2, and output the intent category and the corresponding confidence level. S4. Based on the standardized query and constructed keyword index, vector index and knowledge graph obtained in step S2, execute keyword retrieval, vector retrieval and knowledge graph retrieval in parallel to obtain three candidate document sets respectively; S5. Couple user query intent recognition with retrieval strategy selection, dynamically adjust the fusion weight of the three-way retrieval based on the intent category and confidence level output in step S3, and perform weighted fusion calculation on the three-way candidate document set obtained in step S4 after normalization to obtain the fusion ranking result. S6. Perform conflict detection on the fusion ranking result obtained in step S5. If information conflict is detected, update the fusion ranking result using a multi-factor arbitration mechanism of fusion data source authority score, timeliness decay and consistency voting. S7. Use the fusion ranking result updated in step S6 as context input to the large language model to generate an initial answer, perform hallucination detection on the initial answer, and output the final answer based on the detection result.

2. The intent recognition and multi-path recall dynamic weighted fusion retrieval method according to claim 1, characterized in that, In step S1, the structure of the unified document object model for the fruit industry includes: id: A unique identifier for a document; content: The document's text content; source_type: Data source type, with values ​​of PDF, IMAGE, HTML, TABLE; metadata: Metadata includes the source organization, publication date, authority rating, knowledge category, and applicable region; entities: A list of entities in the fruit industry sector, including varieties, diseases, pests, pesticides, symptoms, timing, operations, and regions; Embedding: A 768-dimensional vector representation of a document.

3. The intent recognition and multi-path recall dynamic weighted fusion retrieval method according to claim 1, characterized in that, In step S1, the specific steps of the semantic boundary-based adaptive document slicing algorithm include: The standardized data is segmented into paragraphs based on paragraph tags to obtain multiple paragraph segments. The semantic similarity of sentences in adjacent paragraph segments is calculated. If the semantic similarity is less than 0.7, the position is marked as a semantic breakpoint. The data is segmented according to the semantic breakpoints, and a greedy merging strategy is used to generate document slices with a length not exceeding a preset maximum length L. An overlapping window of 50 tokens is added to adjacent document slices to ensure contextual coherence.

4. The intent recognition and multi-path recall dynamic weighted fusion retrieval method according to claim 1, characterized in that, In step S2, the set of entities in the fruit industry extracted in step S1 specifically includes: Error correction: By comparing the entity set in the fruit industry field, correct non-standard fruit industry terms in the user query; Synonym expansion: Based on the entity set in the fruit industry, associate the descriptions of spraying pesticides and thinning fruit. Named entity recognition: Labeling varieties, diseases, and pests that match the entity set in the fruit industry field in the user query.

5. The intent recognition and multi-path recall dynamic weighted fusion retrieval method according to claim 1, characterized in that, In step S3, the classification model for fine-tuning in the fruit industry adopts BERT Encode and a classification head architecture, specifically including: BERT Encoder: It has a 12-layer Transformer structure and is further pre-trained using fruit industry corpora related to fruit tree planting, pest and disease control, and pesticide application. Classification header: sequentially connects the Linear layer, ReLU activation layer, Dropout layer, and Linear layer; The intent categories include four types: factual, diagnostic, operational, and encyclopedic. The classification model outputs the probability distribution of the four intent categories, and the category with the highest probability is taken as the output intent category. This probability is the corresponding confidence level.

6. The intent recognition and multi-path recall dynamic weighted fusion retrieval method according to claim 1, characterized in that, In step S4, the keyword retrieval uses the BM25 algorithm, the vector retrieval uses the Dense Retrieval algorithm, and the graph retrieval uses the Graph Traversal algorithm; the three candidate document sets are all Top-K document sets sorted by retrieval relevance scores.

7. The intent recognition and multi-path recall dynamic weighted fusion retrieval method according to claim 1, characterized in that, In step S5, the specific steps for dynamically adjusting the fusion weights of the three-way retrieval include: Based on the intent category query output in step S3, a preset basic weight table is used. In the basic weight table, the keyword retrieval weight is denoted as w1, the vector retrieval weight as w2, and the graph retrieval weight as w3. Factual intentions: w1=0.6, w2=0.3, w3=0.1; Diagnostic intent: w1=0.2, w2=0.3, w3=0.5; Operational intents: w1=0.25, w2=0.45, w3=0.3; Encyclopedic intent: w1=0.2, w2=0.5, w3=0.3; If the confidence level of the output in step S3 is lower than 0.7, then w1, w2, and w3 are adjusted to a uniform distribution: w1=0.33, w2=0.34, w3=0.33; If the normalized query obtained in step S2 contains numbers, then w1 increases by 0.10; if it contains symptom descriptions, then w3 increases by 0.10; if it contains expressions of "how" or "how," then w2 increases by 0.

05. Normalize the adjusted w1, w2, and w3 to ensure that w1 + w2 + w3 = 1.

8. The intent recognition and multi-path recall dynamic weighted fusion retrieval method according to claim 1, characterized in that, In step S6, the specific steps of the multi-factor arbitration mechanism include: Extract the core answers from the top 3 documents in the fusion ranking result obtained in step S5, calculate the semantic similarity between each pair of core answers, and determine that there is information conflict if the minimum similarity is lower than the conflict threshold. Calculate the document weighted score = document relevance score × The Data source type settings: Government agencies 1.0, Academic institutions 0.9, Agricultural research institutions 0.85, Industry associations 0.75, Media platforms 0.6, General sources 0.4; Calculate the time decay factor = exp(-age / τ), where age is the number of days since the document was published, and τ is set according to the query type: price query τ = 7 days, policy query τ = 180 days, technology query τ = 365 days. Multiply the obtained weighted score by the time decay factor to update the document weighted score. Candidate documents are clustered based on semantic similarity to the core answer, and the voting score for each cluster is calculated as the sum of the updated weighted scores of all documents within the cluster. Select the cluster with the highest voting score as the optimal answer group, update the fusion ranking results, and calculate the arbitration confidence score as the sum of the voting scores of all clusters.

9. The intent recognition and multi-path recall dynamic weighted fusion retrieval method according to claim 1, characterized in that, In step S7, the specific steps of hallucination detection include: Extract the entity set and value set from the initial answer, and at the same time extract the entity set and value set of all documents in the fusion sorting result after step S6; If the entity in the initial response exists outside the document entity set, it is marked as an illusion of type UNKNOWN_ENTITY; If the difference between the numerical value in the initial answer and the numerical value set in the document exceeds the 20% tolerance, it is marked as a SUSPICIOUS_NUMBER type illusion; If no hallucination is detected, the final answer has a high confidence level; if there is some supporting evidence, the confidence level is medium; if there is no supporting evidence, the confidence level is low and the answer is regenerated based on the constraints of the fusion ranking result updated in step S6.

10. A dynamic weighted fusion retrieval system for intent recognition and multi-path recall, characterized in that, include: The data module is used to standardize multi-source heterogeneous data using a unified document object model for the fruit industry, slice the processed data using an adaptive document slicing algorithm based on semantic boundaries, construct keyword indexes, vector indexes and knowledge graphs based on the slicing results, and extract a set of entities in the fruit industry from the unified document object model. The preprocessing module is used to perform word segmentation, named entity recognition, error correction, and synonym expansion on user queries based on the entity set of the fruit industry extracted by the data module, and output a standardized query representation. The identification module is used to identify the intent of the normalized query output by the preprocessing module using a classification model finely tuned in the fruit industry, and output the intent category and the corresponding confidence level. The recall module is used to perform keyword retrieval, vector retrieval and graph retrieval in parallel based on the normalized query output by the preprocessing module and the keyword index, vector index and knowledge graph constructed by the data module, and output a three-way candidate document set; The fusion module is used to couple user query intent recognition with retrieval strategy selection. It dynamically adjusts the fusion weights of the three-way retrieval based on the intent category and confidence level output by the recognition module. After normalizing the three-way candidate document set output by the recall module, it performs weighted fusion calculation and outputs the fusion ranking result. The arbitration module is used to perform conflict detection on the fusion ranking results output by the fusion module. If an information conflict is detected, the fusion ranking results are updated using a multi-factor arbitration mechanism that combines the authority score of the fusion data source, the timeliness decay, and the consistency vote. The detection module is used to take the updated fusion ranking result of the arbitration module as the context input to the large language model to generate an initial answer, perform hallucination detection on the initial answer, and output the final answer.

Citation Information

Cited By

  • Multi-source data alignment method, system and equipment based on large language model and multi-path recall and medium

    CN122064737A

  • A method, system, device, and medium for aligning multi-source data based on a large language model and multi-path recall.

    CN122064737B