Intelligent retrieval system and intelligent retrieval method for public service resources

By using a hybrid retrieval and guidance mechanism in the AI ​​service module, the problems of low retrieval accuracy and low resource utilization in public data platforms have been solved, achieving efficient and accurate resource discovery and a closed-loop experience.

CN122064786APending Publication Date: 2026-05-19DIGITAL ZHEJIANG TECH OPERATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DIGITAL ZHEJIANG TECH OPERATION CO LTD
Filing Date
2026-02-04
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

The existing public data platform's search function relies on keyword matching, which cannot identify the user's true intent, has difficulty handling the complex needs described in natural language, and lacks effective guidance when there are no matching resources, resulting in low search accuracy and low resource utilization.

Method used

The system employs an artificial intelligence service module for classification processing, combining keyword matching and semantic vector similarity for hybrid retrieval. It then uses a re-ranking model to sort resources based on their level and access frequency, and provides guidance information when no matching resources are available.

Benefits of technology

It improves the accuracy of retrieval and user experience, realizes a closed-loop experience from search to business processing, solves the problems of low retrieval accuracy and low resource utilization in existing technologies, and enhances the platform's service capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064786A_ABST
    Figure CN122064786A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent retrieval system and an intelligent retrieval method for public service resources, and belongs to the technical field of intelligent information retrieval. A natural language query request input by a user is received through a front-end interaction module, the natural language query request is forwarded to an artificial intelligence service module through a rear-end processing module, and retrieval operation based on keyword matching and retrieval operation based on semantic vector similarity are executed in parallel by starting corresponding sub-workflows. And recalling the candidate resources from the target resource libraries of different categories, and performing comprehensive sorting by using a resorting model in combination with at least one parameter in the hierarchy to which the resources belong and the access frequency. And then aggregating all candidate resources to generate structured response data containing resource names and summary information. And the back end checks and obtains the latest details in a real business database by taking the resource identifier as an index, and finally carries out visual display through the front end. According to the method, semantic-level accurate retrieval is realized, and the user experience and the platform service capability are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent information retrieval technology, and in particular to an intelligent retrieval system and method for public service resources. Background Technology

[0002] Existing public data platforms primarily rely on keyword matching and classification filtering mechanisms for their search functions. Users need to input precise query terms to obtain relevant results, lacking semantic understanding of vague expressions, synonyms, or cross-domain requirements, resulting in low search accuracy. The system cannot identify the user's true intent, struggles to handle complex requests described in natural language, and only returns a "no data available" message when no matching resources are available, lacking an effective guidance mechanism. Different types of resources are managed in a scattered manner, and search result ranking is mostly based on simple rules without optimization in conjunction with business context, leading to a disconnect between returned content and actual application needs. Furthermore, the relationships between various resources are not effectively utilized, failing to achieve intelligent recommendations and closed-loop services, impacting the overall service efficiency and user experience of the platform. Summary of the Invention

[0003] The purpose of this application is to provide an intelligent retrieval system and method for public service resources, so as to alleviate the aforementioned technical problems existing in the prior art.

[0004] In a first aspect, the present invention provides an intelligent retrieval system for public service resources, comprising a front-end interaction module, a back-end processing module, and an artificial intelligence service module; wherein, The front-end interaction module is used to receive natural language query requests input by the user and send the query requests to the back-end processing module. The backend processing module is used to forward the received query requests to the artificial intelligence service module, receive the response data returned by the artificial intelligence service module, use the resource identifier contained in the response data as an index, and query the corresponding search results in the real business database. The AI ​​service module is used to classify query requests based on the main workflow, and launch corresponding sub-workflows according to the classification results. In each sub-workflow, a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity are executed in parallel. Candidate resources are recalled from the target retrieval resource library of different categories. The candidate resources are sorted by a re-ranking model combined with at least one parameter, such as the resource's level and access frequency. The sorted sub-workflow results are aggregated and returned to the main workflow. The main workflow aggregates and deduplicates the sub-workflow results returned by all sub-workflows, generates response data, and outputs the response data to the backend processing module. The front-end interaction module is also used to receive the processed search results and present them in a visual format.

[0005] In an optional implementation, the front-end interaction module includes a query input unit and a result display unit; The query input unit is used to receive natural language query requests input by the user and collect the resource type tags selected by the user; The results display unit receives the processed search results and displays them in the form of visual cards.

[0006] In an optional implementation, the result display unit also integrates a function operation component, which is used to respond to the user's click operation and trigger instructions to view details or jump to the resource application page.

[0007] In an optional implementation, the backend processing module includes a request forwarding unit and a data verification unit; The request forwarding unit is used to transmit the received query request to the artificial intelligence service module; The data verification unit is used to extract the resource identifier contained in the structured response after receiving the structured response, and query the corresponding search results in the real business database based on the resource identifier. In an optional implementation, the artificial intelligence service module includes a workflow scheduling unit, an intent recognition unit, and a hybrid retrieval unit; The workflow scheduling unit is used to start the corresponding sub-workflow branch based on the resource type label; The intent recognition unit is used to determine whether a query request belongs to a public service-related issue when the user has not explicitly selected a resource type label. If it belongs to a public service-related issue, it determines the corresponding data type and executes the corresponding sub-workflow. If it does not belong to a public service-related issue, it generates a guided response for non-public service requests. The hybrid retrieval unit is used to execute the first retrieval operation based on keyword matching and the second retrieval operation based on semantic vector similarity in parallel in each sub-workflow.

