Intelligent drg grouping method and system based on large model

Through the large model-based DRG intelligent grouping method, the problems of inaccurate information extraction and insufficient adaptability in DRG grouping technology are solved, efficient and accurate DRG grouping is achieved, which adapts to new disease patterns and treatment plans and improves the intelligence level of the grouping system.

CN120600290BActive Publication Date: 2025-10-21LIAONING RONGKE ZHIWEIYUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511108366.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-10-21
Estimated Expiration
2045-08-08

AI Technical Summary

Technical Problem

Existing DRG grouping technology has difficulty in accurately understanding the complex semantics and implicit information in medical texts, resulting in difficulties in coding standardization, inaccurate grouping results, lack of adaptive learning capabilities, and inability to cope with new disease patterns and treatment plans.

Method used

A DRG intelligent grouping method based on a large model is adopted. Natural language text is converted into semantic coding through optical character recognition technology. A pre-trained language large model is used to extract information and generate structured summaries. Combined with multimodal matching and semantic supplementary features, path optimization is performed based on DRG grouping rules. The proximal strategy optimization algorithm is used to iteratively update the model parameters and output the final grouping results.

Benefits of technology

It improves coding accuracy and efficiency, reduces manual coding errors, enhances the accuracy and flexibility of grouping results, adapts to the ever-changing complexity of cases, and improves the intelligence level of the DRG grouping system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120600290B_ABST
    Figure CN120600290B_ABST
Patent Text Reader

Abstract

The application provides a large model-based DRG intelligent grouping method and system, relates to the technical field of information processing, and comprises the following steps: obtaining patient medical record texts, extracting medical information by using a pre-trained language large model and generating a structured illness summary, performing multi-modal matching to generate a standard ICD code, solving ambiguous content by using similar matching, forming complete coding features, generating an initial grouping path based on preset rules, updating model parameters by using a proximal strategy optimization algorithm, and outputting a final DRG grouping result. The application improves the grouping accuracy, reduces the artificial auditing burden, and realizes intelligent medical grouping.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field, and in particular to a DRG intelligent grouping method and system based on a large model. Background Art

[0002] Diagnosis Related Groups (DRGs) are an important case classification and management system that has become a core tool for healthcare payment and quality management. Traditional DRG grouping methods rely primarily on medical coders to manually extract and encode medical record information, then use grouping software to implement grouping rules to generate the final DRG grouping results. With the development of medical informatization and the widespread use of electronic medical record systems, DRG grouping automation has become a foundational requirement. However, it still faces challenges such as low information extraction accuracy, difficulty in coding standardization, and complex grouping logic.

[0003] There are many problems that need to be solved in the current DRG grouping technology. Traditional information extraction methods have difficulty in accurately understanding the complex semantics and implicit information in medical texts, especially for non-standardized descriptions, medical terminology variants, and content with strong contextual relevance. The extraction accuracy is insufficient, resulting in omissions or errors in key diagnostic and surgical information. The medical coding standardization process lacks sufficient semantic understanding capabilities and is difficult to handle the diversity of synonymous expressions, ambiguous descriptions, and professional terms, resulting in inaccurate ICD coding matches and affecting the accuracy of grouping results. The existing DRG grouping system lacks adaptive learning capabilities and cannot dynamically adjust according to the constantly updated grouping rules and the increasing complexity of cases. It is difficult to cope with new disease patterns and treatment plans, resulting in unstable and inflexible grouping results. Summary of the Invention

[0004] The embodiments of the present invention provide a DRG intelligent grouping method and system based on a large model, which can solve the problems in the prior art.

[0005] A first aspect of an embodiment of the present invention provides a DRG intelligent grouping method based on a large model, comprising:

[0006] Obtain the original natural language text from the patient's medical record homepage, discharge record, and medical history record, and convert the original natural language text into semantic code using optical character recognition technology; input the semantic code into a pre-trained language model to extract the main diagnosis information, surgical operation information, and complication information, and generate a structured medical summary text; perform multimodal matching processing based on the medical summary text, map the medical summary text to standard ICD code, and generate semantic supplementary features;

[0007] For non-standard descriptions and ambiguous content in the medical summary text, a pre-trained language model is used to perform similarity matching to obtain a predicted standard code, and the predicted standard code is fused with the standard ICD code and the semantic supplementary features to form a complete coding feature;

[0008] Input the complete coding features into the inference engine of the pre-trained language model, and generate the initial grouping path based on the preset DRG grouping rules.

[0009] The encoding features are used as the state space, the initial grouping path is used as the action space, and a reward function is designed based on the grouping accuracy, case similarity and path complexity. The parameters of the pre-trained language model are iteratively updated through the proximal strategy optimization algorithm to output the final DRG grouping result.

[0010] Multimodal matching is performed based on the medical summary text to map the medical summary text into standard ICD codes, and semantic supplementary features are generated at the same time, including:

[0011] Perform entity recognition and relationship extraction on the input medical summary text, semantically align the identified entity nodes with the nodes in the pre-built medical knowledge graph, and iteratively aggregate the features of adjacent nodes based on the graph clustering algorithm to generate an entity semantic embedding vector that integrates contextual information;

[0012] Perform path retrieval in the medical knowledge graph based on the entity semantic embedding vector, construct a set of reasoning paths based on the semantic type of the relationship edge, calculate the importance score of each reasoning path using the attention mechanism, and select the reasoning path with the highest importance score to construct a hierarchical structure tree of diagnostic information;

[0013] The nodes in the hierarchical structure tree are mapped and aligned with the standard ICD code, a coarse-grained matching is performed on the top node to determine the main category of the ICD code, the main category is used as a constraint, a fine-grained recursive matching is performed on the child nodes, and the optimal ICD code sequence is calculated based on the hierarchical relationship and semantic similarity between the nodes;

[0014] Based on the attribute information and relationship information of the nodes in the hierarchical structure tree, a semantic supplement rule set is constructed, feature information is propagated between adjacent nodes through a message passing mechanism, and the propagated node features are used as semantic supplement features.

[0015] For the non-standard descriptions and ambiguous content in the medical summary text, a pre-trained language model is used for similarity matching to obtain the predicted standard codes including:

[0016] Based on a pre-acquired medical standard terminology knowledge base, the input medical condition summary text is segmented, and the semantic similarity scores of the word segments in the medical condition summary text and the standard descriptions in the medical standard terminology knowledge base are calculated. The word segments with semantic similarity scores lower than a preset similarity threshold are marked as non-standard descriptions, and the probability distribution entropy values ​​of the non-standard descriptions under multiple disease categories are calculated to determine the ambiguous content segments;

[0017] Using the pre-trained language model, the non-standard description is subjected to multi-granularity feature decomposition, multi-granularity feature vectors at the character level, word level, and sentence level are extracted, and the multi-granularity feature vectors are matched with standard terms through hierarchical similarity calculation;

[0018] The prediction probability of the candidate standard coding is calculated based on the matching relationship, and weighted in combination with the semantic similarity score to generate a confidence score for the candidate standard coding. The candidate standard coding with the highest confidence score is selected as the normalized expression of the non-standard description as the predicted standard coding.

[0019] Inputting the complete coding features into the inference engine of the pre-trained language model and generating an initial grouping path based on the preset DRG grouping rules includes:

[0020] Constructing a multi-layer DRG rule tree structure based on medical expert knowledge, mapping the grouping rule nodes in the DRG rule tree structure into rule vectors through a nonlinear activation function, weighting the rule vectors in combination with the attention weight distribution, and generating an inference vector that integrates attention information;

[0021] Based on the inference vector, the conditional transition probabilities between adjacent nodes in the DRG rule tree structure are calculated, the conditional transition probabilities of all nodes in the DRG rule tree structure are continuously multiplied to obtain the generation probability of the grouping path, and the semantic relevance between the nodes is evaluated by calculating the cosine similarity between the vector representations of each node in the grouping path;

[0022] The grouping path with the highest semantic relevance is taken as the optimal grouping path.

