Medical text privacy information extraction and encryption method, system, terminal and medium

By combining neural network models and differential privacy technology, the problem of inaccurate privacy identification in medical texts is solved, achieving efficient extraction and encryption of privacy information, ensuring data security and availability, and supporting disease association analysis.

CN120632126BActive Publication Date: 2026-01-09INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511127175.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2026-01-09
Estimated Expiration
2045-08-13

AI Technical Summary

Technical Problem

Existing medical text privacy protection technologies struggle to accurately identify complex semantic privacy, resulting in incomplete information extraction. Furthermore, existing encryption schemes cannot support statistical analysis and lack systematic privacy grading protection, making it difficult to balance data utility and privacy security.

Method used

By employing a neural network-based relation extraction model and differential privacy technology, combined with a privacy-sensitive database and association rules in the medical field, and through noise modulation mechanisms and homomorphic encryption, we can extract and encrypt privacy information from medical texts, ensuring the accuracy of privacy identification and data availability.

Benefits of technology

It improves the accuracy of privacy identification, reduces the false alarm rate, supports disease association analysis in encrypted state, and preserves the scientific research value and privacy protection of medical data to the greatest extent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632126B_ABST
    Figure CN120632126B_ABST
Patent Text Reader

Abstract

The application relates to the field of medical data management, and specifically provides a medical text privacy information extraction and encryption method, system, terminal and medium, which comprises the following steps: extracting entities from a medical text by using a natural language processing technology; inputting the medical text and the extracted entities into a pre-trained neural network-based relation extraction model to obtain the relations between the entities and generate entity relation triples; preliminarily screening a privacy candidate set according to a sensitive library and association rules, performing semantic verification on the candidate set by using a privacy recognition model to realize secondary screening and obtain a final privacy candidate set; adding noise to corresponding entities in the medical text by using a differential privacy technology according to the entities in the final privacy candidate set to generate a noise-disturbed medical text; and saving the triples in the final privacy candidate set after homomorphic encryption. The application improves the privacy recognition accuracy and reduces the false positive rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of medical data management, in particular to a medical text privacy information extraction and encryption method, system, terminal and medium. BACKGROUND

[0002] With the development of medical informatization, medical text data such as electronic medical records and health archives are growing exponentially, which contains a large amount of sensitive personal information such as disease history and genetic test results. Traditional privacy protection technologies include rule-based information extraction, conventional desensitization technology, and encryption scheme. However, the rule-based information extraction method is difficult to accurately identify the complex semantic privacy in the medical text; the conventional desensitization technology such as simple replacement or deletion can protect the original data, but it causes a serious loss of medical research value; and the existing encryption scheme can ensure data security, but it cannot support necessary statistical analysis operations. More importantly, the related technology lacks a systematic medical privacy grading protection mechanism. The same protection strength is often used for direct identifiers such as identity cards and indirect sensitive information such as disease diagnosis, which may cause over-protection affecting data utility, and may cause privacy leakage due to insufficient protection. In addition, the professional terms and complex context relationships unique to medical texts make the general privacy computing model perform poorly in accuracy and recall rate, which cannot meet the requirements of privacy protection. SUMMARY

[0003] To solve the above problems, the present application provides a medical text privacy information extraction and encryption method, system, terminal and medium, which improves the accuracy of privacy identification, reduces the false positive rate, supports disease association analysis under encryption, and improves the medical data utility retention rate and protection strength through a dynamic noise adjustment mechanism.

[0004] In a first aspect, the technical solution of the present application provides a medical text privacy information extraction and encryption method, comprising the following steps:

[0005] Obtaining a medical text to be processed, using natural language processing technology to extract entities from the medical text;

[0006] Inputting the medical text and the extracted entities into a pre-trained neural network-based relation extraction model to obtain the relationship between each entity and generate entity relationship triples;

[0007] According to the pre-configured medical field privacy sensitive library and association rules, a preliminary privacy candidate set is screened out, and a pre-trained privacy identification model is used for semantic verification of the candidate set to realize secondary screening, and obtain the final privacy candidate set. The elements in the privacy candidate set are entities or triples;

[0008] According to the entity in the final privacy candidate set, a noise is added to the corresponding entity in the medical text using differential privacy technology to generate a noise disturbed medical text;

[0009] The triplets in the final privacy candidate set are saved after homomorphic encryption.

[0010] In an optional implementation, a medical text to be processed is acquired, and an entity is extracted from the medical text using a natural language processing technology, specifically including:

[0011] The medical text to be processed is preprocessed, including removing noise characters, unifying text format, filtering general stop words according to a stop word table customized according to characteristics of the medical field, and retaining field key words;

[0012] The preprocessed medical text is segmented using a natural language processing technology, continuous text is segmented into independent lexical units, and each lexical unit is tagged with a part of speech;

[0013] A named entity recognition model based on deep learning is adopted to recognize entities in the medical field from the text after segmentation and part of speech tagging;

[0014] The recognized entities are post-processed, including merging and splitting multiple-word entities with errors, and removing repeated or low-confidence entities;

[0015] An entity set is generated, including text content, type and location information of each entity in the original text.

[0016] In an optional implementation, the medical text and the extracted entities are input into a pre-trained neural network-based relation extraction model to obtain the relationship between each entity and generate entity relationship triplets, specifically including:

[0017] The medical text and the entity set are received, and the medical text is standardized processed;

[0018] Based on the extracted entity set, all possible entity combination pairs are generated within a given context window range, and entity pair screening rules are set according to domain knowledge to exclude irrelevant entity combinations;

[0019] An input representation is constructed for each entity pair, including interception of the original text segment, labeling of the location information of the target entity in the text, and injection of entity type features;

[0020] The constructed input data is input into the pre-trained relation extraction neural network model, the relation extraction neural network model uses a Transformer encoder to obtain a context-aware representation of the text, extracts a feature representation of the target entity, focuses on entity-related context using an attention mechanism, fuses entity features, relative position features and global context features, generates a relation classification feature vector, and calculates the probability distribution of each relation category through a fully connected layer and a softmax function;

[0021] The relation type with the highest probability is selected as the predicted relation of the entity pair, and a confidence threshold is applied to filter, and only the relations with a prediction confidence exceeding a preset threshold are retained;

[0022] The effective entity relation group is constructed as a structured triple.

[0023] In an optional implementation, a privacy candidate set is preliminarily screened according to a preconfigured medical field privacy sensitive library and an association rule, specifically including:

[0024] A predefined medical field privacy sensitive library is loaded, which contains a sensitive entity type list, a sensitive keyword table and a sensitive pattern rule;