[0008] In an optional implementation, the hybrid retrieval unit includes a keyword retrieval subunit and a vector retrieval subunit; The keyword retrieval subunit is used to segment the query statement using Chinese word segmentation methods that include public service domain terms, and to match candidate resources in the metadata directory based on the inverted index mechanism; The vector retrieval subunit is used to transform query statements into high-dimensional semantic vectors and retrieve semantically similar candidate resources from a pre-built vector database.

[0009] In an optional implementation, each submodule of the artificial intelligence service module further includes a result aggregation unit and a reordering unit; The result aggregation unit is used to summarize similar candidate resources from different retrieval strategies to form a unified intermediate result set; The re-ranking unit is used to call the re-ranking model to score the relevance of candidate resources, and calculate a comprehensive ranking value by combining at least one parameter, such as the resource's level and access frequency, and generate candidate resources ranked by relevance based on the comprehensive ranking value.

[0010] In an optional implementation, the artificial intelligence service module further includes a response generation unit; The response generation unit is used to convert the sorted candidate resources into response data and output the response data to the engineering side processing module. The response data includes semi-structured response data and / or unstructured response data.

[0011] In an optional implementation, the artificial intelligence service module further includes an empty result processing unit; The empty result processing unit is used to determine whether the result list is empty after the re-sorting unit has completed the sorting of candidate resources; When the query is determined to be empty and the intent recognition unit confirms that the query request is related to public services, guidance information is generated and directed to the supply and demand management system for the user to submit a resource request application. When the query is determined to be empty and the intent recognition unit confirms that the query request is not related to public services, a standard reply text is generated to inform the user that the service is currently unavailable.

[0012] Secondly, the present invention provides an intelligent retrieval method for public service resources, applied to the intelligent retrieval system for public service resources described in the foregoing embodiments, comprising a front-end interaction module, a back-end processing module, and an artificial intelligence service module; the method includes: The front-end interaction module receives natural language query requests input by users through the front-end interface and sends the query requests to the back-end processing module. The backend processing module forwards the query request to the artificial intelligence service module. The AI ​​service module classifies the query requests based on the main workflow, and initiates corresponding sub-workflow branches according to the classification results. In each sub-workflow, a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity are executed in parallel. Candidate resources are retrieved from different categories of target retrieval resource libraries, and a re-ranking model is invoked to rank the candidate resources based on at least one parameter, such as the resource's level and access frequency. The ranked sub-workflow results are then aggregated and returned to the main workflow. The main workflow aggregates and deduplicates the sub-workflow results returned by all sub-workflows, generates response data, and outputs the response data to the backend processing module. The backend processing module receives the response data returned by the artificial intelligence service module, uses the resource identifier contained in the response data as an index, and queries the corresponding search results in the real business database. The search results are presented in a visual format through the aforementioned front-end interaction module.

[0013] The intelligent retrieval system and method for public service resources provided in this application receive natural language query requests through a front-end interaction module, increasing the freedom of user input and solving the problem of traditional systems' excessive reliance on keyword accuracy. The back-end processing module performs secondary verification using resource identifiers as indexes, ensuring the real-time nature and accuracy of the returned results. The artificial intelligence service module implements classification processing and parallel retrieval based on a workflow architecture, combining keyword matching and semantic vector similarity mechanisms to balance retrieval accuracy and generalization ability, effectively handling fuzzy expressions and cross-domain queries. By employing a re-ranking model in sub-workflows to integrate business parameters such as resource update time and access frequency, the result ranking is made more aligned with actual application needs. Response feedback and visualization presentation achieve a closed loop from search to service, compensating for the shortcomings of existing systems such as lack of guidance and low resource utilization when no results are found, significantly improving user experience and platform service capabilities. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0015] Figure 1 A schematic diagram of the structure of an intelligent retrieval system for public service resources provided in this application embodiment; Figure 2 An intent recognition flowchart is provided for an embodiment of this application; Figure 3 A flowchart of multi-channel recall and result processing is provided for an embodiment of this application; Figure 4 A flowchart illustrating an intelligent retrieval method for public service resources provided in this application embodiment. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0017] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0018] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0019] This application provides an intelligent retrieval system for public service resources, including a front-end interaction module, a back-end processing module, and an artificial intelligence service module; see also... Figure 1 As shown, where, The front-end interaction module is used to receive natural language query requests input by the user and send the query requests to the back-end processing module.

[0020] Natural language query requests refer to users' information needs expressed in everyday language, without needing to follow a fixed format or use specific keywords, such as "I want to find data interfaces related to population statistics". The front-end interaction module is deployed on the client interface, providing a unified intelligent search entry point, supporting users to express their needs in unstructured natural language, without needing to master technical terms or precise keywords, thus improving the friendliness and accessibility of human-computer interaction.

[0021] The backend processing module forwards the received query requests to the artificial intelligence service module, receives the structured response returned by the artificial intelligence service module, uses the resource identifier contained in the structured response as an index, and queries the corresponding search results in the real business database.

[0022] The real business database refers to the core business system database that stores information such as resource details, permissions, and processes. The resource identifier can be a resource ID or an API number. By extracting the resource identifier (such as a resource ID or API number) from the structured response, a unique index is used to access the real business database, and the final data status verification and detail completion operations are performed to ensure the accuracy and timeliness of the returned results.

