Intention recognition method based on multi-strategy retrieval
By employing a hierarchical retrieval architecture and dynamic weight calculation, combined with knowledge graph reasoning, the problems of high recall, high accuracy, and high response speed in intent recognition in existing technologies have been solved, enabling efficient recognition of diverse user inputs and complex business scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN GENERAL LOTTERY TECH
- Filing Date
- 2026-01-23
- Publication Date
- 2026-04-17
Smart Images

Figure CN121561085B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of natural language processing and intelligent interaction technology, and in particular to an intent recognition method based on multi-strategy retrieval. Background Technology
[0002] With the popularization of artificial intelligence technology in the field of human-computer interaction, intent recognition, as a core component, directly determines the interactive experience. Existing intent recognition technologies are mainly divided into three categories: one is based on a single retrieval mechanism (such as keyword matching, semantic vector retrieval), the second is based on deep learning models (such as CNN, LSTM, BERT) for direct classification, and the third is based on the capabilities of large models for direct classification.
[0003] However, existing technologies have significant drawbacks: First, single retrieval mechanisms lack coverage, keyword matching is easily affected by differences in user expression (such as synonyms for "refund," "refund fee," and "refund"), and semantic vector retrieval has a recall rate of less than 45% for long-tail intents (such as queries in niche business scenarios); Second, although deep learning models have high accuracy, training requires massive amounts of labeled data (costing 3-5 times higher than traditional methods), and the response time after deployment is often over 100ms, with an accuracy rate of less than 60% for identifying ambiguous intents (such as incomplete expressions and mixed queries with multiple intents); Third, large models suffer from poor adaptation to vertical terminology, computationally expensive inference (inference time for a single query ≥200ms), and long bad case repair cycles (average 72 hours), making it difficult to meet real-time interaction requirements; Fourth, some multi-strategy retrieval solutions use fixed weight fusion (such as semantics: 0.4, keywords: 0.3, business: 0.3), which cannot adapt to different query scenarios, making it difficult to balance accuracy and efficiency.
[0004] In practical applications, user intent encompasses various types, including explicit intent (such as standard questions), vague intent (such as colloquial expressions), and long-tail intent (such as special business requirements). Existing technologies struggle to simultaneously meet the three-dimensional requirements of "high recall, high accuracy, and high response speed," severely limiting the application of intent recognition technology in complex business scenarios. Summary of the Invention
[0005] To address the aforementioned technical problems, embodiments of this application propose an intent recognition method based on multi-strategy retrieval, comprising:
[0006] Text preprocessing steps: Receive user query requests, perform text preprocessing on the user query requests, and obtain standardized query information;
[0007] Hierarchical retrieval steps: Perform exact matching on the standardized query information; if the matching is successful, return the matching result directly; if the matching fails, initiate semantic matching, keyword matching and business matching in parallel to obtain semantic matching result set, keyword matching result set and business matching result set respectively;
[0008] Dynamic weight calculation steps: Calculate the standard deviation of the scores corresponding to the semantic matching result set, the keyword matching result set, and the business matching result set; if the standard deviation is greater than a preset threshold, use the Softmax function to calculate the initial weight based on the scores; if the standard deviation is less than or equal to the preset threshold, use the Sigmoid function to calculate the initial semantic matching weight based on the scores corresponding to the semantic matching result set, and allocate the remaining weights proportionally to keyword matching and business matching; prune the range of the initial weights and re-normalize them to obtain the semantic matching weight, keyword matching weight, and business matching weight.
[0009] Result fusion step: Based on the weights obtained in the dynamic weight calculation step, the semantic matching result set, the keyword matching result set, and the business matching result set are weighted and fused to generate the final ranking result and corresponding confidence score;
[0010] Intent response steps: Based on the final sorting result and the confidence level, trigger the corresponding business logic processing or human-computer interaction response.
[0011] Furthermore, it solves the technical problem of how to efficiently and accurately identify user intent and transform it into controllable technical actions. Its technical effect is to build a complete technical control chain from intent input to physical world response, achieving the comprehensive optimization of retrieval efficiency, accuracy, and robustness.
[0012] Furthermore, the text preprocessing step includes:
[0013] Standardization processing sub-step: Perform spell correction and synonym mapping on the user query request to generate standardized text;
[0014] The word segmentation sub-step involves detecting the language type of the user's query request and using a word segmenter corresponding to that language type to segment the standardized text, while filtering out stop words and special characters.
[0015] Furthermore, it solves the technical problem of how to transform diverse and non-standard user input into standardized data that can be uniformly processed by machines, thereby improving the accuracy and consistency of subsequent retrieval processes.
[0016] Furthermore, in the hierarchical retrieval step, the semantic matching initiated in parallel includes:
[0017] Vectorization sub-step: Convert the standardized query information and the content of the document to be matched into a high-dimensional vector;
[0018] Hybrid retrieval sub-step: Perform vector similarity retrieval based on the high-dimensional vector and text retrieval based on the full-text index in parallel, and take the union of the two results as the preliminary candidate set;
[0019] Enhanced scoring sub-step: Calculate the vector similarity score between the standardized query information and the candidate documents, as well as the word overlap score based on word segmentation, and dynamically apply different enhancement coefficients or penalty factors according to the high and low ranges of the vector similarity score and the word overlap score to calculate the enhanced semantic score.
[0020] Furthermore, it solves the technical problem of how to improve the accuracy and robustness of semantic understanding retrieval and avoid misjudgments caused by differences in language expression. Its technical effect is to enhance the accuracy of semantic matching through the dynamic synergy of multiple similarity indicators.
[0021] Furthermore, in the hierarchical retrieval step, the parallel keyword matching includes:
[0022] The synonym query extension sub-step: Based on the one-to-many synonym index, replace the word segments in the standardized query information with their synonyms to generate multiple extended queries;
[0023] Multi-query retrieval aggregation sub-step: Use the BM25 algorithm to retrieve each of the extended queries, aggregate and deduplicate all the results to obtain a candidate result set;
[0024] Keyword enhancement scoring sub-step: For each result in the candidate result set, its BM25 base score, query keyword matching rate, and core term matching rate are combined to calculate the enhanced keyword score.
[0025] Furthermore, it solves the technical problem of how to effectively handle the lexical differences between user queries and knowledge base documents, and improve the recall rate of long-tail intents. Its technical effect is to expand the semantic coverage and significantly improve intent recall capabilities.
[0026] Furthermore, in the hierarchical retrieval step, the parallel initiation of business matching includes:
[0027] Entity identification and query sub-step: Identify business entities from the standardized query information, and query the business entities and their associated entities in the pre-built knowledge graph to obtain a query entity set;
[0028] Knowledge graph reasoning sub-steps: In the knowledge graph, obtain document entities to obtain a document entity set, analyze the path relationship between query entities and document entities, and calculate the relationship reasoning confidence based on path type and hop count;
[0029] Business fusion scoring sub-step: The entity direct matching score, business domain matching score, and the relationship inference confidence are weighted and fused to calculate the business matching score.
[0030] Furthermore, it solves the technical problem of how to understand the deep logical relationships in complex business queries and achieve knowledge-based intent recognition. The technical effect is to improve the system's ability to accurately understand specialized and complex business intents.
[0031] Furthermore, in the enhanced scoring sub-step, dynamically applying different enhancement coefficients or penalty factors specifically involves:
[0032] In response to the vector similarity score being greater than a first threshold and the word overlap score being greater than a second threshold, the vector similarity score is multiplied by a first enhancement coefficient;
[0033] In response to a vector similarity score greater than the first threshold but a word overlap score less than or equal to the second threshold but greater than the third threshold, the vector similarity score is multiplied by a second enhancement coefficient;
[0034] Otherwise, multiply the vector similarity score by a scaling factor.
[0035] Furthermore, it solves the technical problem of how to precisely quantify and adjust the judgment criteria for semantic relevance. Its technical effect is to make the scoring results more closely match the true semantic relevance through a segmented dynamic scoring strategy.
[0036] Furthermore, prior to the synonym query expansion sub-step, the method also includes:
[0037] The synonym index construction sub-step involves loading business entities and their synonym definitions through configuration files, constructing a one-to-one index from synonyms to standard words for standardization, and a one-to-many index from standard words to the synonym set for query expansion.
[0038] Furthermore, this solves the technical problem of how to flexibly and efficiently maintain and manage domain synonym knowledge, resulting in zero-code maintenance and real-time updates of business knowledge, thus improving system adaptability.
[0039] Furthermore, in the knowledge graph reasoning sub-step, calculating the confidence level of relational reasoning further includes:
[0040] Common neighbor discovery sub-step: In the knowledge graph, find the set of common neighbor entities between the query entity set and the document entity set;
[0041] Path confidence calculation sub-step: Calculate the path association score based on the strength of the relationship between entities in the set of common neighbor entities, and the path length from the query entity and the document entity to the common neighbor.
[0042] Furthermore, it solves the technical problem of how to mine implicit relationships between entities that are not directly connected from knowledge graphs. The technical effect is to enhance the system's ability to discover and understand indirectly related intentions.
[0043] Furthermore, in the dynamic weight calculation step, the range pruning is: restricting any one of the semantic matching weight, keyword matching weight, and business matching weight to a preset range consisting of a minimum weight value and a maximum weight value.
[0044] Furthermore, it solves the technical problem of how to prevent the fusion results from being distorted due to excessively high or low decision weights for a single path. Its technical effect is to ensure the stability and robustness of the multi-strategy fusion system.
[0045] Furthermore, between the hierarchical retrieval step and the dynamic weight calculation step, the following is also included:
[0046] Cache query steps: Attempt to retrieve the cached semantic matching result set, keyword matching result set, and business matching result set associated with the standardized query information from the cache;
[0047] If a cache hit occurs, the cached result set from the cache query step is used; if a cache miss occurs, the parallel-initiated matching is performed and stored in the cache.
[0048] Furthermore, it solves the technical problem of how to reduce system load and improve response speed in high-concurrency scenarios. Its technical effect is to significantly improve system throughput and average response performance through caching mechanism.
[0049] Furthermore, the dynamic weight calculation step specifically includes:
[0050] The sub-step for obtaining optimization parameters is as follows: Based on the online learning model, obtain the optimization parameters for the dynamic weight calculation strategy;
[0051] Standard deviation calculation sub-step: Calculate the standard deviation of the semantic matching score, the keyword matching score, and the business matching score;
[0052] Strategy selection sub-step: In response to the standard deviation being greater than the fourth threshold, a weight calculation strategy using the Softmax function for weight allocation is selected; in response to the standard deviation being less than or equal to the fourth threshold, a weight calculation strategy using the Sigmoid function for weight allocation is selected.
[0053] Weight execution sub-step: Using the optimization parameters obtained in the optimization parameter acquisition sub-step, execute the weight calculation strategy selected in the strategy selection sub-step to calculate the semantic matching weight, the keyword matching weight, and the business matching weight;
[0054] The online learning model continuously optimizes the optimization parameters based on user interaction feedback signals corresponding to historical queries.
[0055] Furthermore, it solves the technical problem of how to make dynamic weight calculation continuously adapt to real user behavior and preferences, and realize automated and personalized parameter tuning. Its technical effect is to upgrade static or rule-driven weight calculation into a data-driven dynamic optimization system by introducing an online learning mechanism based on real user feedback, which greatly improves the system's adaptability and long-term performance in actual deployment.
[0056] Furthermore, the sub-step of obtaining optimization parameters includes:
[0057] Information collection sub-step: Collect context information, execution action information and feedback quantification information associated with each historical query. The context information includes the scores of each matching strategy corresponding to the historical query. The execution action information includes the weight calculation strategy and corresponding parameters selected for the historical query. The feedback quantification information is calculated based on the user interaction feedback signal corresponding to the historical query.
[0058] Model training and application sub-steps: Using the context information as the context input of the context gambling machine model, the execution action information as the action, and the feedback quantification information as the immediate reward, the context gambling machine model is trained, and the optimization parameters are determined based on the strategy output by the trained model for the current query.
[0059] Furthermore, it solves the technical problem of how to construct a mathematical model that can efficiently explore and utilize the optimal weight strategy from historical interactions. The technical effect is that by formalizing the weight optimization problem into a sequential decision problem through the contextual gambling machine model, it realizes the intelligent exploration and utilization balance of weight strategy in a complex fractional feature space, thereby improving learning efficiency and strategy quality.
[0060] Furthermore, in the information collection sub-step, quantifying the user interaction feedback signal into a reward value specifically involves:
[0061] In response to the user interaction feedback signal including click behavior data, a first reward component is calculated based on the click rate and click duration;
[0062] In response to the user interaction feedback signal containing satisfaction evaluation data, a second reward component is calculated based on the evaluation level;
[0063] The first reward component and the second reward component are weighted and fused to obtain the feedback quantification information.
[0064] Furthermore, it solves the technical problem of how to unify diverse and unstructured user behaviors and subjective evaluations into numerical reward signals that can drive model learning. The technical effect is that by designing a comprehensive reward mechanism that integrates objective behavioral indicators and subjective evaluation indicators, the optimization goals of online learning models can be more comprehensively and accurately aligned with actual business value and user experience.
[0065] Accordingly, embodiments of this application also provide an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the intent recognition method based on multi-strategy retrieval as described above.
[0066] Accordingly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the intent recognition method based on multi-strategy retrieval as described above.
[0067] This application achieves significant technical advantages over existing technologies through innovative techniques such as hierarchical multi-path retrieval architecture, intelligent dynamic weight fusion, and knowledge graph reasoning.
[0068] 1. Significantly Improved Intent Recognition Accuracy: Through a hierarchical multi-path retrieval architecture employing precise matching, semantic matching, keyword matching, and business matching, the four strategies complement each other. Precise matching achieves accurate recognition of explicit instructions; semantic matching strengthens the ability to capture semantic associations through a dual scoring mechanism of vector similarity and word overlap; keyword matching broadens the semantic coverage through synonym expansion; and business matching deepens the understanding of business logic based on knowledge graph reasoning. The combined effect significantly improves accuracy compared to a single strategy.
[0069] 2. Multi-strategy fusion accuracy optimization: A dynamic weight fusion strategy based on score standard deviation is adopted. When there are significant differences in scores, the Softmax function is used to highlight the contribution of the superior strategy. When the scores are close, the Sigmoid function is used to achieve a smooth weight transition. Combined with weight range restrictions, imbalances caused by a single strategy dominating the decision-making process are avoided. Compared with the traditional fixed-weight scheme, the accuracy of the fusion result is significantly improved, and it can better adapt to the feature differences of different query scenarios.
[0070] 3. Significantly Enhanced Multilingual and Non-Standard Input Processing Capabilities: Through automatic multilingual detection, language-specific stop word filtering, and standardized processing using dual-index synonyms, the system achieves comprehensive adaptation to mixed Chinese-English queries, colloquial expressions, and spelling errors. This effectively improves the accuracy of word segmentation for multilingual queries and the recall effect of synonym queries, significantly broadening the system's adaptability to diverse inputs and reducing the risk of misjudgment caused by non-standard input.
[0071] 4. Significantly Improved Recall: Based on a dual-index synonym expansion mechanism of one-to-one and one-to-many, a single query is expanded into multiple synonym queries, and the coverage of candidate results is broadened by combining hybrid retrieval (vector retrieval + text retrieval). At the same time, the implicit relationship reasoning of the knowledge graph, through common neighbor discovery and path analysis, mines the indirect associations between queries and documents, effectively solving the recall problem of long-tail intents and implicit intents.
[0072] 5. Significantly Enhanced Business Logic Understanding Capability: By constructing semantic relationships between business entities, domains, and patterns through knowledge graphs, multi-level matching at the entity, domain, and structure levels is achieved. This improves the accuracy of business entity recognition and domain attribution determination, enabling precise understanding of complex business queries involving multiple entities and logical relationships, thus meeting the core needs of specialized intent recognition in vertical domains.
[0073] 6. System robustness and availability are comprehensively improved: Multiple fault tolerance mechanisms ensure stable system operation. Even if a single strategy fails, other strategies can still maintain effective identification capabilities, avoiding a precipitous drop in system performance. The cache degradation strategy greatly improves system availability and enables seamless recovery from failures. The modular and configurable design simplifies the development process of new strategies and improves parameter tuning efficiency, significantly enhancing the system's adaptability to business iterations.
[0074] 7. Outstanding advantages in response speed and deployment cost: The hierarchical retrieval architecture enables ultra-fast response through precise matching, and multi-path parallel retrieval further optimizes the overall response efficiency; pure CPU computing combined with a caching mechanism greatly improves the system's concurrent processing capabilities, without relying on expensive GPU hardware, significantly reducing deployment and maintenance costs; at the same time, it supports real-time knowledge updates, without the need for complex model fine-tuning processes, and can quickly adapt to iterative changes in business knowledge. Attached Figure Description
[0075] Figure 1 This is an overall flowchart of the intent recognition method based on multi-strategy retrieval according to an embodiment of this application.
[0076] Figure 2 This is a flowchart of keyword matching in an embodiment of this application.
[0077] Figure 3 This is a flowchart illustrating the dynamic weight calculation logic of an embodiment of this application.
[0078] Figure 4 This is a business matching flowchart of an embodiment of this application. Detailed Implementation
[0079] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0080] In the embodiments of this application, directional indicators (such as up, down, left, right, front, back, etc.) are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0081] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features.
[0082] Overall Deployment Description: The intent recognition method based on multi-strategy retrieval proposed in this application can be deployed in three types of hardware environments:
[0083] Cloud deployment: Intel Xeon Gold 6330 CPU + NVIDIA A100 GPU + 128GB DDR4 RAM + 2TB NVMe SSD + Redis cluster (3 masters and 3 slaves) + Neo4j graph database server (8-node cluster), suitable for high-concurrency intelligent customer service platforms;
[0084] Edge deployment: ARM Cortex-A76 CPU + 4GB LPDDR5 RAM + 512GB NVMe SSD, suitable for low-latency scenarios such as voice assistant terminals and smart interactive terminals;
[0085] Hybrid deployment: The text preprocessing module and the precise matching module are deployed on edge nodes, while the semantic matching and business matching modules are deployed in the cloud. Data interaction is achieved through 5G / fiber optics, balancing latency and computing power requirements.
[0086] The interaction logic between each software module and the hardware is as follows: the text preprocessing module calls CPU multi-threaded resources to perform word segmentation, the vectorization of semantic matching is accelerated by GPU, the knowledge graph data is stored in the Neo4j server and indexed, the cached data is distributed through Redis cluster, the online learning model relies on the GPU server for parallel training, and all modules achieve low-latency data transmission through the gRPC protocol.
[0087] Those skilled in the art will understand that the steps or sub-steps in the method flow correspond one-to-one with the modules mentioned in this application. For example, if the text preprocessing step is: receiving a user query request, performing text preprocessing on the user query request, and obtaining standardized query information, then the corresponding text preprocessing module's function is to receive a user query request, perform text preprocessing on the user query request, and obtain standardized query information. The interaction logic between each software module and the hardware is as follows: the text preprocessing module calls CPU multi-threaded resources to perform word segmentation; semantic matching vectorization is accelerated by GPU computation; knowledge graph data is stored on a Neo4j server and indexed; cached data is distributed and stored via a Redis cluster; the online learning model relies on a GPU server for parallel training; and all modules achieve low-latency data transmission through the gRPC protocol.
[0088] Please refer to Figure 1 The basic method for intent recognition based on multi-strategy retrieval involves the following steps:
[0089] Text preprocessing steps: The intelligent customer service terminal (ARM Cortex-A76) receives user query requests (such as "how to process a refund") and transmits the query data to the text preprocessing module of the edge server via the 5G network. The module calls the CPU multi-thread to perform standardization processing: correcting "fund refund" to "fund refund", mapping "refund" and "refund fee" to the standard word "fund refund", filtering stop words "how" and "process", segmenting words to obtain ["fund refund"], and finally outputting standardized query information (including the original text, standardized text, and word segmentation results).
[0090] Layered retrieval steps: The edge server's exact matching module reads standardized query information and queries the local SSD storage's exact matching index (storing business codes, standard titles, etc.). No exact match is found for "fund refund" (if an exact match is found, the result is returned directly). This triggers the cloud server to launch semantic matching, keyword matching, and business matching modules in parallel.
[0091] 1) The semantic matching module converts the standardized query into a 768-dimensional vector and retrieves the semantic matching result set from the vector database;
[0092] 2) The keyword matching module retrieves the inverted index based on the BM25 algorithm to obtain the keyword matching result set;
[0093] 3) The business matching module queries the Neo4j knowledge graph to obtain the business matching result set.
[0094] 3. Please refer to the following: Figure 3, Dynamic weight calculation steps: The cloud CPU calculates the scores of the three result sets (semantics: 0.82, keywords: 0.75, business: 0.78), with a standard deviation of 0.035 and a preset threshold of 0.12 (stored in the configuration file). Since the standard deviation ≤ 0.12, the Sigmoid function is used to calculate the initial semantic matching weight: sem_w = 0.2 + 0.6 / (1 + exp(-10 × (0.82 - 0.65))) = 0.58, and the remaining weight of 0.42 is distributed according to the ratio of the keyword score to the business score (keywords: 0.20, business: 0.22); the weights are clipped to the interval [0.15, 0.7] (not adjusted), and after renormalization, the final weights are obtained (semantics: 0.58, keywords: 0.20, business: 0.22); if the standard deviation > 0.12, the Softmax function is selected for the self-adaptive weight allocation strategy. [[ID=z]]
[0095] 4. Result fusion step: Based on the final weights, the three result sets are weighted and fused to calculate the comprehensive score of each candidate document (e.g., for document A: 0.82 × 0.58 + 0.75 × 0.20 + 0.78 × 0.22 = 0.80), and the final sorting result and confidence level are generated (document A: 0.80, confidence level HIGH).
[0096] 5. Intent response step: The cloud server transmits the sorting result and confidence level to the intelligent customer service terminal, and the terminal triggers the business logic processing based on the confidence level HIGH, and pushes the "Explanation of the Process for Returning Funds" document and operation guide to the user.
[0097] Technical effects of this embodiment: Through the hierarchical retrieval architecture, when the exact match fails, the three strategy matches are executed in parallel, thereby improving the recall rate; the dynamic weight calculation adaptively selects the strategy according to the score distribution, avoiding the rigidity of fixed weights, achieving a balance between retrieval efficiency (the exact match response of the edge node ≤ 5 ms) and accuracy (the comprehensive accuracy rate is 85%), and constructing a complete technical control chain from intent input to terminal response.
[0098] Embodiment (2) - 1, as a basic embodiment, the text preprocessing method includes:
[0099] 1. Standardization processing sub-step: The user queries "How to check the marked data last month" (including colloquial expressions), and the text preprocessing module of the edge server calls the large model (deployed on the GPU) to execute:
[0100] 1) Spelling correction: Correct "marked" to "filled and submitted" (based on the business synonym library);
[0101] 2) Synonym mapping: Map "check" and "query" to the standard word "query"; [[ID=z3]]
[0102] 3) Generate the standardized text "Query the data submitted by painting and filling last month".
[0103] 2. Sub-step of word segmentation processing: The module detects that the language type is Chinese (with an accuracy of 95%) through the langdetect library, calls the jieba word segmenter to segment the standardized text, and obtains ["Query", "last month", "painting and filling submission", "data"]; loads the Chinese stop word library (150 words), filters the stop word "Query", and finally outputs the word segmentation result ["last month", "painting and filling submission", "data"].
[0104] Embodiment (2)-2. On the basis of the above basic embodiment, entity extraction and multi-language hybrid processing can be further optimized and added:
[0105] 1. Sub-step of standardization processing: When the user queries "Query the refund records in October 2025" (mixed Chinese and English), the module executes:
[0106] 1) Spelling correction: No error;
[0107] 2) Synonym mapping: Map "refund" to the standard word "money refund";
[0108] 3) Entity extraction: Identify the time entity "October 2025" (DATE_SCOPE, weight 0.8);
[0109] 4) Generate the standardized text "Query the money refund records in October 2025".
[0110] 2. Sub-step of word segmentation processing: Detect that the language type is mixed Chinese and English, use jieba for word segmentation of the Chinese part, and use spacy for word segmentation of the English part, and obtain ["Query", "October 2025", "money refund", "records"]; filter the Chinese and English stop words (English "of", Chinese "of"), and output the word segmentation result ["October 2025", "money refund"].
[0111] Technical effect: Embodiment (2)-1 ensures the consistency of the standardized text through language-specific word segmentation and stop word filtering, and improves the subsequent retrieval accuracy; Embodiment (2)-2 adds entity extraction and multi-language hybrid processing, thus adapting to complex input scenarios, and the multi-language query accuracy rate is increased from 40% to 75%, solving the normalization problem of diverse user inputs.
[0112] Embodiment (3)-1. The basic semantic matching method includes:
[0113] 1. Vectorization sub-step: The cloud GPU server calls the BERT-base model to convert the standardized query information "fill in and submit for refund" and the documents to be matched (5000 documents, stored on NVMeSSD) into 768-dimensional high-dimensional vectors. The vectors are stored in the FAISS vector database (or PostgreSQL database) (supporting GPU-accelerated retrieval).
[0114] 2. Hybrid retrieval sub-steps: Parallel execution of vector similarity retrieval (calculating cosine similarity) and text retrieval (keyword-based full-text retrieval):
[0115] 1) Vector retrieval: Returns 20 documents with a cosine similarity ≥ 0.3;
[0116] 2) Text search: Returns 15 documents containing either "submit" or "funds refunded";
[0117] 3) Take the union of the 30 documents to obtain the initial candidate set (after deduplication).
[0118] 3. Enhanced scoring sub-step: Calculate the vector similarity score (e.g., document X: 0.72) and the lexical overlap score (Jaccard similarity: |{"fill in and submit","funds returned"}∩{"fill in and submit","funds returned","process"}| / |{"fill in and submit","funds returned"}∪{"fill in and submit","funds returned","process"}|=0.667); Since the vector similarity > 0.65 and the lexical overlap > 0.2, apply an enhancement coefficient of 1.25 to calculate the enhanced semantic score: 0.72 × 1.25 = 0.90 (after normalization).
[0119] Example (III)-2: Optimizing semantic matching. Based on Example (III)-1, core term weights and dynamic threshold adjustments are introduced:
[0120] 1. Vectorization sub-step: The RoBERTa model (adapted to Chinese business scenarios) is used to convert the query and document into 1024-dimensional vectors, which are stored in the Milvus vector database (or PostgreSQL database).
[0121] 2. Hybrid retrieval sub-steps: The vector retrieval threshold is dynamically adjusted to 0.35 (based on system load), and the text retrieval adds priority to core terms ("filling and submitting" and "funds refund" are core terms with a weight of 1.2), and the initial candidate set size is controlled at 25.
[0122] 3. Enhanced scoring sub-step: Calculate the vector similarity score (document Y: 0.62), lexical overlap score (0.32), and core term weighted overlap (0.8); since the vector similarity is ≤0.65 and the lexical overlap is >0.3, apply an enhancement coefficient of 1.2, and enhance the semantic score: (0.62×0.7+0.32×0.3)×1.2=0.59 (α=0.7, β=0.3, after normalization).
[0123] Technical effects: Implementation (III)-1 expands the candidate set by hybrid retrieval and enhances the combination of scoring and dual similarity indicators, thereby improving the semantic matching accuracy; Implementation (III)-2 introduces core term weights and dynamic thresholds to adapt to business scenarios and system load, thereby increasing the semantic matching accuracy from 65% to 82% and solving the misjudgment problem caused by differences in language expression.
[0124] Please refer to Figure 2 Example (IV)-1: The basic keyword matching method includes:
[0125] 1. Synonym Query Expansion Sub-step: Based on the one-to-many synonym index (stored in Redis), the standardized query segmentation ["fill in and submit", "funds refunded"] is expanded as follows:
[0126] 1) "Fill in and submit" → ["Fill in and submit", "Select and submit", "Purchase voucher"];
[0127] 2) "Refund" → ["Refund", "Refund", "Payback"];
[0128] 3) Generate extended queries (3×3=9 in total, take the top 5+1=6): "Fill in and submit for refund", "Select and submit for refund", "Fill in and submit for refund", etc.
[0129] 2. Multi-query retrieval aggregation sub-step: Perform BM25 retrieval (inverted index stored in SSD) for each extended query, with BM25 parameters k1=1.2 and b=0.75; aggregate the retrieval results of the 6 queries, and obtain 18 candidate result sets after deduplication.
[0130] 3. Keyword Enhancement Scoring Sub-step: Calculate the BM25 base score (0.78) of document Z, keyword matching rate (sum of matching weights / total weight = 1.2 + 1.2 / 1.2 + 1.2 = 1.0), and core term matching rate (1.2 + 1.2 / 1.2 + 1.2 = 1.0); Enhanced keyword score = 0.78 × 0.4 + 1.0 × 0.2 + 1.0 × 0.2 = 0.71.
[0131] Example (IV)-2: Optimize the keyword matching scheme. Based on Example (IV)-1, add penalties for mutually exclusive keywords and dynamic weight adjustment:
[0132] 1. Synonym query expansion sub-step: The number of expanded queries is limited to top 3 + 1 = 4 to avoid noise caused by excessive expansion; add English synonym expansion (such as "refund" → "fund refund").
[0133] 2. Multi-query retrieval aggregation sub-step: Distributed BM25 retrieval (deployed on 3 CPU nodes) is adopted to improve retrieval efficiency; a time decay factor (weight of documents in the last 3 months × 1.1) is introduced during aggregation.
[0134] 3. Keyword Enhancement Scoring Sub-step: The document is found to contain mutually exclusive keywords "payment" and "refund", and a penalty factor of 0.8 is applied; Enhanced Keyword Score = (0.78×0.4+1.0×0.2+1.0×0.2)×0.8=0.57.
[0135] Technical effects: Example (IV)-1 expands semantic coverage by expanding synonyms, enhances the integration of multi-dimensional indicators in scoring, and thus improves the long-tail intent recall rate; Example (IV)-2 adds a penalty mechanism and distributed retrieval, thereby reducing noise interference and improving efficiency. The keyword matching recall rate increases from 45% to 68%, solving the problem of insufficient recall caused by vocabulary differences.
[0136] Please refer to Figure 4 Example (5)-1: The basic business matching method includes:
[0137] 1. Entity Identification and Query Sub-steps: Identify business entities from the standardized query "Query this month's data on submitted and refunded payments": "Submission" (BUSINESS_MODE, 1.2), "Refund" (BUSINESS_MODE, 1.2), and "This month" (DATE_SCOPE, 0.8); query the entity and related entities (such as the "Financial Management" domain node) in the Neo4j knowledge graph to obtain the query entity set.
[0138] 2. Knowledge Graph Reasoning Sub-step: In the knowledge graph, obtain document entities to obtain a document entity set, and analyze the path relationship between the query entity and the document entity (the entities of the document "Instructions for the Return of Payment for Filling in the Business" are: "Fill in and Submit", "Return of Payment", and "Process"): "Fill in and Submit" - BELONGS_TO - "Financial Management" - BELONGS_TO - "Return of Payment" (2 hops), path type weight 0.9, path confidence = 1.0 / (1+2) = 0.333.
[0139] 3. Business integration scoring sub-step: Calculate the entity direct matching score (0.431), business domain matching score (0.7), and relational inference confidence (0.333); Business matching score = 0.431×0.35+0.7×0.30+0.333×0.20+0.506×0.15=0.527 (structural matching score 0.506).
[0140] Example (V)-2: Optimize business matching. Based on Example (V)-1, add incremental updates and multi-domain inference:
[0141] 1. Entity recognition and query sub-steps: The BERT entity recognition model is adopted (after fine-tuning to adapt to business scenarios), and the recognition accuracy is improved to 92%; the knowledge graph supports incremental updates (adding the "cross-border payment return" entity, the update time is ≤100ms).
[0142] 2. Knowledge graph reasoning sub-steps: Find multi-path relationships (such as "fill in and submit" - TRIGGERS - "voucher verification" - RELATED_TO - "funds returned"), and accumulate the confidence of multiple paths (maximum 0.10).
[0143] 3. Business integration scoring sub-step: Dynamically adjust the weight of each score (the domain matching weight is increased to 0.35), business matching score = 0.431×0.30+0.7×0.35+0.333×0.20+0.506×0.15=0.545.
[0144] Technical effects: Example (V)-1 realizes entity and relationship reasoning based on knowledge graph, thereby understanding the deep logic of business; Example (V)-2 adds incremental update and multi-path reasoning, thereby adapting to business iteration and complex queries, and the accuracy of business query is increased from 60% to 85%, solving the problem of accurate understanding of professional intent.
[0145] Example (VI)-1, Threshold and coefficient settings for semantic enhancement scoring (general scenario settings):
[0146] 1. Preset thresholds: First threshold (vector similarity) = 0.65, second threshold (lexical overlap) = 0.2, third threshold (lexical overlap) = 0.05;
[0147] 2. Enhancement coefficient and penalty factor:
[0148] 1) Vector similarity > 0.65 and word overlap > 0.2: First enhancement coefficient = 1.25;
[0149] 2) Vector similarity > 0.65 and 0.05 < lexical overlap ≤ 0.2: Second enhancement coefficient = 1.1;
[0150] 3) Other cases: Scaling factor = 0.9 (vector similarity > 0.65) or 0.75 (vector similarity ≤ 0.65).
[0151] 3. Application example: Query the “filling and submission process” and the document “filling and submission operation guide”. The vector similarity is 0.70 and the word overlap is 0.15. Apply the second enhancement coefficient of 1.1 and the enhanced semantic score is 0.70 × 1.1 = 0.77.
[0152] Example (VI)-2: Vertical Business Scenario Setup:
[0153] 1. Preset thresholds: First threshold = 0.70 (for financial business scenarios, where semantic requirements are higher), second threshold = 0.3, third threshold = 0.1;
[0154] 2. Enhancement coefficient and penalty factor:
[0155] 1) Vector similarity > 0.70 and word overlap > 0.3: First enhancement coefficient = 1.3;
[0156] 2) Vector similarity > 0.70 and 0.1 < lexical overlap ≤ 0.3: Second enhancement coefficient = 1.15;
[0157] 3) Other cases: Scaling factor = 0.85 (vector similarity > 0.70) or 0.7 (vector similarity ≤ 0.70).
[0158] 3. Application example: Query "refund of wealth management products" and the document "rules for return of funds for wealth management products", vector similarity = 0.72, word overlap = 0.35, apply the first enhancement coefficient 1.3, the enhanced semantic score = 0.72 × 1.3 = 0.94.
[0159] Technical effect: By setting thresholds and coefficients for different scenarios, the scoring criteria can be made to fit different business needs, avoiding misjudgments caused by general settings. In Example (VI)-2, the semantic matching accuracy is improved by 8% in the financial scenario, which solves the problem of fine adjustment of the scoring criteria.
[0160] Example (VII)-1, Synonym Index Construction (Basic Index Construction):
[0161] 1. Configuration file loading: Business users define entity types and synonyms through YAML configuration files (no code development required), and the configuration files are stored in a cloud configuration center (supporting hot updates):
[0162] yaml
[0163] 2. entity_types:
[0164] BUSINESS_MODE:
[0165] synonyms:
[0166] Fill in and submit: [Fill in voucher, select submit, purchase voucher]
[0167] Refund: [Refund, Money Back, refund]
[0168] 3. Index Building: The cloud server loads the configuration file and performs the following operations:
[0169] 1) One-to-one index: {"tag":"fill in and submit","select and submit":"fill in and submit","refund":"funds returned",...};
[0170] 2) One-to-many index: {"Fill in submission":["Fill in submission","Mark","Select submission","Purchase voucher"],...};
[0171] 4. Storage: Indexes are stored in Redis with a TTL of 3600 seconds and support cache preheating.
[0172] Example (VII)-2: Optimize index construction. Based on Example (VII)-1, add synonym weight decay and conflict detection:
[0173] 1. Configuration file loading: Add synonym weight configuration (e.g., "Mark" weight = 0.9, "Select Submit" weight = 0.85);
[0174] 3. Index building:
[0175] 1) One-to-one index: Retains weight information for subsequent score adjustments;
[0176] 2) One-to-many index: Detects synonym conflicts (such as "refund" simultaneously mapping to "funds returned" and "payment cancelled"), and resolves them through business rule priority;
[0177] 3. Incremental update: Add a new synonym "refund return" → "fund refund", only update the related index, time ≤50ms.
[0178] Technical effects: Implementation Example (VII)-1 achieves zero-code maintenance of the synonym index, thereby improving system adaptability; Implementation Example (VII)-2 adds weight decay and conflict detection, thereby improving index accuracy, and the synonym query recall rate increases from 35% to 78%, solving the problem of efficient management of domain synonyms.
[0179] Example (8)-1: Calculation of Relational Confidence in Knowledge Graph Reasoning (Basic Reasoning Calculation)
[0180] 1. Common Neighbor Discovery Sub-step: Query the entity set {"Submit", "Refund"} and the document entity set {"Submit", "Process", "Financial Management"}, and find the common neighbor entity in the Neo4j knowledge graph: {"Financial Management"} (associated with "Submit" BELONGS_TO and "Refund" BELONGS_TO).
[0181] 2. Path confidence calculation sub-step:
[0182] 1) Relationship strength: BELONGS_TO relationship strength = 0.8;
[0183] 2) Path length: The path from the query entity to its common neighbor is 1 hop, and the path from the document entity to its common neighbor is 1 hop;
[0184] 3) Path association score = 0.05 × min(1.0, 1 / 3) + 0.03 × (1.0 / (1+1) × 0.8) = 0.017 + 0.012 = 0.029.
[0185] Example (VIII)-2: Based on Example (VIII)-1, add multi-hop neighbors and relation type weighting (optimize inference calculation):
[0186] 1. Common Neighbor Discovery Sub-step: Find common neighbors within 2 hops, add {"Document Verification"} ("Fill in and submit" - TRIGGERS - "Document Verification" - RELATED_TO - "Fund Refund").
[0187] 2. Path confidence calculation sub-step:
[0188] 1) Relationship strength: TRIGGERS=0.7, RELATED_TO=1.0;
[0189] 2) Path length: 2 hops;
[0190] 3) Path association score = 0.05 × min(1.0, 2 / 3) + 0.03 × (1.0 / (1+2) × (0.7 × 1.0)) + 0.03 × (1.0 / (1+1) × 0.8) = 0.033 + 0.007 + 0.012 = 0.052.
[0191] Technical effects: Example (8)-1 uses common neighbors and path analysis to mine implicit associations, thereby improving the recall rate of indirectly related intents; Example (8)-2 adds multi-hop neighbors and relationship weighting, thereby enriching the association dimensions, improving the accuracy of complex business queries by 26%, and solving the problem of discovering implicit associations.
[0192] Example (IX)-1: Fixed Range Clipping (Weighted Range Clipping):
[0193] 1. Preset minimum weight value = 0.15, maximum weight value = 0.7 (stored in system configuration file);
[0194] 2. The initial weights obtained from dynamic weight calculation are: semantics = 0.75, keywords = 0.10, business = 0.15;
[0195] 3. Scope pruning: The semantic weight is pruned to 0.7, the keyword weight is increased to 0.175, and the business weight is kept at 0.125;
[0196] 4. Renormalization: Semantics = 0.7 / (0.7+0.175+0.125) = 0.7, Keywords = 0.175, Business = 0.125 (Total = 1.0).
[0197] Example (IX)-2: Based on Example (IX)-1, the range is dynamically adjusted according to the business scenario (dynamic range pruning):
[0198] 1. Financial business scenario: minimum weight = 0.2, maximum weight = 0.6;
[0199] 2. General customer service scenario: minimum weight = 0.15, maximum weight = 0.7;
[0200] 3. Initial weights: semantics = 0.65, keywords = 0.2, business = 0.15 (financial scenario);
[0201] 4. Clipping and normalization: No adjustment is needed, output directly (all values are in the range [0.2, 0.6]).
[0202] Technical effects: Example (IX)-1 avoids excessive concentration of single strategy weights by pruning within a fixed range, thereby ensuring multi-strategy collaboration; Example (IX)-2 dynamically adjusts the range based on the scenario to adapt to different business needs, improving the accuracy from 45% to 62% in the worst case, and solving the problem of fusion distortion caused by unbalanced weight allocation.
[0203] Example (10)-1, Basic Caching Mechanism (Cache Lookup):
[0204] 1. Cache query steps: Standardize the query information "Submitted for Refund" to generate a cache key (MD5 (standardized text + timestamp accurate to the hour)). The Redis client on the edge server queries the Redis cluster:
[0205] 1) Cache hit (key exists): Directly retrieve the semantic, keyword, and business matching result set cached using the cache query step (cache duration 600 seconds);
[0206] 2) Cache miss: Perform parallel matching, store the result set in Redis, and set TTL=600 seconds.
[0207] 2. Cache expiration strategy: Supports forced refresh (when the user triggers "re-query") and automatic expiration (when TTL expires).
[0208] Example (X)-2, based on Example (X)-1, adds a second-level cache and preheating (optimizes the caching mechanism):
[0209] 1. Cache query steps:
[0210] 1) First-level cache: Redis cluster (stores frequently queried results, TTL=3600 seconds);
[0211] 2) Second-level cache: Local memory on the edge server (TTLCache, storing high-frequency results from the past hour, TTL=300 seconds);
[0212] 3) Query order: first local memory, then Redis, and finally perform matching.
[0213] 2. Cache preheating: When the system starts, the top 100 most frequently queried results (such as "fund refund process" and "filling and submitting operation") are loaded in batches into Redis and local memory.
[0214] Technical effects: Implementation (X)-1 reduces redundant calculations by using Redis caching, thereby improving response speed; Implementation (X)-2 increases the second-level cache and preheating, thereby improving the cache hit rate, increasing the system throughput from 50QPS to 1000+QPS, and reducing the average response latency from 450ms to 50ms, thus solving the performance bottleneck problem in high-concurrency scenarios.
[0215] Example (XI)-1, Basic Online Learning Weight Calculation (Online Learning Dynamic Weight Calculation):
[0216] 1. Obtaining optimization parameters: The online learning model (deployed on a GPU server) outputs optimization parameters based on historical query data (100,000 records): Softmax temperature parameter = 0.3, Sigmoid center parameter = 0.65, and steepness parameter = 10.
[0217] 2. Standard deviation calculation sub-step: The three matching scores of the current query are: semantics = 0.85, keyword = 0.60, business = 0.55, and standard deviation = 0.163.
[0218] 3. Strategy selection sub-step: The fourth threshold is preset to 0.12. Since the standard deviation is > 0.12, the Softmax function weight allocation strategy is selected.
[0219] 4. Weighted execution sub-step: Execute the Softmax function using a temperature parameter of 0.3:
[0220] 1) exp(0.85 / 0.3)=exp(2.833)=17.0, exp(0.60 / 0.3)=exp(2.0)=7.39, exp(0.55 / 0.3)=exp(1.833)=6.26;
[0221] 2) Initial weights = 17.0 / (17.0+7.39+6.26) = 0.57, 7.39 / 30.65 = 0.24, 6.26 / 30.65 = 0.20;
[0222] 3) After cropping, the weights are 0.57 (semantic), 0.24 (keyword), and 0.19 (business) (after normalization).
[0223] 5. Model optimization: Based on user click feedback (click semantic matching results), update and optimize parameters (temperature parameter adjusted to 0.28).
[0224] Example (XI)-2, based on Example (XI)-1, adds personalized parameter tuning (optimizes online learning weight calculation):
[0225] 1. Obtaining optimization parameters: The online learning model outputs personalized parameters based on user profiles (e.g., "financial personnel" or "ordinary users"): temperature parameter for financial personnel scenario = 0.25, temperature parameter for ordinary users scenario = 0.35.
[0226] 2. Strategy Selection and Execution Sub-steps: The current user is a finance professional, with a standard deviation of 0.18 > 0.12. The Softmax function with a temperature parameter of 0.25 is used, and the weights are more concentrated on semantic matching (0.62).
[0227] 3. Model optimization: Based on user satisfaction ratings (5 stars), further optimize the parameters (temperature parameter = 0.24).
[0228] Technical effects: Example (XI)-1 uses an online learning model to adaptively optimize parameters, thereby making the weight calculation fit user behavior; Example (XI)-2 adds personalized tuning to adapt to different user needs, and the dynamic weight fusion score is improved by an average of 15%, solving the adaptive problem of weight calculation.
[0229] Example (XII)-1, LinUCB Model Implementation (Context Gambling Machine Model Optimization):
[0230] 1. Information collection sub-step: Collect historical query data:
[0231] 1) Contextual information: Semantic score = 0.80, Keyword score = 0.70, Business score = 0.65, Standard deviation = 0.076;
[0232] 2) Action information: Select Sigmoid strategy, center parameter = 0.65, steepness = 10;
[0233] 3) Feedback quantification: User click duration 30 seconds, satisfaction 4 stars, reward value = 0.85.
[0234] 2. Model training and application sub-steps:
[0235] 1) Model selection: LinUCB contextual gambling machine model (deployed on a GPU server);
[0236] 2) Training: The model is trained (100,000 iterations) using contextual information as input, action information as action, and feedback quantification information as reward.
[0237] 3) Application: Input the current query context information (semantic=0.78, keyword=0.68, business=0.63, standard deviation=0.075) into the model, and output the Sigmoid strategy and optimization parameters (center=0.64, steepness=10.2).
[0238] Example (XII)-2, the Thompson Sampling model implementation includes:
[0239] 1. Information collection sub-steps: Add query type features (such as "question" and "declarative sentence") and provide quantitative feedback to increase user reuse rate (whether the same intent is queried again).
[0240] 2. Model training and application sub-steps:
[0241] 1) Model selection: Thompson Sampling model (suitable for sparse feedback scenarios);
[0242] 2) Training: Model the policy return based on the Beta distribution, iterating 50,000 times;
[0243] 3) Application: The current query is a question type, the model outputs the Softmax strategy, and the temperature parameter is 0.32.
[0244] Technical effects: Example (XII)-1 realizes intelligent exploration and utilization of strategies through the LinUCB model, thereby improving the efficiency of weight optimization; Example (XII)-2 adopts the ThompsonSampling model to adapt to sparse feedback, thereby expanding the applicable scenarios, improving learning efficiency by 40%, and solving the problem of weight strategy optimization in complex feature spaces.
[0245] Example (XIII)-1, Basic Feedback Quantification (Feedback Quantification):
[0246] 1. Calculation of the first reward component: User click behavior data: Click-through rate = 60% (6 clicks out of 10 impressions), average click duration = 25 seconds; First reward component = 0.6 × 0.5 + 25 / 60 × 0.5 = 0.3 + 0.21 = 0.51 (click-through rate weight 0.5, click duration weight 0.5).
[0247] 2. Calculation of the second reward component: For a user satisfaction rating of 3 stars (1-5 stars), the second reward component = 3 / 5 = 0.6.
[0248] 3. Weighted fusion: The first reward component has a weight of 0.6, the second reward component has a weight of 0.4, and the feedback quantitative information = 0.51×0.6 + 0.6×0.4 = 0.31 + 0.24 = 0.55.
[0249] Example (XIII)-2, based on Example (XIII)-1, adds business indicator feedback (optimizes feedback quantification):
[0250] 1. First reward component calculation: Increase click-through rate (the proportion of business operations completed after clicking), weight allocation: click-through rate 0.3, click duration 0.3, conversion rate 0.4.
[0251] 2. Calculation of the second reward component: Add the sentiment analysis score of the user review text (e.g., "very useful" → 0.9), and integrate it with the star rating (star rating 0.6, sentiment 0.4).
[0252] 3. Weighted fusion: Feedback quantified information = (0.6×0.3+25 / 60×0.3+0.8×0.4)×0.6+(3 / 5×0.6+0.9×0.4)×0.4=(0.18+0.13+0.32)×0.6+(0.36+0.36)×0.4=0.63×0.6+0.72×0.4=0.38+0.29=0.67.
[0253] Technical effects: Example (XIII)-1 integrates objective behavior and subjective evaluation to fully reflect user experience; Example (XIII)-2 adds business indicators and sentiment analysis to improve the accuracy of feedback quantification, and the model optimization target is more in line with business value, solving the standardization problem of unstructured feedback.
[0254] Experimental Results Verification: (I) Experimental Environment
[0255] 1. Testing environment for this application
[0256] Hardware: Intel Xeon Gold 6330 CPU (24 cores, 48 threads), NVIDIA A100 GPU (40GB VRAM), 128GB DDR4 RAM, 2TB NVMe SSD, Redis cluster (3 masters, 3 slaves, 16GB RAM per node), Neo4j graph database cluster (8 nodes, 32GB RAM per node).
[0257] Software: Python 3.9, PyTorch 2.0, FAISS 1.7.4, jieba 0.42.1, spacy 3.5.3, Redis 6.2.6, Neo4j 5.12;
[0258] Configuration: Enable all matching strategies, cache TTL=600 seconds, online learning model iterations 100,000 times.
[0259] 2. Comparison of Scheme Environments (General Large Model)
[0260] Model: Qwen3-30B-A3B-Instruct-2507;
[0261] Hardware: NVIDIA H20 GPU (80GB VRAM), 256GB DDR4 RAM, 4TB NVMe SSD;
[0262] Inference framework: vLLM0.2.0;
[0263] Prompt strategy: Few-shot (3-shot) + ChainofThought.
[0264] (ii) Dataset
[0265] Self-built enterprise domain vertical business knowledge question answering and intent recognition dataset:
[0266] Knowledge base documentation: 5000 entries (including business rules, operation manuals, API documentation, and error code definitions);
[0267] Test query set: 1000 independent queries, distributed as follows: exact commands (30%), fuzzy / semantic queries (40%), and mixed / complex queries (30%).
[0268] Evaluation metrics: accuracy (the percentage of correct Top-1 matches), response latency (average time), throughput (the number of requests processed per second per node), illusion rate (the percentage of returned error messages), and weight optimization convergence speed (the number of iterations required for the online learning model to reach stable performance).
[0269] Comparative experimental results
[0270] Comparison Projects This application General large model (comparison scheme) Improvement in performance accuracy 98.50% 92.00% The combination of multi-strategy integration and online learning achieves zero error in recognizing business terminology, improving accuracy by 6.5%. Average response delay 50ms 450ms Edge computing combined with caching mechanisms eliminates the need for large-scale matrix inference, resulting in a 9x speed improvement. Throughput 1000+ QPS 50 QPS Distributed retrieval combined with CPU parallel computing improves concurrent processing capabilities by more than 40 times. Resource consumption cost Low (primarily CPU / memory) High (GPU dependent) No need for expensive GPU servers, reducing hardware deployment costs by over 90%. Result certainty 100% certainty Probabilistic output Based on the search results, the same input will always produce the same output, eliminating the "erratic" behavior of large models. Hallucination rate 0% 5% Strictly based on knowledge base retrieval, preventing the fabrication of business rules or false data. Knowledge update speed Millisecond real-time Hourly / Daily The configuration file update takes effect immediately, without requiring model fine-tuning or rebuilding of vector indexes. Explainability High (traceable matching strategy) Low (black box reasoning) A clear source tracing strategy (keywords / semantics / business logic) facilitates bad case analysis and optimization. Weight optimization convergence speed 80,000 iterations - (No weight optimization) The contextualized slot machine model converges 20% faster than traditional machine learning models. Multilingual query accuracy 86% 65% Multilingual word segmentation and thesaurus mapping improve the accuracy of mixed Chinese-English queries by 32.3%.
[0271] (iv) Results Analysis
[0272] 1. Core performance advantages: This application solves the problem of insufficient coverage of a single strategy by integrating a hierarchical retrieval architecture with dynamic weights, achieving an accuracy of 98.5%. At the same time, through edge computing and caching mechanisms, the response latency is controlled within 50ms, and the throughput is increased by 40 times, meeting the needs of high-concurrency real-time interaction.
[0273] 2. Reliability advantages: 0% illusion rate, 100% result certainty, and knowledge updates take effect in milliseconds. It solves the controllability and maintainability problems of large models in vertical fields and is suitable for scenarios with extremely high accuracy requirements, such as finance and government affairs.
[0274] 3. Cost advantage: No need to rely on expensive GPUs, hardware deployment costs are reduced by 90%, while modular design and zero-code configuration reduce later maintenance costs;
[0275] 4. Adaptive Advantages: Online learning and contextual gambling machine models enable weight calculations to continuously adapt to user behavior, resulting in fast convergence speed for weight optimization and superior long-term performance compared to static rule-driven solutions.
[0276] In summary, the technical solution of this application is significantly superior to the prior art in terms of accuracy, response speed, reliability, and cost control, and has outstanding substantive features and significant progress.
[0277] Furthermore, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0278] Furthermore, a portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. The program instructions invoking the methods of this application may be stored in a fixed or removable recording medium, and / or transmitted via data streams in broadcast or other signal carrying media, and / or stored in the working memory of a computer device operating according to the program instructions. Here, one embodiment of this application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the apparatus is triggered to operate the methods and / or technical solutions based on the foregoing embodiments of this application.
[0279] Although embodiments of this application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for intent recognition based on multi-strategy retrieval, characterized in that, include: Text preprocessing steps: Receive user query requests, perform text preprocessing on the user query requests, and obtain standardized query information; Hierarchical retrieval steps: Perform exact matching on the standardized query information; if the matching is successful, return the matching result directly; if the matching fails, initiate semantic matching, keyword matching and business matching in parallel to obtain semantic matching result set, keyword matching result set and business matching result set respectively; Dynamic weight calculation steps: Calculate the standard deviation of the scores corresponding to the semantic matching result set, the keyword matching result set, and the business matching result set; if the standard deviation is greater than a preset threshold, then use the Softmax function to calculate the initial weights based on the scores; If the standard deviation is less than or equal to the preset threshold, the Sigmoid function is used to calculate the initial semantic matching weight based on the score corresponding to the semantic matching result set, and the remaining weight is distributed proportionally to keyword matching and business matching; the initial weight is pruned and renormalized to obtain the semantic matching weight, keyword matching weight and business matching weight. Result fusion step: Based on the weights obtained in the dynamic weight calculation step, the semantic matching result set, the keyword matching result set, and the business matching result set are weighted and fused to generate the final ranking result and corresponding confidence score; Intent response steps: Based on the final ranking result and the confidence level, trigger the corresponding business logic processing or human-computer interaction response; In the hierarchical retrieval step, the semantic matching initiated in parallel includes: Vectorization sub-step: Convert the standardized query information and the content of the document to be matched into a high-dimensional vector; Hybrid retrieval sub-step: Perform vector similarity retrieval based on the high-dimensional vector and text retrieval based on the full-text index in parallel, and take the union of the two results as the preliminary candidate set; Enhanced scoring sub-step: Calculate the vector similarity score between the standardized query information and the candidate document, as well as the word overlap score based on word segmentation, and dynamically apply different enhancement coefficients or penalty factors according to the high and low ranges of the vector similarity score and the word overlap score to calculate the enhanced semantic score; In the hierarchical retrieval step, the parallel keyword matching includes: The synonym query extension sub-step: Based on the one-to-many synonym index, replace the word segments in the standardized query information with their synonyms to generate multiple extended queries; Multi-query retrieval aggregation sub-step: Use the BM25 algorithm to retrieve each of the extended queries, aggregate and deduplicate all the results to obtain a candidate result set; Keyword enhancement scoring sub-step: For each result in the candidate result set, its BM25 base score, query keyword matching rate, and core term matching rate are combined to calculate the enhanced keyword score; In the hierarchical retrieval step, the parallel-initiated business matching includes: Entity identification and query sub-step: Identify business entities from the standardized query information, and query the business entities and their associated entities in the pre-built knowledge graph to obtain a query entity set; Knowledge graph reasoning sub-steps: In the knowledge graph, obtain document entities to obtain a document entity set, analyze the path relationship between query entities and document entities, and calculate the relationship reasoning confidence based on path type and hop count; Business fusion scoring sub-step: The entity direct matching score, business domain matching score, and the relationship inference confidence are weighted and fused to calculate the business matching score.
2. The method of claim 1, wherein, The text preprocessing steps include: Standardization processing sub-step: Perform spell correction and synonym mapping on the user query request to generate standardized text; The word segmentation sub-step involves detecting the language type of the user's query request and using a word segmenter corresponding to that language type to segment the standardized text, while filtering out stop words and special characters.
3. The method of claim 1, wherein, In the enhanced scoring sub-step, the dynamic application of different enhancement coefficients or penalty factors specifically involves: In response to the vector similarity score being greater than a first threshold and the word overlap score being greater than a second threshold, the vector similarity score is multiplied by a first enhancement coefficient; In response to a vector similarity score greater than the first threshold but a word overlap score less than or equal to the second threshold but greater than the third threshold, the vector similarity score is multiplied by a second enhancement coefficient; Otherwise, multiply the vector similarity score by a scaling factor.
4. The method of claim 1, wherein, Before the synonym query expansion sub-step, the method also includes: The synonym index construction sub-step involves loading business entities and their synonym definitions through configuration files, constructing a one-to-one index from synonyms to standard words for standardization, and a one-to-many index from standard words to the synonym set for query expansion.
5. The method of claim 1, wherein, In the knowledge graph reasoning sub-step, calculating the confidence level of relational reasoning further includes: Common neighbor discovery sub-step: In the knowledge graph, find the set of common neighbor entities between the query entity set and the document entity set; Path confidence calculation sub-step: Calculate the path association score based on the strength of the relationship between entities in the set of common neighbor entities, and the path length from the query entity and the document entity to the common neighbor.
6. The method of claim 1, wherein, In the dynamic weight calculation step, the range pruning is: limiting any one of the semantic matching weight, keyword matching weight, and business matching weight to a preset range consisting of a minimum weight value and a maximum weight value.
7. The method of claim 1, wherein, Between the hierarchical retrieval step and the dynamic weight calculation step, the following is also included: Cache query steps: Attempt to retrieve the cached semantic matching result set, keyword matching result set, and business matching result set associated with the standardized query information from the cache; If a cache hit occurs, the cached result set from the cache query step is used; if a cache miss occurs, the parallel-initiated matching is performed and stored in the cache.
Citation Information
Patent Citations
Multi-path recall retrieval method and system based on dynamic weight distribution and storage medium
CN121255840A
Complex question and answer method and system based on adaptive task deconstruction and multi-modal evidence aggregation
CN121365663A