[0025] An input entity set is traversed, and a judgment is performed on each entity, including checking whether the entity type belongs to the sensitive entity type in the privacy sensitive library, verifying whether the entity text content completely or partially matches the sensitive keyword table, and applying a regular expression verification to the entity of a specific type;

[0026] An entity satisfying any judgment condition is marked as a privacy candidate entity;

[0027] An input entity relation triple is analyzed, and an association rule is applied for privacy judgment, including: loading a predefined sensitive relation pattern library containing medical privacy relation combinations, performing pattern matching on each triple, judging whether it satisfies the sensitive relation pattern, and marking the triple satisfying the sensitive relation pattern as a privacy candidate triple.

[0028] In an optional implementation, a pre-trained privacy recognition model is used to perform semantic verification on the candidate set to realize secondary screening, and obtain a final privacy candidate set, specifically including:

[0029] A privacy candidate set generated by preliminary screening is received, a complete context representation is constructed for each candidate element, a text segment containing the target element and a surrounding context window are extracted, and the text segment is standardized;

[0030] The verification process is performed on the candidate privacy entity, including: inputting the entity and its context into a pre-trained sequence labeling model, obtaining the entity type probability distribution and boundary mark output by the model, verifying the consistency of the entity boundary and the type, calculating the entity recognition confidence score, and comparing with a preset threshold to determine whether to retain;

[0031] The verification process is performed on the candidate privacy relationship triple, including: inputting the complete triple and its context into a pre-trained relationship classification model, obtaining the relationship type probability distribution output by the model, verifying the rationality of the relationship semantics and the consistency of the context, calculating the relationship classification confidence score, and applying a dynamic threshold strategy for screening.

[0032] In an optional implementation, according to the entities in the final privacy candidate set, a differential privacy technique is used to add noise to the corresponding entities in the medical text to generate a noise-perturbed medical text, specifically including:

[0033] Load the final determined privacy candidate entity set and the original medical text, parse the attribute information of each candidate entity, including the entity text content, type, starting and ending position index in the medical text, and privacy sensitivity level;

[0034] Based on the entity type and the privacy sensitivity level, configure the differential privacy protection parameters;

[0035] Locate the specific position of each privacy candidate entity in the medical text, and perform corresponding noise addition operation based on the differential privacy protection parameters according to the entity type to generate a noise-perturbed medical text.

[0036] In an optional implementation, the triples in the final privacy candidate set are saved after homomorphic encryption, specifically including:

[0037] Load the final determined privacy candidate triple set, parse the structured information of each triple, including the text content of the head entity, the relationship type, the tail entity, the entity type, the context association information of the triple in the medical text, and the privacy sensitivity level;

[0038] Start the homomorphic encryption key management module and perform key generation and initialization operation;

[0039] For each privacy candidate triple, configure differential encryption parameters according to the types of the head entity and the tail entity and the relationship type;

[0040] Perform hierarchical encryption processing on the triple.

[0041] In a second aspect, the technical scheme of the present application provides a medical text privacy information extraction and encryption system, including:

[0042] An entity extraction module is configured to obtain medical text to be processed, and extract entities from the medical text by using natural language processing technology.

[0043] An entity relationship triple generation module is configured to input the medical text and the extracted entities into a pre-trained neural network-based relation extraction model, obtain relationships between the entities, and generate entity relationship triples.

[0044] A privacy candidate set generation module is configured to preliminarily screen out a privacy candidate set according to a pre-configured medical field privacy sensitive library and association rules, and perform secondary screening on the candidate set by using a pre-trained privacy recognition model to achieve semantic verification, so as to obtain a final privacy candidate set, and elements in the privacy candidate set are entities or triples.

[0045] A medical text noise disturbance module is configured to add noise to corresponding entities in the medical text by using differential privacy technology according to the entities in the final privacy candidate set, so as to generate noise-disturbed medical text.

[0046] A triple homomorphic encryption module is configured to perform homomorphic encryption on the triples in the final privacy candidate set and save the homomorphic encryption result.

[0047] In a third aspect, the technical solution of the present application provides a terminal, which comprises:

[0048] A memory is configured to store a medical text privacy information extraction and encryption program.

[0049] A processor is configured to implement the steps of the medical text privacy information extraction and encryption method according to any one of the above aspects when the medical text privacy information extraction and encryption program is executed.

[0050] In a fourth aspect, the technical solution of the present application provides a computer readable storage medium, wherein the readable storage medium stores a medical text privacy information extraction and encryption program, and the medical text privacy information extraction and encryption program is configured to implement the steps of the medical text privacy information extraction and encryption method according to any one of the above aspects when executed by a processor.

[0051] From the above technical solution, the present application has the following advantages: first, the natural language technology is used to realize accurate identification of medical entities and relationships, the sensitive library words and deep learning verification are combined to construct a privacy candidate set, and then the differential privacy technology is used for differential privacy protection, for example, the direct identifier is implemented in a format-preserving manner, strict desensitization is implemented, semantic noise conforming to differential privacy is added to sensitive information such as disease diagnosis, and the homomorphic encryption is used to protect the key relationship triple. The hierarchical processing method can maximize the preservation of the scientific research value of the medical text, improve the privacy identification accuracy, reduce the false positive rate, support disease association analysis in the encrypted state, improve the medical data utility reservation rate and protection strength through the dynamic noise adjustment mechanism, and guarantee the data privacy and security. BRIEF DESCRIPTION OF DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the present application, the drawings required to be used in the description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0053] Figure 1 A medical text privacy information extraction and encryption method flowchart is provided for the embodiments of the present application.

[0054] Figure 2 A medical text privacy information extraction and encryption system structure schematic diagram is provided for the embodiments of the present application.

[0055] Figure 3 A terminal structure schematic diagram is provided for the embodiments of the present application. DETAILED DESCRIPTION

[0056] In order to make the application purpose, features and advantages of the present application more obvious and easy to understand, the technical solutions protected by the present application will be described in detail below with specific embodiments and drawings. Obviously, the following described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0057] Unless otherwise defined, all technical and scientific terms used in the present application have the same meaning as understood by those skilled in the art to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing the specific embodiments of the present application, and are not intended to limit the present application.

[0058] Figure 1A medical text privacy information extraction and encryption method flow chart is provided for the embodiment of the present application. Among them, Figure 1 The execution subject can be a medical text privacy information extraction and encryption system. The medical text privacy information extraction and encryption method provided by the embodiment of the present application is executed by a computer device, and accordingly, the medical text privacy information extraction and encryption system runs in the computer device. According to different needs, the order of steps in the flow chart can be changed, and some can be omitted.