[0023] The AI ​​service module is used to classify query requests based on the main workflow, and launch corresponding sub-workflows according to the classification results. In each sub-workflow, a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity are executed in parallel. Candidate resources are retrieved from different categories of target retrieval resource libraries, and the candidate resources are sorted by a re-ranking model combined with at least one parameter, such as the resource's level and access frequency. The sorted sub-workflow results are aggregated and returned to the main workflow. The main workflow aggregates and deduplicates the sub-workflow results returned by all sub-workflows, generates response data, and outputs the response data to the backend processing module.

[0024] The first retrieval operation is keyword matching. Specifically, the Jieba word segmentation tool combined with a custom government affairs thesaurus can be used to segment the query text, and the BM25 algorithm can be used for precise field matching in a structured index. The second retrieval operation is semantic vector similarity retrieval. Specifically, the query statement can be encoded into a high-dimensional vector using a locally deployed qwen3-embedding-4b model, and an approximate nearest neighbor search can be performed in a vector database to capture semantic relevance. The target retrieval resource repository includes a collection of public service digital assets stored in categories such as data resource repository, component repository, and application repository, each corresponding to callable resources of different business types.

[0025] In one implementation, the AI ​​service module categorizes query requests based on the main workflow. First, it uses a large language model to identify user intent and tagged it with labels such as "data resource," "component," "application resource," or "knowledge Q&A," thus initiating corresponding sub-workflow branches. Within each sub-workflow, a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity are executed in parallel, retrieving and ranking candidate resources from different categories of target resource databases. Specifically, a comprehensive score can be calculated based on preset business rules (such as resource update timeliness and popularity) to rank the retrieved results. The relevance score given by the rerank model, along with at least one business parameter such as resource level and access frequency, is comprehensively considered to improve the practicality and relevance of the results. Finally, the "response generation" node calls large models such as Qwen to generate structured response data containing resource names and summary information, as well as a semi-structured comprehensive response, which is then output to the backend processing module.

[0026] The front-end interaction module is also used to receive processed search results and present them in a visual format. In practical applications, search results can be presented to users in various forms, such as visual cards. Each card displays specific information about the resource, including the search title, search summary, relevance, and resource details, as well as function buttons such as "add to cart" and "apply now," thus realizing a closed loop from search to business processing and improving service continuity and user experience.

[0027] In a specific example, the search results for application resources may include the search title, search summary, relevance, and resource details. The search results for data resources and component resources may include, in addition to the search title, search summary, relevance, and resource details, function buttons for "Add to Cart" and "Apply Now". Knowledge Q&A corresponds to a question and answer output.

[0028] To facilitate understanding, the specific modules of the above system will be described in further detail below.

[0029] In an optional embodiment of the present invention, the front-end interaction module is further divided into a query input unit and a result display unit, which are used to realize the reception of user natural language input and the visualization of retrieval results, thereby constructing an efficient and intuitive human-computer interaction channel.

[0030] The query input unit receives natural language query requests from users and collects the resource type tags selected by the user. Specifically, users input their actual business needs in free text form through the intelligent search entry provided on the front-end page, such as "How to apply for newborn household registration" or "Are there any data interfaces that can be used for population statistics?". This type of input does not need to follow a specific grammatical structure and supports fuzzy expressions, colloquial descriptions, and multi-turn dialogue context continuation. The front-end transmits the user's original query statement directly to the back-end service layer as a Query, which is then forwarded to the AI ​​model service layer built on the Dify framework to initiate the subsequent intent recognition and retrieval process.

[0031] Meanwhile, to improve the targeting and processing efficiency of the search path, the query input unit also integrates a resource type tag selection function. Users can actively select preset category tags such as "Full Search," "Data Resources," "Components," "Applications," or "QA" in the operation area near the search box. These tags are passed to the main workflow as classification instructions, and the system enters the corresponding condition branch accordingly to determine which vertical domain search assistant to call for subsequent operations. For example, when the user selects the "Components" category, the system only activates the component search sub-process, avoiding interference from irrelevant domains and improving response speed and resource utilization.

[0032] On the other hand, the results display unit receives the processed search results and presents them in the form of visual cards. Specifically, after completing the mixed search, re-ranking, and structured response generation, the final output semi-structured response data (such as JSON format) is returned to the front end. The results display unit parses this data content and renders it into a set of uniformly laid out, clearly hierarchical "card"-style UI components. Each card corresponds to a matching resource, including key information such as title, summary, category, and relevance score, and embeds interactive buttons to support users in directly performing operations such as "view details" and "add vehicle to purchase".

[0033] It is understood that the public services referred to in this application may be related services in the field of government affairs.

[0034] In one example, when a user searches for "resources related to medical insurance reimbursement process" and obtains a relevant government resource card, they can click the "View Details" button to directly access the resource details page, or initiate a resource usage application through the "Apply Now" button. Furthermore, in the event of no matching resources, the results display unit can dynamically generate guidance prompts based on a fallback strategy, such as displaying "No relevant resources found. Do you want to submit a request?" along with a quick access link, effectively reducing service interruptions and improving the platform's continuous service capabilities.

[0035] In this embodiment, the front-end interaction module captures both the user's natural language request and resource type selection through the query input unit, providing basic input for back-end semantic understanding and task distribution. The result display unit transforms complex retrieval logic into an intuitive and operable visual interface, significantly enhancing system usability and user experience. The entire interaction process integrates RAG technology, large-scale model analysis, and workflow orchestration capabilities, demonstrating the technical advantages of this invention in achieving high-precision and high-efficiency resource discovery within an intelligent public data service platform.