[0023] The encoding features are used as the state space, the initial grouping path is used as the action space, and a reward function is designed based on grouping accuracy, case similarity, and path complexity. The parameters of the pre-trained language model are iteratively updated through the proximal strategy optimization algorithm. The final DRG grouping results are output including:

[0024] Combining the encoding features, historical grouping information, and current context state to form a state space, using the initial grouping path as an action space, generating a mapping matrix between the state space and the action space, and constructing a state-action space, wherein the mapping matrix is ​​used to characterize the feasibility of state transition;

[0025] A set of standard cases is extracted from a medical database as a reference sample, and the characteristics of the reference sample are similarly calculated with the characteristics of the currently processed case to obtain a case similarity score. Based on the case similarity score, similarity weights are assigned to the grouping paths in the action space, and an accuracy score is calculated based on the degree of match between the predicted grouping results and the actual grouping labels;

[0026] Calculating a path complexity penalty term based on the length of the initial grouping path and a preset maximum allowable length, and combining the accuracy score, the case similarity score, and the path complexity penalty term to construct a comprehensive reward function, wherein the comprehensive reward function is used to evaluate the quality of each candidate grouping path;

[0027] Based on the product of the reward value corresponding to the comprehensive reward function and the preset learning rate as the gradient direction of the performance target, the parameters of the pre-trained language model are iteratively updated through the proximal policy optimization algorithm until the performance target converges, and the output result of the pre-trained language model after the parameter update is used as the final grouping result.

[0028] Based on the product of the reward value corresponding to the comprehensive reward function and the preset learning rate as the gradient direction of the performance target, the parameters of the pre-trained language model are iteratively updated through the proximal policy optimization algorithm, including:

[0029] The product of the reward value and a preset learning rate is constructed as a gradient optimization base value; the logarithmic gradient of the policy function is calculated based on the gradient optimization base value, the product of the logarithmic gradient and the gradient optimization base value is used as the optimization direction of the performance target, and the probability ratio of the corresponding action of the new policy function and the old policy function in the current state is calculated;

[0030] A first-order moment estimation is performed on the gradient of the new strategy function using a momentum accumulation method, a second-order moment estimation value is obtained by calculating the square of the gradient by exponential weighted average, and a parameter update step size is adaptively determined based on the ratio of the first-order moment estimation value to the second-order moment estimation value;

[0031] The change rate corresponding to the probability ratio between adjacent iterations is detected, and the iteration is stopped when the change rate is less than the preset change threshold for multiple consecutive times.

[0032] A second aspect of an embodiment of the present invention provides a DRG intelligent grouping system based on a large model, including:

[0033] The first unit is used to obtain the original natural language text from the patient's medical record homepage, discharge record, and medical history record, and convert the original natural language text into semantic code using optical character recognition technology; input the semantic code into a pre-trained language model, extract the main diagnosis information, surgical operation information, and complication information, and generate a structured medical summary text; perform multimodal matching processing based on the medical summary text, map the medical summary text to standard ICD code, and generate semantic supplementary features;

[0034] The second unit is used to perform similarity matching on the non-standard descriptions and ambiguous contents in the medical summary text using a pre-trained language model to obtain a predicted standard code, and fuse the predicted standard code with the standard ICD code and the semantic supplementary features to form a complete coding feature;

[0035] The third unit is used to input the complete coding features into the inference engine of the pre-trained language model, and generate an initial grouping path based on the preset DRG grouping rules.

[0036] The fourth unit is used to use the encoding features as the state space and the initial grouping path as the action space, design a reward function based on grouping accuracy, case similarity and path complexity, iteratively update the parameters of the pre-trained language model through the proximal strategy optimization algorithm, and output the final DRG grouping result.

[0037] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:

[0038] processor;

[0039] a memory for storing processor-executable instructions;

[0040] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0041] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0042] The beneficial effects of this application are as follows:

[0043] By introducing a large pre-trained language model to process raw medical text data, it is possible to effectively parse unstructured medical record content and achieve intelligent conversion from natural language to standard medical coding, greatly improving coding accuracy and efficiency and reducing the workload and error rate of manual coding.

[0044] The combination of multimodal matching and semantic supplementary features solves the problem of processing non-standard descriptions and ambiguous content in medical texts, improves the completeness and accuracy of information utilization in the grouping process, and makes the grouping results more in line with clinical actual conditions.

[0045] A reinforcement learning framework was introduced to optimize the grouping decision-making process. The model parameters were continuously updated through the proximal strategy optimization algorithm, which achieved adaptive optimization of the grouping path. While ensuring the grouping accuracy, it also took into account the case similarity and path complexity, thereby improving the overall intelligence level and practical value of the DRG grouping system. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 Schematic diagram of the process of the DRG intelligent grouping method based on the large model according to an embodiment of the present invention;

[0047] Figure 2 This is the DRG grouping system architecture diagram. DETAILED DESCRIPTION

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0049] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0050] Figure 1 Schematic diagram of the process of the DRG intelligent grouping method based on the large model according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0051] Obtain the original natural language text from the patient's medical record homepage, discharge record, and medical history record, and convert the original natural language text into semantic code using optical character recognition technology; input the semantic code into a pre-trained language model to extract the main diagnosis information, surgical operation information, and complication information, and generate a structured medical summary text; perform multimodal matching processing based on the medical summary text, map the medical summary text to standard ICD code, and generate semantic supplementary features;

[0052] For non-standard descriptions and ambiguous content in the medical summary text, a pre-trained language model is used to perform similarity matching to obtain a predicted standard code, and the predicted standard code is fused with the standard ICD code and the semantic supplementary features to form a complete coding feature;

[0053] Input the complete coding features into the inference engine of the pre-trained language model, and generate the initial grouping path based on the preset DRG grouping rules.

[0054] The encoding features are used as the state space, the initial grouping path is used as the action space, and a reward function is designed based on the grouping accuracy, case similarity and path complexity. The parameters of the pre-trained language model are iteratively updated through the proximal strategy optimization algorithm to output the final DRG grouping result.

[0055] In an optional embodiment, performing multimodal matching processing based on the medical summary text, mapping the medical summary text to standard ICD codes, and generating semantic supplementary features include:

[0056] Perform entity recognition and relationship extraction on the input medical summary text, semantically align the identified entity nodes with the nodes in the pre-built medical knowledge graph, and iteratively aggregate the features of adjacent nodes based on the graph clustering algorithm to generate an entity semantic embedding vector that integrates contextual information;

[0057] Perform path retrieval in the medical knowledge graph based on the entity semantic embedding vector, construct a set of reasoning paths based on the semantic type of the relationship edge, calculate the importance score of each reasoning path using the attention mechanism, and select the reasoning path with the highest importance score to construct a hierarchical structure tree of diagnostic information;

[0058] The nodes in the hierarchical structure tree are mapped and aligned with the standard ICD code, a coarse-grained matching is performed on the top node to determine the main category of the ICD code, the main category is used as a constraint, a fine-grained recursive matching is performed on the child nodes, and the optimal ICD code sequence is calculated based on the hierarchical relationship and semantic similarity between the nodes;

[0059] Based on the attribute information and relationship information of the nodes in the hierarchical structure tree, a semantic supplement rule set is constructed, feature information is propagated between adjacent nodes through a message passing mechanism, and the propagated node features are used as semantic supplement features.

[0060] This embodiment provides a method for performing multimodal matching processing based on medical summary text, which maps the medical summary text into standard ICD codes and generates semantic supplementary features.

[0061] In this implementation, entity recognition and relationship extraction are performed on the input medical summary text. For example, for the medical summary text "A 45-year-old male patient developed persistent headaches three days ago, accompanied by a fever of 38.5°C, a white blood cell count of 12.5×10^9 / L, and CT scan showing meningeal thickening," a pre-trained medical named entity recognition model is used to identify entities such as "headache," "fever," "38.5°C," "white blood cell count 12.5×10^9 / L," and "meningeal thickening." A relationship extraction model is then used to extract relationship triplets such as "fever-temperature value -38.5°C" and "white blood cell count value -12.5×10^9 / L." Entity recognition utilizes a deep learning model based on the BiLSTM-CRF architecture. Using word vectors trained on medical corpus as input, it combines character-level features with lexical features to annotate and extract medical entities from the text. Relationship extraction adopts a remote supervision method, using pre-defined medical relationship templates to match the text and determining the semantic relationship between entities through dependency syntactic analysis.