[0059] As Figure 1 shown, the method comprises the following steps.

[0060] S1, obtaining the medical text to be processed, and extracting entities from the medical text using natural language processing technology.

[0061] S2, inputting the medical text and the extracted entities into a pre-trained neural network-based relation extraction model to obtain the relationship between each entity and generate entity relationship triples.

[0062] S3, according to the pre-configured medical field privacy sensitive library and association rules, a preliminary screening of the privacy candidate set is performed, and a pre-trained privacy recognition model is used for semantic verification to realize secondary screening, and obtain the final privacy candidate set. The elements in the privacy candidate set are entities or triples.

[0063] S4, according to the entities in the final privacy candidate set, using differential privacy technology to add noise to the corresponding entities in the medical text, generating noise disturbed medical text.

[0064] S5, saving the triples in the final privacy candidate set after homomorphic encryption.

[0065] As a refinement and extension of the above embodiment, in order to completely describe the specific implementation process in the embodiment, the following will give a non-limiting description of the specific implementation of the above steps.

[0066] In some optional embodiments, step S1 obtains the medical text to be processed, and extracts entities from the medical text using natural language processing technology, which specifically includes the following steps.

[0067] S11, preprocessing the medical text to be processed, including removing noise characters, unifying text format, filtering general stop words according to the stop word table customized according to the characteristics of the medical field, and retaining field key words.

[0068] Remove noise characters in the text, including special symbols, invalid spaces and non-standard format content.

[0069] Unify the text format, including date, number, case, etc. Standardization processing.

[0070] According to the characteristics of the medical field, a custom stop word list is customized to filter general stop words such as "de" and "le" and retain field keywords such as "medical record number" and "diagnosis result".

[0071] S12, using natural language processing technology to segment the preprocessed medical text, the continuous text is segmented into independent lexical units, and each lexical unit is tagged with a part of speech.

[0072] The labeled content includes nouns, verbs, adjectives, etc. to identify potential entity candidate words.

[0073] S13, using a named entity recognition model based on deep learning to identify entities in the medical field from the segmented and part-of-speech tagged text.

[0074] Specifically, the preprocessed text is input into the pre-trained entity recognition model BERT-BiLSTM-CRF, and the model outputs the entity label of each lexical unit, including entity type (such as name, disease name, ID number) and boundary marker (B / I / O), according to the label sequence to extract complete entities, for example:

[0075] Input text: "Patient Zhang is diagnosed with diabetes";

[0076] Model output: "Zhang / B-PER Diabetes / B-DISEASE";

[0077] Extracted entities: "Zhang" (name), "diabetes" (disease name).

[0078] For the identified entities, their attribute information can be further extracted, including through context analysis or predefined attribute rules to extract additional attributes of the entity, such as "age: 30 years old" and "medical record number: 123456".

[0079] S14, post-processing of the identified entities, including merging and splitting multiple-word entities, removing duplicate or low-confidence entities.

[0080] S15, generating an entity set, including the text content, type, and location information of each entity in the original text.

[0081] The final extracted entities and their attributes are output as a structured list as input to the subsequent relationship extraction module, for example: [

[0083] {"text": "Zhang", "type": "PER", "start_pos": 3, "end_pos": 5},

[0084] {"text": "diabetes", "type": "DISEASE", "start_pos": 8, "end_pos": 11} ]

[0086] Through the above steps, key entity information can be efficiently and accurately extracted from medical texts, providing structured input for subsequent privacy relationship extraction and encryption protection. The BERT deep learning model combined with pre-processing techniques adapted to the field improves the recall rate and precision of entity recognition, especially for complex terminology and rare disease names, drug codes, and other long-tail entities in the medical field.

[0087] In some optional embodiments, step S2 inputs the medical text and extracted entities into a pre-trained neural network-based relationship extraction model to obtain the relationships between entities and generate entity relationship triples, including the following steps.

[0088] S21, receiving medical text and entity set, and standardizing the medical text.

[0089] The medical text processed by entity extraction and the corresponding entity set are received, the entity set includes the text content, type, and location information of each entity in the original text; the input text is standardized, including unified coding format, removing redundant spaces and special characters, to ensure accurate correspondence between the text and the entity location.

[0090] S22, based on the extracted entity set, generate all possible entity combination pairs within a given context window, and set entity pair screening rules based on domain knowledge to exclude irrelevant entity combinations.

[0091] Map the extracted entities to the standard types of medical ontology, calculate the absolute distance and relative distance between entities according to the original text character offset, the distance is determined by the number of characters, and the relative distance is determined by the sentence and paragraph level.

[0092] Set the basic window size to the number of characters, for example, the basic window size of "disease-treatment" is ± 150 characters, and the basic window size of "patient-test result" is ± 100 characters.

[0093] Arrange and combine all entities within the window, and screen the entities based on the screening rules of domain knowledge, for example, entity 1 is patient age and entity 2 is test instrument, which are excluded without verb connection. Necessary reservation rules, such as the presence of "take" "injection" and other verbs in the window, retain the pattern of (patient, medication, drug).

[0094] S23, build a model input representation for each entity pair, including the original text segment, mark the position information of the target entity in the text, and inject entity type features.

[0095] The original text segment ensures the integrity of the context containing the target entity pair.

[0096] Mark the position information of the target entity in the text, identify the entity boundary with special markers or position encoding.

[0097] Inject entity type features, convert entity type information into embedding vectors and fuse with text representation.

[0098] S24, input the built input data into the pre-trained relation extraction neural network model, the relation extraction neural network model uses the Transformer encoder to obtain the context-aware representation of the text, extracts the feature representation of the target entity, uses the attention mechanism to focus on the entity-related context, fuses the entity features, relative position features and global context features, generates a relationship classification feature vector, and calculates the probability distribution of each relationship class through the full connection layer and softmax function.

[0099] The relation extraction neural network model uses the R-BERT model, which can identify the relationship between entities in the text and form entity association information.

[0100] Specifically, multi-layer Transformer encoding is used: H = BERT(input_ids, attention_mask, token_type_ids), the output dimension is [batch_size, seq_len, hidden_size].

[0101] The average pooling is used to take the average value of the vector corresponding to the token of the entity pair to generate a unified entity representation vector. First, find the token vector corresponding to the start and end positions of the entity in the text. Then add all the token vectors of the entity and take the arithmetic mean to get the entity representation vector e. It is best to use the average vector as the semantic representation of the entity for subsequent relation extraction or graph construction.

[0102] The average pooling is represented as: , .