[0036] In an optional implementation, the results display unit also integrates functional operation components. These components respond to user clicks, triggering commands such as viewing details and requesting resources. Specifically, when the search results are displayed as visual cards on the front end, each card embeds multiple functional operation components as operation entry points. When a user clicks "View Details," the system redirects to the relevant page to display detailed information; when the user clicks "Request Resources," the system automatically initiates the integration process with the sharing application, generating a resource usage application form, thus avoiding the need for the user to manually and repeatedly search for resource application entry points and resources.

[0037] The aforementioned functional operation components are linked with the backend real business database based on Dify's workflow orchestration capabilities. By bringing high-frequency business operations to the search results interface and dynamically controlling button visibility in conjunction with user identity and permissions, the interaction efficiency is improved and the system security is ensured. This effectively solves the service breakpoint problem caused by the lack of intelligent guidance and business connection in existing public data platforms.

[0038] Furthermore, the backend processing module includes a request forwarding unit and a data verification unit. The request forwarding unit transmits received query requests to the AI ​​service module. Specifically, the frontend encapsulates the user-input natural language query request and attached resource type tags into a structured message, which is then received by the backend service layer. The backend service layer performs protocol parsing and routing determination, and then forwards the request completely to the AI ​​model service layer built on the Dify framework via a standard API interface, triggering the intent recognition and multi-path recall process in the main workflow. This approach achieves frontend-backend decoupling, ensuring that semantic understanding and retrieval logic are independently carried by a dedicated AI service, improving system maintainability and scalability.

[0039] The data verification unit, upon receiving a structured response, extracts the resource identifiers contained within the structured response and queries the corresponding search results in the real business database based on these resource identifiers. Specifically, after the AI ​​service completes hybrid retrieval and reordering and generates a structured response containing resource codes (such as data IDs, component numbers, etc.), the data verification unit in the backend service layer immediately parses the response and extracts the unique identifiers of each matching resource. Subsequently, a precise query is executed in the local real business database, dynamically obtaining a snapshot of the resource's current metadata to ensure the information returned to the frontend is real-time and accurate, avoiding information deviations caused by delayed knowledge base updates. This approach guarantees the consistency between intelligent search results and the actual business system status, improving the user's search experience.

[0040] In an optional implementation, the artificial intelligence service module includes a workflow scheduling unit, an intent recognition unit, and a hybrid retrieval unit. This artificial intelligence service module is deployed on the AI ​​model service layer built on the Dify framework. As the core processing engine of the intelligent search system, it is responsible for the entire process of understanding, routing, and retrieving natural language query requests input by users.

[0041] The workflow scheduling unit is used to launch corresponding sub-workflow branches based on resource type tags. Specifically, when a user submits a query request through the intelligent search entry on the front-end page, the original query statement is transmitted to the back-end and forwarded to the main workflow of the Dify platform. See also Figure 2As shown, the system first checks if a historical session record exists. If it does, a large language model is invoked to semantically complete and rewrite the current query based on contextual information, generating a more complete search instruction. If no historical session exists, the currently input query content is used directly. Subsequently, based on preset classification rules or a lightweight classification model, the user's query request is tagged with a resource type. These tags can include categories such as "full search," "data resource," "component," "application," or "question and answer (QA)." Based on this, the workflow scheduling unit dynamically triggers the corresponding condition branch based on the tag, thereby initiating the corresponding sub-workflow. For example, when the tag is "data resource," the "data resource retrieval sub-workflow" is initiated; when the tag is "component," the "component retrieval sub-workflow" is launched. This mechanism achieves differentiated retrieval path management for different public service resource types, and each sub-workflow exists independently in a modular form. This allows for the addition of new resource types by simply adding corresponding sub-process nodes without reconstructing the overall architecture, improving the system's flexibility and scalability.

[0042] The intent recognition unit determines whether a query request belongs to the public service category when the user has not explicitly selected a resource type tag. If it does, the system determines the corresponding data type and executes the relevant sub-workflow. If it does not belong to the public service category, a guiding response is generated for non-public service requests. After the sub-workflow is activated, the system calls a locally deployed large language model (such as DeepSeek-R1-Distill-Qwen-32B) to perform a secondary analysis of the user query, examining its topic scope and actual needs. Based on semantic understanding capabilities fine-tuned on a public service corpus, the model can accurately identify whether the query involves government services, public data access, government component calls, or policy consultation. If it is determined to be a non-public service related question (such as "recommend a movie" or "what time is it now"), the subsequent search process is immediately interrupted, and the intent recognition unit generates a standardized guiding response, such as: "Hello, this platform focuses on government services and public data resource support. Please submit your government-related query requests." This effectively avoids invalid queries consuming system resources, improving service focus and operational efficiency. Meanwhile, this mechanism solves the service mismatch problem caused by vague user questions, arbitrary expressions, or loss of intent in multi-turn dialogues in existing technologies, and significantly enhances the robustness and accuracy of the system in complex interaction scenarios.

