Medical charging violation detection method based on knowledge graph and graph neural network
By constructing a multimodal heterogeneous knowledge graph and graph neural network, the limitations of existing medical fee violation detection methods are overcome, achieving high-accuracy detection and detailed analysis of multiple violation types, thus improving the comprehensiveness and accuracy of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-08
AI Technical Summary
Existing methods for detecting violations in medical billing suffer from incomplete rule expression, insufficient feature extraction, limited violation type detection, and lack of interpretability. They are unable to effectively utilize complex rule relationships and inter-item correlations, cannot handle multiple violation types simultaneously, and have low detection accuracy.
We employ a knowledge graph and graph neural network-based approach to construct a multimodal heterogeneous knowledge graph. This graph integrates the static features of projects with dynamic features and semantic embeddings at the case level. We utilize heterogeneous graph neural networks to learn the complex relationships between rules, projects, pricing units, and text semantics. Finally, we train a model using graph neural networks to detect violations.
It improves the comprehensiveness and accuracy of detecting medical fee irregularities, can detect multiple types of irregularities simultaneously, has the ability to generalize to unseen combinations of items and rules, and provides detailed analysis of the reasons for irregularities.
Smart Images

Figure CN121997180A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical fee supervision, specifically relating to a method for detecting medical fee irregularities based on knowledge graphs and graph neural networks. Background Art
[0002] With the continuous improvement of medical informatization, the scale and complexity of medical billing data are increasing daily. To ensure the safety and rational use of medical insurance funds, regulatory authorities need to establish an effective mechanism for detecting violations. Medical billing violations mainly include duplicate charges, charges exceeding standard rates, and mutually exclusive charges.
[0003] Duplicate billing refers to the same medical service being charged repeatedly within a specified time limit (such as daily or 24-hour), exceeding the maximum allowed number of times or duration. Overcharging refers to the number of medical services charged exceeding the prescribed standard limit. Mutually exclusive billing refers to certain medical services that cannot be charged simultaneously, or whose cumulative charging time when charged simultaneously cannot exceed the prescribed limit.
[0004] Existing methods for detecting irregularities in medical billing primarily rely on rule matching and statistical analysis. These methods have the following shortcomings:
[0005] 1. Incomplete rule expression: Traditional rule matching methods have difficulty handling complex rule relationships and inter-item correlations, and cannot effectively utilize the semantic relationships between rules.
[0006] 2. Insufficient feature extraction: Existing methods mainly rely on simple statistical features (such as the number of times a fee is charged and the amount charged), which cannot capture the complex relationships and contextual information between items.
[0007] 3. Limited detection of violation types: Most methods can only detect a single type of violation, making it difficult to handle multiple violation types such as duplicate charges, overcharging, and mutually exclusive charges at the same time.
[0008] 4. Lack of interpretability: Existing methods often only provide the result of the violation judgment, but cannot provide a detailed analysis of the reasons for the violation, which is not conducive to the understanding and handling by regulatory personnel.
[0009] In recent years, knowledge graph and graph neural network technologies have achieved significant results in multiple fields. Knowledge graphs can effectively organize and represent relationships between entities, while graph neural networks can learn representations of nodes and edges, capturing complex graph structure information. However, research on applying knowledge graphs and graph neural networks to the detection of medical billing irregularities is still relatively limited, and the accuracy of irregularity detection is not high enough. (Summary of the Invention)
[0010] To address the aforementioned technical problems, this invention employs a medical billing irregularity detection method based on knowledge graphs and graph neural networks, comprising the following steps: acquiring medical billing data, inputting the medical billing data into a trained graph neural network, and obtaining the irregularity detection result; the training process of the graph neural network includes:
[0011] S1: Obtain the medical fee rule base and medical fee data, preprocess the medical fee data according to the medical fee rule base, and obtain the preprocessed medical fee data;
[0012] S2: Construct a multimodal heterogeneous knowledge graph based on the medical fee rule base and preprocessed medical fee data;
[0013] S3: Generate a graph sample set containing violation tags based on the medical fee rule base, preprocessed medical fee data, and multimodal heterogeneous knowledge graph;
[0014] S4: Train the graph neural network using a graph sample set containing violation labels to obtain the trained graph neural network.
[0015] The beneficial effects of this invention are:
[0016] 1. This invention constructs a multimodal knowledge graph to uniformly express the textual semantics and entity relationships of various rules, items, pricing units, and unstructured text, enabling simultaneous detection of violation types in rules and unstructured text, thus improving the comprehensiveness and accuracy of detection. 2. This invention integrates the static features of the item itself with case-level dynamic features and semantic embeddings, more accurately expressing the semantics and contextual information of the item, thereby improving the accuracy of detection. 3. This invention employs a heterogeneous graph neural network, which can effectively utilize the complex relationships between rules, items, pricing units, textual semantics, and entities, and introduces a semantic gating mechanism to learn node representations, improving the quality of feature learning and thus improving the accuracy of detection. 4. Through the learning of knowledge graphs and graph neural networks, the model can capture the potential relationships between rules and items, and has a certain generalization ability for unseen combinations of items and rules. Attached Figure Description
[0017] Figure 1 This is a flowchart of a medical billing irregularity detection method based on knowledge graphs and graph neural networks according to the present invention;
[0018] Figure 2 This is a schematic diagram of the heterogeneous knowledge graph structure of the present invention.
[0019] Figure 3 This is a schematic diagram of the heterogeneous graph neural network model structure of the present invention; Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] like Figure 1 As shown, this embodiment of the invention employs a medical billing violation detection method based on knowledge graphs and graph neural networks, comprising: acquiring medical billing data (i.e., case-level samples to be detected), inputting the medical billing data into a trained graph neural network, and obtaining violation detection results; the training process of the graph neural network includes:
[0022] S1: Obtain the medical fee rule base and medical fee data, preprocess the medical fee data according to the medical fee rule base, and obtain the preprocessed medical fee data;
[0023] Medical billing data includes: actual billing data and unstructured text data. Actual billing data includes billing records for multiple case numbers, and unstructured text data includes unstructured text for multiple case numbers. The medical billing rule base includes multiple rules.
[0024] In one embodiment, the medical billing rule base is typically stored in the form of an Excel file, containing multiple worksheets, each storing different types of rules:
[0025] "Worksheet 1 Duplicate Charge 1": Duplicate charge rules that allow a maximum of one charge per day, including a set of items that can be charged a maximum of one charge per day;
[0026] "Worksheet 1 Duplicate Billing 2": Duplicate billing rules with a maximum of 24 hours of billing per day, including a set of items whose cumulative daily billing duration cannot exceed 24 hours;
[0027] For example, multiple billing records may appear for the same project within the same calendar day (duplicate billing / segmented billing), but the cumulative value of the "billing duration" corresponding to these records shall not exceed 24 hours.
[0028] "Worksheet 2 Over-standard Billing": Over-standard billing rules, which includes a set of items for which the number of charges and the price of charges must not exceed the standard (frequency or price);
[0029] "Worksheet 3 Mutually Exclusive Items": Stores mutual exclusion billing rules, containing pairs of mutually exclusive items.
[0030] Each worksheet contains the following fields: Project Code, Project Name, Unit of Measurement, Unit Price, and Detection Logic.
[0031] Actual billing data typically includes multiple billing records, stored in Excel files. Each billing record contains the following fields: patient case number (INPN), billing date (CHARGE_DATE), item code (ITEM_CODE), item billing details, etc. Item billing details include: billing duration (QUANTITY), price, etc.
[0032] Unstructured text data includes unstructured text from multiple case numbers. This unstructured text comprises unstructured corpora such as medical orders, medical records, laboratory / imaging reports, and prescription instructions associated with real billing data, used to provide contextual semantic information. Specifically, medical orders include instructions on the number of procedures, cumulative duration of procedures, and mutual exclusion of procedures; medical records include the medical procedures the patient needs to undergo. Therefore, in addition to the medical rule base, unstructured text data also contains some medical rules.
[0033] Preprocessing of medical billing data includes:
[0034] S11. Clean the real billing data, and filter out the billing records that are constrained by the medical billing rule base from the cleaned real billing data to obtain the preprocessed real billing data.
[0035] Cleaning real billing data includes: deleting billing records with empty item codes, deleting billing records with a billing duration of less than or equal to 0, and standardizing date formats.
[0036] The process of filtering out billing records that are subject to the medical billing rule base from the cleaned real billing data includes: for each billing record in the cleaned real billing data, if its item belongs to any rule set in the medical billing rule base, then the billing record is filtered out and used as input for subsequent violation detection.
[0037] For example, the rule base contains the rule "repeated charges - daily cumulative ≤ 24 hours", which involves the item code P001 (nursing services, unit of measurement: hour).
[0038] The cleaned data of actual charges includes the following records:
[0039] Record 1: Hospitalization number = Z001, billing date = 2025-05-01, item code = P001, billing duration = 8 (hours);
[0040] Record 2: Hospitalization number = Z001, billing date = 2025-05-01, item code = P001, billing duration = 10 (hours);
[0041] Record 3: Hospitalization number = Z001, billing date = 2025-05-01, item code = P999 (non-rule base item), billing duration = 1;
[0042] The filtering step only retains records whose project codes belong to the rule base project set, i.e., records 1 and 2 are retained; since P999 is not in the rule base, record 3 will not be included in subsequent detection.
[0043] S12. Preprocess the unstructured text of each case number in the unstructured text data, namely sentence segmentation, noise removal, and regularization of medical terminology, to obtain the preprocessed unstructured text data.
[0044] S13. Combine the preprocessed real billing data and unstructured text data to obtain preprocessed medical billing data.
[0045] S2: Construct a multimodal heterogeneous knowledge graph based on the medical fee rule base and preprocessed medical fee data;
[0046] like Figure 2 As shown, constructing a multimodal heterogeneous knowledge graph includes:
[0047] S21. Construct a rule node and its characteristics for each rule in the medical fee rule base;
[0048] Each rule corresponds to a rule node, and the characteristics of a rule node include: the rule type and the rule's constraint values.
[0049] In one embodiment, the 6-dimensional static features of a rule node for:
[0050] Feature 1: The normalized value of the maximum allowed number of attempts / duration / price (max_count); where the maximum allowed number of attempts / duration / price is determined as follows:
[0051] (a) Repeated charging rule: If it is "charged no more than once per day", then max_count=1; if it is "billing time not exceeding 24 hours per day", then max_count=24;
[0052] (b) Rules for charging above the standard: If it is a frequency / quantity type limit, then max_count is the frequency limit; if it is a price type limit, then max_count is the price limit.
[0053] If the rules do not specify the maximum number of times / duration / price allowed, then max_count will be set to 0.
[0054] Feature 2: Whether to limit by day (1.0 or 0.0);
[0055] Feature 3: Whether to limit by hour (1.0 or 0.0);
[0056] Feature 4: Whether the overcharging limit is set (1.0 or 0.0);
[0057] Feature 5: Whether to use the price limit flag (1.0 or 0.0); set to 1 if the rule logic includes a unit price / amount threshold; otherwise set to 0.
[0058] Feature 6: Whether to use the mutual exclusion restriction flag (1.0 or 0.0).
[0059] S22. Construct a project node and its characteristics for each item in the preprocessed real charging data. ;
[0060] Each medical service item corresponds to a project node. The characteristics of a project node include: the project's attributes (such as unit price and unit of measurement), the type of rules and restrictions that the project is subject to.
[0061] In one embodiment, the 9-dimensional static features of a project node for:
[0062] Feature 1: Log-normalized value of the unit price of the project;
[0063] Feature 2: Normalized value of the project's unit of measurement code;
[0064] Feature 3: Normalized values of the maximum allowed number of times / duration / price for the project; if the rule does not specify the maximum allowed number of times / duration / price, then max_count is set to 0;
[0065] Feature 4: Whether to limit by day (1.0 or 0.0);
[0066] Feature 5: Whether to use the 24-hour limit flag (1.0 or 0.0);
[0067] Feature 6: Whether the overcharging limit is set (1.0 or 0.0);
[0068] Feature 7: Whether to use the price limit flag (1.0 or 0.0);
[0069] Feature 8: Normalized unit price (price_per_unit / 200.0, if present);
[0070] Feature 9: Whether to use the mutual exclusion restriction flag (1.0 or 0.0); 1 if the item forms a mutual exclusion pair with any item in the mutual exclusion rule table, 0 otherwise.
[0071] S23. Construct a pricing unit node and its characteristics for each pricing unit in the medical fee rule base;
[0072] Each pricing unit corresponds to a pricing unit node, and the characteristics of the pricing unit node include: the normalized value of the pricing unit's code and its type.
[0073] In one embodiment, the 2D feature vector of the pricing unit node is:
[0074] Feature 1: Normalized value of the pricing unit code (unit_id / max_units); unit_id is the ID of the pricing unit, and max_units is the quantity of pricing units;
[0075] Feature 2: Whether the pricing unit includes an "hour" symbol (1.0 or 0.0).
[0076] S24. Construct a text semantic node and its embedding vector for each case number in the preprocessed unstructured text data.
[0077] Text semantic nodes (Text): The unstructured text corresponding to each case number is encoded using a pre-trained RoBERTa model to obtain the context embedding of the unstructured text for each case number. , using context embedding The first CLS in the middle indicates As paragraph vector, and use paragraph vector Mapping to the hidden dimension yields the embedding vector of the unstructured text for each case number. Each case number's unstructured text corresponds to a text semantic node, and the embedding vector of the text semantic node is the embedding vector of the corresponding case number's unstructured text.
[0078] S25. Identify entities in the preprocessed unstructured text data, and construct a named entity node and its embedding vector for each entity.
[0079] Entity nodes: Extracting entities such as diseases, symptoms, tests, and drugs from unstructured text data using pre-trained BiLSTM-CRF or pre-trained medical NER models. And its context vector, calculate each entity The similarity between the context vector and each candidate concept in the UMLS / Medical Insurance Ontology vocabulary is calculated, and the candidate concept with the highest similarity is selected as the entity. The alignment results are calculated, and the corresponding similarity is output as semantic similarity; for entities... The alignment result type is one-hot encoded to obtain the entity. One-hot encoding of entity types ; to entity The entity is obtained by concatenating the names of the alignment results. The text, using the TF-IDF method to analyze entities Vectorize the text to obtain entities. TF-IDF statistics ; Use the word2vec method to analyze entities Vectorize the text to obtain entities. word vectors , will entity One-hot encoding of entity types TF-IDF statistics and word vectors By piecing them together, a solid object is obtained. Embedding vectors for each entity; For each entity node, the embedding vector of the entity node is the same as the embedding vector of the corresponding entity.
[0080] S26. Construct cross-modal edges between nodes. Cross-modal edges include: restricted relationship edges from project nodes to rule nodes, reverse relationship edges from rule nodes to project nodes, ownership relationship edges from project nodes to pricing unit nodes, reverse relationship edges from pricing unit nodes to project nodes, mutual exclusion relationship edges between project nodes, semantic support relationship edges between text semantic nodes and project nodes, and semantic mapping relationship edges between entity nodes and project nodes.
[0081] The "restricted" relationship between a project and a rule (restricted_by): indicates that the project is constrained by the rule;
[0082] The reverse relationship from rule to project (rev_restricted_by): indicates the reverse relationship between the project and the rule constraint;
[0083] The "has_unit" relationship between a project and a unit of account: indicates that the project uses this unit of account;
[0084] Reverse relationship from unit of account to project (rev_has_unit): Indicates the reverse relationship of the project using the unit of account;
[0085] The "mutual exclusion" relationship between projects (mutex_with): indicates that two projects cannot be charged at the same time;
[0086] The edges mentioned above are structural relationship edges. Structural relationship edges (restricted_by, has_unit, mutex_with) are unweighted edges, with a default weight of 1.
[0087] Semantic support edges between text semantic nodes and item nodes: the semantic similarity between the embedding vector of a text semantic node and the features of an item node. Exceeding the preset threshold Create semantically supporting relation edges and assign semantic similarity. The weights of the semantically supporting relation edges; where semantic similarity is cosine similarity, and the threshold is... 0.8 can be used as the default value.
[0088] Semantic mapping relationship edges between entity nodes and project nodes:
[0089] Mapping project nodes to the UMLS / Medical Insurance Ontology Lexicon yields the alignment concept for project nodes. ; Entity nodes Mapping to the UMLS / Medical Insurance Ontology Lexicon yields entity nodes. Alignment concept and semantic similarity;
[0090] When entity node If it belongs to the same entity type as the project, such as inspection / disposal / pharmaceuticals, then... Then, a semantic mapping edge (aligned_to) is established from the entity node to the project node, and the entity node... The semantic similarity is used as the weight of the semantic mapping relation edge;
[0091] When entity node When the entity belongs to a clinical concept such as disease / symptom, it is not aligned with the project based on the same concept. Instead, the alignment concept of the entity node is determined based on the relationship of 'disease-related examination / indication / treatment' in the UMLS / Medical Insurance Ontology Glossary. Alignment concept with project nodes If an interpretable association exists, then a semantic mapping edge (aligned_to) is also established to link the entity nodes. The semantic similarity is used as the weight of the semantic mapping relationship edge.
[0092] S3: Generate a graph sample set containing violation tags based on the medical fee rule base, preprocessed medical fee data, and multimodal heterogeneous knowledge graph;
[0093] The generated image sample set containing violation labels includes:
[0094] S31. In the preprocessed medical billing data, the billing records of the same case number on the same date are aggregated to obtain a case-level sample for each case number on each date. That is, each case-level sample includes: all billing records of a patient in one day.
[0095] S32. Based on the medical fee rule base, perform violation detection on each case-level sample and generate a violation label for each case-level sample;
[0096] The violation detection of case-level samples based on the medical fee rule base includes: determining whether each item in the case-level sample complies with the rules of the medical fee rule base; if there are items that do not comply with the medical fee rule base, then there is a violation; otherwise, there is no violation.
[0097] In one embodiment, mutual exclusion violation detection is performed by checking whether there are mutually exclusive item pairs in the case sample. If there are mutually exclusive item pairs and both items are charged at the same time, the case sample is marked as a mutual exclusion violation. If the mutual exclusion rule has a time accumulation limit, the cumulative duration of the two mutually exclusive items in the case-level sample is calculated separately, and the cumulative value of their simultaneous charges is taken as the cumulative time. If there are item pairs with a cumulative time exceeding 24 hours, the case-level sample is marked as a time accumulation violation.
[0098] Double billing violation detection: The cumulative billing duration of each item in the case-level sample is counted. If there is an item whose cumulative billing duration exceeds the maximum allowed duration, the case-level sample is marked as a double billing violation.
[0099] Detection of overcharging violations: The total number of charges for each item in the statistical case-level sample is counted. If there is an item whose total number of charges exceeds the maximum allowed number, it is marked as an overcharging violation.
[0100] For example, if the total billing duration for item P001 under the same hospital number and date is summed, and the cumulative value is 8+10=18≤24, it is considered not in violation; if another item P001=10 hours appears, then the cumulative duration is 8+10+10=28>24, which is considered a violation.
[0101] If any type of violation exists in the case, the violation label is 1 (violation); otherwise, the violation label is 0 (normal).
[0102] S33. Extract multiple non-violation case-level samples from the case-level samples. Based on the medical charging rule base, perturb each extracted case-level sample to generate multiple violation case-level samples. Combine the generated violation case-level samples with the remaining unextracted case-level samples to obtain a balanced case-level sample set.
[0103] To address the problem of insufficient training samples caused by the small number of violation samples and uneven distribution of categories in real-world scenarios, this step extracts multiple non-violation case-level samples (normal samples) from the case-level samples as base samples. Based on the rule types in the rule base, the base samples are subjected to controlled perturbations (e.g., increasing the number of charges, increasing the billing duration, replacing them with mutually exclusive item combinations, etc.) to generate violation samples corresponding to the rule types and assign them corresponding violation labels, thereby forming a labeled sample set for supervised training.
[0104] For example, when the rule is "the same project can be charged a maximum of N times within the same natural day," a violation sample is constructed by copying and appending the project's charging records in the same case, changing the number of times the project appears on that day from N to N+1. When the rule is "the cumulative billing duration of the same project within the same natural day is ≤24 hours," a violation sample is constructed by keeping the structure of multiple records for the project unchanged or by appending records so that the cumulative billing duration exceeds 24 hours. When the rule is a mutually exclusive rule, a violation is constructed by simultaneously retaining two (or more) mutually exclusive projects in the same case. When the rule is "overcharging," a violation sample is constructed by designing the billing duration of a project in the same case to exceed the standard threshold, or by splitting a single record and accumulating it to exceed the threshold.
[0105] S34. To balance each case-level sample in the case-level sample set Each item in Generate dynamic features and semantic embeddings; where m is the index of the case-level samples in the balanced case-level sample set;
[0106] Case-level samples Projects in Generating dynamic features includes: in case-level samples Get information about the project from [website name] Fee records, regarding the project All charging records are feature-coded to obtain the project The dynamic characteristics.
[0107] In one embodiment, by characterizing project charging behavior, learnable behavioral evidence is provided to the case-level graph neural network, thereby enriching the case-level samples. Projects in Generate dynamic features, including:
[0108] Search for items in the medical fee rules database. The relevant rules are used to obtain a rule set. ;
[0109] In case-level samples Calculate the items separately About the set of rules Statistics for each rule;
[0110] For the project About the set of rules The statistics for each rule are normalized to obtain the item. About the set of rules The degree of normalization exceeding the limit for each rule;
[0111] Project About the set of rules The normalized exceedance degree of each rule is concatenated to obtain the project. dynamic characteristics .
[0112] For example, regarding the duplicate charging rule 1 and the over-standard billing rule, in the case-level sample... The normalized exceedance of the charging frequency for item p is calculated, and the normalized value of the maximum interval between charging timestamps for the same item is calculated; for rule 1 (duplicate charging), in the case-level sample... The normalized exceedance rate of the cumulative billing duration for item p is calculated internally; for mutually exclusive rules, in case-level samples... The normalized excess degree of the number of mutually exclusive items in the internal calculation item p.
[0113] The aforementioned dynamic features describe the actual billing behavior pattern of the project in the current case, providing behavioral evidence for the model to make comprehensive judgments.
[0114] Case-level samples Projects in Generate semantic embeddings This includes: extracting case-level samples from multimodal heterogeneous knowledge graphs. Includes text semantic nodes corresponding to case numbers; based on the project. The edge weights of the extracted text semantic nodes are used to aggregate the embedding vectors of the extracted text semantic nodes: ,in, Case-level samples The collection of text semantic nodes corresponding to the included case numbers. For set The embedding vector of the t-th text semantic node in the text. For the project The weight of the semantic support edge of the text semantic node t.
[0115] During testing, if the case-level sample is a new case number, then step S2 can be executed to construct the case-level sample. The text semantic node of the case number.
[0116] S34. Balance each case-level sample in the case-level sample set. Each item in The dynamic features and semantic embeddings are respectively added to a multimodal heterogeneous knowledge graph to obtain each case-level sample in a balanced case-level sample set. Image sample ;
[0117] Specifically, case-level samples Each item in The dynamic features and semantic embeddings are respectively associated with the corresponding item nodes in the multimodal heterogeneous knowledge graph. The features are concatenated to obtain case-level samples. Image sample ; Sample Image Each item in the dataset has three features: dynamic features, semantic embeddings, and static features (i.e., the features obtained in step S2). The splicing result of ).
[0118] S35, Each case-level sample in the combined balanced case-level sample set Image sample Combine the violation tags to obtain a sample image set containing the violation tags.
[0119] S4: Train the graph neural network using a graph sample set containing violation labels to obtain the trained graph neural network.
[0120] like Figure 3 As shown, the graph neural network is an enhanced heterogeneous graph neural network, including: an embedding layer, a multi-head relation attention convolutional module, a hierarchical aggregation module, and a deep classification module; training the graph neural network using a graph sample set containing violation labels includes:
[0121] S41: Transfer the image sample The features of each node are input into the embedding layer for type-specific linear embedding to obtain the embedding vectors of rule nodes, item nodes and pricing unit nodes;
[0122] Since text semantic nodes and entity nodes have already been embedded in step S2, this step only embeds the features of rule nodes, item nodes, and pricing unit nodes; the embedding layer includes multiple type-specific embedding layers, each of which processes the corresponding node type (rule node, item node, and pricing unit node).
[0123] For each graph sample The specific linear embedding process is as follows:
[0124]
[0125] in, For the sample image The embedding vector of node v, Representation of sample diagrams The type of node v, For the sample image The characteristics of node v, , Type-specific parameters are assigned to type-specific embedding layers, and learnable biases are introduced to enhance semantic heterogeneity. LayerNorm normalizes the layers.
[0126] S42: Transfer the image sample The embedding vectors of the nodes are input into the multi-head relational attention convolutional module to obtain graph samples. Enhanced features of each node v in the middle ;
[0127] The multi-head relational attention convolutional module includes: L layers of multi-head relational attention convolutional layers and L layers of residual gating and layer normalization modules; the multi-head relational attention convolutional module processes graph samples... The processing of the embedding vectors of the nodes includes:
[0128] S421, Sample image The embedding vectors of the nodes are input into the first multi-head relational attention convolutional layer, and the output of the first multi-head relational attention convolutional layer is input into the first residual gating and layer normalization module.
[0129] S422. Input the output of the first residual gating and layer normalization module into the second multi-head relational attention convolutional layer, and input the output of the second multi-head relational attention convolutional layer into the second residual gating and layer normalization module.
[0130] S423. Input the output of the current residual gating and layer normalization module into the next multi-head relational attention convolutional layer, and input the output of the next multi-head relational attention convolutional layer into the next residual gating and layer normalization module.
[0131] For each graph sample Multi-head relationship attention convolutional layers are designed for each edge type. Set up K attention points, the specific formula is as follows:
[0132]
[0133]
[0134]
[0135] in, Let k be the dimension of the attention head. , , These represent the query, key, and value matrices for edge type r in the k-th attention head. This represents the activation function. Let r be the bias of edge type r in the k-th attention head. Representation of sample diagrams nodes In the Feature vectors from multi-head attention convolutional layers. , Representing the sample diagrams respectively nodes , In the Feature vectors of layer residual gating and layer normalization modules Represents a set of edge types. Indicates the number of heads of attention. For the sample image nodes In edge type The set of neighboring nodes, For the sample image nodes , edge type In the Semantic gating of attention heads For the sample image nodes , edge type In the The weight of each attention head, Representing edge type In the The linear transformation matrix of each attention head. edge type In the Learnable semantic gating parameters for each attention head For nodes , edge type The weight.
[0136] The residual gating and layer normalization module incorporates gated residual units (GRUs) to stabilize deep propagation. Its data processing includes:
[0137]
[0138] in, This is an adaptive gating system used to adjust the contributions of information from the previous and current layers, enabling cross-layer semantic fusion. Representation of sample diagrams nodes In the Feature vectors of layer residual gating and layer normalization modules , The learnable weight matrix and bias vector for adaptive gating.
[0139] S424. Repeat step S423 until the output of the last layer residual gating and layer normalization module is obtained, i.e., the graph sample. Enhanced features of each node v in the middle .
[0140] S43: Sample image Enhanced features of all nodes Input the hierarchical aggregation module to obtain the graph sample. Multiscale feature representation ;
[0141] The hierarchical aggregation module includes: a hierarchical aggregator and a Set Transformer module (collection Transformer module); the hierarchical aggregation module handles graph samples. The enhanced features of all nodes are processed, including:
[0142] Image sample The enhanced features of all nodes in the graph are aggregated by a hierarchical aggregator to obtain graph samples. aggregation features :
[0143]
[0144]
[0145]
[0146] in, For the sample image The attention weights of node v. Representation of sample diagrams The set of nodes, For the sample image The query vector of node v. , These are the learnable weight matrix and bias vector.
[0147] Aggregation features Perform mean pooling and max pooling respectively to obtain mean pooling features. Max pooling characteristics ;
[0148] For the sample image The enhanced features of all project nodes are combined to obtain a project enhanced feature set; the project enhanced feature set is then input into the Set Transformer module to obtain the project enhanced feature set representation. The project enhancement feature set is treated as an unordered set and input into the Set Transformer's SAB to model the higher-order interaction relationships between elements within the set.
[0149] Aggregation features Mean pooling characteristics Max pooling characteristics And obtain the project enhanced feature set representation By splicing the images together, we can obtain the sample image. Multiscale feature representation .
[0150] S45: Sample image Multiscale feature representation Input the data into the deep classification module to obtain image samples. The detection results and their probability distribution.
[0151] The deep classifier module Clf represents multi-scale features. Process and output probability distribution :
[0152]
[0153] in, These represent the probability of violation and the probability of normality, respectively. It includes ReLU and residual connections to mitigate gradient vanishing. , This is the weight matrix. , For bias.
[0154] If the probability of violation is greater than the normal probability, the detection result is a violation; otherwise, the detection result is no violation.
[0155] S46: Based on the sample diagram Enhanced features and graph samples of each node The loss function value is calculated based on the probability distribution of the detection results. The parameters of the graph neural network are updated according to the loss function value. When the loss function value is minimized, the trained graph neural network is obtained.
[0156] loss function ;in, They are weights, The classification loss is based on the probability distribution of violation detection results. For supervised contrastive loss based on node-based augmented features, For cross-modal alignment loss based on node-based augmented features, To counteract the loss caused by regularization.
[0157] The classification loss is calculated from all map samples. The probability of violation and the probability of normality are compared with the true label. Cross-entropy loss;
[0158] Supervised contrastive loss: Minimizes the distance between similar samples and maximizes the distance between dissimilar samples in the case representation. ;in, For the graph sample set, To remove the graph samples from the graph sample set The index of the remaining graph samples, To match the sample image A collection of image samples with the same label. Representation of sample diagrams The concatenated vector of enhanced features of all project nodes p in the middle. Temperature coefficient;
[0159] For cross-modal alignment loss: at project nodes With text semantic nodes Construct contrastive learning objectives between them: ;in, Representation of sample diagrams The text semantic nodes that have a semantic support relationship edge with the project node p. Representation of sample diagrams The set of text semantic nodes that have semantic support edges with project node p. For the sample image A collection of semantic nodes in Chinese text. For the sample image The set of project nodes p, , , These are sample images. Project node p, text semantic node And the enhanced features of text semantic node t, This refers to temperature hyperparameters.
[0160] To counteract regularization loss: a perturbation is added to the item node embedding using the Fast Gradient Method (FGM). Force the model to remain robust to small changes in input: Where C is the number of categories, c is the index of the category, and perturbation is... Generated using an adversarial training method, i.e. , This represents the upper limit of the disturbance amplitude.
[0161] The process of inputting medical billing data into a trained graph neural network includes: medical billing data, which is the case-level sample to be detected, including all records of a certain case number on a certain day; calculating the dynamic features and semantic embeddings of the case-level sample to be detected; adding the dynamic features and semantic embeddings to a pre-constructed multimodal heterogeneous knowledge graph; and then inputting the multimodal heterogeneous knowledge graph into the trained graph neural network to obtain the violation detection results.
[0162] In practical use, in order to facilitate medical insurance personnel to quickly obtain results through the model, the dynamic features of the case-level samples to be tested do not need to be calculated as statistics. Instead, the billing records of each item are directly obtained from the case-level samples to be tested, and all billing records of each item are encoded to obtain the dynamic features of each item.
[0163] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for detecting irregularities in medical billing based on knowledge graphs and graph neural networks, characterized in that, include: Acquire medical billing data, input the data into a trained graph neural network, and obtain violation detection results; the training process of the graph neural network includes: S1: Obtain the medical fee rule base and medical fee data, preprocess the medical fee data according to the medical fee rule base, and obtain the preprocessed medical fee data; S2: Construct a multimodal heterogeneous knowledge graph based on the medical fee rule base and preprocessed medical fee data; S3: Generate a graph sample set containing violation tags based on the medical fee rule base, preprocessed medical fee data, and multimodal heterogeneous knowledge graph; S4: Train the graph neural network using a graph sample set containing violation labels to obtain the trained graph neural network.
2. The method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 1, characterized in that, Medical billing data includes: actual billing data and unstructured text data; actual billing data includes billing records for multiple case numbers, and unstructured text data includes unstructured text for multiple case numbers; preprocessing of medical billing data includes: S11. Clean the real billing data, and filter out the billing records that are constrained by the medical billing rule base from the cleaned real billing data to obtain the preprocessed real billing data. S12. Preprocess the unstructured text of each case number in the unstructured text data to obtain the preprocessed unstructured text data. S13. Combine the preprocessed real billing data and unstructured text data to obtain preprocessed medical billing data.
3. The method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 2, characterized in that, The medical billing rule base includes multiple rules, each containing: the item and its unit of measurement; each billing record includes: case number, date, item, and item billing details; the construction of a multimodal heterogeneous knowledge graph includes: For each rule in the medical fee rule base, construct a rule node and its characteristics; For each pricing unit in the medical fee rule base, construct a pricing unit node and its characteristics; For each item in the preprocessed real charging data, construct a project node and its characteristics; For each case number in the preprocessed unstructured text data, a text semantic node and its embedding vector are constructed. Identify entities in preprocessed unstructured text data, and construct an entity node and its embedding vector for each entity. Cross-modal edges are constructed between nodes. These cross-modal edges include: restricted relationship edges from project nodes to rule nodes, reverse relationship edges from rule nodes to project nodes, ownership relationship edges from project nodes to pricing unit nodes, reverse relationship edges from pricing unit nodes to project nodes, mutual exclusion relationship edges between project nodes, semantic support relationship edges between text semantic nodes and project nodes, and semantic mapping relationship edges between entity nodes and project nodes. The weights of restricted relation edges, reverse relation edges, possessive relation edges, and mutually exclusive relation edges are 1; the weight of semantic support relation edges is the semantic similarity between text semantic nodes and project nodes, and the weight of semantic mapping relation edges is the semantic similarity between entity nodes and project nodes.
4. The method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 3, characterized in that, The generated image sample set containing violation labels includes: S31. Aggregate the billing records for the same case number on the same date in the preprocessed medical billing data to obtain case-level samples for each case number on each date; S32. Based on the medical fee rule base, perform violation detection on each case-level sample and generate a violation label for each case-level sample; S33. Extract multiple non-violation case-level samples from the case-level samples. Based on the medical charging rule base, perturb each extracted case-level sample to generate multiple violation case-level samples. Combine the generated violation case-level samples with the remaining unextracted case-level samples to obtain a balanced case-level sample set. S34. To balance each case-level sample in the case-level sample set Each item in Generate dynamic features and semantic embeddings; where m is the index of the case-level samples in the balanced case-level sample set; S35. Balance each case-level sample in the case-level sample set. Each item in The dynamic features and semantic embeddings are respectively added to a multimodal heterogeneous knowledge graph to obtain each case-level sample in a balanced case-level sample set. Image sample ; S36, Each case-level sample in the combined balanced case-level sample set Image sample Combine the violation tags to obtain a sample image set containing the violation tags.
5. The method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 4, characterized in that, Case-level samples Projects in Generating dynamic features and semantic embeddings includes: In case-level samples Get information about the project from [website name] Fee records, regarding the project All charging records are feature-coded to obtain the project Dynamic characteristics; Extracting case-level samples from multimodal heterogeneous knowledge graphs Includes text semantic nodes corresponding to case numbers; based on the project. The edge weights of the extracted text semantic nodes are used to aggregate the embedding vectors of the extracted text semantic nodes to obtain the project. Semantic embedding.
6. The method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 1, characterized in that, The graph neural network includes: an embedding layer, a multi-head relation attention convolutional module, a hierarchical aggregation module, and a deep classification module; training the graph neural network using a graph sample set containing violation labels includes: S41: Transfer the image sample The features of each node in the graph are input into the embedding layer to obtain graph samples. The embedding vectors of each node; S42: Transfer the image sample The embedding vectors of the nodes are input into the multi-head relational attention convolutional module to obtain graph samples. Enhanced features of each node in the process; S43: Sample image The enhanced features of all nodes in the graph are input into the hierarchical aggregation module to obtain the graph samples. Multi-scale feature representation; S44: Sample image The multi-scale feature representation is input into the deep classification module to obtain image samples. The results of the non-compliant tests and their probability distribution; S45: According to the sample diagram Enhanced features and graph samples of each node The loss function value is calculated based on the probability distribution of the violation detection results. The parameters of the graph neural network are updated according to the loss function value. When the loss function value is minimized, the trained graph neural network is obtained.
7. The method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 6, characterized in that, The multi-head relational attention convolution module includes: multiple multi-head relational attention convolutional layers and multiple residual gating and normalization modules; the multi-head relational attention convolution module processes graph samples... The processing of the embedding vectors of the nodes includes: S421, Sample image The embedding vectors of the nodes are input into the first multi-head relational attention convolutional layer, and the output of the first multi-head relational attention convolutional layer is input into the first residual gating and layer normalization module. S422. Input the output of the first residual gating and layer normalization module into the second multi-head relational attention convolutional layer, and input the output of the second multi-head relational attention convolutional layer into the second residual gating and layer normalization module. S423. Input the output of the current residual gating and layer normalization module into the next multi-head relational attention convolutional layer, and input the output of the next multi-head relational attention convolutional layer into the next residual gating and layer normalization module. S424. Repeat step S423 until the output of the last layer residual gating and layer normalization module is obtained, i.e., the graph sample. Enhanced features of each node in the process.
8. The method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 7, characterized in that, The next multi-head relational attention convolutional layer processes the output of the current residual gating and layer normalization module, including: ; ; ; in, Let k be the dimension of the attention head. , , These represent the query, key, and value matrices for edge type r in the k-th attention head. This represents the activation function. Let r be the bias of edge type r in the k-th attention head. Representation of sample diagrams nodes In the Feature vectors from multi-head attention convolutional layers. , Representing the sample diagrams respectively nodes , In the Feature vectors of layer residual gating and layer normalization modules Represents a set of edge types. Indicates the number of heads of attention. For the sample image nodes In edge type The set of neighboring nodes, For the sample image nodes , edge type In the Semantic gating of attention heads For the sample image nodes , edge type In the The weight of each attention head, Representing edge type In the The linear transformation matrix of each attention head. edge type In the Learnable semantic gating parameters for each attention head For nodes , edge type The weight.
9. The method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 7, characterized in that, The hierarchical aggregation module includes: a hierarchical aggregator and a Set Transformer module, where Set Transformer is a collection of Transformers; the hierarchical aggregation module processes graph samples. The enhanced features of all nodes are processed, including: Image sample The enhanced features of all nodes in the graph are input into a hierarchical aggregator to obtain graph samples. aggregation features ; Aggregation features Perform mean pooling and max pooling respectively to obtain mean pooling features. Max pooling characteristics ; For the sample image The enhanced features of all project nodes are combined to obtain a project enhanced feature set; the project enhanced feature set is then input into the Set Transformer module to obtain the project enhanced feature set representation. ; Aggregation features Mean pooling characteristics Max pooling characteristics and project enhanced feature set representation By splicing the images together, we can obtain the sample image. The scale features are represented.
10. A method for detecting medical fee irregularities based on knowledge graphs and graph neural networks according to claim 7, characterized in that, loss function ;in, They are weights, The classification loss is based on the probability distribution of violation detection results. For supervised contrastive loss based on node-based augmented features, For cross-modal alignment loss based on node-based augmented features, To counteract the loss caused by regularization.