Medical insurance parameter-aware routing and symbolic-neural hybrid reasoning method and system
By using a medical insurance parameter-aware routing and symbolic-neural hybrid reasoning method, the challenges of path adaptation, heterogeneous knowledge retrieval, and accurate calculation in cross-domain hybrid problems in medical insurance information systems are solved, achieving high-precision medical insurance knowledge query and calculation result output.
Patent Information
- Application Number
- CN202611485791.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-11-17
AI Technical Summary
Existing medical insurance information systems suffer from insufficient recall accuracy, high risk of computational error, and difficulty in accurately matching processing paths when dealing with cross-domain mixed problems. In particular, they lack effective solutions in scenarios involving heterogeneous medical insurance knowledge sources, precise computational needs, and cross-domain queries.
We employ a medical insurance parameter-aware routing and symbolic-neural hybrid reasoning method. Through multi-dimensional parameter extraction, semantic routing, multi-index knowledge base retrieval, and configurable rule package calculation, combined with a large language model, we generate structured analysis results to ensure computational accuracy and recall precision.
It improves the ability to handle cross-domain mixed problems in the medical insurance field, enhances the coverage, accuracy, and timeliness of search results, reduces the probability of calculation errors, and improves the accuracy and traceability of output results.
Smart Images

Figure CN123117352A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of natural language processing and knowledge engineering, specifically involving a medical insurance parameter perception routing and symbol-neural hybrid reasoning method, system, device and storage medium. Background Technology
[0002] The medical security system is an important component of the social security system, involving multiple aspects such as the collection, payment, and supervision of medical insurance funds. With the deepening reform of the medical security system, medical institutions at all levels, medical insurance agencies, and insured individuals face numerous needs for knowledge inquiries and decision-making related to medical insurance in their daily work. These needs cover multiple interdisciplinary areas, including ICD (Infectious Disease Code) lookup, surgical procedure code lookup, DRG (Diagnosis Related Groups) inclusion criteria, medical insurance payment calculations, treatment pathway assessments, and compliance warnings.
[0003] Currently, most information systems in the medical insurance field use traditional menu-based queries or keyword searches. Users need to possess certain professional knowledge to switch between multiple independent systems to handle comprehensive issues. For example, if a medical record coder wants to determine the DRG group inclusion status of a case, they need to query multiple data sources, such as ICD codes, surgical codes, complication lists, DRG grouping schemes, and local baseline points. This process is cumbersome and prone to errors.
[0004] In recent years, large language model technology has made significant progress, demonstrating powerful capabilities in natural language understanding and knowledge reasoning. However, when applying general-purpose large language models directly to the medical insurance field, the following significant technical problems still exist: First, medical insurance knowledge sources are highly heterogeneous—there are structured coding tables (such as ICD codes and DRG grouping tables), semi-structured regulatory documents (such as regulatory rules and treatment guidelines), and unstructured clinical pathways and operational guidelines. A single retrieval strategy cannot simultaneously cover the recall needs of multiple data types and structures. Second, medical insurance payment calculations involve precise mathematical formulas (such as the DRG point-based payment calculation formula). The probability-based generation method of general-purpose large language models cannot guarantee the accuracy of the calculation results, and there is a significant risk of calculation error. Third, users' medical insurance questions often involve the intersection of multiple fields (such as "What is the medical insurance payment amount for 100,000 yuan of inpatient expenses in a tertiary hospital for hypertension, according to ICD codes and DRG groupings for hypertension?"). Traditional single-intent classification and routing methods are difficult to accurately match the correct processing path, and medical insurance rules have obvious regional and time-limited applicability, lacking a mechanism for perceiving rule versions and scope of application.
[0005] Existing common retrieval enhancement methods mostly employ flattened text segmentation and single-path similarity retrieval, which result in insufficient recall accuracy when dealing with cross-domain hybrid problems, and lack a mechanism to organically combine precise symbolic computation with neural reasoning. In the knowledge-intensive, structurally complex, and highly accuracy-sensitive application scenario of medical insurance, there is an urgent need for an intelligent analysis solution that can deeply integrate parameter-aware routing, multi-source heterogeneous knowledge retrieval, configurable rule package computation, and neural reasoning. Summary of the Invention
[0006] To address the aforementioned issues, this invention discloses a medical insurance parameter-aware routing and symbolic-neural hybrid reasoning method and system. This method extracts multi-dimensional parameters from user questions and dynamically selects processing paths based on parameter combinations. Evidence is then retrieved from a unified knowledge base, and medical insurance costs are accurately calculated using configurable rule packages. Finally, the parameters, evidence, and calculation results are input into a large language model, generating structured analysis results under constraints of immutable fields and evidence binding. These results are then output after multiple verifications. This method, through the collaboration of parameter-aware routing, symbolic computation, and neural reasoning, solves three major challenges in cross-domain hybrid medical insurance problems: path adaptation, heterogeneous knowledge retrieval, and accurate calculation.
[0007] To achieve the above objectives, the technical solution of the present invention is as follows:
[0008] The medical insurance parameter-aware routing and symbolic-neural hybrid reasoning method includes the following steps:
[0009] S1: Receive user input regarding medical insurance-related questions and obtain the corresponding session context information;
[0010] S2: Perform multi-dimensional parameter extraction on user questions to obtain a structured parameter set, which includes at least: task type, knowledge dependency type, computation requirement identifier, set of fields required for computation, set of missing fields, region of coordination or region of policy application, rule version or settlement year, and parameter confidence level;
[0011] S3: Based on the combination state of each parameter in the structured parameter set, dynamically select the target path from five processing paths through semantic routing nodes;
[0012] S4: Perform knowledge retrieval and / or symbolic computation according to the selected processing path: the knowledge retrieval obtains version- and region-filtered retrieval evidence from a unified knowledge base employing multi-indexing, multi-path recall, and metadata filtering; the symbolic computation performs precise calculations, including medical insurance payment formulas, through configurable rule packages and outputs structured calculation results;
[0013] S5: Input the structured parameter set, retrieval evidence, and calculation results into the large language model, and generate analysis results for the medical insurance field under evidence constraints and non-modifiable field constraints;
[0014] S6: Perform deterministic validation and structured output on the analysis results.
[0015] In a preferred embodiment, the multi-dimensional parameter extraction in step S2 is implemented through a parameter extractor node. A lightweight language model is invoked to extract the following parameter dimensions from the user's question according to a predefined schema: task type (encoding query, grouping judgment, payment calculation, rule interpretation, compliance verification), knowledge dependency type (encoding table, grouping rules, policy clauses, price catalog), calculation requirement identifier (used to determine whether symbolic computation needs to be triggered), set of fields required for calculation, set of missing fields, diagnosis name, surgery name, total cost, hospital level, length of stay, region of coordination or policy application, rule version or settlement year, and parameter confidence level. The parameter extractor defines the type, enumeration range, and extraction rules of each parameter in JSON schema format, and the extraction results are output in structured field format.
[0016] In a preferred embodiment, in step S3, the semantic routing node makes routing decisions based on the combination state of each parameter in the structured parameter set. Specifically, the semantic routing node has a built-in routing decision table that defines the mapping relationship between different parameter combinations and the target processing path. When the task type is a non-medical insurance question, it is routed to the regular answer path, where the large language model answers directly. When the task type is a medical insurance knowledge query and the calculation requirement is marked "no", it is routed to the retrieval and evidence generation path. When the task type is a medical insurance calculation, the calculation requirement is marked "yes", and the missing field set is empty, it is routed to the retrieval and rule calculation and generation path. When the task type is a medical insurance calculation, the calculation requirement is marked "yes", but the missing field set is not empty, it is routed to the parameter supplementation path, generating a list of missing fields and prompting the user to supplement them. Before the parameters are completed, it is prohibited to directly enter the calculation process. When the parameter confidence is lower than a preset threshold, or the rule version is unclear, or the evidence conflict is marked as true, it is routed to the manual review path (or the exception handling path). In addition to identifying the task type and computational requirements, the semantic routing node also comprehensively considers the set of missing fields, parameter confidence, evidence conflict identifiers, and rule version values to make routing decisions, fully reflecting the technical characteristics of parameter-aware routing.
[0017] In a preferred embodiment, the knowledge retrieval in step S4 is implemented based on a unified knowledge base. This knowledge base is constructed using a retrieval architecture with multiple indexes, multi-path recall, and metadata filtering. The construction process includes: importing structured coding tables (such as ICD coding data, DRG grouping tables, and MCC / CC complication lists) at the row level to establish keyword indexes and structured field indexes; importing semi-structured regulatory documents (such as medical insurance supervision regulations, treatment guidelines, and price catalogs) after segmenting them according to document structure and clause structure to establish keyword indexes and vector indexes; and importing unstructured clinical pathways and operational guidelines in units of natural paragraphs to establish vector indexes. Each knowledge entry is uniformly encapsulated and stores the following metadata fields: evidence number, knowledge type, source document, regional code, rule version, effective date, expiration date, field path, and content. During retrieval, the knowledge base entries are first filtered for applicability based on metadata fields such as the unified planning region, rule version, or settlement year in the structured parameter set, excluding knowledge entries that are invalid or inapplicable to the target region. Then, within the filtered range, a multi-path recall strategy combining precise keyword matching and vector semantic retrieval is executed. A reciprocal ranking fusion method is used to merge and re-rank the multi-path recall results. For each candidate knowledge entry, its reciprocal ranking score is calculated based on its ranking in each recall result, and the reciprocal ranking scores of each recall result are summed to obtain the fusion score. The results are then sorted in descending order of the fusion score, and retrieval evidence is output according to a preset TopK and recall threshold. The above model scale and parameter values are merely an example and do not constitute a limitation on the scope of protection of this invention; TopK and threshold can be dynamically configured according to the knowledge base size and usage scenario.
[0018] In a preferred embodiment, the symbolic computation is implemented through configurable rule packages and code execution nodes to handle medical insurance scenarios requiring precise numerical calculations. Each configurable rule package contains at least the following fields: rule identifier and version number, applicable region, effective date and expiration date, grouping scheme version, payment mode identifier (used to distinguish between rate-based, point-based, or other localized variants), weight table or benchmark point table, rate or benchmark point value, medical institution level coefficient table, additional coefficient table for specialty / academic / high-tech, high and low multiplier thresholds and their tiering rules, special case or exception rules, settlement formula template (including formula type identifier and parameter field mapping table), and parameter fields and their source binding information.
[0019] The code execution node executes sequentially according to the predefined algorithm logic: Parameter parsing step, which reads the input data required for calculation from the structured parameter set and binds each parameter to its source field; Rule matching step, which matches the corresponding configurable rule package based on the applicable region, settlement year, and rule version; Formula type determination step, which reads the payment mode identifier and formula type identifier from the rule package to determine the calculation logic to be used in this calculation; Formula execution step, which calls the corresponding calculation formula according to the matched rule package and substitutes the parameter values; Result output step, which outputs the calculation result in structured JSON format.
[0020] To demonstrate the adaptability of the configurable rule package to DRG payment models in different regions, two exemplary models are described below, but the scope of the invention is not limited thereto:
[0021] Example 1 (Rate-based model):
[0022] The payment mode in the rule package is set to "rate method", the formula type is set to "rate method formula", and the calculation formula is: payment amount = weight × rate × medical institution coefficient.
[0023] The code execution node determines the DRG group and its weight (W) based on the diagnosis code, surgery code, complication status, and the grouping scheme version and weight table in the rule package; it queries the medical institution coefficient (K) in the rule package based on the hospital level; and it performs payment calculation based on the rate or benchmark value (P) in the rule package. .
[0024] The profit and loss analysis formula is: .
[0025] in, This refers to the actual total cost of hospitalization.
[0026] The rule for determining high and low multipliers is: if Then it is determined to be a low-magnification case. These are then classified as high-probability cases, among which... and This is the preset multiplier threshold.
[0027] Example 2 (Points-based method): The payment mode is configured as "points-based" in the rule package, the formula type is configured as "points-based formula", and the calculation formula template is: Settlement points = base points × level coefficient × specialty coefficient × academic coefficient × high technology coefficient × value-based medical coefficient, payment amount = settlement points × point value.
[0028] The baseline points are determined by the baseline point table in the rule package based on DRG grouping; the level coefficient, specialty coefficient, academic coefficient, high-tech coefficient, and value-based healthcare coefficient are determined by the corresponding coefficient table in the rule package based on the medical institution's level and qualifications; the point values are periodically published by the medical insurance agency and serve as configurable external parameter inputs for the rule package. The rules for determining high-multiplier and low-multiplier cases and adjusting settlement points are implemented based on the high- and low-multiplier thresholds and their tiering rules configured in the rule package.
[0029] The code execution node outputs the rule package identifier and version number used for calculation, the payment mode identifier, the formula template used, the substituted values and their source binding in the rule package, intermediate steps and the final calculation result in structured JSON format, and passes them to the subsequent large language model for generating natural language interpretation.
[0030] It should be noted that the above rate method formula ( The formulas for DRG payment in different regions are merely two exemplary implementations and do not constitute a limitation on the scope of protection of this invention. In practical applications, the DRG payment methods in different regions may include different calculation formulas, adjustment coefficients, exclusion rules, and settlement processes (including but not limited to the two models mentioned above and their localized variations). The symbolic calculation engine dynamically loads the corresponding calculation logic based on the payment mode identifier and formula type identifier in the matched specific rule package. The field structure and calculation formula template of the rule package can be configured and extended according to the policy documents of the target region without departing from the scope of the technical solution of this invention.
[0031] In a preferred embodiment, the evidence constraint generation in step S5 is achieved through a prompt word template. The template injects the user's original question, a structured parameter set, retrieved evidence, and structured calculation results. The retrieved evidence and calculation results are uniformly encapsulated as evidence objects, each containing the following fields: evidence number, data source, rule version, input field, field source, calculation formula, intermediate results, final result, and calculation status. Key fields such as payment amount, code, rule version, and weight are marked as unmodifiable fields. The following constraints are set in the prompt word template: the large language model is limited to completing reasoning and expression only within the scope of the retrieved evidence; for values marked as unmodifiable fields, the large language model is prohibited from recalculating or correcting them on its own, and must directly reference the corresponding values in the evidence object; the large language model is required to output according to a predefined JSON Schema, which must at least include the fields conclusion, evidence_ids, calculation_result, explanation, missing_information, and review_status; each sub-conclusion in the output must be bound to at least one evidence number, and the generation of a definitive conclusion is prohibited when there is a lack of evidence or field conflicts.
[0032] In a preferred embodiment, the deterministic verification in step S6 includes at least one of the following: evidence whitelist verification, checking whether all evidence numbers referenced in the output belong to the evidence whitelist composed of evidence numbers from the current recall results; code consistency verification, checking whether the diagnostic code, surgical code, and DRG code in the output are consistent character by character with the corresponding codes in the evidence object; numerical consistency verification, checking whether the numerical conclusions referenced in the output are consistent with the values of the specified JSON path in the calculation object; sub-conclusion evidence binding verification, checking whether each sub-conclusion in the output is bound to at least one evidence number; and deterministic conclusion generation prohibition verification when evidence is missing or field conflicts occur, prohibiting the generation of deterministic conclusions when evidence is insufficient or field conflicts occur, and instead outputting missing information prompts and review status markers.
[0033] Based on the above method, the present invention also provides a parameter-aware routing and symbolic-neural hybrid reasoning system for the medical insurance field, the system comprising:
[0034] The parameter extraction module is used to extract structured parameters from user-input questions related to the medical insurance field. The structured parameters include at least the task type, knowledge dependency type, calculation requirement identifier, set of fields required for calculation, set of missing fields, unified planning area, rule version, and parameter confidence level.
[0035] The semantic routing module is used to dynamically select a target path from five processing paths based on the combination state of each parameter in the structured parameters. The five processing paths include a regular answer path, a retrieval and evidence generation path, a retrieval and rule calculation and generation path, a parameter supplementation path, and a manual review path.
[0036] The knowledge retrieval module is used to perform retrieval from a unified knowledge base that employs multiple indexes, multi-path recall, and metadata filtering, and to recall retrieval evidence after filtering knowledge entries based on the region and rule version information in the parameters.
[0037] The symbolic calculation module is used to perform precise numerical calculations, including DRG payment amount calculations, through configurable rule packages, and output the calculation results in the form of structured evidence.
[0038] The hybrid reasoning module is used to call the large language model under the dual constraints of retrieving evidence and computing evidence, as well as the constraint of unmodifiable fields, and generate analysis results according to the predefined output schema;
[0039] The results processing module is used to perform deterministic verification and structured output on the analysis results.
[0040] The beneficial effects of this invention are as follows:
[0041] By using a multi-dimensional parameter extraction mechanism, the implicit parameters in user questions are made explicit, providing richer decision-making basis for subsequent semantic routing than single intent classification, and improving the ability to handle cross-domain mixed questions.
[0042] By using semantic routing nodes to dynamically select processing paths based on multi-dimensional parameter combinations including task type, missing field set, parameter confidence, and rule version, a leap from single-path processing to multi-path adaptive routing is achieved. Furthermore, it can automatically enter parameter supplementation or exception handling paths when calculation parameters are missing or rules conflict, avoiding the limitations of using fixed processing logic for all problems.
[0043] Through a unified knowledge base architecture with multiple indexes, multi-path retrieval, and metadata filtering, structured coded data, semi-structured regulations, and unstructured text can adopt appropriate indexing strategies according to their respective data characteristics. Furthermore, by filtering knowledge entries based on their applicability through metadata fields such as regional codes and rule versions, the coverage, accuracy, and timeliness of search results are enhanced.
[0044] By employing a hybrid architecture of symbolic computation and neural reasoning, precise computation tasks are handled by a code execution engine driven by configurable rule packages to ensure numerical accuracy, while semantic understanding and interpretation tasks are handled by a large language model. The two collaborate deeply through a structured evidence interface, preserving natural language interaction capabilities while ensuring computational accuracy.
[0045] By employing a dual-constraint generation mechanism that combines retrieval evidence and computational evidence, along with an unmodifiable field constraint mechanism, the probability of errors caused by directly performing numerical calculations in the application of general-purpose large language models in the medical insurance field is reduced. This also reduces the probability of inconsistencies between generated results and retrieval evidence or computational results, thereby improving the accuracy and traceability of the output results. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the overall architecture of the system of the present invention.
[0047] The system of this invention consists of an input layer, a parameter-aware routing layer, a knowledge retrieval layer, a symbolic computation layer, a hybrid reasoning layer, and an output layer. Information is exchanged between these layers through a structured data interface.
[0048] The input layer receives natural language questions from users, along with conversation context information;
[0049] The parameter extractor of the parameter-aware routing layer performs multi-dimensional structured parameter extraction on the user's question. The extracted parameters include at least the task type, knowledge dependency type, computation requirement identifier, set of fields required for computation, set of missing fields, coordination region, rule version, and parameter confidence. The semantic routing node determines the target path from five processing paths based on the combination state of the parameters and the built-in routing decision table, and allocates control to the knowledge retrieval layer and / or symbolic computation layer.
[0050] The knowledge retrieval layer receives routing decisions, performs applicability filtering on knowledge entries in the unified knowledge base based on metadata such as region code and rule version in the parameters, performs multi-path recall and fusion reordering, and outputs retrieval evidence; the unified knowledge base stores metadata fields such as evidence number, knowledge type, source document, region code, rule version, effective date and expiration date for each knowledge entry;
[0051] The symbolic computation layer receives the parameter input required for computation, matches the corresponding configurable rule package, loads the weight table, rate, medical institution coefficient and other parameters in the rule package, executes the formula calculation and outputs the calculation result in structured JSON form. Each calculation result is bound to its rule package identifier, version number and parameter source.
[0052] The hybrid inference layer injects structured parameters, retrieval evidence, and computation results into the large language model. Under evidence constraints and immutable field constraints, the large language model is required to generate analysis results according to a predefined JSON Schema, where fields such as payment amount, code, rule version, and weight are marked as immutable.
[0053] The output layer performs deterministic checks on the results—including evidence whitelist checks, coding consistency checks, numerical consistency checks, and sub-conclusion evidence binding checks—and after passing the checks, it organizes the results into a structure and outputs them to the user.
[0054] Figure 2 This is a schematic diagram of the overall process of the method of the present invention.
[0055] Step S1: Receive the user's natural language question;
[0056] Step S2: Perform multidimensional parameter extraction on the user's question to obtain the task type, knowledge dependency type, calculation requirement identifier, set of fields required for calculation, set of missing fields, coordination region, rule version, and parameter confidence.
[0057] Step S3: The semantic routing node determines the target processing path by querying the routing decision table based on the combination status of each parameter in the structured parameters: If the task type is a non-medical insurance question, it is routed to step S41 (normal answer); if the task type is a medical insurance knowledge query and there is no calculation requirement, it is routed to step S42 (retrieval and evidence generation); if the task type is a medical insurance calculation and the required fields are complete, it is routed to step S43 (retrieval and rule calculation and generation); if the task type is a medical insurance calculation but the required fields are incomplete, it is routed to step S44 (parameter supplementation, generating a list of missing fields and prompting the user to supplement them); if the parameter confidence is lower than the threshold, the rule version is unknown, or there is evidence conflict, it is routed to step S45 (manual review / anomaly handling).
[0058] Step S41: The user is answered directly by a regular LLM node;
[0059] Step S42: After filtering the knowledge entries in the unified knowledge base based on the region and rule version in the parameters, perform multi-way recall and fusion reordering to obtain retrieval evidence;
[0060] Step S43: Based on the retrieval in step S42, the symbolic computation engine simultaneously matches the corresponding calculation formulas and parameters through configurable rule packages, performs precise calculations, and obtains retrieval evidence and structured calculation results respectively;
[0061] Step S44: Generate a list of missing fields and prompt the user to fill in the missing parameters. After the parameters are filled in, re-execute parameter extraction and semantic routing.
[0062] Step S45: Manually review or handle exceptions for cases where the parameter confidence level is lower than the threshold or the rule version is unknown, and determine the subsequent processing method based on the review results.
[0063] Step S5: Under the dual constraints of retrieval evidence and computational evidence, as well as the constraint of immutable fields, LLM performs hybrid reasoning according to a predefined JSON Schema to generate structured analysis results;
[0064] Step S6: Perform deterministic verification on the analysis results, including evidence whitelist verification, coding consistency verification, numerical consistency verification, and sub-conclusion evidence binding verification; if any deterministic verification fails, the corresponding deterministic conclusion shall not be output directly, and the corresponding abnormal information shall be recorded, and the review status shall be set to "pending review". If necessary, it shall be submitted to manual review; after the verification is passed, the final result shall be output to the user in a structured format.
[0065] Figure 3 This is a schematic diagram illustrating the collaborative relationship between hybrid retrieval and symbolic computation in this invention.
[0066] Figure 4 This is a schematic diagram illustrating the organization of the prompt template generated for evidence constraints in this invention. Detailed Implementation
[0067] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.
[0068] As shown in the figure, the medical insurance parameter sensing routing and symbolic-neural hybrid reasoning method and system of the present invention are as follows:
[0069] Example 1: Implementation of Multidimensional Semantic Routing Based on Parameter Extractor
[0070] This embodiment provides a specific implementation of parameter extraction and semantic routing for the medical insurance field. After receiving a natural language question input by the user, the system first passes the question text and session identifier to the parameter extractor node. The parameter extractor is configured with a lightweight language model, and the model generation temperature parameter is set to 0.1 to maintain the stability of the extraction results. The model size and parameter values described above are merely examples and do not constitute a limitation on the scope of protection of this invention.
[0071] The parameter extractor's extraction schema is configured with the following fields: The first field is the task type (task_type), with enumerated values of "encoding query", "grouping judgment", "payment calculation", "rule interpretation", and "compliance verification", used to distinguish the business task category to which the question belongs; the second field is the knowledge dependency type (knowledge_dependency), with enumerated values of "encoding table", "grouping rule", "policy clause", and "price catalog", used to indicate the knowledge type that should be prioritized for matching during retrieval; the third field is the calculation requirement identifier (needs_calculation), with enumerated values of "yes" and "no"; the fourth field is the set of required fields (required_fields), listing all parameter field names required to perform the calculation; the fifth field is the set of missing fields (missing_fields), listing necessary fields not provided in the current question; subsequent fields include diagnosis name, surgery name, total cost, hospital level, length of stay, unified planning area (or policy applicable area), rule version (or settlement year), and parameter confidence level.
[0072] Taking the user question "What is the ICD code for pneumonia?" as an example, the parameter extractor outputs: task_type is "code query", knowledge_dependency is "code table", needs_calculation is "no", required_fields is empty, missing_fields is empty, diagnosis is "pneumonia", and confidence is high.
[0073] Taking the user question "In Beijing, the total cost of hospitalization at a tertiary hospital in 2024 is 23,000 yuan according to CHS-DRG version 1.2. How much will DRG pay?" as an example, the output is: task_type is "payment calculation", knowledge_dependency is "grouping rule", needs_calculation is "yes", required_fields is ["region", "rule_version", "hospital_level", "total_cost", "diagnosis_code", "surgery_code"], missing_fields is ["diagnosis_code", "surgery_code"], total_cost is 23,000 yuan, hospital_level is "tertiary", region is "Beijing", rule_version is "CHS-DRG version 1.2 / 2024", and confidence is low (due to missing diagnosis and surgery codes).
[0074] The semantic routing node reads the multi-dimensional parameter combination status from the parameter extraction results and determines the target path based on the built-in routing decision table. An example of the routing decision representation is as follows:
[0075] When task_type is "non-medical insurance / routine question" → route to the regular answer path (path A);
[0076] When task_type ∈ {"encoded query", "rule interpretation", "compliance verification"} and needs_calculation = "no" → route to the retrieval and evidence generation path (path B);
[0077] When task_type∈{“group judgment”,“payment calculation”} and needs_calculation="yes” and missing_fields is empty → route to the retrieval and rule calculation and generation path (path C);
[0078] When task_type ∈ {“group judgment”, “payment calculation”} and needs_calculation = “yes” and missing_fields is not empty, the route is redirected to the parameter supplementation path (path D), a list of missing fields is generated and prompts for supplementation is given, and direct calculation is prohibited;
[0079] When confidence < threshold, or rule_version is empty, or evidence_conflict="true" → route to manual review / anomaly handling path (path E).
[0080] The above routing decision example is only one implementation method, and the task type enumeration and routing rules can be expanded according to the actual business scenario; the threshold can be dynamically configured according to the size of the knowledge base.
[0081] Example 2: Unified Retrieval Implementation of Multi-Source Heterogeneous and Multi-Structured Knowledge Base
[0082] In this embodiment, the unified knowledge base is constructed using an architecture of multiple indexes, multi-path retrieval, and metadata filtering. The knowledge base contains the following multi-source heterogeneous data:
[0083] The first category is structured coding table data, including the ICD-10 diagnostic coding table (approximately 20,000 rows), the ICD-9 surgical coding table (approximately 5,000 rows), the TCM disease and syndrome coding table, the tumor morphology coding table, the DRG grouping scheme data table (including DRG codes, group names, MDC classifications, ADRG classifications, and type labels), the MCC / CC complication list, the mapping relationship data between the DRG main diagnosis table and ADRG, and the DRG exclusion list data. This type of data is imported at the row-level granularity, with each record corresponding to a knowledge entry. Keyword indexes and structured field indexes are established to support precise coding queries and field condition filtering.
[0084] The second category consists of semi-structured regulations and normative documents, including medical insurance supervision regulations (such as the full text of the "Regulations on the Supervision and Management of the Use of Medical Security Funds"), price lists for medical services, medical insurance drug lists, DRG payment technical specifications, and inpatient medical record front page data filling specifications. These documents are segmented according to their original chapter and clause structures, with each segment maintaining semantic integrity and indexed by keywords and vectors.
[0085] The third category is unstructured clinical text, including treatment pathway guidelines, operational specifications, and compliance rules. These documents are imported as paragraphs and indexed using a vector index.
[0086] All knowledge entries are uniformly encapsulated in the following metadata fields: evidence_id, knowledge_type, source_document, region_code, rule_version, effective_date, expire_date, field_path, and content. During retrieval, the system first filters knowledge entries based on the applicability of fields such as the overall planning region (region_code) and rule_version in the structured parameter set, excluding those that are expired (exceeding expire_date) or not applicable to the target region. Within the filtered range, both keyword exact matching (for handling coded query problems, such as "I10.x00x002" or "hypertension") and vector semantic retrieval (for handling semantic matching problems, such as "DRG enrollment for pneumonia") are performed simultaneously. The two recall results are then fused, reordered, and the retrieved evidence is output. The TopK values and recall thresholds mentioned above are merely examples and can be dynamically configured according to the size of the knowledge base and the usage scenario, and do not constitute a limitation on the scope of protection of this invention.
[0087] Example 3: Implementation of Symbolic Computation and Hybrid Inference Based on Configurable Rule Packages
[0088] In this embodiment, the symbolic computation engine is embedded in the system workflow as a code execution node. It achieves precise execution of medical insurance payment calculation through configurable rule packages, forming a deeply coupled hybrid inference architecture with the large language model.
[0089] Each configurable rule package contains at least the following fields: rule identifier and version number, applicable region, effective / expiration date, payment mode identifier, grouping scheme version, weight table or benchmark point table, rate or benchmark point value, level coefficient table, additional coefficient table, high and low multiplier thresholds and their tiering rules, special cases or exception rules, settlement formula template and its parameter field mapping table.
[0090] The following is a DRG payment calculation example to demonstrate the complete process of parameter extraction, calculation plan generation, step-by-step symbolic calculation, and structured output. This example uses the rate-based calculation formula: Payment Amount = DRG Weight × Rate × Medical Institution Coefficient (i.e., Pay = W × P × K) as the exemplary calculation logic. This formula is only one exemplary implementation; different regions may use different payment models and calculation formulas (such as the point-based method). Adaptation can be achieved by replacing the payment model identifier and settlement formula template in the rule package, and this does not constitute a limitation on the scope of protection of this invention.
[0091] Suppose the system receives the following user input:
[0092] "
Clinical Scenario
Questions
[0093] (1) Parameter extraction and subproblem decomposition
[0094] The parameter extractor identified four sub-questions within the user's problem and output structured parameters: task type "payment calculation," calculation requirement identifier "yes," coordination region "Nanjing City," rule version "2022," DRG weight W=4.2, pre-adjustment point value 120 yuan, post-adjustment point value 115 yuan, medical institution coefficient K=1.22, and annual surgical volume 200 cases. The parameter extractor simultaneously generated a calculation plan containing four sequentially executed calculation steps: Step 1 calculates the pre-adjustment payment amount (W×120×K), Step 2 calculates the post-adjustment payment amount (W×115×K), Step 3 calculates the difference per case (subtracting the results of the first two steps), and Step 4 calculates the total annual difference (difference per case × annual surgical volume). The system detected that all required fields were provided, missing fields were empty, the confidence level was high, and the route was directed to path C (retrieval + rule calculation + generation path).
[0095] (2) Symbolic computation execution
[0096] The symbolic computation engine executes the computation plan sequentially:
[0097] Step 1: Payment amount before adjustment = 4.2 × 120 × 1.22 = 614.88 yuan;
[0098] Step 2: Adjusted payment amount = 4.2 × 115 × 1.22 = 589.26 yuan;
[0099] Step 3: The difference per case = 614.88 − 589.26 = 25.62 yuan;
[0100] Step 4: Total annual difference = 25.62 × 200 = 5,124 yuan.
[0101] The symbolic computation engine encapsulates the above step-by-step computation results into structured evidence output, with each computation result bound to its source field and computation formula.
[0102] (3) Hybrid reasoning and structured output
[0103] Under the constraint of non-modifiable fields (numerical fields such as payment amount and difference are prohibited from being recalculated or corrected by the large language model), the hybrid inference node injects both structured parameters and symbolic computation results into the large language model, generating the following structured analysis results:
[0104] Payment amount before adjustment: 614.88 yuan;
[0105] Adjusted payment amount: 589.26 yuan;
[0106] Difference per case: 25.62 yuan;
[0107] Total annual difference (200 cases): 5,124 yuan.
[0108] Case with missing parameters
[0109] When the user inputs only "Total hip replacement, DRG weight W=4.2, K=1.22, please calculate it for me," the parameter extractor outputs the missing fields as "pre-adjustment point value" and "post-adjustment point value," with a medium confidence level. The system detects that the missing fields are not empty, routes to the parameter completion path (path D), and prevents entry into the complete calculation process, outputting the following missing field prompt:
[0110] "The points value before and after the adjustment are currently missing. Please add them and resubmit (e.g., point value P = 120 yuan → 115 yuan)."
[0111] Once the user completes the above fields, the status changes to COMPLETE, and the complete calculation process can then begin.
[0112] Example 4: Structured Processing Implementation for Serial / Parallel Multi-Subtask Processing
[0113] Unlike the multi-step computation within the same computational task in Example 3, this example focuses on handling cross-domain hybrid problems that include different types of subtasks.
[0114] In this embodiment, for cross-domain hybrid problems, the parameter-aware routing node first determines the subtasks included in the problem, the knowledge dependencies and computational dependencies of each subtask, based on structured parameters, and generates a subtask execution sequence. Taking the hybrid problem "What is the DRG inclusion for hypertension (I10.x00x002), and what is the DRG payment amount for tertiary hospitals in Beijing in 2024?" as an example, the processing flow is as follows:
[0115] The parameter extractor extracts task_type as a composite type of "grouping judgment + payment calculation", knowledge_dependency as "grouping rule", and needs_calculation = "yes".
[0116] The parameter-aware routing node resolves two subtasks: Subtask A: DRG grouping judgment (depending on grouping rule retrieval); Subtask B: DRG payment amount calculation (depending on the grouping result of Subtask A + rule package calculation).
[0117] The routing node generates an execution sequence: first, it executes subtask A to retrieve knowledge and obtain DRG groups and weights, then it executes subtask B to calculate the payment amount using the rule package. The integrated LLM is only responsible for organizing the obtained evidence objects and calculation objects according to the execution sequence, and does not autonomously change the execution path, rule version, or numerical result.
[0118] The response is output in a predefined JSON Schema format: the `conclusion` field directly provides the DRG inclusion code and DRG payment amount; the `evidence_ids` field lists all referenced evidence numbers; the `calculation_result` field references the payment amount and grouping result in the symbolic calculation object; the `explanation` field describes the DRG grouping basis, the payment amount calculation process, and the version of the rule package used; the `missing_information` field lists missing information in the parameters; and the `review_status` field indicates the review status. For cases with missing parameters, the `explanation` field provides a parameter missing prompt, rule application instructions, code review prompts, and manual review suggestions, rather than generating business suggestions beyond the scope of the data processing technical solution, such as "payment optimization suggestions."
[0119] Example 5: Implementation of Result Validation and Structured Output
[0120] In this embodiment, the result verification process includes the following deterministic verification steps.
[0121] The first step is evidence whitelist verification: The system maintains a whitelist of all evidence objects returned in this retrieval, defined as the set of `evidence_id`. All cited evidence IDs in the output are extracted and checked one by one to ensure they all belong to the whitelist. If an ID outside the whitelist is found, it is determined to be a phantom reference, and correction is triggered.
[0122] The second step is code consistency verification: the system extracts all coded fields (such as diagnosis codes, surgical codes, and DRG codes) involved in the output results and compares them character by character with the corresponding coded fields in the retrieved evidence object. For example, the DRG codes in the output must match the DRG codes returned by the grouped retrieval in the evidence object character by character; any discrepancy will trigger a correction.
[0123] The third step is numerical consistency verification: the system extracts the numerical conclusions from the output and compares them with the values in the specified JSON path of the calculation object. For example, the payment amount referenced in the conclusion field of the output must be completely consistent with the value under the calculations.pay_amount path in the calculation object.
[0124] The fourth step is the sub-conclusion evidence binding verification: the system checks whether each sub-conclusion in the output is bound to at least one evidence number. Any sub-conclusion lacking evidence binding is marked as "unsupported by evidence" and triggers the supplementary process.
[0125] The fifth step is a validation check for definitive conclusions in cases of missing evidence or field conflicts: When insufficient evidence or field conflicts are detected, the system prohibits the generation of definitive conclusions. Instead, it sets `review_status` to "pending review" in the output and lists missing or conflicting items in `missing_information`, requiring manual review. After successful validation, the results are output in a structured format, including the original question, a summary of the conclusion, detailed analysis, a list of cited evidence, the calculation process, missing information prompts, and the review status.
[0126] For any of the above-mentioned deterministic verifications that fail, the system is prohibited from directly outputting a deterministic conclusion that failed the verification, and will record relevant abnormal information in the output results based on the verification results; for cases where the verification of evidence number, code, value, or evidence binding fails, the corresponding invalid evidence, code inconsistency, value inconsistency, or evidence missing information will be recorded respectively, and the review_status will be set to "pending review"; for results that cannot pass the verification, they will be submitted to manual review before a final conclusion is determined.
[0127] It should be noted that the above content merely illustrates the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. For those skilled in the art, various improvements and modifications can be made without departing from the principle of the present invention, and all such improvements and modifications fall within the scope of protection of the claims of the present invention.
Claims
1. A mediclaim parameter aware routing and symbolic-neural hybrid inference method, characterized in that, Includes the following steps: S1: Receive user input regarding medical insurance-related questions and obtain the corresponding session context information; S2: Perform multi-dimensional parameter extraction on the user question to obtain a structured parameter set. The structured parameter set includes at least: task type, knowledge dependency type, calculation requirement identifier, set of fields required for calculation, set of missing fields, overall planning area or policy applicable area, rule version or settlement year, and parameter confidence level. S3: Based on the combination state of each parameter in the structured parameter set, the target path is dynamically selected from five processing paths through the semantic routing node. The five processing paths include: the regular answer path corresponding to non-medical insurance questions, the retrieval and evidence generation path corresponding to medical insurance knowledge queries, the retrieval and rule calculation and generation path corresponding to complete calculation parameters, the parameter supplementation path corresponding to incomplete calculation parameters, and the manual review path corresponding to rule conflicts, unclear versions, or low confidence. S4: Based on the selected target path, perform knowledge retrieval and / or symbolic computation: The knowledge retrieval retrieves version- and region-filtered retrieval evidence from a unified knowledge base employing multi-indexing, multi-path recall, and metadata filtering; The symbolic computation calls the corresponding calculation formula through a configurable rule package to perform precise calculations, including medical insurance payment calculation, and outputs structured calculation results; wherein, each knowledge entry in the unified knowledge base stores at least the evidence number, knowledge type, source document, region code, rule version, effective date, expiration date, field path, and content; S5: Input the structured parameter set, retrieval evidence, and structured calculation results into the large language model. Under the constraints of evidence and non-modifiable fields, generate structured analysis results for the medical insurance field according to the predefined output schema. Among them, the payment amount, code, rule version, and weight fields in the retrieval evidence are marked as non-modifiable fields. The large language model can only reference them and cannot regenerate or modify the values of the non-modifiable fields. S6: Perform deterministic verification and structured output on the analysis results; the deterministic verification includes at least: verifying whether the evidence number in the output belongs to the whitelist for this recall, verifying whether the output code is consistent with the code in the evidence object character by character, verifying whether the output value is consistent with the value of the specified JSON path in the calculation object, and verifying whether each sub-conclusion in the output is bound to at least one evidence number.
2. The method of claim 1, wherein, The multi-dimensional parameter extraction in step S2 calls the language model through the parameter extractor node to extract structured parameters from the original user question text according to a predefined extraction mode. The parameter extractor defines the type, enumeration range and extraction rules of each parameter in JSON Schema form, and the extraction results are output in the form of structured fields. The parameters include at least the task type, knowledge dependency type, computational requirement identifier, diagnosis name, surgery name, total cost, hospital level, length of stay, unified planning area or policy applicable area, rule version or settlement year and parameter confidence level.
3. The method of claim 1, wherein, The routing decision in step S3 is based on the combination state of each parameter in the structured parameter set, at least based on the combined values of the task type, calculation requirement identifier, missing field set, and parameter confidence. The semantic routing node has a built-in routing decision table, which defines the mapping relationship between different parameter combinations and target processing paths, including at least the following mapping rules: Task type is non-medical insurance question → regular answer path; Task type is medical insurance knowledge query, calculation requirement identifier is no → retrieval and evidence generation path; Task type is medical insurance calculation, calculation requirement identifier is yes, missing field set is empty → retrieval and rule calculation and generation path; Task type is medical insurance calculation, calculation requirement identifier is yes, missing field set is not empty → parameter supplementation path, direct calculation is prohibited; Parameter confidence is lower than a preset threshold, or rule version is unknown → manual review path.
4. The method of claim 1, wherein, In step S4, the unified knowledge base is constructed using a retrieval architecture of multiple indexes, multi-path recall, and metadata filtering: Structured coding tables are imported at the row level to establish keyword and structured field indexes; semi-structured regulatory documents are segmented and imported according to document and clause structures to establish keyword and vector indexes; unstructured clinical texts are imported in units of natural paragraphs to establish vector indexes. During retrieval, knowledge base entries are filtered based on metadata such as knowledge dependency type, coordinating region, and rule version in the structured parameter set. Then, multi-path recall combining precise keyword matching and vector semantic retrieval is performed. After fusing and reordering the multi-path recall results, retrieval evidence is output according to a preset TopK and recall threshold.
5. The method of claim 4, wherein, Each knowledge entry in the unified knowledge base shall store at least the following fields: evidence number, knowledge type, source document, region code, rule version, effective date, expiration date, field path, and content; the knowledge types included in the unified knowledge base shall include at least one of the following: ICD diagnostic coding table, ICD surgical coding table, DRG grouping scheme data, MCC / CC complication list, medical service item price catalog, medical insurance drug catalog, medical insurance regulations and compliance rule base.
6. The method of claim 1, wherein, The symbolic calculation in step S4 is implemented through configurable rule packages. Each rule package includes at least: rule identifier and version number, applicable region, effective date and expiration date, grouping scheme version, weight table, rate or benchmark value, medical institution coefficient, high and low multiplier threshold, special case or exception rules, and parameter fields and their sources. The symbolic calculation is used to handle medical insurance scenarios that require precise numerical calculations, including at least one of the following: DRG payment calculation and medical insurance profit and loss analysis. The symbolic calculation is implemented through code execution nodes in the workflow. The calculation process is output in the form of structured evidence, including the rule package identifier and version number used, the formula used, the substituted values and their source bindings, intermediate calculation results, and final results.
7. The method of claim 1, wherein, The evidence constraint generation process in step S5 includes: injecting the user's original question, structured parameter set, retrieved evidence, and structured calculation results into the context of the large language model through a prompt word template; encapsulating the retrieved evidence and calculation results into a unified evidence object, each evidence object containing an evidence number, data source, rule version, input fields and their sources, calculation formula, intermediate results, final results, and calculation status; marking the payment amount, code, rule version, and weight fields as unmodifiable fields, restricting the large language model to only reference them and not regenerate or modify the values of the unmodifiable fields; requiring the large language model to output according to a predefined JSON Schema, wherein the JSON... The schema includes at least the fields for conclusion, evidence number list, calculation result, explanation, missing information, and review status. The deterministic verification in step S6 includes at least one of the following: evidence whitelist verification, checking whether the evidence number in the output belongs to the evidence whitelist composed of the set of evidence numbers of the evidence objects actually returned in this retrieval; encoding consistency verification, checking whether the encoding value in the output is consistent with the corresponding encoding in the evidence object character by character; numerical consistency verification, checking whether the numerical conclusion in the output is consistent with the numerical value of the specified JSON path in the calculation object; sub-conclusion evidence binding verification, checking whether each sub-conclusion in the output is bound to at least one evidence number; and deterministic conclusion generation prohibition verification when there is insufficient evidence or field conflict, prohibiting the generation of deterministic conclusions when there is insufficient evidence or field conflict, and outputting missing information or conflict information and review status.
8. A medicare parameter aware routing and symbolic-neural hybrid inference system characterized in that, include: The parameter extraction module is used to extract structured parameters from user-input questions related to the medical insurance field. The structured parameters include at least the task type, knowledge dependency type, calculation requirement identifier, set of fields required for calculation, set of missing fields, unified planning area, rule version, and parameter confidence level. The semantic routing module is used to dynamically select a target path from five processing paths based on the combination state of each parameter in the structured parameters. The five processing paths include a regular answer path, a retrieval and evidence generation path, a retrieval and rule calculation and generation path, a parameter supplementation path, and a manual review path. The knowledge retrieval module is used to perform retrieval from a unified knowledge base that employs multiple indexes, multiple retrieval paths, and metadata filtering. It also retrieves evidence after filtering knowledge entries based on the region and rule version information in the parameters. Each knowledge entry in the unified knowledge base stores at least the fields of evidence number, knowledge type, source document, region code, rule version, effective date, and expiration date. The symbolic calculation module is used to perform precise calculations, including the calculation of medical insurance payment amount, through a configurable rule package, and output the calculation results in the form of structured evidence. The configurable rule package includes at least a rule identifier and version number, applicable region, grouping scheme version, weight table, rate and medical institution coefficient. The hybrid reasoning module is used to call the large language model under the dual constraints of retrieving evidence and computing evidence, as well as the constraint of unmodifiable fields, and generate analysis results according to the predefined output schema; The results processing module is used to perform deterministic verification and structured output on the analysis results. The deterministic verification includes at least evidence whitelist verification, code consistency verification, numerical consistency verification and sub-conclusion evidence binding verification.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.