[0043] The hybrid retrieval unit executes a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity in parallel across various sub-workflows. After confirming that the query pertains to a public service-related issue, the system enters the core RAG (Retrieval Enhancement Generation) process, where the hybrid retrieval unit executes a dual retrieval strategy. The first retrieval operation uses keyword matching: the query is segmented using the Jieba word segmentation tool combined with a custom government domain thesaurus, and then the BM25 algorithm is used for precise matching in a structured resource index, ensuring high recall rates for specialized terms (such as "electronic certificates" and "one-stop online services"). The second retrieval operation uses semantic vector similarity: the query is transformed into a high-dimensional vector representation using a locally deployed qwen3-embedding-4b model, and an approximate nearest neighbor (ANN) search is performed in a pre-built government knowledge vector database to capture semantically relevant resources (such as associating "check population information" with "obtain household registration statistics"). The two retrieval operations are executed in parallel within the sub-workflows, and the results are merged before proceeding to the subsequent re-ranking stage. This hybrid retrieval mechanism combines the interpretability of traditional retrieval with the generalization ability of modern semantic retrieval. It ensures the accurate targeting of key terms while solving the matching problems caused by synonyms and colloquial descriptions, significantly improving the accuracy and breadth of retrieval.

[0044] Furthermore, the aforementioned hybrid retrieval unit includes keyword retrieval subunits and vector retrieval subunits. As a core component of the artificial intelligence service module, this hybrid retrieval unit is deployed within each sub-workflow (such as "data resource retrieval," "component retrieval," etc.). It is used to initiate a multi-channel parallel retrieval mechanism after confirming that the user's query pertains to a public service-related issue, thereby improving the comprehensiveness and accuracy of resource retrieval.

[0045] The keyword retrieval subunit segments the query statement using Chinese word segmentation methods that include public service terminology, and matches candidate resources in the metadata directory based on an inverted index mechanism. Specifically, the system uses the Jieba Chinese word segmentation tool to segment the user-input natural language query statement and loads a pre-built custom thesaurus for the government service sector. This thesaurus covers professional terms and high-frequency expressions in government service scenarios, such as "one-stop online service," "electronic certificate," "data sharing interface," "population statistics," and "legal entity database," ensuring that these key terms are not incorrectly segmented or omitted. After word segmentation, the extracted keywords are used to perform retrieval in the established structured metadata directory. This metadata directory is organized using an inverted index mechanism, establishing a mapping relationship between keywords and resource IDs for the title, description, tags, and category fields of each government resource (such as datasets, components, and applications). The system uses the BM25 algorithm to calculate the relevance score between each keyword and the resource fields, filtering out a preliminary list of matching candidate resources. This process is efficient and highly interpretable, and is particularly suitable for accurately matching standard resources with naming conventions.

[0046] The vector retrieval subunit transforms the query statement into a high-dimensional semantic vector, retrieving semantically similar candidate resources from a pre-built vector database. To achieve this, the system calls the locally deployed qwen3-embedding-4b model to encode the user's complete query statement into a fixed-dimensional dense vector. This vector captures semantic information, such as synonyms, hyponyms, and contextual relationships (e.g., "check the number of registered residents in a certain city" and "get the permanent resident population data of XX city" are semantically close). Subsequently, the system performs an Approximate Nearest Neighbor (ANN) search in the pre-built government knowledge vector database. Common algorithms include Faiss and HNSW to quickly locate the candidate resources corresponding to the set of resource vectors most similar to the query vector. These resources are typically not directly matched at the keyword level but are highly semantically related, effectively compensating for the limitations of traditional text matching in recognizing ambiguous expressions, colloquial questions, or polysemous words.

[0047] The two sub-units described above run in parallel within the sub-workflow. After each independently completes its retrieval task, it aggregates the candidate resource sets it retrieves for subsequent results processing. The keyword retrieval sub-unit ensures accurate coverage of specialized terms, making it particularly suitable for finding data directories or interface services with standard naming conventions. The vector retrieval sub-unit, on the other hand, enhances the system's ability to understand user intent, supporting resource discovery across expressions and levels. The combination of these two sub-units creates complementary advantages, forming a "keyword + vector" dual-path retrieval architecture that significantly improves the overall performance of the retrieval system.

[0048] Furthermore, each submodule of the AI ​​service module also includes a result aggregation unit and a re-ranking unit. These two units, located after the hybrid retrieval and before the final result generation, serve as key post-processing components in the RAG workflow. They are responsible for integrating and optimizing the ranking of multi-source retrieval results to improve the relevance and business adaptability of the returned results.

[0049] The result aggregation unit is used to summarize similar candidate resources from different retrieval strategies to form a unified intermediate result set. Specifically, after the main workflow initiates corresponding sub-workflows such as "Data Resources," "Components," "Applications," and "Question and Answer (QA)" based on resource type tags, each sub-workflow executes its own hybrid retrieval operation (including keyword retrieval and vector retrieval) in parallel, recalling a list of candidate resources relevant to its domain. These resources may exist in different structured formats; for example, data resources include fields such as metadata name, providing unit, and update cycle, while component resources include information such as interface protocol, calling method, and dependent environment. The result aggregation unit is responsible for normalizing these heterogeneous but semantically related candidate resources, extracting common core attributes (such as resource name, description, category tag, unique code, etc.), and merging them into a unified intermediate result set. See also Figure 3 The workflow logic shown, where multiple search assistants work in parallel and then converge in the "results processing stage," ensures comprehensive search coverage.

