De-identification apparatus and method
By using start and end special markers to mark and replace target lexical units in large language models, the scalability and illusion problems of traditional de-identification methods in complex environments are solved, achieving de-identification processing with high accuracy and reliability.
Patent Information
- Application Number
- CN202511929507.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-12-19
- Filing Date
- 2025-12-19
- Publication Date
- 2026-06-23
Smart Images

Figure CN122263140A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to a de-identification apparatus and method. Specifically, this disclosure relates to a de-identification apparatus and method capable of correctly performing de-identification operations based on a language model. Background Technology
[0002] Text de-identification is crucial for protecting sensitive personal information. By removing or anonymizing identifiers, it prevents unauthorized disclosure of personal data, enabling organizations to securely use textual materials for research, analysis, and development. Furthermore, de-identification is particularly important in the medical field, as access to patient information can drive significant advancements, but must be handled with care to protect privacy.
[0003] In existing technologies, traditional text de-identification methods include Named Entity Recognition (NER) models and rule-based systems. In traditional de-identification algorithms, the model simply classifies each input term in a given medical text as either sensitive or non-sensitive information. Terminators labeled "sensitive" are removed, while the rest of the medical text remains unchanged. However, NER models require a large amount of labeled training data to perform binary classification of the tags representing the text.
[0004] Furthermore, these methods rely on predefined patterns and supervised learning methods. While these methods are effective in controlled environments, their scalability and adaptability are often insufficient in various real-world environments.
[0005] In contrast, Large Language Models (LLMs) are a powerful foundational tool capable of handling most Natural Language Processing (NLP) tasks. Given input text (e.g., a prompt), a large language model produces a series of lexical units as output.
[0006] However, a key challenge facing large language models is the hallucination problem, where the language model produces meaningless or inaccurate content (e.g., content not present in the original data). In de-identification in the medical field, the hallucination problem includes rewriting and truncation, which can lead to the loss or inaccuracy of medical information.
[0007] Therefore, providing a de-identification technology that can correctly perform de-identification operations based on language models is a goal that the industry urgently needs to strive for. Summary of the Invention
[0008] One object of this disclosure is to provide a de-identification apparatus. The de-identification apparatus includes a storage device, a transceiver interface, and a processor electrically connected to the storage device and the transceiver interface. The storage device stores a language model. The processor generates a plurality of lexical units corresponding to a data to be processed from the language model. The processor marks a target lexical unit among the plurality of lexical units based on a start special tag and an end special tag from the language model to generate tagged data corresponding to the data to be processed, wherein the target lexical unit corresponds to a person's information. The processor replaces the target lexical unit in the tagged data with the start special tag and the end special tag in the tagged data to generate de-identified data corresponding to the data to be processed.
[0009] In one embodiment of the present invention, the tagging data includes a tagging order of the start special tag, the target word, and the end special tag.
[0010] In one embodiment of the present invention, the marking of the target word among the plurality of words further includes the following operations: determining whether a currently processed word is a meaningful word; and in response to the current processed word not being the meaningful word, forming a new current processed word based on the current processed word and the next set of processed words.
[0011] In one embodiment of the present invention, the start special marker and the end special marker are further associated with a classification marker, and replacing the target word in the marker data further includes the following operations: generating a replacement word corresponding to the classification marker; and replacing the target word in the marker data based on the replacement word to generate the deidentified data corresponding to the data to be processed.
[0012] In one embodiment of the present invention, the marking of the target word among the plurality of words includes the following operations: generating a candidate word corresponding to each of the plurality of marking stages based on an order in which the plurality of words appear in the data to be processed; selecting a target candidate word for each of the plurality of marking stages; and marking the target word among the plurality of words based on the start special marker and the end special marker among the plurality of target candidate words.
[0013] In one embodiment of the present invention, generating the candidate word corresponding to each of the plurality of marking stages further includes the following operations: in a first marking stage, determining whether the target candidate word in a previous marking stage of the first marking stage is the start special mark or the end special mark; and in response that the target candidate word in the previous marking stage is not the start special mark or the end special mark, generating the candidate word of the first marking stage based on an original word and the start special mark.
[0014] In one embodiment of the present invention, generating the candidate word corresponding to each of the plurality of marking stages further includes the following operations: in a second marking stage, determining whether the target candidate word in a previous marking stage of the second marking stage is the starting special mark; and in response to the target candidate word in the previous marking stage being the starting special mark, generating the candidate word in the second marking stage based on an original word.
[0015] In one embodiment of the present invention, generating the candidate lexical corresponding to each of the plurality of marking stages further includes the following operations: in a third marking stage, determining whether the target candidate lexical in a previous marking stage of the third marking stage is the start special mark or the end special mark; determining whether the plurality of marking stages prior to the third marking stage have an unending start special mark; and in response that the target candidate lexical in the previous marking stage is not the start special mark or the end special mark, and the plurality of marking stages prior to the third marking stage have the unending start special mark, generating the candidate lexical in the third marking stage based on an original lexical and the end special mark.
[0016] In one embodiment of the present invention, generating the candidate word corresponding to each of the plurality of marking stages further includes the following operations: in a fourth marking stage, determining whether the target candidate word in a previous marking stage of the fourth marking stage is the end special mark; and in response to the target candidate word in the previous marking stage being the end special mark, generating the candidate word in the fourth marking stage based on an original word.
[0017] In one embodiment of the present invention, the processor further performs the following operations: generating a replacement word corresponding to a color mark based on a confidence value of the target word; and replacing the target word in the mark data based on the replacement word of the color mark to generate the deidentified data corresponding to the data to be processed.
[0018] Another object of this disclosure is to provide a de-identification method for an electronic device storing a language model. The de-identification method includes the following steps: generating a plurality of lexical units corresponding to a data to be processed from the language model; tagging a target lexical unit among the plurality of lexical units based on a start special tag and an end special tag from the language model to generate tagged data corresponding to the data to be processed, wherein the target lexical unit corresponds to a person's information; and replacing the target lexical unit in the tagged data based on the start special tag and the end special tag in the tagged data to generate de-identified data corresponding to the data to be processed.
[0019] The de-identification technology (including at least an apparatus and method) provided in this disclosure can actively mark target words in the lexical units of the data to be processed based on special markers, thereby generating marked data corresponding to the data to be processed. Furthermore, the de-identification technology provided in this disclosure replaces the target words in the marked data with positional information provided by the special markers in the marked data, thereby generating de-identified data corresponding to the data to be processed. Since the de-identification technology provided in this disclosure can employ a trained language model, it can make more accurate predictions based on context and other factors when predicting words. In addition, the de-identification technology provided in this disclosure can be fine-tuned to be applicable to various domains, providing scalability and adaptability. Moreover, under strict conditions and candidate word constraints, the de-identification technology provided in this disclosure allows the language model to make accurate predictions and eliminates the risks of illusions, paraphrasing, or truncation (i.e., the de-identified data will not contain words that do not belong to the original data content), thereby improving the reliability and accuracy of the de-identification output. Therefore, the de-identification technology provided in this disclosure ensures the correctness of the de-identified data ultimately provided to the user, solving the problems of the prior art.
[0020] The following detailed description of the technology and implementation methods of this disclosure, in conjunction with the accompanying drawings, enables those skilled in the art to understand the technical features of the claimed invention. Attached Figure Description
[0021] Figure 1 This is a schematic diagram depicting the architecture of a de-identification device in certain implementations; Figure 2 It is a schematic diagram of a prompt template depicting certain implementation methods; Figure 3 It is a lexical diagram depicting the data to be processed in certain implementation methods; Figure 4 This is a schematic diagram depicting the marking operations of certain implementation methods; Figure 5A This describes examples of data to be processed in certain implementation methods; Figure 5B These are examples of labeling information describing certain implementation methods; Figure 5C Examples of labeling data describing certain implementation methods; and Figure 6 This is a partial flowchart depicting the de-identification method of the second embodiment.
[0022] Symbol explanation: 1: De-identification device 11: Storage 13: Send / Receive Interface 15: Processor LM: Language Model PT: Prompt Template TBP: Data to be processed TK1, TK2, TK3, TK4, TK5, TK6, TK7: Lexical Units 400: Operation Diagram PV: Probability value TP1-1, TP1-2, TP2, TP3, TP4: Marking Phase C1-1, C1-2, C2, C3, C4: Candidate word units TC1-1, TC1-2, TC2, TC3, TC4: Target candidate words 501, 503, 505: Schematic diagram 600: De-identification method S601, S603, S605: Steps Detailed Implementation
[0023] The following description, through embodiments, explains the de-identification apparatus and method provided in this disclosure. However, these embodiments are not intended to limit the implementation of this disclosure to any environment, application, or manner described herein. Therefore, the description of the embodiments is for illustrative purposes only and is not intended to limit the scope of this disclosure. It should be understood that in the following embodiments and drawings, elements not directly related to this disclosure have been omitted and are not shown, and the dimensions of each element and the dimensional proportions between elements are merely illustrative and not intended to limit the scope of this disclosure.
[0024] Let me first briefly explain the problem that this disclosure aims to solve. The goal of the de-identification algorithm disclosed herein is to detect and remove personal information from highly sensitive text files (e.g., medical reports) and generate de-identified data for the corresponding highly sensitive text files.
[0025] This disclosure provides a de-identification algorithm based on a language model (e.g., a large language model LLM). Accordingly, this disclosure utilizes the extensive knowledge of a trained language model and selects target lexical units through the tagging constraints and candidate lexical generation methods provided in this disclosure to eliminate the illusion problem that may occur in large language models LLM.
[0026] The application scenarios of this disclosure can be to set / execute the de-identification device and method in an external system (e.g., a cloud server) or to integrate it into a user device (e.g., a computer or mobile phone). This disclosure can generate tagged data based on operations at various different tagging stages, and replace the target word (e.g., sensitive data containing personal information) in the tagged data.
[0027] Furthermore, in subsequent applications, the de-identification device / method of this disclosure can output the generated de-identified data to the user device in a suitable form (e.g., marked with different color levels) to provide the user with additional confidence information.
[0028] The first embodiment of this disclosure is a de-identification device 1, the schematic diagram of which is depicted in... Figure 1 In this embodiment, the de-identification device 1 includes a storage device 11, a transceiver interface 13, and a processor 15, with the processor 15 electrically connected to the storage device 11 and the transceiver interface 13. In some embodiments, the transceiver interface 13 may be communicatively connected to a storage device (e.g., a database server) to obtain data to be processed.
[0029] It should be noted that the storage device 11 may be a memory, a Universal Serial Bus (USB) disk, a hard disk, an optical disk, a USB flash drive, or any other storage medium or circuit known to those skilled in the art to which this disclosure pertains and having the same function. The transceiver interface 13 is an interface capable of receiving and transmitting data, or other interfaces capable of receiving and transmitting data known to those skilled in the art to which this disclosure pertains. The transceiver interface 13 can receive data from sources such as external devices, external web pages, external applications, etc. The processor 15 may be various processing units, a central processing unit (CPU), a microprocessor, or other computing devices known to those skilled in the art to which this disclosure pertains.
[0030] In this embodiment, as Figure 1 As shown, storage 11 can store a language model LM. Specifically, the language model LM can be a large language model that has been trained. The language model LM can be used to generate de-identified data corresponding to the data to be processed based on the user's input (e.g., to-be-processed data) and the user's prompt.
[0031] In some implementations, the language model LM can be fine-tuned using historical training data (e.g., multiple historical data to be processed and multiple historical de-identified data).
[0032] It should be noted that, when the de-identification device 1 of this disclosure is operated, it can control the language model LM to generate de-identified data corresponding to the data to be processed by inputting prompts and data to be processed into the language model LM, under the constraints set in this disclosure.
[0033] For easier understanding, please refer to Figure 2 The prompt template PT. In this example, the prompt template PT specifies that a special starting marker (i.e., ...) is used.<begin_of_ano> ) and the ending special mark (i.e.,<end_of_ano> All personal information should be enclosed in parentheses, and medical-related information should be retained.
[0034] Furthermore, in this example, the prompt template PT specifies that the language model LM removes (redacts) all strings that could represent the patient's name, but retains the title. For example, the data string "John Doe" should be tagged as "<begin_of_ano> John Doe<end_of_ano> 。
[0035] Furthermore, in this example, the prompt template PT specifies that the language model LM retains the surgery date, outpatient date, and medical history. For instance, because the term "Medical visit" does not contain sensitive personal information, the data string "Medical visit on August 14" should remain "Medical visit on August 14" even after being tagged.
[0036] Furthermore, in this example, the prompt template PT specifies that the language model LM should directly return anonymized reports (i.e., de-identified data) without adding any additional formatting (e.g., Markdown format) or comments. Additionally, the prompt template PT can provide at least one example (e.g., the data to be processed, TBP) to allow the language model LM to learn and perform de-identification processing. In some implementations, multiple historical de-identification examples can be provided to the language model LM for fine-tuning to improve the accuracy of de-identification.
[0037] For ease of explanation, the accompanying drawings in this disclosure are illustrated using English as an example. It should be understood that the drawings in this disclosure are merely illustrative, and this disclosure does not limit the language used / recognized by the de-identification device 1 and the language model LM. Those skilled in the art to which this disclosure pertains should be able to understand, based on the content provided in this disclosure, the implementation of the de-identification device 1 in other languages (e.g., Chinese, English, etc.).
[0038] The following paragraphs will describe in detail the specific operation of the de-identification device 1 in this disclosure.
[0039] First, in this embodiment, the de-identification device 1 can obtain the data TBP to be processed (e.g., sensitive data that needs to be de-identified) from the storage 11 or an external device. Then, the trained language model LM generates multiple lexical units corresponding to the data TBP to be processed.
[0040] It should be noted that a lexical unit in a language model (LM) can represent a piece of text; it can be a word, a sub-word, or even a single character. The LM generates text by predicting the next lexical unit based on the previous one at each time step (e.g., predicting the probability of occurrence). In some implementations, lexical units may be generated sequentially during the LM operation or generated sequentially after analysis by the LM.
[0041] For easier understanding, please refer to Figure 3 The diagram shows the lexical representation of the data to be processed. In this example, the language model LM can generate lexical representations in the corresponding order based on the data TBP to be processed, such as: lexical TK1 "Mr.", lexical TK2 "Lin", lexical TK3 "contacted", lexical TK4 "us", lexical TK5 "via", lexical TK6 "email", and lexical TK7 "(xxx@gmail.com)".
[0042] Next, in this embodiment, the processor 15 uses special tags defined in this disclosure to allow the language model LM to tag the content in the data TBP to be processed, so as to accurately generate tagged data. Specifically, the processor 15 uses the language model LM to tag a target word among the plurality of words based on a start special tag and an end special tag, so as to generate tagged data corresponding to the data TBP to be processed, wherein the target word corresponds to a person's information (i.e., personal sensitive information).
[0043] In some implementations, the target word to be tagged should be enclosed by the start special marker and the end special marker, and framed in the order of the start special marker first and the end special marker last. Specifically, the tagging data includes a tagging order of the start special marker, the target word, and the end special marker.
[0044] In some implementations, the tokens generated by the language model LM may be sub-word tokens. Since sub-word tokens themselves do not carry word meaning, individual judgment of them will affect the correctness of de-identification.
[0045] Therefore, to improve the accuracy of word tokens, the processor 15 can pre-determine whether the currently processed word token is meaningful at each marking stage. If the processor 15 determines that the currently processed word token is a meaningless sub-word token, the sub-word token will be merged with the next word token, and the above operation will continue until the currently processed word token is determined to be a meaningful word token.
[0046] Specifically, the processor 15 determines whether a currently processed word is a meaningful word. Then, in response to the current processed word not being a meaningful word, the processor 15 forms a new current processed word based on the current processed word and the next set of processed words.
[0047] For example, with Figure 3 Take the lexical unit TK3 "contacted" as an example. In this example, when the language model LM generates lexical units, it divides the word "contacted" into the lexical unit "conta" and the lexical unit "cted".
[0048] In this example, when the language model LM is currently processing the word "conta", the language model LM determines that the word "conta" itself does not have word meaning. Therefore, the language model LM merges the currently processed word "conta" with the word "cted" in the next segment to produce the word "contacted", which is used as the word being processed. If the merged word still does not have meaning, the merging operation continues.
[0049] In some implementations, the processor 15 selects candidate lexical units by generating them at different stages / conditions based on the order in which they appear in the original data. It should be understood that this disclosure actively restricts the candidate lexical units corresponding to each stage to only include lexical units and special markers (i.e., the start special marker and the end special marker) that originally appeared in the data TBP to be processed, thus avoiding the illusion problem generated by the language model LM by preventing the appearance of lexical units that do not belong to the data TBP to be processed.
[0050] Specifically, the processor 15 generates a candidate word corresponding to each of the multiple tagging stages based on the order in which the multiple words appear in the TBP data to be processed. Then, the processor 15 selects a target candidate word for each of the multiple tagging stages. Finally, the processor 15 tags the target word among the multiple words based on the start special tag and the end special tag among the multiple target candidate words.
[0051] It should be noted that the tagging technology provided in this disclosure can select different mechanisms to generate candidate lexical units under different states (i.e., the occurrence of the start special tag and the end special tag).
[0052] It should be understood that the first marking stage, second marking stage, third marking stage, and fourth marking stage mentioned in this disclosure are merely illustrative examples of states and do not have a sequential relationship. Those skilled in the art to which this disclosure pertains should be able to understand the implementation of the de-identification device 1 in different states / stages based on the content provided in this disclosure.
[0053] The following details the specifics of how this candidate lexical is generated in different states, corresponding to each of the multiple tagging stages. For easier understanding, please refer to [link to documentation]. Figure 4 The marking operation diagram 400 shows that... Figure 3 For example, the pending data TBP in the database (i.e., "Mr. Lin contacted us via email (xxx@gmail.com)").
[0054] The tagging phase TP1-1 of this example demonstrates the generation process of the first lexical unit. In the first time step, the language model LM generates candidate lexical units C1-1 containing two units: the original lexical unit "Mr." and the lexical unit "...".<begin_of_ano> "(That is, the starting special mark).
[0055] If the language model LM does not detect any personal information in the first lexical unit, the original lexical unit "Mr." should be selected. Conversely, if the language model LM detects personal information in the first lexical unit, the lexical unit "Mr." should be selected.<begin_of_ano> Use "" to mark the starting position of sensitive text.
[0056] In this example, since the language model LM did not detect any personal information in the original lexical "Mr.", the lexical "Mr." was selected as the target candidate lexical "TC1-1".
[0057] In some implementations, the language model LM can generate a probability value PV (e.g., confidence level) for each lexical in the corresponding candidate lexical C1-1. In some implementations, the language model LM prioritizes lexicals with high probability values PV as target candidate lexicals.
[0058] Next, the generation process of the second lexical unit is shown in the second tagging stage TP1-2 of this example. In the second time step, the previous lexical unit is "Mr.", and the candidate lexical unit C1-2 generated by the language model LM contains two lexical units: the original lexical unit "Lin" and the lexical unit "".<begin_of_ano> 。
[0059] In this example, the key to the language model LM's decision lies in whether the current word represents personal information. Since the word "Lin" is a name, the language model LM determines that it belongs to personal information, therefore the language model LM should select the word "Lin".<begin_of_ano> The lexical character "" is used to mark the beginning of a sensitive text sequence. In other words, the language model LM selects the lexical character "".<begin_of_ano> "" is used as the target candidate word TC1-2.
[0060] Specifically, in a first marking stage (e.g., marking stage TP1-1 and marking stage TP1-2), the language model LM determines whether the target candidate lexical in the previous marking stage is the start special tag or the end special tag. Then, in response that the target candidate lexical in the previous marking stage is not the start special tag or the end special tag, the language model LM generates the candidate lexical in the first marking stage based on an original lexical and the start special tag.
[0061] Next, in the tagging phase TP2 of this example, the generation process of the third lexical unit is shown. In this third time step, since the previous lexical unit is "<begin_of_ano>", the candidate lexical unit C2 generated by the language model LM is restricted to the original lexical unit "Lin". This is because the previously selected lexical unit was the lexical unit "...".<begin_of_ano> (That is, the location has been marked as sensitive text). The language model LM selected the word "Lin" as the target candidate word TC2.
[0062] Specifically, in a second tagging stage (e.g., tagging stage TP2), the language model LM determines whether the target candidate lexical in the previous tagging stage is the starting special tag. Then, in response to the fact that the target candidate lexical in the previous tagging stage is the starting special tag, the language model LM generates the candidate lexical in the second tagging stage based on an original lexical.
[0063] Next, in the tagging phase TP3 of this example, the generation process of the fourth lexical unit is shown. In the fourth time step, the candidate lexical unit C3 generated by the language model LM is limited to the lexical unit "end_of_ano" (i.e., the end tag) and the original lexical unit "contacted". In this example, since the lexical unit "contacted" is not personal information, the language model LM should select the lexical unit "end_of_ano".<end_of_ano> This concludes the current scope of de-identified text. In other words, the language model LM selected the lexical unit "..."<end_of_ano> "" is used as the target candidate word TC3.
[0064] Specifically, in a third marking stage (e.g., marking stage TP3), the language model LM determines whether the target candidate lexical in the previous marking stage is the start special marker or the end special marker. Next, the language model LM determines whether the multiple marking stages preceding the third marking stage have an unending start special marker. Then, in response to the target candidate lexical in the previous marking stage not being the start special marker or the end special marker, and the multiple marking stages preceding the third marking stage having the unending start special marker, the language model LM generates the candidate lexical in the third marking stage based on an original lexical and the end special marker.
[0065] Next, in the tagging phase TP4 of this example, the generation process of the fifth lexical unit is shown. In the fifth time step, since the previous lexical unit is "<end_of_ano> The candidate lexical C4 generated by the language model LM is restricted to the original lexical "contacted".
[0066] In this example, to ensure that consecutive segments of personal information are represented by a pair of morphemes "<begin_of_ano> " and word element"<end_of_ano> The language model LM restricts lexical selection to only those lexical terms selected in the previous time step if they were already selected.<begin_of_ano> "or word element"<end_of_ano> When selecting the word "contacted", only the original word unit is chosen. In other words, the language model LM selected the word unit "contacted" as the target candidate word unit TC4.
[0067] Specifically, in a fourth tagging stage (e.g., tagging stage TP4), the language model LM determines whether the target candidate lexical in the previous tagging stage is the end-specific tag. Then, in response to the target candidate lexical in the previous tagging stage being the end-specific tag, the language model LM generates the candidate lexical in the fourth tagging stage based on an original lexical.
[0068] Next, the remaining terms will continue to be processed in the same way as described above, until all terms of the TBP data to be processed have been marked.
[0069] Finally, in this embodiment, the processor 15 replaces the target word with the information provided by the special marker to generate deidentified data. Specifically, the processor 15 replaces the target word in the marker data with the start special marker and the end special marker in the marker data to generate a deidentified data corresponding to the data to be processed, TBP.
[0070] It should be noted that although the foregoing example only illustrates the identification / replacement of a single target word, those skilled in the art to which this disclosure pertains should be able to understand the implementation of the de-identification device 1 for multiple target words based on the content provided in this disclosure.
[0071] For easier understanding, please refer to Figure 5A and Figure 5B . Figure 5A Schematic diagram 501 illustrates a data TBP to be processed. In this example, the data TBP to be processed is medical data, which contains information such as "Hospital X Inpatient System", "Medical Record Number: 5285", "Gender: Female", "Name: Mary Lin", "Date of Birth: 1901-09-01", "Bed Number: K789", "Admission Date: 2021-07-12", "Department: Ward 6", etc.
[0072] also, Figure 5B Schematic diagram 503 illustrates a type of tagged data. In this example, the de-identification device 1 generates tagged data corresponding to the data to be processed, TBP. The tagged data includes "Medical Record Number:<begin_of_ano> 5285<end_of_ano> "Name:"<begin_of_ano> Mary Lin<end_of_ano> "Date of Birth: "<begin_of_ano> 1901-09-01<end_of_ano> "Bed Number: "<begin_of_ano> K789<end_of_ano> Tags such as "".
[0073] For example, processor 15 can use other alternative words (e.g., words that do not pose a risk to personal privacy) to replace / hide these specially marked morphemes.
[0074] In some implementations, the start special marker and the end special marker further correspond to a classification marker (e.g., patient identification number, patient name, date of birth, bed number, etc.). Specifically, the processor 15 generates a replacement word corresponding to the classification marker. Then, based on the replacement word, the processor 15 replaces the target word in the marker data to generate the deidentified data corresponding to the data TBP to be processed.
[0075] For example, Figure 5CSchematic diagram 505 illustrates a type of labeled data. In this example, the labeled data includes "Medical Record Number:<begin_of_PatientID> 5285<end_of_ PatientID > "Name:"<begin_of_name> Mary Lin<end_of_name> "Date of Birth:"<begin_of_birth> 1901-09-01<end_of_ birth > "Bed Number: "<begin_of_bedID> K789<end_of_bedID> Tags such as "".
[0076] In this example, the processor 15 can replace the target word in the tagged data with a preset replacement word corresponding to the category, thereby replacing sensitive data with the correct category replacement word. For example, patient identification numbers are replaced with "1234", and patient names are replaced with "sam".
[0077] In some implementations, the processor 15 may generate a replacement word corresponding to a color marker based on a confidence value (e.g., probability value PV) of the target word. Then, the processor 15 may replace the target word in the marker data based on the replacement word of the color marker to generate the deidentified data corresponding to the data TBP to be processed.
[0078] For example, target words with higher confidence values are represented by red replacement words, and target words with lower confidence values are represented by green replacement words. In this example, the de-identification device 1 can generate / output a visual result so that the user can determine the content of the de-identified data through the visual display.
[0079] As described above, the de-identification device 1 provided in this disclosure can actively mark target words in the lexical units of the data to be processed based on special markers, thereby generating marked data corresponding to the data to be processed. Furthermore, the de-identification device 1 provided in this disclosure replaces the target words in the marked data with the positional information provided by the special markers in the marked data, thereby generating de-identified data corresponding to the data to be processed. Since the de-identification device 1 provided in this disclosure can employ a trained language model, it can make more accurate predictions based on context and other factors when predicting lexical units. In addition, the de-identification device 1 provided in this disclosure can be fine-tuned to be applicable to various domains, providing scalability and adaptability. Furthermore, under strict conditions and candidate lexical unit constraints, the de-identification device 1 provided in this disclosure allows the language model to make accurate predictions and eliminates the risks of illusions, paraphrasing, or truncation (i.e., the de-identified data will not contain lexical units that do not belong to the original data content), thereby improving the reliability and accuracy of the de-identification output. Therefore, the de-identification device 1 provided in this disclosure can ensure the correctness of the de-identified data ultimately provided to the user, thus solving the problems of the prior art.
[0080] The second embodiment of this disclosure is a de-identification method, the flowchart of which is depicted in Figure 6 The de-identification method 600 is applicable to an electronic device, such as the de-identification device 1 described in the first embodiment. The electronic device stores a language model, such as the language model LM described in the first embodiment. The de-identification method 600 generates de-identified data corresponding to the data to be processed through steps S601 to S605.
[0081] First, in step S601, the language model generates multiple lexical units corresponding to a piece of data to be processed.
[0082] Subsequently, in step S603, the language model marks a target word among the plurality of words based on a start special tag and an end special tag, so as to generate a marked data corresponding to the data to be processed, wherein the target word corresponds to a person's information.
[0083] Finally, in step S605, the electronic device replaces the target word in the tagging data based on the start special tag and the end special tag in the tagging data to generate deidentified data corresponding to the data to be processed.
[0084] In some implementations, the tagging data includes a tagging order of the start special tag, the target word, and the end special tag.
[0085] In some implementations, marking the target word among the plurality of words further includes the following steps: determining whether a currently processed word is a meaningful word; and in response to the current processed word not being a meaningful word, forming a new current processed word based on the current processed word and the next set of processed words.
[0086] In some embodiments, the start special marker and the end special marker further correspond to a classification marker, and replacing the target word in the marker data further includes the following steps: generating a replacement word corresponding to the classification marker; and replacing the target word in the marker data based on the replacement word to generate the deidentified data corresponding to the data to be processed.
[0087] In some embodiments, marking the target word among the plurality of words includes the following steps: generating a candidate word corresponding to each of the plurality of marking stages based on an order in which the plurality of words appear in the data to be processed; selecting a target candidate word for each of the plurality of marking stages; and marking the target word among the plurality of words based on the start special marker and the end special marker among the plurality of target candidate words.
[0088] In some embodiments, generating the candidate lexical corresponding to each of the plurality of marking stages further includes the following steps: in a first marking stage, determining whether the target candidate lexical in a previous marking stage of the first marking stage is the start special mark or the end special mark; and in response that the target candidate lexical in the previous marking stage is not the start special mark or the end special mark, generating the candidate lexical in the first marking stage based on an original lexical and the start special mark.
[0089] In some embodiments, generating the candidate lexical corresponding to each of the plurality of marking stages further includes the following steps: in a second marking stage, determining whether the target candidate lexical in a previous marking stage of the second marking stage is the starting special marker; and in response to the target candidate lexical in the previous marking stage being the starting special marker, generating the candidate lexical in the second marking stage based on an original lexical.
[0090] In some embodiments, generating the candidate lexical corresponding to each of the plurality of marking stages further includes the following steps: in a third marking stage, determining whether the target candidate lexical in a previous marking stage of the third marking stage is the start special mark or the end special mark; determining whether the plurality of marking stages prior to the third marking stage have an unending start special mark; and in response that the target candidate lexical in the previous marking stage is not the start special mark or the end special mark, and the plurality of marking stages prior to the third marking stage have the unending start special mark, generating the candidate lexical in the third marking stage based on an original lexical and the end special mark.
[0091] In some implementations, generating the candidate lexical corresponding to each of the plurality of marking stages further includes the following operations: in a fourth marking stage, determining whether the target candidate lexical in a previous marking stage of the fourth marking stage is the end special marker; and in response to the target candidate lexical in the previous marking stage being the end special marker, generating the candidate lexical in the fourth marking stage based on an original lexical.
[0092] In some embodiments, the deidentification method further includes the following steps: generating a replacement word corresponding to a color mark based on a confidence value of the target word; and replacing the target word in the mark data based on the replacement word of the color mark to generate the deidentified data corresponding to the data to be processed.
[0093] In addition to the steps described above, the second embodiment can also perform all the operations and steps of the de-identification device 1 described in the first embodiment, have the same function, and achieve the same technical effect. Those skilled in the art to which this disclosure pertains can directly understand how the second embodiment performs these operations and steps based on the first embodiment described above, has the same function, and achieves the same technical effect, so it will not be described in detail here.
[0094] It should be noted that in this patent specification and claims, certain terms (including "marking stage") are preceded by "first," "second," "third," or "fourth." These multiple "first," "second," "third," or "fourth" prefixes are only used to distinguish different terms. For example, "first" and "second" in "first marking stage" and "second marking stage" are only used to indicate different marking stages.
[0095] In summary, the de-identification technology (including at least an apparatus and method) provided in this disclosure can actively label target words in the lexical units of the data to be processed based on special markers, thereby generating labeled data corresponding to the data to be processed. Furthermore, the de-identification technology provided in this disclosure replaces target words in the labeled data with positional information provided by special markers in the labeled data, thereby generating de-identified data corresponding to the data to be processed. Since the de-identification technology provided in this disclosure can employ a trained language model, it can make more accurate predictions based on context and other factors when predicting lexical units. In addition, the de-identification technology provided in this disclosure can be fine-tuned to be applicable to various domains, providing scalability and adaptability. Moreover, under strict conditions and candidate lexical unit constraints, the de-identification technology provided in this disclosure allows the language model to make accurate predictions and eliminates the risks of illusions, paraphrasing, or truncation (i.e., the de-identified data will not contain lexical units that do not belong to the original data content), thereby improving the reliability and accuracy of the de-identification output. Therefore, the de-identification technology provided in this disclosure ensures the correctness of the de-identified data ultimately provided to the user, solving the problems of the prior art.
[0096] The above embodiments are merely illustrative of some implementations of this disclosure and for explaining its technical features, and are not intended to limit the scope and extent of protection of this disclosure. Any changes or equivalent arrangements that can be easily made by those skilled in the art to which this disclosure pertains are within the scope of this disclosure, and the scope of protection of this disclosure is determined by the claims.
Claims
1. A de-identification device, characterized in that, Include: One storage device stores one language model; One transmit / receive interface; and A processor, electrically connected to the memory and the transceiver interface, is configured to perform the following operations: The language model generates multiple lexical units corresponding to a given piece of data to be processed. The language model, based on a start special tag and an end special tag, tags a target word from among the multiple word elements to generate tagged data corresponding to the data to be processed, wherein the target word corresponds to a person's information; and Based on the start special tag and the end special tag in the tag data, the target word in the tag data is replaced to generate a deidentified data corresponding to the data to be processed.
2. The de-identification device as described in claim 1, characterized in that, The tagging data includes a tagging sequence of the starting special tag, the target word, and the ending special tag.
3. The de-identification device as described in claim 1, characterized in that, The tagging of the target term among these multiple terms further includes the following operations: Determine whether the currently processed word is a meaningful word; and In response to the fact that the currently processed word is not the meaningful word, a new currently processed word is formed based on the currently processed word and the next set of processed words.
4. The de-identification device as described in claim 1, characterized in that, The start and end special tags correspond to a category tag, and replacing the target word in the tag data includes the following operations: Generate a replacement word element corresponding to the classification tag; and Based on the replacement word, the target word in the tagged data is replaced to generate the deidentified data corresponding to the data to be processed.
5. The de-identification device as described in claim 1, characterized in that, The process of marking the target word among these multiple words includes the following operations: Based on the order in which these multiple lexical units appear in the data to be processed, a candidate lexical unit corresponding to each of the multiple tagging stages is generated. Select a target candidate lexical for each of the multiple tagging stages; as well as Based on the start special marker and the end special marker among the multiple target candidate lexical units, the target lexical unit among the multiple lexical units is marked.
6. The de-identification device as described in claim 5, characterized in that, The generation of the candidate lexical corresponding to each of the multiple tagging stages further includes the following operations: In a first marking stage, it is determined whether the target candidate word in the previous marking stage of the first marking stage is the start special marker or the end special marker; and In response to the fact that the target candidate lexical in the previous marking stage is not the start special tag or the end special tag, the candidate lexical in the first marking stage is generated based on an original lexical and the start special tag.
7. The de-identification device as described in claim 5, characterized in that, The generation of the candidate lexical corresponding to each of the multiple tagging stages further includes the following operations: In a second marking stage, it is determined whether the target candidate word element in the previous marking stage of the second marking stage is the starting special mark; as well as In response to the target candidate lexical in the previous marking stage being the starting special tag, the candidate lexical in the second marking stage is generated based on an original lexical.
8. The de-identification device as described in claim 5, characterized in that, The generation of the candidate lexical corresponding to each of the multiple tagging stages further includes the following operations: In a third marking stage, it is determined whether the target candidate word element in the previous marking stage of the third marking stage is the start special mark or the end special mark; Determine whether the plurality of marking stages preceding the third marking stage have an unfinished start special mark; as well as In response to the fact that the target candidate lexical in the previous marking stage is not the start special mark or the end special mark, and that the plurality of marking stages preceding the third marking stage have the unfinished start special mark, the candidate lexical in the third marking stage is generated based on an original lexical and the end special mark.
9. The de-identification device as described in claim 5, characterized in that, The generation of the candidate lexical corresponding to each of the multiple tagging stages further includes the following operations: In a fourth marking stage, it is determined whether the target candidate lexical in the previous marking stage of this fourth marking stage is the end special marker; and In response to the target candidate lexical being the end special marker in the previous marking stage, the candidate lexical being generated in the fourth marking stage is based on an original lexical.
10. The de-identification device as claimed in claim 1, characterized in that, The processor further performs the following operations: Based on the confidence value of the target lexical, a replacement lexical with a corresponding color tag is generated; and The replacement word based on the color mark is used to replace the target word in the marked data to generate the deidentified data corresponding to the data to be processed.
11. A de-identification method, characterized in that, For an electronic device, wherein the electronic device stores a language model, and the de-identification method includes the following steps: The language model generates multiple lexical units corresponding to a given piece of data to be processed. The language model, based on a start special tag and an end special tag, tags a target word from among the multiple word elements to generate tagged data corresponding to the data to be processed, wherein the target word corresponds to a person's information; and Based on the start special tag and the end special tag in the tag data, the target word in the tag data is replaced to generate a deidentified data corresponding to the data to be processed.