[0062] Semantically align the identified entity nodes with nodes in a pre-built medical knowledge graph. The medical knowledge graph contains entity types such as diseases, symptoms, tests, and medications, as well as the relationships between them. The semantic alignment process uses textual similarity calculations of entity names and matching evaluations of entity attributes to determine the optimal mapping node. For example, the "headache" entity is aligned with the "headache" node in the knowledge graph, which contains attribute information such as "symptom" type, severity, and duration. Semantic alignment uses a bidirectional attention network to interactively match entity text features with the text descriptions of knowledge graph nodes, calculate similarity scores, and select the node with the highest score as the mapping result.

[0063] Based on a graph clustering algorithm, features of adjacent nodes are iteratively aggregated, graph convolution operations are performed on the knowledge graph, and information from adjacent nodes is aggregated to a central node through a message passing mechanism. For example, the semantic representation of the "headache" node is enriched by iteratively aggregating information from its adjacent nodes, such as "fever" and "meningitis." Specifically, for each node v, feature information from its adjacent nodes u is aggregated, and the node representation is iteratively updated. The graph clustering algorithm utilizes a multi-layer graph convolutional network. The node feature update at each layer depends on the features and connectivity of adjacent nodes. After multiple rounds of iteration, node features fuse local structure and global semantic information, forming a context-enhanced entity semantic embedding vector.

[0064] Path retrieval is performed within the medical knowledge graph based on entity semantic embedding vectors. For identified symptom entities such as "headache," "fever," and "meningeal thickening," paths from these entity nodes to potential disease nodes are retrieved within the knowledge graph. Path retrieval employs a bidirectional search strategy, searching both the symptom node and the candidate disease node simultaneously to find the shortest path connecting them or the path with the highest semantic relevance.

[0065] Based on semantic embedding vectors, path retrieval is performed within the medical knowledge graph to construct a set of inference paths. This path retrieval employs a bidirectional search strategy, starting from the identified entity node and performing a breadth-first search along the edges of the knowledge graph, with a maximum search depth of three hops. During the search, paths are filtered based on edge relationship types and node categories to retain medically meaningful paths. For example, starting from the "headache" node, paths such as "headache-symptoms-migraine" and "headache-complications-fever" might be found.

[0066] For the retrieved path set, a multi-head self-attention mechanism is used to calculate the importance score of each path. This attention calculation considers the semantic representation of the nodes in the path, the node type and relationship type, and the path length. The attention weight reflects the importance of the path to the current diagnostic task. The paths are sorted by importance score, and the set of paths with the highest scores is selected to construct a hierarchical structure of diagnostic information. The root node of the structure is typically the primary disease or symptom, the child nodes are related medical concepts, and the edges represent the relationships between concepts. Based on the example above, the structure might include a root node of "infection" and child nodes of "headache," "fever," "elevated white blood cell count," and so on.

[0067] After the hierarchical structure tree is constructed, ICD code mapping is performed. First, a coarse-grained matching is performed on the top-level nodes of the structure tree to determine the primary categories of the ICD codes. Coarse-grained matching uses the semantic representation of the node and the representation of the ICD code category description to calculate similarity and select the category with the highest similarity. For example, the top-level node "infection" may match an infectious disease category in ICD-10. Using the matching primary category as a constraint, fine-grained recursive matching is performed on the child nodes. During the recursive matching process, the hierarchical relationship and semantic similarity between nodes are combined to gradually narrow the matching range. For each child node, its semantic similarity with all codes under the current category is calculated and weighted by considering the matching results of the parent node. Ultimately, an optimal ICD code sequence is generated, representing the standardized coding results of the condition summary.

[0068] To generate semantic supplementary features, the system constructs a set of semantic supplementary rules based on the attribute and relationship information of nodes in the hierarchical structure tree. Semantic supplementary rules define how to infer medically relevant information that is not explicitly mentioned from known information. Rules consist of a conditional part that describes the node combination that triggers the rule, and a conclusion part that describes the semantic information that needs to be supplemented. For example, a rule might define "If the 'persistent headache' and 'fever' nodes are present and occur at similar times, then supplement 'possibly an infectious disease'."

[0069] When applying semantic supplementation rules, the message passing mechanism within graph neural networks is used to propagate feature information between adjacent nodes. This message passing process consists of two phases: information collection and information update. In the information collection phase, a node obtains information from its neighbors and weights it based on the type of edge and the importance of the neighboring nodes. In the information update phase, the node integrates this collected information with its own features to generate an updated node representation. Through multiple rounds of message passing, the node representation incorporates information from multi-hop neighbors. These propagated node features are used as semantic supplementation features, which incorporate implicit information derived from medical knowledge reasoning.

[0070] In practice, for the input text "A 45-year-old male patient has experienced persistent headaches for the past two weeks, accompanied by a fever of 38.5°C, and a routine blood test showed an elevated white blood cell count," the system identifies relevant entities and relationships, constructs a hierarchical structure tree, and may map it to the ICD-10 code "A87.9" (viral meningitis). It also generates semantic supplementary features such as "likely a viral infection," "requires further cerebrospinal fluid examination," and "should consider differential diagnosis for bacterial meningitis." These supplementary features provide doctors with diagnostic recommendations and key clinical points to focus on.

[0071] In one specific implementation, reasoning paths such as "headache - is a symptom - meningitis," "fever - is a symptom - meningitis," and "meningeal thickening - is a sign - meningitis" are constructed. During the reasoning path construction process, the directionality and semantic type of the relationship edges are considered, with priority given to diagnostically meaningful relationship paths such as "symptom - disease" and "examination result - disease."

[0072] For each path, an attention weight is calculated based on path length, node importance, and relationship reliability. For example, given the two paths "elevated white blood cell count - suggests infection - possibly meningitis" and "thickening of the meninges - directly indicates meningitis," the latter path receives a higher importance score due to its shorter path and more direct relationship. The attention mechanism weights the paths by calculating the semantic relevance of each node and relationship in the path. The importance score calculation takes into account the specificity and sensitivity of the node in medical diagnosis.

[0073] The inference path with the highest importance score is selected to construct a hierarchical structure tree for the diagnostic information. For example, for the case above, a hierarchical structure tree is constructed with "meningitis" as the root node and "headache," "fever," "elevated white blood cell count," and "meningeal thickening" as child nodes. The hierarchical structure tree is constructed recursively, with the disease as the top node and symptoms, test results, and other items as child nodes, while preserving the semantic relationship types between the nodes.

[0074] Coarse-grained matching is used at the top level node to identify the primary category of the ICD code. For example, the "meningitis" node is matched to the "G00-G09 Inflammatory disorders of the central nervous system" category in the ICD-10. Coarse-grained matching uses a knowledge-based concept matching approach, leveraging a disease ontology dictionary to map top-level disease nodes to the primary category of the ICD code.

[0075] Using the primary category as a constraint, fine-grained recursive matching is performed within the child nodes. For example, within the "G00-G09" category, the specific code "G00.9 Bacterial Meningitis" is further matched based on child node features such as "meningeal Thickening" and "Elevated White Blood Cell Count." This fine-grained matching process utilizes a recursive decision tree structure. Based on the symptoms, signs, and examination results of the child nodes, the possible ICD codes are gradually narrowed down to the most specific code.

[0076] The optimal ICD code sequence is calculated based on the hierarchical relationships and semantic similarity between nodes. Complex cases may map to multiple ICD codes. The semantic match between each candidate code and the hierarchical structure is calculated and sorted to determine the optimal code sequence. For example, for the case described above, the resulting sequence is the primary diagnosis code "G00.9" and the secondary code "R50.9" (fever of unknown origin). The semantic match calculation comprehensively considers the semantic similarity of disease concepts, symptom coverage, and clinical relevance.

