An AI-based medical record automatic desensitization method and system
Patent Information
- Application Number
- CN202611254070.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-10-16
AI Technical Summary
一方面,为防范重识别攻击——即攻击者通过将脱敏数据中的准标识符(如年龄、性别、就诊日期、诊断名称等多项信息的组合)与外部公开数据进行关联匹配以重新锁定患者身份——需要尽可能彻底地移除或模糊化处理数据,但这一过程极易导致过度脱敏,将年龄、就诊时间、诊断信息等具有临床分析价值的数据一并抹除,使脱敏后的病历丧失医学评审和研究的可用性
[0017] The beneficial effects of this invention are as follows: 1. This invention classifies medical entities into direct identifiers, quasi-identifiers, and non-identifiers by performing risk grading and privacy sensitivity classification, and implements differentiated processing—direct identifiers are removed or replaced, non-identifiers are fully retained, and quasi-identifiers enter the subsequent graded perturbation process. This overcomes the problems of over- or under-sensitization caused by the one-size-fits-all approach of existing desensitization methods. While effectively blocking re-identification attack paths, it accurately preserves the medical review and clinical research usability of medical records. 2. This invention queries the time sensitivity attributes of the diseases corresponding to quasi-identifiers in the medical knowledge graph and performs multi-disease constraint conflict arbitration. It uses the most stringent of each time sensitivity attribute as the benchmark to generate a joint constraint matrix and adaptive time offset, so that time perturbation is constrained by the etiological characteristics of the diseases. The time sensitivity differences of different diseases can be accurately identified and differentiated. When the same patient suffers from multiple diseases at the same time, the time constraints of each disease are coordinated and unified through the arbitration mechanism, avoiding the time logic distortion problem caused by the uniform offset due to ignoring the constraint relationship between diseases in existing methods, and ensuring that the diagnosis and treatment timeline in the medical record after desensitization still conforms to clinical reality. 3. This invention extracts the structural information of relationships between medical events and encodes it into a vectorized representation. This enables the desensitization process to perceive the causal narrative structure of disease occurrence, development, diagnosis, and outcome in medical records, ensuring that controlled perturbations do not disrupt the causal relationships and temporal dependencies between events. The desensitized medical records can still be reviewed by experts based on complete diagnostic and treatment logic. 4. This invention separates the style and content of the text, obtaining style constraint information as a constraint condition for controlled perturbations. This neutralizes the stylistic features of the desensitized document, blocking attackers from inferring the writer's identity through stylistic fingerprints such as word preferences and sentence structure, filling the gap in document style privacy protection in existing desensitization schemes. 5. This invention performs medical semantic consistency verification on the vectorized representation of the perturbation and adjusts the perturbation parameters and re-executes when the verification fails. This gives the desensitization process automatic verification and feedback adjustment capabilities, avoiding the problem of key medical facts being destroyed or sensitive information remaining undetected in existing one-way desensitization processes, thus ensuring the reliability of the desensitization results.
Smart Images