[0050] The re-ranking unit invokes a relevance re-ranking model to score candidate resources and calculates a comprehensive ranking value based on at least one parameter, including the resource's hierarchical level and access frequency. Based on this comprehensive ranking value, candidate resources are generated and ranked by relevance. During re-ranking, the sub-workflow uses the rerank model (i.e., the relevance re-ranking model) to perform a refined relevance evaluation on all candidate resources. This rerank model typically employs a cross-encoder structure, capable of deeply matching the semantic association between the query statement and the title and description of each resource, outputting a high-precision relevance score. Compared to the coarse-ranking mechanism in the retrieval stage, the rerank model, although computationally more expensive, provides more accurate judgments and is suitable for fine-ranking scenarios with a small number of candidate objects. Subsequently, the re-ranking unit weights and fuses this semantic relevance score with one or more business rule parameters, including at least the resource update time (resources updated more recently have higher priority) and access frequency (resources with high popularity and frequent use are more valuable). For example, a weighted formula is used: Overall Ranking Value = α × Semantic Relevance Score + β × Time Decay Factor + γ × Standardized Visit Count, where the weight coefficients can be adjusted according to actual business needs. Finally, the system sorts all candidate resources in descending order based on the overall ranking value to generate the final recommendation list. This approach implements a refined re-ranking mechanism, considering both semantic matching and practical metrics applicable to real-world business scenarios.

[0051] Furthermore, the AI ​​service module also includes a response generation unit. As the final output component of the RAG process in the AI ​​model service layer, this response generation unit is located after the result reordering and is responsible for transforming the filtered and sorted candidate resources into a standardized data format that the system can transmit and the front end can parse, thus realizing the final transformation from "semantic understanding" to "business response".

[0052] The response generation unit converts the sorted candidate resources into response data and outputs it to the engineering-side processing module. This response data includes semi-structured and / or unstructured data. Specifically, after the sub-workflow completes the comprehensive sorting of candidate resources, it calls a large language model (such as the Qwen series model) as the "response generation" node. Based on preset templates or schema rules, it performs structured parsing and information extraction on each highly relevant resource. This process includes: identifying and extracting the resource name (e.g., "Population Basic Database of a Certain City"), generating concise summary information (usually one or two sentences summarizing the resource content, applicable scenarios, and key fields, such as: "This dataset contains basic information on the city's registered population, supports statistical analysis by region and age, and is suitable for the formulation of livelihood policies"), and obtaining its corresponding functional interface address (details page, application page entry). This information is organized into a unified semi-structured data format (e.g., Markdown, JSON) to ensure clear syntax, explicit fields, and machine readability. Subsequently, this semi-structured response data is returned to the main workflow and output to the engineering-side processing module through the Dify framework's output interface for further processing.

[0053] Furthermore, the AI ​​service module also includes an empty result processing unit. This empty result processing unit, as a key logical component ensuring service continuity in the intelligent search system, is integrated at the end of the main workflow's result processing flow, located after the reordering unit and before the final response output. It is used to provide differentiated guidance strategies when no matching resources are found, avoiding service interruptions or user churn.

[0054] The empty result processing unit is used to determine whether the result list is empty after the candidate resource sorting is completed. Specifically, after the result aggregation and re-sorting process is completed, a candidate resource list sorted by comprehensive relevance is generated. The empty result processing unit then checks the list for emptiness: if the list does not contain any valid resource entries, the "result is empty" branch process is triggered; otherwise, this unit is skipped, and subsequent response generation operations continue. This judgment node corresponds to... Figure 3 The "Result is Empty Judgment" step shown is the core control point for realizing the intelligent backup mechanism.

[0055] When the query is determined to be empty and the intent recognition unit confirms that the query request is related to public services, guidance information is generated and redirected to the supply and demand management system for the user to submit a resource request. In this scenario, although the current platform does not store data resources that directly match the user's needs, the intent recognition unit has determined that the request belongs to a reasonable demand within the government affairs field (such as "Do you have data on the distribution of new energy vehicle charging piles in a certain district?"), indicating a potential service gap. At this time, the empty result processing unit will not simply return a "No data available" message, but will generate a guiding response, such as: "The current platform has not yet included this resource. You can go to the supply and demand management system to submit a request, and we will coordinate with relevant departments to collect and publish the resources." This guidance information includes a jump link or operation instructions, guiding the user to enter the government resource supply and demand management subsystem and proactively initiate a resource cataloging and collection request. This mechanism effectively solves the problem in existing technologies where users can only passively wait or repeatedly communicate through manual work orders due to resource shortages, improving the responsiveness and closed-loop level of government services.

[0056] When the query is determined to be empty and the intent recognition unit confirms that the query request is not related to public services, a standard reply text is generated to inform the user that the service is currently unavailable. In this case, although the user's question does not match any resources, its topic itself does not fall within the scope of government public data services (such as "How to make scrambled eggs with tomatoes" or "What's the weather like today?"). The empty result processing unit, combined with the pre-judgment result of the intent recognition unit, identifies this type of non-government intent and outputs a standardized apology reply, such as: "Hello, this platform focuses on government services and public data support, and does not currently provide this type of information query service. Please submit your government-related business needs." This clarifies the platform's service boundaries while maintaining good interaction etiquette, avoiding user confusion or misunderstanding.

[0057] The above module, through the empty result processing unit, introduces conditional judgment logic to achieve intelligent classification and response to the "no result" state: for government-related cases but lacking resources, it guides the query to the supply and demand system to achieve reverse demand-driven response; for non-government-related questions, it politely refuses and focuses on the service topic.

[0058] In summary, the intelligent retrieval system for public service resources provided in this application significantly enhances the search intelligence level of the public data platform. By integrating keyword retrieval (Jieba+BM25) and vector retrieval (fine-tuning BCE-embedding), it achieves dual coverage of precise terminology matching and semantic generalization understanding, effectively solving the problem of traditional keyword matching's excessive reliance on user input accuracy. The introduction of a large language model for intent recognition, government relevance assessment, and multi-turn dialogue context understanding improves query parsing capabilities. The rerank model, combined with business rules (such as timeliness and popularity), re-ranks the results, enhancing the relevance and usability of the returned results. The system supports natural language interaction, structured card display, and operations such as "application" and "jump," achieving a closed-loop experience from search to business processing. Furthermore, the modular and scalable architecture design implemented through the Dify framework facilitates subsequent functional expansion. Overall, it improves retrieval efficiency, accuracy, and user satisfaction, and establishes a robust fallback guidance mechanism to avoid service interruptions.