[0077] A set of semantic supplementation rules is constructed based on the attribute and relationship information of nodes in the hierarchical structure tree. For example, for the code "G00.9 Bacterial Meningitis," additional clinical decision-making recommendations such as "Need to identify the pathogen" and "Consider lumbar puncture." Semantic supplementation rules are constructed based on clinical pathways and treatment guidelines in the medical knowledge base, providing standardized supplementary information for specific ICD codes.

[0078] Feature information is propagated between adjacent nodes through message passing. Leveraging the propagation algorithm of graph neural networks, features of related nodes flow and merge within the hierarchical structure tree. For example, a "meningitis" node transmits information such as severity and treatment options to related symptom nodes, providing them with disease context. Message passing utilizes a gated update mechanism to control the direction and intensity of information flow, ensuring feature complementarity and enhancement between related nodes.

[0079] The propagated node features are used as semantic supplementary features. These features contain rich contextual information and medical knowledge, which can be used to support subsequent clinical decisions. For example, semantic supplementary information such as "This case presents with typical manifestations of bacterial meningitis. A lumbar puncture is recommended to identify the pathogen and administer antibiotics" can be generated. Semantic supplementary features are stored in a structured format and contain clinically relevant information such as disease severity, treatment recommendations, and follow-up points, providing auxiliary decision support for doctors.

[0080] In an optional embodiment, for non-standard descriptions and ambiguous content in the medical summary text, similarity matching is performed using a pre-trained language model to obtain a predicted standard code including:

[0081] Based on a pre-acquired medical standard terminology knowledge base, the input medical condition summary text is segmented, and the semantic similarity scores of the word segments in the medical condition summary text and the standard descriptions in the medical standard terminology knowledge base are calculated. The word segments with semantic similarity scores lower than a preset similarity threshold are marked as non-standard descriptions, and the probability distribution entropy values ​​of the non-standard descriptions under multiple disease categories are calculated to determine the ambiguous content segments;

[0082] Using the pre-trained language model, the non-standard description is subjected to multi-granularity feature decomposition, multi-granularity feature vectors at the character level, word level, and sentence level are extracted, and the multi-granularity feature vectors are matched with standard terms through hierarchical similarity calculation;

[0083] The prediction probability of the candidate standard coding is calculated based on the matching relationship, and weighted in combination with the semantic similarity score to generate a confidence score for the candidate standard coding. The candidate standard coding with the highest confidence score is selected as the normalized expression of the non-standard description as the predicted standard coding.

[0084] The implementation of the present invention requires the pre-construction of a medical standard terminology knowledge base, which contains standard medical terms and corresponding ICD codes. The knowledge base structure is in the form of key-value pairs, where the key is the standard term and the value is a data structure containing information such as ICD codes, term descriptions, and synonym sets. The knowledge base is constructed by integrating multiple medical terminology systems, including international disease classification standards such as ICD-10 and ICD-11, as well as various specialist disease terminology sets. Each standard term in the knowledge base is pre-calculated and its vector representation is stored to facilitate semantic similarity calculation.

[0085] When processing the input medical summary text, the system first performs word segmentation using a medical-specific word segmenter that combines dictionary matching and statistical models to identify medical terminology. The word segmentation process retains word position information to facilitate the subsequent location of non-standard descriptions. For example, the patient's medical summary, "The patient recently experienced chest tightness and shortness of breath, paroxysmal dyspnea at night, accompanied by coughing up pink, foamy sputum, edema in both lower limbs, and heart failure," yields the following word segmentation result: "The patient recently experienced chest tightness and shortness of breath, paroxysmal dyspnea at night, coughing up pink, foamy sputum, edema in both lower limbs, and heart failure."

[0086] After word segmentation, a semantic similarity score is calculated for each word segment in the segmentation results and the standard description in the medical standard terminology knowledge base. This semantic similarity calculation uses a two-step approach: the first step uses the edit distance algorithm to calculate character-level similarity to quickly screen potential matches; the second step uses a pre-trained medical domain word vector model to calculate semantic similarity. For each word segment, the top K most similar standard terms are retrieved from the knowledge base and a semantic similarity score is calculated. The semantic similarity score is calculated by taking into account the cosine similarity and contextual relevance of the word vectors, and the final score is obtained through a weighted average.

[0087] A similarity threshold of 0.75 is set, and word segments with semantic similarity scores below this threshold are marked as non-standard descriptions. In this example, the segment "pink foamy sputum" might be marked as a non-standard description because it has no exact matching standard term in the knowledge base and a similarity score of 0.68, which is below the threshold of 0.75.

[0088] For the marked non-standard descriptions, the probability distribution entropy values ​​under multiple disease categories are calculated to determine whether there is ambiguity. The calculation of the probability distribution entropy value is based on the association strength between the non-standard description and each disease category. The association strength is calculated by calculating the similarity between the non-standard description and the standard terms related to the disease category. The similarity is converted into a probability distribution and the entropy value is calculated. The higher the entropy value, the more evenly the non-standard description is distributed among multiple disease categories and the higher the degree of ambiguity. The entropy threshold is set to 1.5, and the content segment with an entropy value exceeding the threshold is determined to be ambiguous content. In the example, the entropy value of "pink foamy sputum" is calculated to be 1.8, which exceeds the threshold and is determined to be an ambiguous content segment.

[0089] For non-standard descriptions and ambiguous content in tags, a pre-trained language model is used to perform multi-granular feature decomposition. The pre-trained language model uses a bidirectional encoder based on the Transformer architecture. This model is pre-trained on a large-scale medical text corpus and has rich medical knowledge understanding capabilities. Multi-granular feature decomposition includes three levels:

[0090] Character-level feature extraction uses a character embedding layer to obtain a representation for each character and a convolutional neural network to capture local character-level features. For the example of "pink foamy sputum," the character-level features capture the characteristic patterns of character combinations such as "pink," "foamy," and "sputum."

[0091] Word-level feature extraction uses word segmentation results to obtain word representations and uses a bidirectional long short-term memory network to capture inter-word dependencies. Word-level features can identify the boundaries and combinations of medical terms, such as identifying "pink frothy sputum" as a medical expression describing a specific symptom.

[0092] Sentence-level feature extraction uses a self-attention mechanism to compute contextual representations of the entire sentence, capturing long-range dependencies. Sentence-level features can understand the context of symptom descriptions within the entire medical summary. For example, linking "pink, frothy sputum" with the preceding "chest tightness and shortness of breath" and "nocturnal paroxysmal dyspnea" can help identify symptoms that may indicate pulmonary edema.

[0093] After extracting multi-granularity feature vectors, a hierarchical similarity calculation is used to establish a matching relationship with the standard term. This hierarchical similarity calculation considers the importance of features at different granularities and employs an attention mechanism for weighted fusion. First, the character-level matching between the features and the standard term is calculated. Next, the semantic similarity between the word-level features and the standard term is calculated. Finally, the thematic consistency between the sentence-level features and the context of the standard term is calculated. These three levels of similarity are fused using attention weights to produce a composite similarity score.

[0094] For the example term "pink foamy sputum," the system searches the knowledge base for semantically similar standard terms. Using a hierarchical similarity calculation, it finds candidate standard terms such as "bloody foamy sputum" and "pink foamy sputum." Among them, "pink foamy sputum," which is related to "pulmonary edema," achieves a high overall similarity score of 0.89.

[0095] Based on the matching relationships, the predicted probability of the candidate standard code is calculated. This calculation considers multiple factors: the overall similarity between the non-standard description and the candidate standard term, the frequency of use of the candidate standard term, the contextual information of the non-standard description in the text, and the ability of the pre-trained language model to understand medical semantics. The predicted probability uses a softmax function to convert the similarity into a probability distribution, representing the likelihood of each candidate standard code.