Figure CN122926499A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical data processing, and in particular to an AI-based automated de-identification method and system for medical records. Background Technology
[0002] With the deepening of medical informatization, electronic medical records have become the core data carrier for medical institutions' diagnosis and treatment activities. However, electronic medical records contain a large amount of sensitive personal information such as patient names, ID numbers, contact information, home addresses, and hospital numbers. Directly submitting original medical records would lead to the leakage of patient privacy, violating the Personal Information Protection Law and relevant regulations on medical data security management. Therefore, anonymizing electronic medical records to preserve their medical review value while ensuring patient privacy has become a rigid requirement for the compliant circulation of medical data.
[0003] Currently, medical record anonymization mainly relies on manual operation, where medical staff manually identify and modify sensitive information in each record using office tools such as WPS. The anonymization of a single record takes approximately 3 to 4 hours, resulting in extremely low efficiency and high labor costs. To address these issues, some existing solutions have proposed rule-based or machine learning model-based automated anonymization methods, but these still have significant shortcomings.
[0004] Existing automated data masking solutions face a fundamental contradiction when processing medical data: the conflict between the strength of privacy protection and data usability. On the one hand, to prevent re-identification attacks—where attackers re-identify patients by associating and matching quasi-identifiers (such as combinations of age, gender, consultation date, diagnosis name, etc.) in masked data with publicly available external data—data needs to be removed or obfuscated as thoroughly as possible. However, this process can easily lead to over-masking, erasing clinically valuable data such as age, consultation time, and diagnosis information, rendering the masked medical records unusable for medical review and research. On the other hand, if only simple processing is performed to preserve data value, it is difficult to effectively block attackers' re-identification paths, posing compliance risks of patient privacy breaches.
[0005] In the existing technology, there is no medical record desensitization scheme that can effectively defend against re-identification attacks while accurately preserving the clinical usability of medical data. Summary of the Invention
[0006] In view of the aforementioned deficiencies of the prior art, the technical problem to be solved by the present invention is to provide an AI-based automated desensitization method and system for medical records, which aims to provide an automated desensitization method and system that can effectively defend against re-identification attacks while accurately preserving the medical usability of medical records.
[0007] To achieve the above objectives, the first aspect of this invention discloses an AI-based automated de-identification method for medical records, the method comprising: Step S1: Obtain the medical record document to be de-identified, perform multimodal parsing on the medical record document, extract text layer data, image layer data and structured field layer data, and obtain structured document and medical entity set; Step S2: Perform re-identification risk classification and privacy sensitivity classification on each medical entity in the medical entity set, distinguishing each medical entity into direct identifiers, quasi-identifiers, and non-identifiers, and generating corresponding classification labels for each medical entity; wherein, the direct identifiers, quasi-identifiers, and non-identifiers are used to distinguish the data sensitivity level, the quasi-identifiers also correspond to the etiological characteristics of the disease to which the medical entity belongs, the direct identifiers are data that are directly related to the patient's personal information and need to be directly removed or replaced, and the non-identifiers are data that are not directly or indirectly related to the patient's personal information and are retained; Step S3: Based on each of the quasi-identifiers, query the time sensitivity attribute of the disease to which it belongs in the medical knowledge graph; based on the constraint relationship between the time sensitivity attributes corresponding to each of the quasi-identifiers, perform multi-disease constraint conflict arbitration, generate a joint constraint matrix with the strictest one among the time sensitivity attributes as the benchmark, and generate an adaptive time offset at the record level based on the joint constraint matrix; wherein, the time sensitivity attribute includes at least a time granularity level, a key time window, and a maximum allowed time offset; Step S4: Extract the correlation structure information between medical events from the structured document, and encode the vectorized representation of the correlation structure information; perform style and content separation processing on the text in the structured document to obtain a style-neutral text representation and style constraint information; Step S5: Using the joint constraint matrix and the adaptive time offset as perturbation boundaries, and the style constraint information as perturbation constraints, perform controlled perturbation on the part of the vectorized representation corresponding to the quasi-identifier to obtain the perturbation vectorized representation; perform medical semantic consistency verification on the perturbation vectorized representation. If the verification passes, output the desensitized medical record document; if the verification fails, adjust the parameters of the controlled perturbation and re-execute the perturbation.
[0008] Optionally, in step S2, the time granularity level includes at least minute, hour, day, week, month, and grade levels; in step S3, the multi-disease constraint conflict arbitration specifically includes the following priority rules: If the time granularity level of the disease corresponding to any of the aforementioned quasi-identifiers is at the minute or hour level, then that time granularity is used as the time reference unit for the overall offset. If there are no diseases with a time granularity level of minutes or hours, the minimum value of the maximum allowable time offset corresponding to each of the aforementioned quasi-identifiers shall be used as the upper limit of the overall offset. Time anchor protection principle: If multiple diseases share the same time anchor, the time offset corresponding to each disease should remain consistent.
[0009] Optionally, the association structure information in step S4 is a causal graph structure, where nodes in the causal graph structure represent medical events and directed edges represent causal relationships between events; The encoding process for obtaining the vectorized representation of the associated structural information specifically includes: Each event node in the causal graph structure is initialized as a semantic embedding vector. The direction information of the directed edges is used as a constraint for message passing in the graph neural network. The neighborhood information of each node is iteratively aggregated through a multi-layer graph convolutional network to obtain the causal context-aware representation of each event node. The causal context-aware representations of all event nodes are weighted and pooled to obtain the vectorized representation of the causal graph structure.
[0010] Optionally, in step S4, the separation of style and content is achieved by encoding the text into a content vector and a style vector, then standardizing and mapping the style vector, and finally reconstructing the text using the content vector and the standardized style vector. The style constraint information includes at least a difference metric of the style vector before and after the standardization mapping, and the difference metric is used to constrain the perturbation magnitude of the controlled perturbation.
[0011] Optionally, in step S5, the medical semantic consistency verification includes fact retention rate verification and causal consistency scoring; The fact retention rate verification is specifically as follows: the original text and the perturbed text are input into the medical information extractor, and the original structured medical fact triple set and the perturbed structured medical fact triple set are output. The ratio of the intersection of the two triple sets to the original structured medical fact triple set is calculated as the fact retention rate. When the fact retention rate is lower than the preset threshold, the verification is determined to fail. The causal consistency scoring specifically involves inputting the causal graph structures before and after the perturbation into a pre-trained causal consistency discriminator. The causal consistency discriminator employs a graph neural network architecture, using real causal graphs annotated by medical experts as positive samples and randomly shuffled or incorrectly connected causal graphs as negative samples for pre-training. It outputs the probability value that the perturbed causal graph is valid in medical logic. When the probability value is lower than a preset threshold, the verification is deemed to have failed.
[0012] The second aspect of this invention discloses an AI-based automated medical record desensitization system, the system comprising: a data extraction module, a hierarchical module, a time constraint generation module, an associated text constraint generation module, and a desensitization module; The data extraction module is used to acquire the medical record document to be de-identified, perform multimodal parsing on the medical record document, extract text layer data, image layer data and structured field layer data, and obtain structured document and medical entity set; The grading module is used to perform re-identification risk grading and privacy sensitivity classification on each medical entity in the medical entity set, distinguishing each medical entity into direct identifiers, quasi-identifiers, and non-identifiers, and generating corresponding grading labels for each medical entity; wherein, the direct identifiers, quasi-identifiers, and non-identifiers are used to distinguish the data sensitivity level, the quasi-identifiers also correspond to the etiological characteristics of the disease to which the medical entity belongs, the direct identifiers are data that is directly related to the patient's personal information and needs to be directly removed or replaced, and the non-identifiers are data that is not directly or indirectly related to the patient's personal information and are retained; The time constraint generation module is used to query the time sensitivity attribute of the disease to which each of the quasi-identifiers belongs in the medical knowledge graph based on the constraint relationship between the time sensitivity attributes corresponding to each quasi-identifier; to perform multi-disease constraint conflict arbitration based on the constraint relationship between the time sensitivity attributes corresponding to each quasi-identifier; to generate a joint constraint matrix with the strictest of the time sensitivity attributes as the benchmark; and to generate an adaptive time offset at the record level based on the joint constraint matrix; wherein, the time sensitivity attribute includes at least a time granularity level, a critical time window, and a maximum allowable time offset; The associated text constraint generation module is used to extract the associated structural information between medical events from the structured document, encode the vectorized representation of the associated structural information, and perform style and content separation processing on the text in the structured document to obtain a style-neutral text representation and style constraint information. The desensitization module is used to perform controlled perturbation on the part of the vectorized representation corresponding to the quasi-identifier, using the joint constraint matrix and the adaptive time offset as perturbation boundaries and the style constraint information as perturbation constraints, to obtain a perturbation vectorized representation; and to perform medical semantic consistency verification on the perturbation vectorized representation. If the verification passes, the desensitized medical record document is output; if the verification fails, the parameters of the controlled perturbation are adjusted and the perturbation is re-executed.
[0013] Optionally, the time granularity levels include at least minute, hour, day, week, month, and grade levels; the multi-disease constraint conflict arbitration specifically includes the following priority rules: If the time granularity level of the disease corresponding to any of the aforementioned quasi-identifiers is at the minute or hour level, then that time granularity is used as the time reference unit for the overall offset. If there are no diseases with a time granularity level of minutes or hours, the minimum value of the maximum allowable time offset corresponding to each of the aforementioned quasi-identifiers shall be used as the upper limit of the overall offset. Time anchor protection principle: If multiple diseases share the same time anchor, the time offset corresponding to each disease should remain consistent.
[0014] Optionally, the association structure information is a causal graph structure, where nodes represent medical events and directed edges represent causal relationships between events; the association text constraint generation module performs encoding to obtain a vectorized representation of the association structure information, specifically: Each event node in the causal graph structure is initialized as a semantic embedding vector. The direction information of the directed edges is used as a constraint for message passing in the graph neural network. The neighborhood information of each node is iteratively aggregated through a multi-layer graph convolutional network to obtain the causal context-aware representation of each event node. The causal context-aware representations of all event nodes are weighted and pooled to obtain the vectorized representation of the causal graph structure.
[0015] Optionally, the separation of style and content is achieved by encoding the text into a content vector and a style vector, then standardizing and mapping the style vector, and finally reconstructing the text using the content vector and the standardized style vector. The style constraint information includes at least a difference metric of the style vector before and after the standardization mapping, and the difference metric is used to constrain the perturbation magnitude of the controlled perturbation.
[0016] Optionally, the medical semantic consistency verification performed by the desensitization module includes fact retention rate verification and causal consistency scoring; The fact retention rate verification is specifically as follows: the original text and the perturbed text are input into the medical information extractor, and the original structured medical fact triple set and the perturbed structured medical fact triple set are output. The ratio of the intersection of the two triple sets to the original structured medical fact triple set is calculated as the fact retention rate. When the fact retention rate is lower than the preset threshold, the verification is determined to fail. The causal consistency scoring specifically involves inputting the causal graph structures before and after the perturbation into a pre-trained causal consistency discriminator. The causal consistency discriminator employs a graph neural network architecture, using real causal graphs annotated by medical experts as positive samples and randomly shuffled or incorrectly connected causal graphs as negative samples for pre-training. It outputs the probability value that the perturbed causal graph is valid in medical logic. When the probability value is lower than a preset threshold, the verification is deemed to have failed.
[0017] The beneficial effects of this invention are as follows: 1. This invention classifies medical entities into direct identifiers, quasi-identifiers, and non-identifiers by performing risk grading and privacy sensitivity classification, and implements differentiated processing—direct identifiers are removed or replaced, non-identifiers are fully retained, and quasi-identifiers enter the subsequent graded perturbation process. This overcomes the problems of over- or under-sensitization caused by the one-size-fits-all approach of existing desensitization methods. While effectively blocking re-identification attack paths, it accurately preserves the medical review and clinical research usability of medical records. 2. This invention queries the time sensitivity attributes of the diseases corresponding to quasi-identifiers in the medical knowledge graph and performs multi-disease constraint conflict arbitration. It uses the most stringent of each time sensitivity attribute as the benchmark to generate a joint constraint matrix and adaptive time offset, so that time perturbation is constrained by the etiological characteristics of the diseases. The time sensitivity differences of different diseases can be accurately identified and differentiated. When the same patient suffers from multiple diseases at the same time, the time constraints of each disease are coordinated and unified through the arbitration mechanism, avoiding the time logic distortion problem caused by the uniform offset due to ignoring the constraint relationship between diseases in existing methods, and ensuring that the diagnosis and treatment timeline in the medical record after desensitization still conforms to clinical reality. 3. This invention extracts the structural information of relationships between medical events and encodes it into a vectorized representation. This enables the desensitization process to perceive the causal narrative structure of disease occurrence, development, diagnosis, and outcome in medical records, ensuring that controlled perturbations do not disrupt the causal relationships and temporal dependencies between events. The desensitized medical records can still be reviewed by experts based on complete diagnostic and treatment logic. 4. This invention separates the style and content of the text, obtaining style constraint information as a constraint condition for controlled perturbations. This neutralizes the stylistic features of the desensitized document, blocking attackers from inferring the writer's identity through stylistic fingerprints such as word preferences and sentence structure, filling the gap in document style privacy protection in existing desensitization schemes. 5. This invention performs medical semantic consistency verification on the vectorized representation of the perturbation and adjusts the perturbation parameters and re-executes when the verification fails. This gives the desensitization process automatic verification and feedback adjustment capabilities, avoiding the problem of key medical facts being destroyed or sensitive information remaining undetected in existing one-way desensitization processes, thus ensuring the reliability of the desensitization results.
[0018] In summary, this invention provides an automated de-identification scheme that can effectively defend against re-identification attacks while accurately preserving the medical usability of medical records, effectively solving the technical problem of balancing privacy protection and data utility in existing technologies. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating an AI-based automated de-identification method for medical records, provided in a specific embodiment of the present invention. Figure 2This is a schematic diagram of the structure of an AI-based automated medical record de-identification system provided in a specific embodiment of the present invention. Detailed Implementation
[0020] This invention discloses an AI-based automated de-identification method and system for medical records. Those skilled in the art can refer to the content of this document and appropriately modify the technical details for implementation. It is particularly important to note that all similar substitutions and modifications are obvious to those skilled in the art and are considered to be included in this invention. The methods and applications of this invention have been described through preferred embodiments. Those skilled in the art can clearly modify or appropriately change and combine the methods and applications described herein without departing from the content, spirit, and scope of this invention to implement and apply the technology of this invention.
[0021] The first aspect of this invention discloses an AI-based automated de-identification method for medical records, such as... Figure 1 As shown, the method includes: Step S1: Obtain the medical record document to be de-identified, perform multimodal parsing on the medical record document, extract text layer data, image layer data and structured field layer data, and obtain structured document and medical entity set.
[0022] It should be noted that in this step, the first step is to obtain the medical record document to be anonymized. The source of the medical record document can be a PDF file, scanned copy, or image file (such as JPG, PNG, or TIFF format) exported from a hospital's electronic medical record. Multimodal parsing is then performed on the obtained document. This parsing process employs corresponding processing techniques for different levels of document structure: for text-level data, text content, font attributes, position coordinates, and paragraph structure are extracted using a PDF parsing library; for image-level data, stamp areas, handwritten signature areas, and photo areas are detected using computer vision technology; for structured field-level data, key-value pairs such as patient name, hospital number, and examination date are extracted by parsing DICOM standard tags or EMR structured fields. After multimodal parsing, two sets of intermediate data are output: one is a structured document, which retains the original document's layout, text content, and position information; the other is a medical entity set, which is the collection of all medically related entities extracted from the document, including but not limited to disease names, drug names, examination items, surgical names, and symptom descriptions. This step provides the data foundation for subsequent hierarchical classification and related structure extraction.
[0023] Step S2: Perform re-identification risk classification and privacy sensitivity classification on each medical entity in the medical entity set, distinguish each medical entity into direct identifiers, quasi-identifiers and non-identifiers, and generate corresponding hierarchical labels for each medical entity.
[0024] Direct identifiers, quasi-identifiers, and non-identifiers are used to distinguish the sensitivity level of data. Quasi-identifiers also correspond to the etiological characteristics of the disease to which the medical entity belongs. Direct identifiers are data that are directly related to the patient's personal information and need to be removed or replaced directly. Non-identifiers are data that are not directly or indirectly related to the patient's personal information and are retained.
[0025] It should be noted that in this step, each medical entity in the medical entity set obtained in step S1 undergoes a re-identification risk grading and privacy sensitivity classification. Re-identification risk grading assesses the risk level of the entity being used by an attacker to re-identify a patient; privacy sensitivity classification assesses the sensitivity of the entity to patient privacy. Based on these two dimensions of assessment, each medical entity is divided into three categories: direct identifiers, quasi-identifiers, and non-identifiers. Direct identifiers are data directly associated with the patient's personal information, such as the patient's name, ID number, medical insurance card number, or mobile phone number; a single item can identify the patient and needs to be removed or replaced directly. Non-identifiers are data that is not directly or indirectly associated with the patient's personal information, such as a body temperature measurement of 38.5℃ or a white blood cell count of 12×10⁻⁶. 9 Clinical laboratory data such as / L are fully preserved; quasi-identifiers fall between the two. A single quasi-identifier cannot identify a patient, but multiple quasi-identifiers can be combined and matched with publicly available external data for re-identification. For example, a combination of information such as age, gender, residence, date of visit, and diagnosis name constitutes a quasi-identifier. Crucially, quasi-identifiers also correspond to the etiological characteristics of the disease to which the medical entity belongs—for example, the time characteristic corresponding to the diagnosis of "acute myocardial infarction" is at the minute level, and the time characteristic corresponding to "hypertension" is at the month level—this definition lays the foundation for time perturbations based on etiological constraints in subsequent steps. After grading, corresponding grading labels are generated for each medical entity for use in subsequent steps.
[0026] Step S3: Based on each quasi-identifier, query the time sensitivity attribute of its corresponding disease in the medical knowledge graph; based on the constraint relationship between the time sensitivity attributes corresponding to each quasi-identifier, perform multi-disease constraint conflict arbitration, use the most stringent one among the time sensitivity attributes as the benchmark to generate a joint constraint matrix, and generate record-level adaptive time offsets based on the joint constraint matrix.
[0027] The time sensitivity attributes include at least the time granularity level, the critical time window, and the maximum allowed time offset.
[0028] It should be noted that in this step, the time sensitivity attributes of the medical entities marked as quasi-identifiers in step S2 are queried and constrained for arbitration. Specifically, using each quasi-identifier as an index, the pre-constructed medical knowledge graph is queried to obtain the time sensitivity attributes of the disease to which the quasi-identifier belongs. The time sensitivity attribute is a quantitative description of the time characteristics of a disease, including at least three dimensions: time granularity level (i.e., the time precision required by the disease, such as minute, hour, day, week, month, or grade), key time window (i.e., the clinically significant time interval in the diagnosis and treatment of the disease, such as a 120-minute window from onset to reperfusion in acute myocardial infarction), and maximum allowable time offset (i.e., the maximum extent to which time information can be disturbed without disrupting the medical logic of the disease). When multiple quasi-identifiers for different diseases exist in the same medical record, there may be conflicts between the time sensitivity attributes of different diseases—for example, acute myocardial infarction requires minute-level precision, while type 2 diabetes, which also exists, only requires month-level precision. To address the aforementioned conflicts, a multi-disease constraint conflict arbitration is performed. The most stringent of the time-sensitivity attributes (i.e., the finest time granularity and the smallest allowable offset) is used as the benchmark to generate a joint constraint matrix. Based on this matrix, an adaptive time offset at the record level is generated. This offset is record-level, meaning all quasi-identifiers for the same patient share the same offset benchmark to ensure the consistency of temporal logic within the same medical record.
[0029] In this specific embodiment, the time granularity levels include at least minute, hour, day, week, month, and grade levels; in step S3, the multi-disease constraint conflict arbitration specifically includes the following priority rules: If the time granularity level of any quasi-identifier corresponding to the disease is at the minute or hour level, then that time granularity is used as the time reference unit for the overall offset. If there are no diseases with a time granularity level of minutes or hours, the minimum value of the maximum allowable time offset corresponding to each quasi-identifier shall be used as the upper limit of the overall offset. Time anchor protection principle: If multiple diseases share the same time anchor, the time offset corresponding to each disease should remain consistent.
[0030] It should be noted that, in a specific embodiment of step S3, the time granularity level is divided into at least six levels: minute, hour, day, week, month, and grade. These six levels correspond to the different time precision requirements of diseases: acute myocardial infarction, stroke, and other acute and critical illnesses have the highest time sensitivity, with clinical quality control indicators accurate to the minute; acute infections, acute pancreatitis, and other diseases have the next highest time sensitivity, with critical treatment windows measured in hours; chemotherapy cycles for tumor diseases are measured in days or weeks, with medium time sensitivity; and the management of chronic non-communicable diseases is measured in months, with low time sensitivity.
[0031] In this embodiment, multi-disease constraint conflict arbitration is performed based on the following three priority rules.
[0032] Rule 1 prioritizes the acute phase: if the time granularity of any quasi-identifier corresponds to a disease at the minute or hour level, then that time granularity is used as the overall time reference unit for the offset. For example, when a patient suffers from both acute myocardial infarction (minute level) and hypertension (month level), the minute level is used as the overall time reference unit for the offset to ensure that the diagnosis and treatment timeline of acute myocardial infarction is not distorted.
[0033] Rule 2 is the strictest protection principle: if there are no diseases with a time granularity level of minutes or hours, then the minimum value of the maximum allowable time offset corresponding to each quasi-identifier is used as the upper limit of the overall offset. For example, when a patient has both lung cancer (daily level, allowable offset ±3 days) and type 2 diabetes (monthly level, allowable offset ±7 days), ±3 days is used as the upper limit of the overall offset.
[0034] Rule 3 is the principle of protecting time anchors: if multiple diseases share the same time anchor, the time offset for each disease should remain consistent. For example, if the admission time of the same patient is the same time anchor for both acute myocardial infarction and type 2 diabetes, then the same offset should be used when shifting the time anchor to ensure that the timelines for both diseases are adjusted using the same reference system.
[0035] In this embodiment, the joint constraint matrix is the set of constraints generated according to the above arbitration rules. The rows of the matrix correspond to each quasi-identifier, the columns correspond to each time constraint dimension, and the element values in the matrix are the specific time offset constraint parameters that each quasi-identifier should follow after arbitration.
[0036] Step S4: Extract the correlation structure information between medical events from the structured document, and encode it to obtain a vectorized representation of the correlation structure information; perform style and content separation processing on the text in the structured document to obtain a style-neutral text representation and style constraint information.
[0037] It should be noted that in this step, the relational structure information between medical events is extracted from the structured document obtained in step S1, and this information is encoded into a vectorized representation. The relational structure information represents the inherent connections between various medical events in the medical record, including chronological relationships (e.g., "admission" precedes "surgery"), causal relationships (e.g., "infection" leads to "fever"), and dependency relationships (e.g., "diagnosis" depends on "examination results"). Specifically, the relational structure information is represented using a causal graph structure. Nodes in the causal graph represent medical events (e.g., "chest pain attack," "emergency visit," "electrocardiogram," "diagnosis of myocardial infarction," "PCI procedure," "symptom relief," etc.), and directed edges represent causal relationships between events (e.g., "chest pain attack" points to "emergency visit," indicating that the former leads to the latter). The causal graph structure comprehensively reflects the entire process of disease occurrence, development, diagnosis, treatment, and outcome. Furthermore, the causal graph structure is encoded into a vectorized representation: first, each event node is initialized as a semantic embedding vector, which is generated by a medical pre-trained language model; then, the directional information of the causal edges is used as a constraint for message passing in the graph neural network, and the neighborhood information of each node is iteratively aggregated through a multi-layer graph convolutional network, so that the representation of each node can perceive its upstream and downstream causal context; finally, the causal context-aware representations of all nodes are weighted and pooled to obtain the vectorized representation of the entire causal graph.
[0038] Simultaneously, this step also separates the style and content of the text in the structured document. Specifically, the text is encoded into content vectors and style vectors: the content vector carries the medical semantic information of the text (i.e., "what was said," such as diagnostic conclusions, medication plans, etc.), while the style vector carries the stylistic features of the text (i.e., "how it was said," such as word preferences, sentence structure, template habits, etc.). The style vectors are standardized and mapped to approximate a neutral style benchmark. Then, the text is reconstructed using the original content vector and the standardized style vector to obtain a style-neutralized text representation. Through the above separation and reconstruction, the stylistic features bearing the personal imprint of the original document are neutralized, while the medical semantic content is fully preserved. In addition, style constraint information is generated, which includes at least a difference metric of the style vector before and after standardization. This difference metric reflects the degree to which the style of the original document deviates from the neutral benchmark and is used to constrain the amplitude of controlled perturbations in subsequent steps—the greater the deviation, the higher the upper limit of the allowed perturbation amplitude.
[0039] In this specific embodiment, the associated structure information in step S4 is a causal graph structure, where nodes in the causal graph structure represent medical events and directed edges represent causal relationships between events. Encoding the vectorized representation of associated structural information specifically includes: Each event node in the causal graph structure is initialized as a semantic embedding vector. The direction information of the directed edges is used as the constraint for message passing in the graph neural network. The neighborhood information of each node is iteratively aggregated through a multi-layer graph convolutional network to obtain the causal context-aware representation of each event node. The causal context-aware representations of all event nodes are weighted and pooled to obtain the vectorized representation of the causal graph structure.
[0040] It should be noted that, in a specific embodiment of step S4, the correlation structure information between medical events is represented using a causal graph structure. Each node in the causal graph structure represents a medical event, including but not limited to symptom onset, medical visit, examination, diagnosis, treatment implementation, disease progression, and outcome. Each directed edge in the causal graph structure represents the causal relationship between two medical events, with the direction pointing from the cause event to the effect event. For example, the "chest pain attack" node points to the "emergency room visit" node via a directed edge, indicating that the chest pain attack led the patient to seek emergency room treatment.
[0041] In this embodiment, the specific implementation process of encoding the causal graph into a vectorized representation is as follows: First, each event node in the causal graph is initialized as a semantic embedding vector. This semantic embedding vector is generated by a language model (such as BioBERT) trained on medical corpora. The embedding vector of each node integrates the textual semantic information and event type information corresponding to the event. Second, the directional information of the directed edges in the causal graph is used as a constraint condition for message passing in the graph neural network—messages are only passed along the direction of the directed edges, that is, information is passed from the cause node to the effect node, and not vice versa, thus ensuring that the causal direction information is encoded into the node representation. Through iterative aggregation of multi-layer graph convolutional networks, the neighborhood information of each node is aggregated layer by layer, so that each node finally obtains a context-aware representation that integrates its upstream and downstream causal contexts. Finally, the causal context-aware representations of all event nodes are weighted and pooled, where the weights are determined by the importance of each node in the causal graph (such as the sum of out-degree and in-degree). The pooling result is the vectorized representation of the entire causal graph.
[0042] This vectorized representation encodes the complete causal relationships and temporal dependencies of medical events in the medical record. Subsequent controlled perturbations are performed in this vector space, rather than in the original text space, thereby ensuring that the perturbation operation can perceive and protect the causal structure between events.
[0043] In this specific embodiment, in step S4, the separation of style and content is achieved by encoding the text into content vectors and style vectors, standardizing and mapping the style vectors, and then reconstructing the text using the content vectors and the standardized style vectors. Style constraint information includes at least a difference measure of the style vector before and after standardization mapping, which is used to constrain the magnitude of the controlled perturbation.
[0044] It should be noted that, in a specific embodiment of step S4, the separation of style and content is achieved through a process of encoding-standardization-reconstruction.
[0045] Specifically, the input text is mapped by an encoder to a concatenation of content vectors and style vectors. The content vectors carry the medical semantic information of the text, including clinical facts such as diagnostic conclusions, medication plans, examination results, and treatment measures; the style vectors carry the stylistic features of the text, including word preferences (such as the difference between "we consider" and "clinically consider"), sentence structure (such as the frequency of use of long sentences and short sentences), and template habits (such as paragraph organization and information arrangement order) and other personalized expressions of the author.
[0046] After obtaining the content vector and style vector, a normalization mapping is performed on the style vector. The normalization mapping process involves projecting the original style vector onto a predefined neutral style baseline vector, making the mapped style vector approximate the standardized medical writing style. This neutral style baseline vector is obtained in advance by analyzing a large number of medical documents from different authors and extracting the common components of their style vectors, representing a general medical expression style after removing personal imprints.
[0047] After standardization mapping, the original content vector and the standardized style vector are used together as input to the decoder for text reconstruction, resulting in a style-neutral text representation. Since the content vector remains unchanged during the encoding-reconstruction process, the medical semantic content is fully preserved; while the style vector is standardized, neutralizing the personal style characteristics of the document.
[0048] In this embodiment, style constraint information is also generated, specifically a difference metric of the style vector before and after standardization. This difference metric can be obtained by calculating the Euclidean or cosine distance between the original style vector and the standardized style vector, and its magnitude reflects the degree to which the personal style of the original document deviates from the neutral benchmark. This difference metric is passed to step S5 to constrain the perturbation amplitude of the controlled perturbation—the larger the difference metric, the more distinct the personal style of the original document and the easier it is to be used for author attribution inference, thus the higher the upper limit of the allowed perturbation amplitude; conversely, if the original document has approached a neutral style, the perturbation amplitude is reduced accordingly to avoid overprocessing.
[0049] Step S5: Using the joint constraint matrix and adaptive time offset as perturbation boundaries and style constraint information as perturbation constraints, perform controlled perturbation on the part of the vectorized representation corresponding to the quasi-identifier to obtain the perturbation vectorized representation; perform medical semantic consistency verification on the perturbation vectorized representation. If the verification passes, output the desensitized medical record document. If the verification fails, adjust the parameters of the controlled perturbation and re-execute the perturbation.
[0050] It should be noted that in this step, the final desensitization operation is performed by combining the outputs of the preceding steps. Specifically, using the joint constraint matrix and adaptive time offset generated in step S3 as perturbation boundaries, and the style constraint information generated in step S4 as perturbation constraints, a controlled perturbation is performed on the part of the vectorized representation obtained in step S4 corresponding to the quasi-identifier. "Controlled perturbation" refers to performing a geometric transformation on the vectorized representation within the constraints of the perturbation boundaries—the perturbated embedding should maintain medical semantic equivalence with the original embedding in the semantic space (i.e., without changing the clinical meaning), but the representation form is changed to prevent re-identification attacks. Because the perturbation is subject to the triple constraints of the joint constraint matrix (etiological time constraints), the adaptive time offset (record-level unified benchmark), and the style constraint information (stylistic constraints), the direction and magnitude of the perturbation are precisely controlled within a range that is "sufficient to prevent re-identification without destroying medical semantics." After the perturbation is completed, the perturbed vectorized representation is obtained.
[0051] Subsequently, a medical semantic consistency check is performed on the vectorized representation of the perturbation. This check verifies whether the perturbation operation substantially alters the medical semantics of the medical record. If the check passes, it means that the perturbation operation successfully preserves the medical semantics while protecting privacy, resulting in the output of anonymized medical record documents. If the check fails, it indicates that the perturbation operation was excessive, and key medical facts were destroyed or omitted. In this case, the parameters of the controlled perturbation are automatically adjusted—for example, reducing the perturbation amplitude or adjusting the perturbation direction—and the perturbation is re-executed until the check passes. Through the aforementioned closed-loop mechanism of "perturbation-check-adjustment-reperturbation," it is ensured that the final output anonymized medical record can effectively block re-identification attack paths while accurately preserving its usability for medical review and clinical research.
[0052] In this specific embodiment, medical semantic consistency verification includes fact retention rate verification and causal consistency scoring; The fact retention rate verification is as follows: the original text and the perturbed text are input into the medical information extractor, and the original structured medical fact triple set and the perturbed structured medical fact triple set are output. The ratio of the intersection of the two triple sets to the original structured medical fact triple set is calculated as the fact retention rate. When the fact retention rate is lower than the preset threshold, the verification is deemed to have failed. The causal consistency scoring is as follows: the causal graph structures before and after the perturbation are input into a pre-trained causal consistency discriminator. The causal consistency discriminator adopts a graph neural network architecture, and is pre-trained with real causal graphs labeled by medical experts as positive samples and randomly shuffled or incorrectly connected causal graphs as negative samples. It outputs the probability value that the causal graph after the perturbation is medically logically valid. When the probability value is lower than a preset threshold, the verification is judged to fail.
[0053] It should be noted that, in a specific embodiment of step S5, the medical semantic consistency verification includes two independent verification dimensions: fact retention rate verification and causal consistency score. The two dimensions verify whether the perturbation operation has destroyed the medical semantics of the medical record from the entity level and the structural level, respectively.
[0054] In the fact retention rate verification, the original text and the perturbed text are input into a medical information extractor. This extractor is built based on a pre-trained named entity recognition model and a relation extraction model, and can extract structured medical fact triples from the medical text. Each triple is in the form of <subject, relation, object>, such as <patient, suffers from, acute myocardial infarction>, <drug, dosage, 300mg>, <surgery, time, day 2 after admission>, etc. The original text is extracted to obtain the original triple set, and the perturbed text is extracted to obtain the perturbed triple set. The ratio of the intersection of the two triple sets to the size of the original triple set is calculated as the fact retention rate. When the fact retention rate is lower than a preset threshold (e.g., 99.5%), the fact retention rate verification is deemed to have failed, indicating that the perturbing operation caused at least 0.5% of the medical facts to be changed or omitted, triggering a re-perturbing.
[0055] In the causal consistency scoring, the causal graph structure before perturbation and the causal graph structure reconstructed from the desensitized text after perturbation are respectively input into a pre-trained causal consistency discriminator. This discriminator employs a graph neural network architecture, trained using supervised graph classification pre-training with real medical causal graphs annotated by medical experts as positive samples and spurious causal graphs constructed by randomly shuffling node order, reversing directed edge directions, or incorrectly connecting events with no causal relationship. After training, the discriminator can output the probability value of any input causal graph being logically valid in medicine. During the desensitization process, the two causal graphs before and after perturbation are input into the discriminator, and their output probability values are compared. When the probability value of the perturbated causal graph is lower than a preset threshold (e.g., 0.95), or decreases by more than a preset range (e.g., 5%) compared to the probability value of the pre-perturbated causal graph, the causal consistency score verification is deemed to have failed, indicating that the perturbation operation disrupted the causal logic of the original medical record, triggering a re-perturbation.
[0056] If either verification dimension fails, the medical semantic consistency verification is deemed to have failed. The parameters of the controlled perturbation are automatically adjusted (including but not limited to reducing the perturbation amplitude, adjusting the perturbation direction, and reducing the offset). The perturbation operation in step S5 is then re-executed until both dimensions pass the verification.
[0057] This invention, through risk grading and privacy sensitivity classification of medical entities, distinguishes data into direct identifiers, quasi-identifiers, and non-identifiers and implements differentiated processing—direct identifiers are removed or replaced, non-identifiers are fully retained, and quasi-identifiers enter the subsequent graded perturbation process. This overcomes the problems of over- or under-sensitization caused by the one-size-fits-all desensitization in existing solutions. While effectively blocking the re-identification attack path, it accurately preserves the medical review and clinical research usability of medical records.
[0058] This invention addresses the issue by querying the time sensitivity attributes of diseases corresponding to quasi-identifiers in a medical knowledge graph and performing multi-disease constraint conflict arbitration. It generates a joint constraint matrix and adaptive time offset using the most stringent of each time sensitivity attribute as the benchmark. This ensures that time disturbances are constrained by the etiological characteristics of the diseases, allowing for accurate identification and differentiated processing of time sensitivity differences among different diseases. When a patient suffers from multiple diseases simultaneously, the time constraints of each disease are coordinated and unified through the arbitration mechanism. This avoids the time logic distortion problem caused by the uniform offset due to ignoring the constraint relationships between diseases in existing solutions, ensuring that the diagnosis and treatment timeline in the desensitized medical records still conforms to clinical reality.
[0059] This invention extracts the correlation structure information between medical events and encodes it into a vectorized representation, enabling the desensitization operation to perceive the causal narrative structure of disease occurrence, development, diagnosis, treatment, and outcome in medical records. This ensures that controlled perturbations do not disrupt the causal relationship and temporal dependence between events, and the desensitized medical records can still be used by review experts to make judgments based on complete diagnostic and treatment logic.
[0060] This invention separates the style and content of text to obtain style constraint information, which is then used as a constraint condition for controlled perturbation. This neutralizes the stylistic features of the anonymized document, blocking attackers from inferring the writer's identity through stylistic fingerprints such as word preferences and sentence structure. This fills the gap in existing anonymization schemes regarding document style privacy protection.
[0061] This invention provides an automatic verification and feedback adjustment capability for the desensitization process by performing medical semantic consistency verification on the perturbation vectorized representation and adjusting the perturbation parameters and re-executing when the verification fails. This avoids the problem of key medical facts being destroyed or sensitive information remaining undetected in the existing one-way desensitization process, thus ensuring the reliability of the desensitization results.
[0062] In summary, the embodiments of the present invention provide an automated de-identification scheme that can effectively defend against re-identification attacks while accurately preserving the medical usability of medical records, effectively solving the technical problem in the prior art that it is difficult to balance privacy protection and data utility.
[0063] Based on the AI-based automated medical record de-identification method provided above, this invention also provides an AI-based automated medical record de-identification system, such as... Figure 2 As shown, the system includes: a data extraction module 201, a hierarchical module 202, a time constraint generation module 203, a related text constraint generation module 204, and a desensitization module 205; The data extraction module 201 is used to obtain the medical record documents to be de-identified, perform multimodal parsing on the medical record documents, extract text layer data, image layer data and structured field layer data, and obtain structured documents and medical entity sets; The hierarchical module 202 is used to perform re-identification risk classification and privacy sensitivity classification on each medical entity in the medical entity set, distinguishing each medical entity into direct identifiers, quasi-identifiers and non-identifiers, and generating corresponding hierarchical labels for each medical entity; among them, direct identifiers, quasi-identifiers and non-identifiers are used to distinguish the data sensitivity level, and quasi-identifiers also correspond to the etiological characteristics of the disease to which the medical entity belongs; direct identifiers are data that are directly related to the patient's personal information and need to be directly removed or replaced; non-identifiers are data that are not directly or indirectly related to the patient's personal information and are retained. The time constraint generation module 203 is used to query the time sensitivity attribute of the disease to which each quasi-identifier belongs in the medical knowledge graph based on each quasi-identifier; to perform multi-disease constraint conflict arbitration based on the constraint relationship between the time sensitivity attributes corresponding to each quasi-identifier; to generate a joint constraint matrix based on the strictest of the time sensitivity attributes; and to generate an adaptive time offset at the record level based on the joint constraint matrix; wherein, the time sensitivity attribute includes at least the time granularity level, the key time window, and the maximum allowable time offset; The associated text constraint generation module 204 is used to extract the associated structural information between medical events from the structured document, encode the vectorized representation of the associated structural information, and perform style and content separation processing on the text in the structured document to obtain a style-neutral text representation and style constraint information. The desensitization module 205 is used to perform controlled perturbation on the part of the vectorized representation corresponding to the quasi-identifier, using the joint constraint matrix and adaptive time offset as perturbation boundaries and style constraint information as perturbation constraints, to obtain the perturbation vectorized representation; and to perform medical semantic consistency verification on the perturbation vectorized representation. If the verification passes, the desensitized medical record document is output; if the verification fails, the parameters of the controlled perturbation are adjusted and the perturbation is re-executed.
[0064] Optionally, the time granularity levels should include at least minute, hour, day, week, month, and grade levels; the multi-disease constraint conflict arbitration specifically includes the following priority rules: If the time granularity level of any quasi-identifier corresponding to the disease is at the minute or hour level, then that time granularity is used as the time reference unit for the overall offset. If there are no diseases with a time granularity level of minutes or hours, the minimum value of the maximum allowable time offset corresponding to each quasi-identifier shall be used as the upper limit of the overall offset. Time anchor protection principle: If multiple diseases share the same time anchor, the time offset corresponding to each disease should remain consistent.
[0065] Optionally, the association structure information is a causal graph structure, where nodes represent medical events and directed edges represent causal relationships between events; the association text constraint generation module 204 performs encoding to obtain a vectorized representation of the association structure information, specifically: Each event node in the causal graph structure is initialized as a semantic embedding vector. The direction information of the directed edges is used as the constraint for message passing in the graph neural network. The neighborhood information of each node is iteratively aggregated through a multi-layer graph convolutional network to obtain the causal context-aware representation of each event node. The causal context-aware representations of all event nodes are weighted and pooled to obtain the vectorized representation of the causal graph structure.
[0066] Optionally, the separation of style and content is achieved by encoding the text into content vectors and style vectors, normalizing and mapping the style vectors, and then reconstructing the text using the content vectors and the normalized style vectors. Style constraint information includes at least a difference measure of the style vector before and after standardization mapping, which is used to constrain the magnitude of the controlled perturbation.
[0067] Optionally, the medical semantic consistency checks performed by the desensitization module 205 include fact retention rate checks and causal consistency scoring; The fact retention rate verification is as follows: the original text and the perturbed text are input into the medical information extractor, and the original structured medical fact triple set and the perturbed structured medical fact triple set are output. The ratio of the intersection of the two triple sets to the original structured medical fact triple set is calculated as the fact retention rate. When the fact retention rate is lower than the preset threshold, the verification is deemed to have failed. The causal consistency scoring is as follows: the causal graph structures before and after the perturbation are input into a pre-trained causal consistency discriminator. The causal consistency discriminator adopts a graph neural network architecture, and is pre-trained with real causal graphs labeled by medical experts as positive samples and randomly shuffled or incorrectly connected causal graphs as negative samples. It outputs the probability value that the causal graph after the perturbation is medically logically valid. When the probability value is lower than a preset threshold, the verification is judged to fail.
[0068] In summary, the embodiments of the present invention provide an automated de-identification scheme that can effectively defend against re-identification attacks while accurately preserving the medical usability of medical records, effectively solving the technical problem in the prior art that it is difficult to balance privacy protection and data utility.
[0069] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0070] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0071] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. An AI-based automated de-identification method for medical records, characterized in that, The method includes: Step S1: Obtain the medical record document to be de-identified, perform multimodal parsing on the medical record document, extract text layer data, image layer data and structured field layer data, and obtain structured document and medical entity set; Step S2: Perform re-identification risk classification and privacy sensitivity classification on each medical entity in the medical entity set, distinguishing each medical entity into direct identifiers, quasi-identifiers, and non-identifiers, and generating corresponding classification labels for each medical entity; wherein, the direct identifiers, quasi-identifiers, and non-identifiers are used to distinguish the data sensitivity level, the quasi-identifiers also correspond to the etiological characteristics of the disease to which the medical entity belongs, the direct identifiers are data that are directly related to the patient's personal information and need to be directly removed or replaced, and the non-identifiers are data that are not directly or indirectly related to the patient's personal information and are retained; Step S3: Based on each of the quasi-identifiers, query the time sensitivity attribute of the disease to which it belongs in the medical knowledge graph; based on the constraint relationship between the time sensitivity attributes corresponding to each of the quasi-identifiers, perform multi-disease constraint conflict arbitration, generate a joint constraint matrix with the strictest one among the time sensitivity attributes as the benchmark, and generate an adaptive time offset at the record level based on the joint constraint matrix; wherein, the time sensitivity attribute includes at least a time granularity level, a key time window, and a maximum allowed time offset; Step S4: Extract the correlation structure information between medical events from the structured document, and encode the vectorized representation of the correlation structure information; perform style and content separation processing on the text in the structured document to obtain a style-neutral text representation and style constraint information; Step S5: Using the joint constraint matrix and the adaptive time offset as perturbation boundaries, and the style constraint information as perturbation constraints, perform controlled perturbation on the part of the vectorized representation corresponding to the quasi-identifier to obtain the perturbation vectorized representation; perform medical semantic consistency verification on the perturbation vectorized representation. If the verification passes, output the desensitized medical record document; if the verification fails, adjust the parameters of the controlled perturbation and re-execute the perturbation.
2. The AI-based automated de-identification method for medical records according to claim 1, characterized in that, In step S2, the time granularity level includes at least minute, hour, day, week, month, and grade levels; in step S3, the multi-disease constraint conflict arbitration specifically includes the following priority rules: If the time granularity level of the disease corresponding to any of the aforementioned quasi-identifiers is at the minute or hour level, then that time granularity is used as the time reference unit for the overall offset. If there are no diseases with a time granularity level of minutes or hours, the minimum value of the maximum allowable time offset corresponding to each of the aforementioned quasi-identifiers shall be used as the upper limit of the overall offset. Time anchor protection principle: If multiple diseases share the same time anchor, the time offset corresponding to each disease should remain consistent.
3. The AI-based automated de-identification method for medical records according to claim 1, characterized in that, The association structure information in step S4 is a causal graph structure, where nodes in the causal graph structure represent medical events and directed edges represent causal relationships between events. The encoding process for obtaining the vectorized representation of the associated structural information specifically includes: Each event node in the causal graph structure is initialized as a semantic embedding vector. The direction information of the directed edges is used as a constraint for message passing in the graph neural network. The neighborhood information of each node is iteratively aggregated through a multi-layer graph convolutional network to obtain the causal context-aware representation of each event node. The causal context-aware representations of all event nodes are weighted and pooled to obtain the vectorized representation of the causal graph structure.
4. The AI-based automated de-identification method for medical records according to claim 1, characterized in that, In step S4, the separation of style and content is achieved by encoding the text into a content vector and a style vector, standardizing the style vector, and then reconstructing the text using the content vector and the standardized style vector. The style constraint information includes at least a difference metric of the style vector before and after the standardization mapping, and the difference metric is used to constrain the perturbation magnitude of the controlled perturbation.
5. The AI-based automated de-identification method for medical records according to claim 1, characterized in that, In step S5, the medical semantic consistency verification includes fact retention rate verification and causal consistency scoring; The fact retention rate verification is specifically as follows: the original text and the perturbed text are input into the medical information extractor, and the original structured medical fact triple set and the perturbed structured medical fact triple set are output. The ratio of the intersection of the two triple sets to the original structured medical fact triple set is calculated as the fact retention rate. When the fact retention rate is lower than the preset threshold, the verification is determined to fail. The causal consistency scoring specifically involves inputting the causal graph structures before and after the perturbation into a pre-trained causal consistency discriminator. The causal consistency discriminator employs a graph neural network architecture, using real causal graphs annotated by medical experts as positive samples and randomly shuffled or incorrectly connected causal graphs as negative samples for pre-training. It outputs the probability value that the perturbed causal graph is valid in medical logic. When the probability value is lower than a preset threshold, the verification is deemed to have failed.
6. An AI-based automated medical record de-identification system, characterized in that, The system includes: a data extraction module, a hierarchical module, a time constraint generation module, a related text constraint generation module, and a desensitization module; The data extraction module is used to acquire the medical record document to be de-identified, perform multimodal parsing on the medical record document, extract text layer data, image layer data and structured field layer data, and obtain structured document and medical entity set; The grading module is used to perform re-identification risk grading and privacy sensitivity classification on each medical entity in the medical entity set, distinguishing each medical entity into direct identifiers, quasi-identifiers, and non-identifiers, and generating corresponding grading labels for each medical entity; wherein, the direct identifiers, quasi-identifiers, and non-identifiers are used to distinguish the data sensitivity level, the quasi-identifiers also correspond to the etiological characteristics of the disease to which the medical entity belongs, the direct identifiers are data that is directly related to the patient's personal information and needs to be directly removed or replaced, and the non-identifiers are data that is not directly or indirectly related to the patient's personal information and are retained; The time constraint generation module is used to query the time sensitivity attribute of the disease to which each of the quasi-identifiers belongs in the medical knowledge graph based on the constraint relationship between the time sensitivity attributes corresponding to each quasi-identifier; to perform multi-disease constraint conflict arbitration based on the constraint relationship between the time sensitivity attributes corresponding to each quasi-identifier; to generate a joint constraint matrix with the strictest of the time sensitivity attributes as the benchmark; and to generate an adaptive time offset at the record level based on the joint constraint matrix; wherein, the time sensitivity attribute includes at least a time granularity level, a critical time window, and a maximum allowable time offset; The associated text constraint generation module is used to extract the associated structural information between medical events from the structured document, encode the vectorized representation of the associated structural information, and perform style and content separation processing on the text in the structured document to obtain a style-neutral text representation and style constraint information. The desensitization module is used to perform controlled perturbation on the part of the vectorized representation corresponding to the quasi-identifier, using the joint constraint matrix and the adaptive time offset as perturbation boundaries and the style constraint information as perturbation constraints, to obtain a perturbation vectorized representation; and to perform medical semantic consistency verification on the perturbation vectorized representation. If the verification passes, the desensitized medical record document is output; if the verification fails, the parameters of the controlled perturbation are adjusted and the perturbation is re-executed.
7. The AI-based automated medical record de-identification system according to claim 6, characterized in that, The time granularity levels include at least minute, hour, day, week, month, and grade levels; the multi-disease constraint conflict arbitration specifically includes the following priority rules: If the time granularity level of the disease corresponding to any of the aforementioned quasi-identifiers is at the minute or hour level, then that time granularity is used as the time reference unit for the overall offset. If there are no diseases with a time granularity level of minutes or hours, the minimum value of the maximum allowable time offset corresponding to each of the aforementioned quasi-identifiers shall be used as the upper limit of the overall offset. Time anchor protection principle: If multiple diseases share the same time anchor, the time offset corresponding to each disease should remain consistent.
8. The AI-based automated medical record de-identification system according to claim 6, characterized in that, The association structure information is a causal graph structure, where nodes represent medical events and directed edges represent causal relationships between events; the association text constraint generation module performs encoding to obtain a vectorized representation of the association structure information, specifically: Each event node in the causal graph structure is initialized as a semantic embedding vector. The direction information of the directed edges is used as a constraint for message passing in the graph neural network. The neighborhood information of each node is iteratively aggregated through a multi-layer graph convolutional network to obtain the causal context-aware representation of each event node. The causal context-aware representations of all event nodes are weighted and pooled to obtain the vectorized representation of the causal graph structure.
9. The AI-based automated medical record de-identification system according to claim 6, characterized in that, The separation of style and content is achieved by encoding the text into content vectors and style vectors, standardizing and mapping the style vectors, and then reconstructing the text using the content vectors and the standardized style vectors. The style constraint information includes at least a difference metric of the style vector before and after the standardization mapping, and the difference metric is used to constrain the perturbation magnitude of the controlled perturbation.
10. The AI-based automated medical record de-identification system according to claim 6, characterized in that, The medical semantic consistency verification performed by the desensitization module includes fact retention rate verification and causal consistency scoring; The fact retention rate verification is specifically as follows: the original text and the perturbed text are input into the medical information extractor, and the original structured medical fact triple set and the perturbed structured medical fact triple set are output. The ratio of the intersection of the two triple sets to the original structured medical fact triple set is calculated as the fact retention rate. When the fact retention rate is lower than the preset threshold, the verification is determined to fail. The causal consistency scoring specifically involves inputting the causal graph structures before and after the perturbation into a pre-trained causal consistency discriminator. The causal consistency discriminator employs a graph neural network architecture, using real causal graphs annotated by medical experts as positive samples and randomly shuffled or incorrectly connected causal graphs as negative samples for pre-training. It outputs the probability value that the perturbed causal graph is valid in medical logic. When the probability value is lower than a preset threshold, the verification is deemed to have failed.