[0059] This application further provides an intelligent retrieval method for public service resources, applied to the intelligent retrieval system for public service resources described in the foregoing embodiments, including a front-end interaction module, a back-end processing module, and an artificial intelligence service module; see [link to related documentation]. Figure 4 As shown, the method mainly includes the following steps: S410 receives natural language query requests input by users through the front-end interface via the front-end interaction module and sends the query requests to the back-end processing module.

[0060] The front-end interaction module simultaneously obtains the user's semantic intent and resource category preferences. "Natural language query request" refers to the complete sentence or phrase entered by the user, such as "I want to apply for open data related to the population census". Resource category preferences refer to the target resource categories actively selected by the user, including classification options such as data resources, components, and applications, which are used to help the system clarify the search boundaries.

[0061] In this implementation, the front-end page features a unified intelligent search input box and optional resource type filtering controls. After a user types their query in the input box, they can select the desired resource type by clicking a tag or using a drop-down menu. The system captures the original text content along with the selected tag, constructing initial request information containing semantic content and classification indicators, and transmits it to the back-end service module as the basis for subsequent processing.

[0062] S420 forwards query requests to the artificial intelligence service module through the backend processing module.

[0063] After receiving a request from S410, the backend processing module forwards it to the main workflow entry point of the AI ​​service module. The main workflow first parses the resource type tag value, identifying tags such as "data resource" or "application." Then, based on the tag, it triggers a condition branch node, automatically redirecting to and activating the matching sub-workflow, such as the "data resource retrieval sub-workflow" or the "application retrieval sub-workflow." Each sub-workflow is pre-configured with a retrieval strategy, knowledge base connection method, and processing rules appropriate to its resource category, ensuring specialized processing capabilities.

[0064] In S430, the AI ​​service module categorizes query requests based on the main workflow. Based on the classification results, it initiates corresponding sub-workflow branches. Within each sub-workflow, a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity are executed in parallel. Candidate resources are retrieved from different categories of target retrieval resource databases. A re-ranking model is invoked, combining at least one parameter—resource level and access frequency—to rank the candidate resources. The ranked sub-workflow results are then aggregated and returned to the main workflow. The main workflow aggregates and deduplicates the sub-workflow results returned by all sub-workflows, generating response data, which is then returned to the backend processing module.

[0065] The first retrieval operation utilizes word segmentation and traditional full-text search algorithms to perform precise term-level matching within structured fields. The second retrieval operation leverages an embedding model to transform the query into a semantic vector, searching for semantically similar content in a high-dimensional space to address issues such as synonym substitution and expression differences. Both operations are performed in parallel within the same sub-workflow, retrieving resources from different target resource repositories.

[0066] In the activated sub-workflow, the system simultaneously launches two retrieval channels. The first channel performs keyword matching retrieval: using the Jieba word segmenter, which integrates a government-specific thesaurus, it segments the user query, extracts keywords, and then calls the BM25 algorithm to match them in an inverted index composed of text fields such as resource name, description, and tags, returning a list of relevant resources. The second channel performs semantic vector similarity retrieval: it generates semantic vectors from the user query using the locally deployed qwne3-embedding-4b model, and then performs an approximate nearest neighbor search in the corresponding category's vector database, returning several resources with the closest semantics. Each channel independently completes resource retrieval, forming a preliminary candidate set for subsequent fusion.

[0067] After each sub-workflow completes its retrieval, a dedicated rerank model is invoked to refine the relevance score between each resource and the original query, reassessing the degree of matching. Then, dynamic business parameters from the resource metadata (such as higher scores for more recent resource updates and higher weights for more frequent accesses) are used for weighted adjustments to calculate a comprehensive ranking score. Finally, the top-scoring items are sorted in descending order of score to generate standardized semi-structured response data, including fields such as resource name and summary information, which are then encapsulated in JSON format and sent back to the backend processing module.

[0068] S440 receives response data returned by the artificial intelligence service module through the backend processing module, uses the resource identifier contained in the response data as an index, and queries the corresponding search results in the real business database.

[0069] In practical applications, the response data includes semi-structured response data and / or unstructured response data. Semi-structured response data includes formats such as Markdown and JSON, while unstructured data includes formats such as text. After receiving the response data returned by the AI ​​model, the backend processing module extracts a unique identifier (ID) for each resource. The system uses these IDs as the basis for searching the real-time attribute information of the corresponding resource in the actual business database, including its latest status, permission settings, details page links, and availability.

[0070] The S450 presents search results in a visual format through a front-end interactive module.

[0071] After receiving the search results verified by the real database, the front-end interaction module renders each resource as an independent visual card. Each visual card integrates functional controls that can be executed. The visual card displays key information such as the resource name, brief summary, category, and update time, and includes built-in function buttons such as "View Details" and "Apply Now". Users can directly click the corresponding controls to initiate subsequent operations, thus realizing an integrated service loop of search, identification, and use.