[0103] Where, , is the vector representation of entity 1 and entity 2, , is the number of tokens contained by entity 1 and entity 2, , The start and end position index of entity 1 in the text, 、The start and end position index of entity 2 in the text, The hidden layer vector of the i-th or j-th token.

[0104] Attention mechanism is introduced by using attention pooling, which assigns weights to different tokens within an entity, and generates an entity representation with more focused key semantics through weighted average. First, the importance score of each token in the entity is calculated through self-attention or cross-attention mechanism. For example, the entity token vector is input into a small neural network (such as a single-layer fully connected layer), and the weight α_i of each token is output, satisfying α_i ≥ 0 and ∑α_i = 1. The entity token vector is weighted and summed according to the weight to obtain the entity representation vector e. The key semantic position within the entity can be interpreted by visualizing the weight.

[0105] Combining the advantages and disadvantages of average pooling and attention pooling, the outputs of the two are spliced as entity representation ([e_avg, e_attn]), which combines generalization and semantic focusing ability. The entity representation can more accurately capture semantic information and provide high-quality basic data for subsequent relation extraction and construction.

[0106] The entity representation and global semantics (such as the output of the [CLS] token) are spliced to form a relationship feature vector, which contains: [e1, e2, e1-e2, e1×e2, global semantics], enhancing the interaction information between entities. Multi-feature fusion r = [e1; e2; e1-e2; e1⊙e2; hcls], where: [;] represents vector splicing; ⊙ represents element-level multiplication; h_cls is the representation of the [CLS] token.

[0107] The relationship classifier is the last step of the relation extraction model, and its core function is to map the fusion features of the entity pair to the probability distribution of the relationship type.

[0108] Fully connected layer calculation:

[0109] Softmax probability distribution formula:

[0110] Output dimension: [batch_size, num_relations]

[0111] S25, select the relationship type with the highest probability as the predicted relationship of the entity pair, and apply a confidence threshold filter to only keep the relationships with a prediction confidence exceeding the preset threshold.

[0112] The relation type probability distribution of the entity pair is output by the classification layer, the relation with the highest probability is selected as the prediction result, a confidence threshold (such as 70%) is set, low-confidence relations are filtered, and misjudgments are reduced.

[0113] For the special requirements of the medical field, post-processing rules can be applied to further verify the rationality of the relations, such as excluding "drug treatment-age" and other relation combinations that do not conform to medical common sense.

[0114] S26, the effective entity relation combination is constructed as a structured triple.

[0115] The effective entity relation combination is constructed as a structured triple, and the format is (head entity, relation type, tail entity). The final generated standardized entity relation triple set is output, each triple contains complete metadata information such as the text and type of the head entity and tail entity, the relation type and confidence score, the location context in the original text, and the timestamp for time-series medical data.

[0116] By using a neural network model to capture deep semantic relationships, the recognition ability for complex medical relationships is improved; by using multi-feature fusion, the problem of fuzzy entity relations in medical text is solved.

[0117] In some optional embodiments, in step S3, the privacy candidate set is preliminarily screened according to the pre-configured medical field privacy sensitive library and the association rules, which specifically includes the following steps.

[0118] S311, load the pre-defined medical field privacy sensitive library, which contains a sensitive entity type list, a sensitive keyword table, and a sensitive pattern rule.

[0119] The sensitive entity type list includes but is not limited to patient name, ID number, medical insurance account number, disease name, and examination result code.

[0120] The sensitive keyword table covers medical privacy-related terms and their synonyms and abbreviations.

[0121] The sensitive pattern rule defines the regular expression pattern of sensitive information, such as the format rule of ID number and medical record number.

[0122] S312, traverse the input entity set, and perform judgment on each entity, including checking whether the entity type belongs to the sensitive entity type in the privacy sensitive library, verifying whether the entity text content completely or partially matches the sensitive keyword table, and applying regular expression verification to the entity that meets the specific type.

[0123] S313, the entity that meets any of the judgment conditions is marked as a privacy candidate entity.

[0124] S314, analyze the input entity relation triplets, apply association rules for privacy judgment, including: load the pre-defined sensitive relation pattern library, containing medical privacy relation combinations, perform pattern matching on each triplet, judge whether it meets the sensitive relation pattern, and the triplet that meets the sensitive relation pattern is marked as a privacy candidate triplet.

[0125] The medical privacy relation combination includes patient-disease relation (such as "suffering from", "confirmed diagnosis"), patient-treatment relation (such as "undergoing surgery", "taking medicine"), and patient-personal information relation (such as "contact information", "home address").

[0126] Integrate the screening results into a unified privacy candidate set and perform sensitivity grading, label the sensitivity level and screening basis for each candidate element, including:

[0127] First-level privacy: direct identification information, such as ID number, contact information;

[0128] Second-level privacy: indirect inferable information, such as rare disease diagnosis results;

[0129] Third-level privacy: general medical information, such as common disease treatment records.

[0130] Finally, output the structured privacy candidate set, including the privacy entity list and the corresponding sensitive type, the privacy relation triplet and the associated sensitive pattern, the confidence score and the sensitivity level of each element, and the rules and matching basis applied in the screening process.

[0131] In some optional embodiments, step S3 utilizes a pre-trained privacy recognition model to perform semantic verification on the candidate set to achieve secondary screening and obtain the final privacy candidate set, which includes the following steps.

[0132] S321, receive the privacy candidate set generated by the preliminary screening, construct a complete context representation for each candidate element, extract the text segment containing the target element and the surrounding context window, and perform standardization processing on the text segment.

[0133] Read the metadata of each candidate element from the privacy candidate set, including the starting position and ending position of the entity / relationship in the original text, and the element type. For entity class elements, adjust the boundary to the complete semantic unit according to the segmentation result, and for relation class elements, simultaneously determine the position range of the head entity and the tail entity.

[0134] Determine the dynamic window according to the element type and the characteristics of medical text, and adjust the window position, including expanding W / 2 characters to the left and right of the target element as the center, and truncating in advance when encountering paragraph boundaries or punctuation symbols, ensuring that the window contains at least one complete sentence.

[0135] S322, performing a verification process on the candidate privacy entity, including: inputting the entity and its context into a pre-trained sequence labeling model, obtaining the entity type probability distribution and boundary mark output by the model, verifying the coherence of the entity boundary and the consistency of the type, calculating the entity recognition confidence score, and comparing with a preset threshold to determine whether to retain.

[0136] Specifically, the candidate entity and its standardized context segment are format organized, the entity position mark is added in the context segment, and the document structure feature is injected.