[0096] The predicted probability and semantic similarity score are weighted to generate a confidence score for the candidate standard encoding. This weighting is performed using a linear combination, with the weight coefficients optimized using a validation set. The confidence score reflects the system's confidence in the standardization result, ranging from 0 to 1, with values ​​closer to 1 indicating greater confidence.

[0097] In the example, for the non-standard description of "pink foamy sputum", the system may generate multiple candidate standard codes, including "R09.3" (abnormal sputum), "R06.1" (wheezing), etc., but based on contextual information and symptom combination patterns, the system calculates the confidence score of "pink foamy sputum in pulmonary edema" (corresponding to the ICD-10 code "J81") as 0.92, which is significantly higher than other candidate codes.

[0098] The candidate standard code with the highest confidence score is selected as the normalized representation of the non-standard description. In this example, the system normalizes "pink frothy sputum" to "pink frothy sputum" and assigns the ICD-10 code "J81." The system also records the confidence score during the normalization process, providing a reference for manual review if necessary.

[0099] For the entire medical summary text, the system processes each non-standard description and ambiguous content one by one, generating the corresponding standardized expression and ICD code. The final output includes the standardized medical description and the corresponding standard code sequence. For the example medical summary, the complete processing result might be: "The patient has recently experienced chest tightness and shortness of breath (R07.4), paroxysmal nocturnal dyspnea (R06.0), accompanied by pink frothy sputum (J81), and bilateral lower extremity edema (R60.0). Heart failure (I50.9) is considered."

[0100] Through the above technical solution, the present invention realizes the accurate identification and standardized processing of non-standard descriptions and ambiguous contents in the medical summary text, improves the standardization and consistency of medical text, and provides a reliable data foundation for subsequent medical data analysis and intelligent diagnosis.

[0101] In an optional embodiment, inputting the complete encoding features into the inference engine of the pre-trained language model, and generating an initial grouping path based on a preset DRG grouping rule includes:

[0102] Constructing a multi-layer DRG rule tree structure based on medical expert knowledge, mapping the grouping rule nodes in the DRG rule tree structure into rule vectors through a nonlinear activation function, weighting the rule vectors in combination with the attention weight distribution, and generating an inference vector that integrates attention information;

[0103] Based on the inference vector, the conditional transition probabilities between adjacent nodes in the DRG rule tree structure are calculated, the conditional transition probabilities of all nodes in the DRG rule tree structure are continuously multiplied to obtain the generation probability of the grouping path, and the semantic relevance between the nodes is evaluated by calculating the cosine similarity between the vector representations of each node in the grouping path;

[0104] The grouping path with the highest semantic relevance is taken as the optimal grouping path.

[0105] In practice, the system first constructs a multi-layered DRG rule tree structure. This structure, based on the knowledge of medical experts, organizes DRG grouping rules in a hierarchical manner. For example, for respiratory diseases, a four-layer rule tree can be constructed: the first layer is the main diagnostic category (MDC), which includes respiratory diseases; the second layer is whether a surgical procedure has been performed; the third layer is whether there are complications or comorbidities; and the fourth layer is age groups. Each node represents a rule, such as "the main diagnosis is J44.900 (chronic obstructive pulmonary disease)" or "the surgical procedure Y83.802 (tracheotomy) has been performed."

[0106] After the rule tree is constructed, the system maps each rule node into a rule vector using a nonlinear activation function. In implementation, each rule text is first segmented. For example, "The main diagnosis is chronic obstructive pulmonary disease" is segmented into ["main", "diagnosis", "for", "chronic", "obstructive", "pulmonary disease"]. The segmentation results are then extracted using a pre-trained language model to obtain an initial vector representation with a dimension of 768. The hyperbolic tangent function (tanh) is then used as a nonlinear activation function to map the initial vector to the interval [-1, 1], enhancing the expressive power of the rule representation. For example, for the rule "The main diagnosis is J44.900", the initial vector [0.23, 0.45, -0.12, ..., 0.67] is processed with the tanh function to [0.22, 0.42, -0.12, ..., 0.59].

[0107] To highlight important rules, the system uses an attention mechanism to calculate the weights of rule vectors. Attention weights are determined based on the degree of match between the current case's features and the rules. For example, for a patient with a primary diagnosis of chronic obstructive pulmonary disease and a tracheotomy, the system calculates the correlation between their feature vector and each rule vector. Assuming the attention weight for "Primary diagnosis J44.900" is 0.75, and the weight for "Surgical procedure Y83.802 present" is 0.82, while other rules have lower weights, the system prioritizes these two rules. Based on the calculated attention weights, the rule vectors are weighted and summed to generate an inference vector that incorporates the attention information.

[0108] After generating the inference vector, the system calculates the conditional transition probabilities between adjacent nodes in the rule tree. Conditional transition probabilities indicate the likelihood that the next rule will hold given the current rule holds. This probability is calculated by taking the dot product of the inference vector and the rule vector of the adjacent node, followed by softmax normalization. For example, if the conditional transition probability from the "Main diagnosis is respiratory disease" node to the "Surgical procedure performed" node is 0.85, it indicates that there is a high probability that the patient will require surgical considerations for grouping.

[0109] By continuously multiplying the conditional transition probabilities between nodes, the system obtains the probability of each possible grouping path. For example, the probability of the path "respiratory disease → surgical procedure → complications → adult patient → DRG group A" is 0.85 × 0.78 × 0.92 × 0.95 = 0.59, while the probability of the path "respiratory disease → surgical procedure → no complications → adult patient → DRG group B" is 0.85 × 0.78 × 0.08 × 0.95 = 0.05.

[0110] In addition to generating probabilities, the system also evaluates the semantic relevance between nodes in the grouping path. The strength of the semantic association between nodes is quantified by calculating the cosine similarity between the vector representations of adjacent nodes. A cosine similarity value closer to 1 indicates a stronger semantic association. For example, the cosine similarity between the node vectors for "chronic obstructive pulmonary disease" and "respiratory system diseases" is 0.92, indicating a strong correlation; whereas the similarity with "digestive system diseases" is only 0.15, indicating a weak correlation.

[0111] Ultimately, the system selects the optimal grouping path by comprehensively considering the probability of generating a grouping path and the semantic relevance between nodes. For the example above, the path "Respiratory disease → Surgical procedure → Complications → Adult patient → DRG group A" not only has a high generation probability but also boasts an average semantic similarity of 0.88 between nodes, significantly outperforming other paths. Therefore, it was selected as the optimal grouping path.

[0112] In a real-world clinical case, this method was successfully applied to a 65-year-old male patient diagnosed with chronic obstructive pulmonary disease with acute exacerbation (J44.101), who had undergone a tracheotomy (96.0) and presented with type II respiratory failure (J96.100). Using this method, the system identified the optimal grouping path as "MDC05 (respiratory disease) → surgical procedure → complications → adult patient → E01," which is consistent with the expert grouping results, demonstrating the accuracy and practical value of this method.

[0113] In an optional embodiment, the encoding features are used as the state space, the initial grouping path is used as the action space, a reward function is designed based on grouping accuracy, case similarity, and path complexity, and the parameters of the pre-trained language model are iteratively updated through a proximal strategy optimization algorithm. The final DRG grouping result is output including:

[0114] Combining the encoding features, historical grouping information, and current context state to form a state space, using the initial grouping path as an action space, generating a mapping matrix between the state space and the action space, and constructing a state-action space, wherein the mapping matrix is ​​used to characterize the feasibility of state transition;

[0115] A set of standard cases is extracted from a medical database as a reference sample, and the characteristics of the reference sample are similarly calculated with the characteristics of the currently processed case to obtain a case similarity score. Based on the case similarity score, similarity weights are assigned to the grouping paths in the action space, and an accuracy score is calculated based on the degree of match between the predicted grouping results and the actual grouping labels;

[0116] Calculating a path complexity penalty term based on the length of the initial grouping path and a preset maximum allowable length, and combining the accuracy score, the case similarity score, and the path complexity penalty term to construct a comprehensive reward function, wherein the comprehensive reward function is used to evaluate the quality of each candidate grouping path;