[0072] In the description of this application, it should be noted that the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0073] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. An intelligent retrieval system for public service resources, characterized in that, It includes a front-end interaction module, a back-end processing module, and an artificial intelligence service module; among which, The front-end interaction module is used to receive natural language query requests input by the user and send the query requests to the back-end processing module. The backend processing module is used to forward the received query request to the artificial intelligence service module, receive the response data returned by the artificial intelligence service module, and use the resource identifier contained in the response data as an index to query the corresponding search results in the real business database. The AI ​​service module is used to classify the query requests based on the main workflow, initiate corresponding sub-workflows according to the classification results, and execute a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity in parallel in each sub-workflow. Candidate resources are retrieved from different categories of target retrieval resource libraries, and the candidate resources are sorted using a re-ranking model combined with at least one parameter, including resource level and access frequency. The sorted sub-workflow results are then aggregated and returned to the main workflow. The main workflow aggregates and deduplicates the results returned by all sub-workflows, generates response data, and outputs the response data to the backend processing module. The front-end interaction module is also used to receive the processed search results and present them in a visual form.

2. The intelligent retrieval system for public service resources according to claim 1, characterized in that, The front-end interaction module includes a query input unit and a result display unit; The query input unit is used to receive natural language query requests input by users and collect resource type tags selected by users; The result display unit is used to receive the processed search results and display them in the form of visual cards.

3. The intelligent retrieval system for public service resources according to claim 2, characterized in that, The result display unit also integrates a functional operation component, which is used to respond to the user's click operation and trigger page jump instructions for viewing details and resource application.

4. The intelligent retrieval system for public service resources according to claim 1 or 2, characterized in that, The backend processing module includes a request forwarding unit and a data verification unit; The request forwarding unit is used to transmit the received query request to the artificial intelligence service module; The data verification unit is used to extract the resource identifier contained in the response data after receiving the response data, and query the corresponding search results in the real business database based on the resource identifier.

5. The intelligent retrieval system for public service resources according to claim 4, characterized in that, The artificial intelligence service module includes a workflow scheduling unit, an intent recognition unit, and a hybrid retrieval unit; The workflow scheduling unit is used to start the corresponding sub-workflow branch according to the resource type label; The intent recognition unit is used to determine whether a query request belongs to a public service-related issue when the user has not explicitly selected a resource type label. If it belongs to a public service-related issue, it determines the corresponding data type and executes the corresponding sub-workflow. If it does not belong to a public service-related issue, it generates a guided response for non-public service requests. The hybrid retrieval unit is used to execute a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity in parallel within each sub-workflow.

6. The intelligent retrieval system for public service resources according to claim 5, characterized in that, The hybrid retrieval unit includes a keyword retrieval subunit and a vector retrieval subunit; The keyword retrieval subunit is used to segment the query statement using Chinese word segmentation methods based on public service domain vocabulary, and to match candidate resources in the metadata directory based on the inverted index mechanism; The vector retrieval subunit is used to transform the query statement into a high-dimensional semantic vector and retrieve semantically similar candidate resources from a pre-built vector database.

7. The intelligent retrieval system for public service resources according to claim 5 or 6, characterized in that, Each submodule of the artificial intelligence service module also includes a result aggregation unit and a reordering unit; The result aggregation unit is used to summarize candidate resources from different retrieval strategies and form a unified intermediate result set; The re-ranking unit is used to call the re-ranking model to score the relevance of the candidate resources, and calculate a comprehensive ranking value by combining at least one parameter, such as the resource's level and access frequency, and generate candidate resources ranked by relevance based on the comprehensive ranking value.

8. The intelligent retrieval system for public service resources according to claim 7, characterized in that, The artificial intelligence service module also includes a response generation unit; The response generation unit is used to convert the sorted candidate resources into corresponding response data and output the response data to the engineering side processing module. The response data includes semi-structured response data and / or unstructured response data.

9. The intelligent retrieval system for public service resources according to claim 8, characterized in that, The artificial intelligence service module also includes an empty result processing unit; The empty result processing unit is used to determine whether the result list is empty after the re-sorting unit completes the sorting of candidate resources. When the intent recognition unit determines that the query request is related to public services, it generates guidance information and points to the supply and demand management system for the user to submit a resource request application. When the query is determined to be empty and the intent recognition unit confirms that the query request is not related to public services, a standard reply text is generated to inform the user that the service is currently unavailable.

10. A method for intelligent retrieval of public service resources, characterized in that, An intelligent retrieval system for public service resources according to any one of claims 1 to 9, comprising a front-end interaction module, a back-end processing module, and an artificial intelligence service module; the method comprising: The front-end interaction module receives natural language query requests input by users through the front-end interface and sends the query requests to the back-end processing module. The backend processing module forwards the query request to the artificial intelligence service module. The AI ​​service module classifies the query requests based on the main workflow, and initiates corresponding sub-workflow branches according to the classification results. In each sub-workflow, a first retrieval operation based on keyword matching and a second retrieval operation based on semantic vector similarity are executed in parallel. Candidate resources are recalled from different categories of target retrieval resource libraries, and a re-ranking model is invoked to rank the candidate resources based on at least one parameter, including the resource's level and access frequency. The ranked sub-workflow results are then aggregated and returned to the main workflow. The main workflow aggregates and deduplicates the sub-workflow results returned by all sub-workflows, generates response data, and outputs the response data to the backend processing module. The backend processing module receives the response data returned by the artificial intelligence service module, uses the resource identifier contained in the response data as an index, and queries the corresponding search results in the real business database. The search results are presented in a visual format through the front-end interaction module.