[0137] The context text is subword segmented to generate an input sequence acceptable by a BERT model, and the entity position information is encoded into a position embedding vector, which is spliced with the word vector. The prediction result of the model for each token is obtained, including the entity type probability distribution and the boundary mark probability.

[0138] The entity boundary verification is performed to verify whether the entity boundary predicted by the model is consistent with the candidate boundary, including matching the starting position with the B-{type} label and the subsequent position with the I-{type} label, and calculating the boundary offset penalty score for inconsistent cases. When the predicted boundary is discontinuous (such as B-DISEASE and O appearing alternately), the entity recombination algorithm is started to merge adjacent segments.

[0139] The type consistency verification is performed to calculate the type probability mean of all tokens within the entity range, and the type purity index is calculated, i.e. purity = 1- (second highest probability, highest probability), when the candidate type does not match the mainstream type predicted by the model, the manual review mark is triggered.

[0140] The final confidence score score = 0.6*type confidence + 0.3*boundary coherence + 0.1*context consistency is calculated, wherein the context consistency is verified by the medical knowledge graph to verify the co-occurrence probability of the entity and the surrounding terms.

[0141] A dynamic threshold is set, if score ≥ threshold, the privacy entity is confirmed, if 0.7 ≤ score < threshold, the review process is triggered, and if score < 0.7, it is directly rejected.

[0142] S323, performing a verification process on the candidate privacy relationship triple, including: inputting the complete triple and its context into a pre-trained relationship classification model, obtaining the relationship type probability distribution output by the model, verifying the rationality of the relationship semantics and the consistency of the context, calculating the relationship classification confidence score, and applying a dynamic threshold strategy for screening.

[0143] Specifically, the candidate triple and its context are encapsulated into the model input format, the entity position is marked with special marks in the text, and the document structure label is added.

[0144] The context semantic representation is generated by BioBERT, the positions of the head and tail entities are encoded as relative distance features, the entity type embedding is spliced with the text representation, and finally the probability distribution is output to obtain the relationship probability distribution predicted by the model.

[0145] The triple confidence score Confidence = 0.7 x P(r) + 0.2 x KG_score + 0.1 x Context_Consistency, where P(r) is the probability of the target relationship predicted by the relationship classification model, KG_score is the knowledge graph support, and Context_Consistency is the context consistency score.

[0146] If Confidence ≥ threshold, directly pass, if 0.8 ≤ Confidence < threshold, manually review, if Confidence < 0.8, automatically reject.

[0147] The secondary screening verifies the sequence labeling and relationship classification, combines with the confidence threshold, eliminates the rule misjudgment of the candidate, and captures the implicit privacy depending on the context.

[0148] In some optional embodiments, step S4 adds noise to the corresponding entity in the medical text using differential privacy technology according to the entity in the final privacy candidate set, and generates a noisy medical text, which specifically includes the following steps.

[0149] S41, load the final determined privacy candidate entity set and the original medical text, parse the attribute information of each candidate entity, including entity text content, type, starting and ending position index in the medical text, and privacy sensitivity level.

[0150] S42, configure differential privacy protection parameters based on entity type and privacy sensitivity level.

[0151] Determine the total privacy budget ε_total, allocate sub-budgets according to the sensitivity level of the entity, allocate higher proportion of budget to high-sensitive entities such as identity card number and specific diagnosis result, and allocate lower proportion of budget to low-sensitive entities such as drug category. Specifically, strict privacy budget is adopted for direct identifiers, ε ≤ 0.1; moderate privacy budget is adopted for indirect sensitive information, 0.1 < ε ≤ 1; and relaxed privacy budget is adopted for general medical information (such as routine examination indicators), ε > 1.

[0152] Select noise mechanism for different types of entities, use Gaussian noise mechanism for numerical entities such as age, blood pressure and blood sugar, use Laplace noise or entity replacement noise mechanism for text entities such as name and medical institution name, and use hash disturbance combined with noise mechanism for identifier entities such as medical record number and hospitalization number.

[0153] Set noise parameters, including standard deviation of Gaussian noise , scale parameter b of Laplace noise.

[0154]

[0155] wherein, is the failure probability, usually taken as , is the corresponding sub-budget, is the clipping threshold of the range of values taken by the entity.

[0156]

[0157] wherein, is the maximum possible change in the entity.

[0158] S43, locate the specific position of each privacy candidate entity in the medical text, perform the corresponding noise addition operation based on the differential privacy protection parameter according to the entity type, and generate a noisy medical text.

[0159] For numerical entities, extract the original numerical value of the entity, clip the numerical value according to the preset clipping threshold C (if the numerical value exceeds C, scale it to C in proportion), generate random noise based on the configured noise parameter according to the corresponding distribution, superimpose the noise and the clipped numerical value to obtain the disturbed numerical value, and replace the original numerical value.

[0160] For text entities, if it is discrete text (such as name), based on the preset synonym or near-synonym entity word table, randomly select a replacement word according to the noise probability distribution, and the replacement probability is positively correlated with the noise parameter; if it is structured text (such as address), perform partial character replacement or insert redundant characters on key sub-fields (such as house number, street name), and the replacement / insertion ratio is controlled by the noise parameter.

[0161] For identifier type entities, a segmented disturbance strategy is adopted, random offset or character flipping is added to the fixed format part in the entity (such as the date segment and serial number segment in the medical record number), to ensure that the disturbed entity still conforms to the format rules.

[0162] Further, the entity after adding noise is integrated and the coherence is corrected, including: replacing the disturbed entity back to the corresponding original position in the medical text, keeping other non-private parts of the text unchanged, checking the grammatical coherence and semantic rationality of the disturbed text, correcting the grammatical errors caused by noise addition such as numerical unit mismatch and sentence disorder, and avoiding leaking the original entity information in the correction process.

[0163] The privacy budget consumption of this noise addition is calculated and accumulated to the cumulative privacy consumption value. If the cumulative consumption exceeds the total privacy budget ε_total, the current batch processing is terminated and the budget adjustment mechanism is triggered, such as reducing the noise intensity of subsequent entities or prioritizing the processing of high-sensitive entities.

[0164] The generated noise perturbed medical text is verified for effectiveness, including: detecting the degree of masking of the original entity after perturbation by a differential privacy verification tool to ensure that the ε-differential privacy definition is met, and using a medical text analysis model to test the extraction of key information from the perturbed text to ensure that the extraction accuracy of non-private information is not lower than a preset threshold.

[0165] Finally, the noise perturbed medical text that has passed the effectiveness verification is recorded with the parameter configuration of this noise addition, the privacy budget consumption, and the mapping relationship before and after the entity perturbation, which is used for auditing and tracing, and the mapping relationship is separately encrypted and stored.