[0117] Based on the product of the reward value corresponding to the comprehensive reward function and the preset learning rate as the gradient direction of the performance target, the parameters of the pre-trained language model are iteratively updated through the proximal policy optimization algorithm until the performance target converges, and the output result of the pre-trained language model after the parameter update is used as the final grouping result.

[0118] This embodiment provides a DRG grouping method based on a pre-trained language large model. The method optimizes the pre-trained language model parameters through reinforcement learning technology to achieve high-accuracy DRG grouping.

[0119] In its implementation, the system first constructs a state-action space. It combines coded features, historical grouping information, and the current context state to form a state space S. Coded features include basic patient information, primary diagnosis code, secondary diagnosis code, surgical procedure code, and comorbidity code. Historical grouping information includes the grouping paths and outcomes of previously processed similar cases. The context state records the decision steps executed during the current grouping process. The system sets the initial grouping path as the action space A, where each action represents a possible grouping decision path. The system then generates a mapping matrix M between the state space and the action space. Matrix elements M(s,a) represent the feasibility of taking action a in state s, with a value of 0 indicating infeasibility and a value of 1 indicating feasibility. For example, if the patient's primary diagnosis is "I21.0" (anterior wall acute myocardial infarction), the element corresponding to the grouping path associated with the cardiovascular system in the mapping matrix is ​​1, while the element corresponding to the grouping path associated with the digestive system is 0.

[0120] The system then designs a comprehensive reward function. It extracts a reference sample set P, consisting of 5,000 standard cases, from a medical database. For the currently processed case c, the system calculates its feature similarity with each case p in the reference sample set. Feature similarity is calculated based on the degree of matching of coded features. For example, a current case with a diagnosis code of "I21.0" might have a similarity of 0.85 with a reference case with a diagnosis code of "I21.1" (inferior wall acute myocardial infarction), while its similarity with a reference case with a diagnosis code of "K35.2" (acute appendicitis) might be only 0.12. Based on this calculated case similarity, the system assigns a similarity weight W_sim to the grouping paths in the action space. For example, if 80% of similar cases in the reference sample fall into the cardiovascular disease DRG group, the corresponding grouping path will receive a higher similarity weight of 0.8.

[0121] The system calculates an accuracy score, Acc, which measures how closely the predicted grouping matches the true grouping label. For example, if the model predicts the DRG group to be "F43" (heart failure) and the true label is "F43," the accuracy score is 1.0. If the prediction is "F41" (acute myocardial infarction with heart failure), which is different from the true label but within the same system, the accuracy score might be 0.7.

[0122] The system calculates a path complexity penalty, C_path. If the group path length is L and the maximum allowed length is L_max (e.g., 10), then the path complexity penalty, C_path, is the ratio of L to L_max, encouraging the model to choose simpler group paths. For example, the complexity penalty for a group path of length 3 is 0.3, while the complexity penalty for a group path of length 8 is 0.8.

[0123] The system combines the accuracy score Acc, the case similarity score W_sim, and the path complexity penalty C_path to construct a comprehensive reward function R, where the accuracy score is weighted by 0.6, the similarity score is weighted by 0.3, and the complexity penalty is weighted by 0.1. For a specific case, if the accuracy score is 0.9, the similarity score is 0.8, and the complexity penalty is 0.4, the comprehensive reward value is 0.9 × 0.6 + 0.8 × 0.3 - 0.4 × 0.1 = 0.74.

[0124] The system uses a proximal policy optimization algorithm to update the parameters of the pre-trained language model. The system uses the product of the reward value of the comprehensive reward function and the preset learning rate of 0.001 as the gradient direction of the performance target. The system selects 100 case batches for training in each iteration and updates the model parameters θ. In a typical update, the system may adjust parameters such as attention weights and feedforward neural network weights. For example, the weight of a particular attention head may be adjusted from [0.12, 0.28, 0.15, 0.45] to [0.14, 0.27, 0.16, 0.43]. The system iterates training for 500 rounds until the rate of change of the performance objective function value falls below the preset threshold of 0.001, indicating that the model has converged.

[0125] After parameter updates, the pre-trained language model will generate the final DRG grouping results. For example, consider a real-world case: a 65-year-old male patient with a primary diagnosis of "I21.0," a secondary diagnosis of "I50.9" (heart failure), a surgical procedure of "00.66" (percutaneous coronary intervention), and a comorbidity of "E11.9" (type 2 diabetes). The optimized model might output a grouping of "F41" (acute myocardial infarction with heart failure) with a grouping confidence of 0.92, which aligns with the standard grouping determined by medical experts.

[0126] Through the above-mentioned technical implementation, the DRG grouping method based on the pre-trained language large model provided in this embodiment can effectively utilize case similarity and grouping accuracy information, optimize model parameters through reinforcement learning, achieve high-accuracy automated DRG grouping, reduce the workload of medical coders, and improve grouping efficiency and accuracy.

[0127] In an optional embodiment, based on the product of the reward value corresponding to the comprehensive reward function and the preset learning rate as the gradient direction of the performance target, iteratively updating the parameters of the pre-trained language model through the proximal policy optimization algorithm includes:

[0128] The product of the reward value and a preset learning rate is constructed as a gradient optimization base value; the logarithmic gradient of the policy function is calculated based on the gradient optimization base value, the product of the logarithmic gradient and the gradient optimization base value is used as the optimization direction of the performance target, and the probability ratio of the corresponding action of the new policy function and the old policy function in the current state is calculated;

[0129] A first-order moment estimation is performed on the gradient of the new strategy function using a momentum accumulation method, a second-order moment estimation value is obtained by calculating the square of the gradient by exponential weighted average, and a parameter update step size is adaptively determined based on the ratio of the first-order moment estimation value to the second-order moment estimation value;

[0130] The change rate corresponding to the probability ratio between adjacent iterations is detected, and the iteration is stopped when the change rate is less than the preset change threshold for multiple consecutive times.

[0131] This embodiment provides a technical solution for optimizing the parameters of a large pre-trained language model. This solution achieves efficient iterative updating of model parameters by combining a proximal policy optimization algorithm with a comprehensive reward function.

[0132] During implementation, a comprehensive reward function must first be constructed. This reward function can incorporate multiple evaluation dimensions. For example, in text generation tasks, it can include semantic relevance, logical coherence, and expressive fluency. Semantic relevance is measured by calculating the similarity between the word vectors of the generated text and the reference text, with a value ranging from 0 to 1. Logical coherence is assessed by testing the consistency of key entities and events in the generated text, with a value of 1 for complete consistency and 0 for complete inconsistency. Expressive fluency is measured by calculating the average word probability of the text using a language model, with higher probabilities indicating better fluency. These three dimensions can be combined with a weighting of 0.4:0.3:0.3 to form a comprehensive reward value. In a practical application, if the scores of the three dimensions for a generated output are 0.8, 0.7, and 0.9, respectively, the comprehensive reward value is 0.8 × 0.4 + 0.7 × 0.3 + 0.9 × 0.3 = 0.8.

[0133] After obtaining the comprehensive reward value, it is multiplied by the preset learning rate to construct the gradient optimization base value. In this example, an adaptive learning rate mechanism is used, with the initial learning rate set to 0.0005. For the above example, the gradient optimization base value is 0.8 × 0.0005 = 0.0004. This value will serve as the basis for subsequent gradient calculations and directly influence the direction and magnitude of parameter updates.

[0134] Next, the logarithmic gradient of the policy function is calculated. In a language model, the policy function represents the probability distribution for generating a specific word sequence. Suppose the input prompt is "The future development direction of artificial intelligence," and the model generates the response "Artificial intelligence will develop towards greater intelligence, personalization, and universalization." For this output sequence, the predicted probability of each word at each position is first calculated. For example, given the previous context, the predicted probability of the word "intelligent" is 0.15, the predicted probability of the word "personalized" is 0.08, and the predicted probability of the word "universal" is 0.05. Taking the logarithm of these probabilities yields logarithmic probabilities of -1.897, -2.526, and -2.996, respectively. The logarithmic probabilities of all positions are summed to obtain the logarithmic probability of the entire sequence. The gradient of this value with respect to the model parameters is then calculated to obtain the logarithmic gradient.

[0135] After the logarithmic gradient is calculated, it is multiplied by the gradient optimization base value to obtain the optimization direction for the performance target. For a model with 1 billion parameters, its gradient is a vector with 1 billion dimensions. Taking the weight matrix of a layer in the model as an example, assuming that the logarithmic gradient values ​​of four key parameters are [0.5, -0.3, 0.2, -0.4], the optimization direction is [0.5×0.0004, -0.3×0.0004, 0.2×0.0004, -0.4×0.0004], or [0.0002, -0.00012, 0.00008, -0.00016].

[0136] During the parameter update process, it's necessary to calculate the probability ratio of the actions corresponding to the new policy function and the old policy function in the current state. This step corresponds to calculating the probability ratio of generating the same output sequence before and after the model parameter update. For example, if the probability of the model generating the above example answer before the parameter update was 0.012 and after the parameter update was 0.015, the probability ratio would be 0.015 / 0.012 = 1.25. The core idea of ​​the proximal policy optimization algorithm is to limit the range of variation of this ratio to prevent excessive policy updates from causing training instability.

[0137] To achieve stable and efficient parameter updates, this embodiment uses momentum accumulation to estimate the first-order moment of the gradient of the new policy function. Specifically, the exponential moving average is calculated using the parameter β1 = 0.9. Assuming that in the tth iteration, the current gradient of a parameter is 0.0002 and the first-order moment estimate of the previous iteration is 0.00015, the updated first-order moment estimate is 0.00015 × 0.9 + 0.0002 × 0.1 = 0.000165. Similar operations are performed for each parameter in the model to obtain a complete first-order moment estimate vector.

[0138] At the same time, the second-order moment estimate is calculated by exponentially weighted averaging the squared gradient, using a parameter of β² = 0.999. For the same parameters mentioned above, if the current gradient is 0.0002, the squared gradient is 0.00000004, and the second-order moment estimate from the previous iteration is 0.00000005, then the updated second-order moment estimate is 0.00000005 × 0.999 + 0.00000004 × 0.001 = 0.00000004996. This calculation process is also applied to all parameters of the model.

[0139] The parameter update step size is adaptively determined based on the ratio of the first-order moment estimate to the second-order moment estimate. Specifically, the parameter update step size is equal to the learning rate multiplied by the first-order moment estimate divided by the square root of the second-order moment estimate, plus a small constant ε (typically set to 0.00000001). Taking the above parameters as an example, the update step size is 0.0005×0.000165 / √(0.00000004996+0.00000001)=0.0005×0.000165 / 0.000237=0.348. Ultimately, the updated value of this parameter is the original value minus 0.348×0.000165=0.0000574. This adaptive step size adjustment mechanism allows parameter updates to have different rates in different directions, effectively improving optimization efficiency.

[0140] During the iteration process, it is necessary to continuously monitor the rate of change of the probability ratio between consecutive iterations. For example, if the probability ratios for three consecutive iterations are 1.25, 1.26, and 1.265, respectively, then the rates of change between consecutive iterations are 0.8% and 0.4%, respectively. In this embodiment, the change threshold is set to 0.005, or 0.5%. When the rate of change for six consecutive iterations is less than this threshold, the model parameters are considered to have converged to the local optimum, and the iteration process is terminated.

[0141] In practice, this method can be applied to a variety of language processing tasks. Taking machine translation as an example, the original pre-trained model achieved a BLEU score of 32.5 on a general translation test set. After 200 rounds of iterative optimization, the BLEU score increased to 36.8, significantly improving translation quality. During the optimization process, the probability ratio changed significantly in the first 50 rounds, with an average change of 2.3%. This rate of change dropped to an average of 0.8% between rounds 50 and 150, and further dropped to an average of 0.3% in the final 50 rounds. Iterations were ultimately terminated after six consecutive rounds of the probability ratio were below the threshold.

[0142] Another application case is dialogue system optimization. The pre-trained model achieved an initial answer accuracy of 78.2% on a customer service dialogue dataset, with a user satisfaction score of 3.6 out of 5. After applying this optimization method, the model's answer accuracy increased to 85.7%, and the user satisfaction score rose to 4.2. During the optimization process, the comprehensive reward function incorporated three dimensions: answer accuracy, answer completeness, and language naturalness, with weights of 0.5, 0.3, and 0.2, respectively. The entire optimization process involved 320 iterations, processing a total of 150,000 dialogue samples, and ultimately stopped due to meeting the convergence criteria.

[0143] Content summarization is another typical application scenario. For the news summarization task, the original model achieved Rouge-1, Rouge-2, and Rouge-L metrics of 0.41, 0.19, and 0.38, respectively. After optimization using this method, these metrics improved to 0.45, 0.22, and 0.41, respectively. The optimization process used a comprehensive reward function that combined relevance, information content, and conciseness. The total number of iterations was 280, processing 100,000 samples. During the iterations, the average update amplitude of the model parameters gradually decreased from an initial 0.000127 to a final 0.000023, indicating that the parameters were gradually stabilizing.

[0144] This implementation uses a comprehensive reward function to guide the iterative update of the parameters of a large pre-trained language model. Combined with a proximal policy optimization algorithm and an adaptive learning rate adjustment mechanism, this approach achieves efficient optimization of the model for specific tasks. This approach avoids the high variance issues inherent in traditional reinforcement learning methods while maintaining the stability of the optimization process, demonstrating significant performance improvements across a variety of natural language processing tasks.

[0145] Figure 2 This is the DRG grouping system architecture diagram, such as Figure 2 As shown in Figure 2, DRG (Diagnosis Related Group) is a method for classifying cases based on clinical characteristics and resource consumption similarities. Its core grouping logic is as follows:

[0146] The system takes the case as the starting point and conducts a preliminary classification based on the main diagnostic information to form the main diagnostic categories. At this level, the system mainly determines the basic attributes and severity of the disease based on the patient's main diagnosis. Secondly, based on the main diagnostic categories and combined with the main surgical operation information, the system divides the cases into three main ADRGs (adjacent diagnosis-related groups): internal medicine ADRG, non-operating room operation ADRG and surgical ADRG. This classification fully takes into account the differences in diagnosis and treatment methods. The system will further consider other individual characteristics of the case, including factors such as age, complications and the severity of complications, and group each ADRG more finely, ultimately forming specific DRG groups.

[0147] Throughout the grouping process, the system adopted the principle of "clinical experience as the primary focus, supplemented by statistical analysis." This multi-level, multi-dimensional grouping approach ensures scientific and accurate grouping while also reflecting the complexity and individualized nature of medical services.

[0148] The DRG intelligent grouping system based on the large model in the embodiment of the present invention includes:

[0149] The first unit is used to obtain the original natural language text from the patient's medical record homepage, discharge record, and medical history record, and convert the original natural language text into semantic code using optical character recognition technology; input the semantic code into a pre-trained language model, extract the main diagnosis information, surgical operation information, and complication information, and generate a structured medical summary text; perform multimodal matching processing based on the medical summary text, map the medical summary text to standard ICD code, and generate semantic supplementary features;

[0150] The second unit is used to perform similarity matching on the non-standard descriptions and ambiguous contents in the medical summary text using a pre-trained language model to obtain a predicted standard code, and fuse the predicted standard code with the standard ICD code and the semantic supplementary features to form a complete coding feature;

[0151] The third unit is used to input the complete coding features into the inference engine of the pre-trained language model, and generate an initial grouping path based on the preset DRG grouping rules.

[0152] The fourth unit is used to use the encoding features as the state space and the initial grouping path as the action space, design a reward function based on grouping accuracy, case similarity and path complexity, iteratively update the parameters of the pre-trained language model through the proximal strategy optimization algorithm, and output the final DRG grouping result.

[0153] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:

[0154] processor;

[0155] a memory for storing processor-executable instructions;