[0166] For example, the original text is "Patient A (ID: 110101198001011234) fasting blood glucose 6.2 mmol / L, diagnosed as type 2 diabetes", the identified entities include ID number (high sensitive), blood glucose value (medium sensitive), and disease name (high sensitive), the context of the blood glucose value is dynamically calculated as the test report block, there are 2 surrounding private entities, the ID is converted to "1101********1234", the format is kept desensitized, 6.2 is converted to 6.2 + Lap(0.5) = 5.9, and diabetes is replaced with "metabolic syndrome" based on the synonym library, and the output is "Patient A (ID: 1101********1234) fasting blood glucose 5.9 mmol / L, diagnosed as type 2 metabolic syndrome".

[0167] In some optional embodiments, step S5 saves the homomorphic encryption of the final privacy candidate set of triples, specifically including the following steps.

[0168] S51, load the final privacy candidate triple set, parse the structured information of each triple, including the text content of the head entity, the relationship type, the tail entity, the entity type, the context association information of the triple in the medical text, and the privacy sensitivity level.

[0169] S52, start the homomorphic encryption key management module and perform key generation and initialization operations.

[0170] Specifically, based on the preset homomorphic encryption algorithm, a public key, a private key, and an evaluation key are generated, where the public key is used for encryption operation, the private key is used for subsequent decryption operation, and the evaluation key is used to support the calculation and verification of encrypted data.

[0171] The generated key pair is checked for security, including verifying the mathematical association of the public key and the private key, and whether the key length meets the preset security standard.

[0172] The private key and the evaluation key are stored in an encryption key library, which is physically isolated and protected by a hardware security module (HSM) or a trusted execution environment (TEE), and the public key is distributed to the encryption processing module as needed.

[0173] S53, for each privacy candidate triple, according to the type of its head entity, tail entity and relationship type, configure differential encryption parameters.

[0174] For triples containing numerical entities, such as "Patient A - Blood glucose value - 7.2 mmol / L", partial homomorphic encryption parameters supporting numerical operations are used, and plaintext space range and operation precision threshold are set.

[0175] For triples of pure text entities, such as "Patient B - Diagnosis - Type 2 diabetes", full homomorphic encryption parameters supporting string mapping are used, and character encoding mapping rules and ciphertext length limits are configured.

[0176] Based on the privacy sensitivity level of the triple, adjust the encryption strength parameters, and for high sensitivity level triples, such as "Patient C - ID number - 110XXXXXXX" associated with diagnosis and treatment relationships, higher encryption rounds and more complex noise parameters are used.

[0177] S54, perform layered encryption processing on the triples.

[0178] Specifically, for head entity encryption, extract the text content or numerical information of the head entity, homomorphically encrypt it through the public key, generate the head entity ciphertext, and retain the encrypted mapping relationship of the entity type identifier.

[0179] For relationship type encryption, convert the relationship type, such as "diagnosis", "prescription", "allergy", etc. to a preset encoding value, and encrypt the encoding value using the public key to generate the relationship ciphertext.

[0180] For tail entity encryption, use the same encryption strategy as the head entity to homomorphically encrypt the tail entity and generate the tail entity ciphertext.

[0181] The head entity ciphertext, relationship ciphertext, and tail entity ciphertext are associated according to the triple structure to form a complete encrypted triple.

[0182] Further, the encryption validity is verified, including using the evaluation key to perform integrity check on the encrypted triple, verifying whether the ciphertext format meets the algorithm requirement, whether the head entity ciphertext and the tail entity ciphertext are effectively associated with the relationship ciphertext, randomly extracting part of the encrypted triples, verifying the decrypted triples through the private key, and confirming the consistency between the decrypted triples and the original triples, verifying whether the encrypted triples support the preset homomorphic operation, and ensuring that the subsequent calculation operation on the encrypted data can be normally performed.

[0183] The encrypted triples that pass the verification are stored in a structured manner, an encrypted triple index library can be constructed, and the unique identifier of each encrypted triple, the entity type association of the original triple, the encryption time and the corresponding public key version information are recorded. The encrypted triples are stored in an encrypted database, and a storage encryption and transmission encryption double mechanism is used to ensure the confidentiality of the data in the storage medium and the writing process. At the same time, an encryption log is generated to record the execution subject, timestamp, encryption parameters and verification results of the encryption operation, and the log information is separately encrypted and archived for subsequent auditing and tracing.

[0184] The above describes in detail an embodiment of a medical text private information extraction and encryption method, and based on the medical text private information extraction and encryption method described in the above embodiment, the embodiment of the present application further provides a medical text private information extraction and encryption system corresponding to the method.

[0185] Figure 2 A medical text private information extraction and encryption system structure schematic block diagram is provided in the embodiment of the present application, in the embodiment, the medical text private information extraction and encryption system 200 can be divided into multiple functional modules according to the functions performed by the medical text private information extraction and encryption system 200. The module referred to in the present application refers to a series of computer program segments that can be executed by at least one processor and can complete a fixed function, which is stored in the memory.

[0186] The entity extraction module 210 is configured to obtain the medical text to be processed, and extract entities from the medical text using natural language processing technology.

[0187] The entity relationship triple generation module 220 is configured to input the medical text and the extracted entities into a pre-trained neural network-based relationship extraction model, obtain the relationship between each entity, and generate an entity relationship triple.

[0188] The privacy candidate set generation module 230 is configured to preliminarily screen out a privacy candidate set according to a preconfigured medical field privacy sensitive library and association rules, and perform secondary screening on the candidate set by using a pre-trained privacy recognition model to obtain a final privacy candidate set, and the elements in the privacy candidate set are entities or triples.

[0189] The medical text noise disturbance module 240 is configured to add noise to the corresponding entity in the medical text according to the entity in the final privacy candidate set by using differential privacy technology, and generate noise-disturbed medical text.

[0190] The triple homomorphic encryption module 250 is configured to save the triple in the final privacy candidate set after homomorphic encryption.

[0191] The medical text privacy information extraction and encryption system of the embodiment is used to implement the medical text privacy information extraction and encryption method described above, and therefore the specific implementation of the system can refer to the description of the medical text privacy information extraction and encryption method in the foregoing embodiment part, and will not be described here.

[0192] In addition, since the medical text privacy information extraction and encryption system of the embodiment is used to implement the medical text privacy information extraction and encryption method described above, the function of the system corresponds to the function of the method, and will not be described here.

[0193] Figure 3 A structure schematic diagram of a terminal 300 provided by the embodiment of the present application includes a processor 310, a memory 320, and a communication unit 330. The processor 310 is configured to implement the following steps when implementing the medical text privacy information extraction and encryption program stored in the memory 320:

[0194] Obtaining the medical text to be processed, and extracting the entity from the medical text by using the natural language processing technology;

[0195] Inputting the medical text and the extracted entity into the pre-trained neural network-based relation extraction model to obtain the relationship between each entity and generate the entity relationship triple;

[0196] According to the pre-configured medical field privacy sensitive library and the association rule, the privacy candidate set is preliminarily screened out, and the pre-trained privacy recognition model is used to perform semantic verification on the candidate set to realize secondary screening, and obtain the final privacy candidate set. The elements in the privacy candidate set are entities or triples.

[0197] According to the entity in the final privacy candidate set, noise is added to the corresponding entity in the medical text by using differential privacy technology, and noise-disturbed medical text is generated;

[0198] The triple in the final privacy candidate set is saved after homomorphic encryption.

[0199] The terminal 300 includes a processor 310, a memory 320 and a communication unit 330. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the server shown in the figure does not constitute a limitation on the present application. It can be a bus structure or a star structure. It can also include more or fewer components than shown in the figure, or combine certain components, or arrange different components.

[0200] The memory 320 can be used to store the execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 can execute some or all of the steps in the following method embodiments.

[0201] The processor 310 is the control center of the storage terminal. It connects all parts of the electronic terminal through various interfaces and lines, executes or runs the software programs and / or modules stored in the memory 320, and calls the data stored in the memory, to perform various functions of the electronic terminal and / or process data. The processor can be composed of integrated circuits (IC), such as a single packaged IC or a plurality of packaged ICs with the same function or different functions connected together. For example, the processor 310 can only include a central processing unit (CPU). In the embodiments of the present application, the CPU can be a single operation core or can include multiple operation cores.

[0202] The communication unit 330 is used to establish a communication channel, so that the storage terminal can communicate with other terminals. It receives user data sent by other terminals or sends user data to other terminals.

[0203] The present application also provides a computer storage medium. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0204] The application also provides a computer storage medium, wherein the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0205] The computer storage medium stores a medical text privacy information extraction and encryption program, and the medical text privacy information extraction and encryption program realizes the following steps when executed by the processor:

[0206] Obtaining a medical text to be processed, and extracting entities from the medical text using a natural language processing technology;

[0207] Inputting the medical text and the extracted entities into a pre-trained neural network-based relation extraction model to obtain the relationship between each entity and generate entity relationship triples;

[0208] According to the pre-configured medical field privacy sensitive library and the association rules, a preliminary privacy candidate set is screened out, and a pre-trained privacy recognition model is used for semantic verification of the candidate set to realize secondary screening, so that a final privacy candidate set is obtained, and the elements in the privacy candidate set are entities or triples;

[0209] According to the entities in the final privacy candidate set, a differential privacy technology is used to add noise to the corresponding entities in the medical text, so as to generate a noise-disturbed medical text;

[0210] The triples in the final privacy candidate set are saved after homomorphic encryption.

[0211] Those skilled in the art can clearly understand that the technology in the embodiments of the application can be realized by means of software and necessary general hardware platforms. Based on this understanding, the technical solutions in the embodiments of the application can be embodied in the form of a software product, which is stored in a storage medium such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media, including a plurality of instructions for causing a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in the embodiments of the application.

[0212] In several embodiments provided by the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the embodiments of the device described above are merely schematic, and the division of the units is merely a logical function division. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0213] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0214] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.

[0215] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined in the present application can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown in the present application, but will conform to the widest scope consistent with the principles and novel features disclosed in the present application.

Claims

1. A medical text privacy information extraction and encryption method, characterized in that, The method comprises the following steps: obtaining a medical text to be processed, and extracting entities from the medical text by using a natural language processing technology, including: preprocessing the medical text to be processed, including removing noise characters, unifying text formats, filtering general stop words according to a stop word table customized according to characteristics of the medical field, and retaining field key words; performing word segmentation on the preprocessed medical text by using the natural language processing technology, dividing continuous text into independent lexical units, and performing part-of-speech tagging on each lexical unit; adopting a named entity recognition model based on deep learning to identify entities in the medical field from the text after word segmentation and part-of-speech tagging; post-processing the identified entities, including merging and splitting multiple-word entities with errors, and removing repeated or low-confidence entities; and generating an entity set, including text content, type and location information of each entity in the original text; inputting the medical text and the extracted entities into a pre-trained neural network-based relation extraction model to obtain the relations between the entities, and generating entity relation triples; preliminarily screening a privacy candidate set according to a preconfigured medical field privacy sensitive library and association rules, and performing semantic verification on the candidate set by using a pre-trained privacy recognition model to realize secondary screening, and obtaining a final privacy candidate set, elements in the privacy candidate set being entities or triples; adding noise to corresponding entities in the medical text by using differential privacy technology according to the entities in the final privacy candidate set, and generating a noise-perturbed medical text; performing homomorphic encryption on the triples in the final privacy candidate set and saving the encrypted triples; wherein the preliminary screening of the privacy candidate set according to the preconfigured medical field privacy sensitive library and association rules specifically comprises: loading a pre-defined medical field privacy sensitive library, which contains a sensitive entity type list, a sensitive keyword table and sensitive pattern rules; traversing the input entity set, and performing judgment on each entity, including checking whether the entity type belongs to the sensitive entity type in the privacy sensitive library, verifying whether the entity text content completely or partially matches the sensitive keyword table, and applying a regular expression verification to the entity of a specific type; an entity meeting any judgment condition is marked as a privacy candidate entity; analyzing the input entity relation triples, and applying association rules for privacy judgment, including: loading a pre-defined sensitive relation pattern library containing medical privacy relation combinations, performing pattern matching on each triple, judging whether the triple meets the sensitive relation pattern, and marking a triple meeting the sensitive relation pattern as a privacy candidate triple; wherein the semantic verification on the candidate set by using the pre-trained privacy recognition model to realize the secondary screening and obtain the final privacy candidate set specifically comprises: receiving the privacy candidate set generated by the preliminary screening, constructing a complete context representation for each candidate element, extracting a text segment containing the target element and a surrounding context window, and performing standardization processing on the text segment; The verification process is performed on the candidate privacy entity, including: inputting the entity and its context into a pre-trained sequence labeling model, obtaining the entity type probability distribution and boundary mark output by the model, verifying the consistency of the entity boundary and type, calculating the entity recognition confidence score, and comparing it with the preset threshold to determine whether to retain it; The verification process is performed on the candidate privacy relationship triple, including: inputting the complete triple and its context into a pre-trained relationship classification model, obtaining the relationship type probability distribution output by the model, verifying the rationality of the relationship semantics and the consistency of the context, calculating the relationship classification confidence score, and applying a dynamic threshold strategy for screening. 2.The medical text private information extraction and encryption method of claim 1, wherein, The medical text and the extracted entities are input into a pre-trained neural network-based relationship extraction model to obtain the relationships between each entity and generate entity relationship triples, specifically including: Receiving medical text and entity set, standardizing the medical text; Based on the extracted entity set, all possible entity combinations are generated within a given context window range, and entity pair screening rules are set according to domain knowledge to exclude irrelevant entity combinations; An input representation is constructed for each entity pair, including the interception of the original text segment, the labeling of the position information of the target entity in the text, and the injection of entity type features; The constructed input data is input into the pre-trained relationship extraction neural network model, which uses a Transformer encoder to obtain the context-aware representation of the text, extracts the feature representation of the target entity, focuses on the entity-related context using an attention mechanism, and fuses entity features, relative position features, and global context features to generate a relationship classification feature vector. The probability distribution of each relationship category is calculated through a fully connected layer and a softmax function; The relationship type with the highest probability is selected as the predicted relationship for the entity pair, and a confidence threshold is applied to filter out relationships with a prediction confidence below the preset threshold; The effective entity relationship combinations are constructed into structured triples. 3.The medical text private information extraction and encryption method of claim 1, wherein, Based on the entities in the final privacy candidate set, differential privacy technology is used to add noise to the corresponding entities in the medical text to generate noise-perturbed medical text, specifically including: Load the final determined privacy candidate entity set and the original medical text, parse the attribute information of each candidate entity, including entity text content, type, start and end position index in the medical text, and privacy sensitivity level; Based on the entity type and privacy sensitivity level, configure the differential privacy protection parameters; Locate the specific positions of each privacy candidate entity in the medical text, and perform the corresponding noise addition operation based on the differential privacy protection parameters according to the entity type to generate the noise-perturbed medical text. 4.The medical text private information extraction and encryption method of claim 1, wherein, The final privacy candidate set is saved after homomorphic encryption, specifically including: Load the final determined privacy candidate triple set, parse the structured information of each triple, including the text content of the head entity, relationship type, tail entity, entity type, context association information of the triple in the medical text, and privacy sensitivity level; Start the homomorphic encryption key management module and perform key generation and initialization operations; For each privacy candidate triple, differential encryption parameters are configured according to the types of the head entity and the tail entity and the relationship type; Hierarchical encryption processing is performed on the triples.