[0156] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0157] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0158] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A DRG intelligent grouping method based on a large model, characterized by: include: Obtain the original natural language text from the patient's medical record homepage, discharge record, and medical history record, and convert the original natural language text into semantic code using optical character recognition technology; input the semantic code into a pre-trained language model to extract the main diagnosis information, surgical operation information, and complication information, and generate a structured medical summary text; perform multimodal matching processing based on the medical summary text, map the medical summary text to standard ICD code, and generate semantic supplementary features; For non-standard descriptions and ambiguous content in the medical summary text, a pre-trained language model is used to perform similarity matching to obtain a predicted standard code, and the predicted standard code is fused with the standard ICD code and the semantic supplementary features to form a complete coding feature; Input the complete coding features into the inference engine of the pre-trained language model, and generate the initial grouping path based on the preset DRG grouping rules. The encoding features are used as the state space, the initial grouping path is used as the action space, and a reward function is designed based on the grouping accuracy, case similarity and path complexity. The parameters of the pre-trained language model are iteratively updated through the proximal strategy optimization algorithm to output the final DRG grouping result.

2. The method according to claim 1, characterized in that Multimodal matching is performed based on the medical summary text to map the medical summary text into standard ICD codes, and semantic supplementary features are generated at the same time, including: Perform entity recognition and relationship extraction on the input medical summary text, semantically align the identified entity nodes with the nodes in the pre-built medical knowledge graph, and iteratively aggregate the features of adjacent nodes based on the graph clustering algorithm to generate an entity semantic embedding vector that integrates contextual information; Perform path retrieval in the medical knowledge graph based on the entity semantic embedding vector, construct a set of reasoning paths based on the semantic type of the relationship edge, calculate the importance score of each reasoning path using the attention mechanism, and select the reasoning path with the highest importance score to construct a hierarchical structure tree of diagnostic information; The nodes in the hierarchical structure tree are mapped and aligned with the standard ICD code, a coarse-grained matching is performed on the top node to determine the main category of the ICD code, the main category is used as a constraint, a fine-grained recursive matching is performed on the child nodes, and the optimal ICD code sequence is calculated based on the hierarchical relationship and semantic similarity between the nodes; Based on the attribute information and relationship information of the nodes in the hierarchical structure tree, a semantic supplement rule set is constructed, feature information is propagated between adjacent nodes through a message passing mechanism, and the propagated node features are used as semantic supplement features.

3. The method according to claim 1, characterized in that For the non-standard descriptions and ambiguous content in the medical summary text, a pre-trained language model is used for similarity matching to obtain the predicted standard codes including: Based on a pre-acquired medical standard terminology knowledge base, the input medical condition summary text is segmented, and the semantic similarity scores of the word segments in the medical condition summary text and the standard descriptions in the medical standard terminology knowledge base are calculated. The word segments with semantic similarity scores lower than a preset similarity threshold are marked as non-standard descriptions, and the probability distribution entropy values ​​of the non-standard descriptions under multiple disease categories are calculated to determine the ambiguous content segments; Using the pre-trained language model, the non-standard description is subjected to multi-granularity feature decomposition, multi-granularity feature vectors at the character level, word level, and sentence level are extracted, and the multi-granularity feature vectors are matched with standard terms through hierarchical similarity calculation; The prediction probability of the candidate standard coding is calculated based on the matching relationship, and weighted in combination with the semantic similarity score to generate a confidence score for the candidate standard coding. The candidate standard coding with the highest confidence score is selected as the normalized expression of the non-standard description as the predicted standard coding.

4. The method according to claim 1, wherein Inputting the complete coding features into the inference engine of the pre-trained language model and generating an initial grouping path based on the preset DRG grouping rules includes: Constructing a multi-layer DRG rule tree structure based on medical expert knowledge, mapping the grouping rule nodes in the DRG rule tree structure into rule vectors through a nonlinear activation function, weighting the rule vectors in combination with the attention weight distribution, and generating an inference vector that integrates attention information; Based on the inference vector, the conditional transition probabilities between adjacent nodes in the DRG rule tree structure are calculated, the conditional transition probabilities of all nodes in the DRG rule tree structure are continuously multiplied to obtain the generation probability of the grouping path, and the semantic relevance between the nodes is evaluated by calculating the cosine similarity between the vector representations of each node in the grouping path; The grouping path with the highest semantic relevance is taken as the optimal grouping path.

5. The method according to claim 1, wherein The encoding features are used as the state space, the initial grouping path is used as the action space, and a reward function is designed based on grouping accuracy, case similarity, and path complexity. The parameters of the pre-trained language model are iteratively updated through the proximal strategy optimization algorithm. The final DRG grouping results are output including: Combining the encoding features, historical grouping information, and current context state to form a state space, using the initial grouping path as an action space, generating a mapping matrix between the state space and the action space, and constructing a state-action space, wherein the mapping matrix is ​​used to characterize the feasibility of state transition; A set of standard cases is extracted from a medical database as a reference sample, and the characteristics of the reference sample are similarly calculated with the characteristics of the currently processed case to obtain a case similarity score. Based on the case similarity score, similarity weights are assigned to the grouping paths in the action space, and an accuracy score is calculated based on the degree of match between the predicted grouping results and the actual grouping labels; Calculating a path complexity penalty term based on the length of the initial grouping path and a preset maximum allowable length, and combining the accuracy score, the case similarity score, and the path complexity penalty term to construct a comprehensive reward function, wherein the comprehensive reward function is used to evaluate the quality of each candidate grouping path; Based on the product of the reward value corresponding to the comprehensive reward function and the preset learning rate as the gradient direction of the performance target, the parameters of the pre-trained language model are iteratively updated through the proximal policy optimization algorithm until the performance target converges, and the output result of the pre-trained language model after the parameter update is used as the final grouping result.

6. The method according to claim 5, characterized in that Based on the product of the reward value corresponding to the comprehensive reward function and the preset learning rate as the gradient direction of the performance target, the parameters of the pre-trained language model are iteratively updated through the proximal policy optimization algorithm, including: The product of the reward value and a preset learning rate is constructed as a gradient optimization base value; the logarithmic gradient of the policy function is calculated based on the gradient optimization base value, the product of the logarithmic gradient and the gradient optimization base value is used as the optimization direction of the performance target, and the probability ratio of the corresponding action of the new policy function and the old policy function in the current state is calculated; A first-order moment estimation is performed on the gradient of the new strategy function using a momentum accumulation method, a second-order moment estimation is obtained by calculating the square of the gradient using an exponential weighted average, and a parameter update step size is adaptively determined based on the ratio of the first-order moment estimation to the second-order moment estimation; The change rate corresponding to the probability ratio between adjacent iterations is detected, and the iteration is stopped when the change rate is less than the preset change threshold for multiple consecutive times.

7. A DRG intelligent grouping system based on a large model, used to implement the method according to any one of claims 1 to 6, characterized in that: include: The first unit is used to obtain the original natural language text from the patient's medical record homepage, discharge record, and medical history record, and convert the original natural language text into semantic code using optical character recognition technology; input the semantic code into a pre-trained language model, extract the main diagnosis information, surgical operation information, and complication information, and generate a structured medical summary text; perform multimodal matching processing based on the medical summary text, map the medical summary text to standard ICD code, and generate semantic supplementary features; The second unit is used to perform similarity matching on the non-standard descriptions and ambiguous contents in the medical summary text using a pre-trained language model to obtain a predicted standard code, and fuse the predicted standard code with the standard ICD code and the semantic supplementary features to form a complete coding feature; The third unit is used to input the complete coding features into the inference engine of the pre-trained language model, and generate an initial grouping path based on the preset DRG grouping rules. The fourth unit is used to use the encoding features as the state space and the initial grouping path as the action space, design a reward function based on grouping accuracy, case similarity and path complexity, iteratively update the parameters of the pre-trained language model through the proximal strategy optimization algorithm, and output the final DRG grouping result.

8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Disease name code matching method and device, computer equipment and storage medium

    CN111695336A

  • ICD automatic merging coding system and method based on reinforcement learning

    CN114297986A