5. A medical text private information extraction and encryption system, characterized by, It comprises: An entity extraction module is configured to obtain medical text to be processed, and extract entities from the medical text using natural language processing technology, including: preprocessing the medical text to be processed, including removing noise characters, unifying text formats, filtering general stop words according to a customized stop word list based on medical field characteristics, and retaining field key words; using natural language processing technology to segment the preprocessed medical text into independent lexical units, and performing part-of-speech tagging on each lexical unit; adopting a named entity recognition model based on deep learning to identify entities in the medical field from the segmented and part-of-speech tagged text; post-processing the identified entities, including merging and splitting multiple-word entities with errors, and removing duplicate or low-confidence entities; generating an entity set, including the text content, type, and location information of each entity in the original text; An entity relationship triple generation module is configured to input the medical text and the extracted entities into a pre-trained neural network-based relationship extraction model to obtain the relationships between the entities and generate entity relationship triples; A privacy candidate set generation module is configured to preliminarily screen out a privacy candidate set according to a preconfigured medical field privacy sensitive library and association rules, and perform secondary screening on the candidate set using a pre-trained privacy recognition model to obtain a final privacy candidate set, the elements in the privacy candidate set being entities or triples; A medical text noise disturbance module is configured to add noise to corresponding entities in the medical text using differential privacy technology according to the entities in the final privacy candidate set, to generate noise-disturbed medical text; A triple homomorphic encryption module is configured to homomorphically encrypt the triples in the final privacy candidate set and save them; The preliminary screening of the privacy candidate set according to the preconfigured medical field privacy sensitive library and association rules specifically comprises: loading a predefined medical field privacy sensitive library, which contains a list of sensitive entity types, a sensitive keyword table, and sensitive pattern rules; traversing the input entity set and performing judgment on each entity, including checking whether the entity type belongs to the sensitive entity types in the privacy sensitive library, verifying whether the entity text content completely or partially matches the sensitive keyword table, and applying regular expression verification to entities of specific types; entities that meet any of the judgment conditions are marked as privacy candidate entities; analyze the input entity relationship triples and apply association rules for privacy judgment, including: loading a predefined sensitive relationship pattern library containing medical privacy relationship combinations, performing pattern matching on each triple, and judging whether it meets the sensitive relationship pattern, triples that meet the sensitive relationship pattern are marked as privacy candidate triples; The secondary screening of the candidate set using the pre-trained privacy recognition model to obtain the final privacy candidate set specifically comprises: Receiving the generated privacy candidate set of the preliminary screening, constructing a complete context representation for each candidate element, extracting the text segment containing the target element and the surrounding context window, and performing standardization processing on the text segment; Performing a verification process on the candidate privacy entity, including: inputting the entity and its context into a pre-trained sequence labeling model, obtaining the entity type probability distribution and boundary mark output by the model, verifying the coherence and type consistency of the entity boundary, calculating the entity recognition confidence score, and comparing it with the preset threshold to determine whether to retain it; Performing a verification process on the candidate privacy relationship triple, including: inputting the complete triple and its context into a pre-trained relationship classification model, obtaining the relationship type probability distribution output by the model, verifying the rationality and context consistency of the relationship semantics, calculating the relationship classification confidence score, and applying a dynamic threshold strategy for screening.

6. A terminal, characterized by comprising: Comprise: a memory for storing a medical text privacy information extraction and encryption program; a processor for executing the medical text privacy information extraction and encryption program to realize the steps of the medical text privacy information extraction and encryption method according to any one of claims 1 to 4.

7. A computer readable storage medium characterized in that, The readable storage medium has a medical text privacy information extraction and encryption program stored thereon, and the medical text privacy information extraction and encryption program is executed by the processor to realize the steps of the medical text privacy information extraction and encryption method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for identifying sensitive information in judgment document

    CN110826316A

  • Medical record sensitive information protection method combining named entity recognition and differential privacy

    CN118155789A

  • Sensitive word auditing method

    CN120068134A

  • Industrial Internet platform-oriented data privacy protection method and device, and medium

    CN120257354A