A context-aware real-time data anonymization method and system
By using real-time data anonymization methods and systems, and combining user roles and access environment characteristics, dynamic anonymization strategies are generated, which solves the flexibility and performance bottlenecks of traditional data anonymization schemes, and achieves fine-grained access control and efficient data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, traditional data anonymization schemes are difficult to flexibly adapt to user roles, access environments, and data sensitivity levels, resulting in over-anonymization or under-anonymization, coarse-grained permissions, risks of unauthorized access, high processing latency, and limited data availability.
By intercepting requests through the gateway, information such as user authentication tokens, URL parameters, and IP addresses is extracted. User roles and access environment characteristics are analyzed, and a rule engine is used to generate real-time de-identification strategies. Combined with sensitive field identification and classification, field-level access control and dynamic adjustment of de-identification intensity are achieved.
It achieves fine-grained access control, reduces the risk of unauthorized access, improves data availability and security, optimizes processing performance, and meets the dynamic access requirements of multiple scenarios.
Smart Images

Figure CN120750643B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data security technology, specifically to a context-aware real-time data de-identification method and system. Background Technology
[0002] In the wave of digitalization, with the widespread application of cloud computing and big data technologies, sensitive data faces extremely severe security challenges in cross-system and cross-role access scenarios. Traditional data masking solutions mostly adopt static masking rules, that is, pre-setting masking strategies (such as fixed field replacement, global data masking, etc.) before data use, which makes it difficult to flexibly adjust the masking logic according to dynamic context factors such as user roles, access environments, and data sensitivity levels.
[0003] Disadvantages of existing technology:
[0004] (1) Limitations on Strategy Flexibility: Current desensitization strategies are mostly based on static rule systems, which are difficult to adapt to the dynamic permission requirements of multiple roles and scenarios in a complex and ever-changing business ecosystem. In actual business scenarios, the access permissions of users in different departments and at different job levels vary significantly, and static rules cannot dynamically adjust the degree of desensitization according to the real-time changes in user roles and scenarios. This limitation can easily lead to the phenomenon of "over-desensitization," for example, providing users with high permissions who should have access to detailed data to support decision-making with data that has been deeply desensitized and has almost lost its decision-making value, which has a negative impact on their work efficiency and decision-making quality; conversely, "under-desensitization" may also occur, causing users with lower permissions to accidentally come into contact with sensitive information, which poses a potential risk to data security.
[0005] (2) Performance bottleneck: Traditional gateway architectures mainly adopt a serial processing mechanism. During real-time data anonymization, data needs to pass through multiple processing stages sequentially. This mode easily leads to a lengthy processing chain, which in turn causes high latency issues. Taking high-concurrency real-time transaction data processing as an example, the latency of traditional gateway architectures can reach tens or even hundreds of milliseconds, which is far from meeting the current stringent requirements for millisecond-level response, severely restricting the real-time interactive performance of the system.
[0006] (3) Coarse-grained permission control: Role-based access control is relatively broad, assigning permissions only based on the user's role, making it difficult to dynamically adjust according to the access environment. In practical applications, IP whitelists can precisely limit the source of access, and time period restrictions can effectively control the operation time range, but traditional access control cannot take these environmental factors into account and achieve dynamic correction. When internal personnel have excessive role permissions and the access environment lacks effective restrictions, there is a high risk of unauthorized access, which can easily lead to the leakage of sensitive data.
[0007] (4) Limited Data Availability: Traditional data masking strategies often adopt a "uniform" approach, applying the same data masking rules to data across all scenarios. However, different business scenarios have significantly different data requirements. In the testing environment, to ensure the accuracy and effectiveness of system debugging, it is often necessary to retain some real data to simulate real business processes. However, a uniform data masking strategy can over-process this data, causing it to lose its due business value and failing to provide sufficient support for testing.
[0008] Therefore, how to improve the shortcomings of the existing technology is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0009] To achieve the objectives of this invention, this application provides a context-aware real-time data anonymization method, comprising:
[0010] Step S1: Intercept HTTP / HTTPS requests through the gateway and extract the user authentication token, URL parameters, IP address, timestamp, and request body data from the request header;
[0011] Step S2: Based on the user authentication token, parse the user role information, extract access environment features based on the IP address and timestamp, and identify and classify sensitive fields in the request body data to determine the data sensitivity level;
[0012] Step S3: Based on the user role information, access environment characteristics, and data sensitivity level, the rule engine matches the predefined de-identification strategy template to generate a real-time de-identification strategy containing field-level de-identification instructions;
[0013] Step S4: Verify access permissions based on the user authentication token, and dynamically adjust the desensitization level in combination with the access environment characteristics;
[0014] Step S5: Perform real-time desensitization processing on the sensitive fields in the corresponding data according to the real-time desensitization strategy and desensitization intensity.
[0015] In some specific embodiments, step S6 is also included:
[0016] Record the operation logs for steps S1-S5, including the context parameters involved in each de-identification operation, including user information, environment parameters, and data characteristics, and record the application's policy version information and data modification trajectory.
[0017] In some specific embodiments, step S2, the identification and classification of sensitive fields, includes:
[0018] Natural language processing models are used to perform semantic analysis on the request body data to identify sensitive fields containing personal identification information, financial data, or medical records.
[0019] Based on the preset sensitivity standards, the identified sensitive fields are marked as five levels, L1-L5, where L1-L5 represent the highest to the lowest sensitivity levels, respectively.
[0020] In some specific embodiments, in step S3, the rule engine is implemented using Drools, and the matching logic of the rule engine includes:
[0021] When the user role is a regular user and the data sensitivity level is ≥L3, a complete replacement desensitization method is adopted;
[0022] When the user role is an administrator and the access environment is an intranet, a partially hidden desensitization method is used.
[0023] In some specific embodiments, step S3 further includes:
[0024] Continuously monitor the data access environment. When an anomaly that violates risk rules is detected, immediately initiate an automatic response process, reduce access privilege levels, and increase de-identification measures.
[0025] In some specific embodiments, the abnormal situations that violate the risk rules include accessing highly sensitive data via public IP address, sudden changes in user roles, abnormal access time, abnormal device, abnormal access frequency, abnormal geographical location, abnormal operational behavior, abnormal environmental parameters, and abnormal audit logs.
[0026] In some specific embodiments, step S3 includes field replacement, data truncation, and mask display.
[0027] In some specific embodiments, step S5 includes the real-time desensitization process:
[0028] Identify data formats and perform different processing based on different data formats, including:
[0029] If the data is in JSON format, sensitive fields in the JSON data will be masked or replaced.
[0030] If the data is in XML format, then the sensitive nodes in the XML data will be truncated.
[0031] If the data is in CSV format, then sensitive columns in the CSV data are encrypted while preserving their format.
[0032] To achieve the same inventive objective, this application also provides a context-aware real-time data anonymization system, comprising:
[0033] Request interception module: Used to intercept HTTP / HTTPS requests through the gateway and extract user authentication tokens, URL parameters, IP addresses, timestamps, and request body data from the request headers;
[0034] Context parsing module: used to parse user role information based on the user authentication token, extract access environment features based on the IP address and timestamp, and identify and classify sensitive fields in the request body data to determine the data sensitivity level;
[0035] Dynamic desensitization engine module: Based on the user role information, access environment characteristics and data sensitivity level, it generates a real-time desensitization strategy containing field-level desensitization instructions by matching a predefined desensitization strategy template through a rule engine.
[0036] Permission verification module: used to verify access permissions based on the user authentication token, and dynamically adjust the desensitization level in combination with the access environment characteristics;
[0037] Desensitization Execution Module: Used to perform real-time desensitization processing on sensitive fields in the corresponding data according to the real-time desensitization strategy and desensitization intensity.
[0038] In some specific embodiments, a logging module is also included:
[0039] The operation log is used to record steps S1-S5, including the context parameters involved in each de-identification operation, including user information, environment parameters and data characteristics, and records the application's policy version information and data modification trajectory.
[0040] The beneficial effects of the above technical solution are as follows:
[0041] (1) Performance Optimization: The real-time data masking gateway adopts an advanced pipelined processing architecture, with the processing flow consisting of request interception, parsing, policy generation, masking, and response. Combined with Netty's non-blocking I / O technology, the gateway achieves a significant breakthrough in performance.
[0042] (2) Balancing Data Availability and Security: To achieve an effective balance between data availability and security, the gateway employs a dynamic mapping mechanism between sensitivity levels and permissions. In the testing environment, this mechanism enables relevant personnel to access 30%-70% of the real data, changing the traditional approach which only provides 0% or 100% of the real data. This innovative approach not only meets compliance requirements but also enhances the value of data in testing scenarios, providing strong support for business development and compliant operations.
[0043] (3) Fine-grained access control: The gateway possesses powerful fine-grained access control capabilities, supporting field-level access management. In actual business scenarios, role A can be flexibly configured to view the order amount field, while role B can only view the anonymized amount. Compared with traditional RBAC solutions, the access granularity in this application is refined to the field level. Evaluation shows that the risk of unauthorized access is reduced by more than 90%, effectively ensuring the security and compliance of data access. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 A flowchart illustrating a context-aware real-time data desensitization method according to an embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram of a context-aware real-time data desensitization system provided as an embodiment of the present invention. Detailed Implementation
[0047] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0048] Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar symbols denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the invention, and should not be construed as limiting the invention.
[0049] Example 1
[0050] This invention employs a microservice architecture, using the Spring Cloud service framework as the foundational platform for context-aware real-time data anonymization gateway effects. The invention utilizes a distributed system architecture, supporting horizontal scaling based on data nodes of arbitrary size, thereby enhancing the overall cluster's computing power. One embodiment of this invention provides a context-aware real-time data anonymization method, referring to... Figure 1 As shown, it includes:
[0051] Step S1: Intercept HTTP / HTTPS requests through the gateway and extract the user authentication token, URL parameters, IP address, timestamp, and request body data from the request header;
[0052] This system employs Netty, a high-performance asynchronous event-driven network application framework, and leverages Spring Cloud Gateway, an API gateway solution based on the Spring ecosystem, to achieve real-time and accurate interception of HTTP / HTTPS traffic. During interception, it deeply parses and extracts key information from request headers, such as user authentication tokens and request origins; accurately obtains URL parameters, including query conditions and path variables; and comprehensively analyzes payload data, covering JSON-formatted request bodies and form data, laying a complete and accurate data foundation for subsequent data anonymization processes. Utilizing connection pooling technology, the system efficiently manages and reuses network connection resources, significantly reducing the overhead of connection creation and destruction. Combined with asynchronous processing mechanisms such as the Netty event loop, the system can process a large number of requests in parallel, greatly improving system throughput. During data anonymization, this architectural design ensures efficient execution of the anonymization operation, guaranteeing timeliness and accuracy even in high-concurrency scenarios.
[0053] The system is equipped with a high-precision request interception mechanism, capable of accurately intercepting all incoming requests and immediately initiating a comprehensive and meticulous parsing process. During parsing, the system utilizes advanced token parsing technology to perform in-depth analysis of the tokens carried in the request, accurately extracting user role information. Simultaneously, the system can automatically and efficiently collect various environmental parameters, including multi-dimensional information such as the request source IP address, device type, operating system version, and network access method. Subsequently, based on pre-defined and fully validated data sensitivity classification rules, the system employs a complex algorithm model to comprehensively evaluate the data involved in the request, achieving precise sensitivity classification and providing a solid and reliable foundation for subsequent processing steps.
[0054] Step S2: Based on the user authentication token, parse the user role information, extract access environment features based on the IP address and timestamp in the request header, and identify and classify sensitive fields in the request body data to determine the data sensitivity level;
[0055] In a specific embodiment of the present invention, step S2, the identification and classification of sensitive fields, includes:
[0056] Natural language processing models are used to perform semantic analysis on the request body data to identify sensitive fields containing personal identification information, financial data, or medical records.
[0057] Based on the preset sensitivity standards, the identified sensitive fields are marked as five levels, L1-L5, where L1-L5 represent the highest to the lowest sensitivity levels, respectively.
[0058] Specifically, the system leverages advanced token parsing technology to accurately extract user IDs from JWT / OAuth2 tokens. This process utilizes sophisticated encryption algorithms and decoding logic to ensure a high degree of accuracy and security in data extraction. Simultaneously, the system conducts in-depth role group identification. For example, "ROLE_DOCTOR" represents the doctor role, which is granted specific data access permissions, primarily for viewing and processing medical diagnostic data; "ROLE_AUDITOR" represents the auditor role, whose permissions focus on compliance review of various data operations. Through this meticulous role classification, the system lays a solid foundation for subsequent data access control.
[0059] In the environmental feature extraction stage, the system first parses the client's IP address and obtains the network location information of the client device through network protocol analysis. This helps to accurately identify the source of data requests and effectively identify abnormal network access behavior. The system accurately records request timestamps and uses high-precision time synchronization technology to ensure the accuracy of time records, so as to carry out subsequent time-series data analysis, such as statistically analyzing the frequency of data requests within a specific time period. In addition, the system deeply extracts device fingerprints. Taking the User-Agent as an example, the system constructs a unique identifier for the device by parsing the information contained therein, such as the operating system, browser type and version, providing comprehensive environmental information support for each data request.
[0060] To achieve accurate data sensitivity classification, the system employs advanced NLP algorithms, such as the BERT model. The BERT model is pre-trained on a large-scale corpus and possesses the ability to deeply understand text semantics. During the data sensitivity field identification process, the model analyzes the requested data word by word, sentence by sentence, and accurately identifies sensitive information such as ID card numbers and bank card numbers using a complex neural network structure. After identification, the system labels the data sensitivity according to preset sensitivity level tags (L1-L5). L1 represents the highest sensitivity level, such as critical privacy information in personal medical records; L5 represents a relatively low sensitivity level, such as general user preference data. Through this scientific classification method, the system can implement corresponding de-identification strategies for data with different levels of sensitivity.
[0061] Step S3: Based on the user role information, access environment characteristics, and data sensitivity level, the rule engine matches the predefined de-identification strategy template to generate a real-time strategy containing field-level de-identification instructions;
[0062] In a specific embodiment of the present invention, in step S3, the rule engine is implemented using Drools, and the matching logic of the rule engine includes:
[0063] When the user role is a regular user and the data sensitivity level is ≥L3, a complete replacement desensitization method is adopted;
[0064] When the user role is an administrator and the access environment is an intranet, a partially hidden desensitization method is used;
[0065] When abnormal access behavior is detected, the desensitization intensity is automatically increased.
[0066] In one specific embodiment of the present invention, step S3 further includes:
[0067] Continuously monitor the data access environment. When an anomaly that violates risk rules is detected, immediately initiate an automatic response process, reduce access privilege levels, and increase de-identification measures.
[0068] In a specific embodiment of the present invention, the abnormal situations that violate the risk rules include accessing highly sensitive data via public IP, whether the user role has suddenly changed, whether the access time is outside of normal working hours, whether the device is an unfamiliar device, whether the access frequency is abnormally frequent, whether the permissions have been temporarily elevated without following the application process, whether the geographical location has suddenly changed, whether the operation behavior is abnormal, whether environmental parameters such as IP have changed frequently, whether there is any conflict in policy execution, and whether there are any abnormal records in the audit log.
[0069] In a specific embodiment of the present invention, in step S3, the desensitization instructions include field replacement, data truncation, and mask display.
[0070] Specifically, it integrates powerful rule engine tools like Drools to build a flexible and efficient rule matching mechanism. Its operational logic is based on context parameters, comprehensively considering user roles (such as ordinary users, administrators, data analysts, etc.), operating environments (production, testing, development, etc.), and sensitivity levels (high sensitivity, medium sensitivity, low sensitivity). Through accurate identification and analysis of these key context parameters, the system can dynamically match pre-defined de-identification strategy templates. For example, in a production environment, for highly sensitive data, if the user role is an ordinary user, a "complete replacement" de-identification strategy might be triggered; while in a testing environment, for the same highly sensitive data, if the user role is a data analyst, a "partial hiding" de-identification strategy might be used. Example rules are as follows:
[0071] when
[0072] / / Conditional checks: The user's role is a nurse, the current environment's IP address is not within the 192.168 network segment, and the data sensitivity level is 3.
[0073] User(role=="ROLE_NURSE")&&Environment(ipnotin"192.168.%.%")&&Data(sensitivityLevel==3)
[0074] then
[0075] / / Perform data masking: Replace the 'phone' field with ****####
[0076] insert("Sensitive Data Removal Strategy","Field Replacement","phone","****####");
[0077] This mechanism enables the system to quickly load various policies during runtime. Leveraging the Drools rule engine, the system can dynamically parse complex conditional expressions in real time, accurately adapting to business needs in different scenarios. Whether facing sudden business adjustments or ever-changing security policy requirements, this mechanism can respond flexibly, enabling dynamic changes to system configurations and meeting flexible configuration needs in diverse scenarios.
[0078] Specifically, based on the matching results of the above conditions, real-time de-identification instructions are intelligently generated. These instructions include: partial field replacement, which replaces sensitive fields with specific character combinations according to pre-set rules; data truncation, which truncates data to a certain length to hide sensitive parts according to actual needs; and masked display, which uses mask symbols to cover the display of sensitive information. In addition, the strategy generator has high flexibility, supporting complex pattern matching through regular expressions and dynamic replacement using template variables. It can dynamically adjust the de-identification rules according to different scenarios and data characteristics, ensuring that the de-identification operation can accurately adapt to diverse data needs.
[0079] The system performs precise verification of user access permissions to target resources based on the scope carried by the JWT / OAuth2 token. For example, when the scope is "read:patient:low", the user is only authorized to read low-level patient information, specifically limited to the patient's basic attributes, including but not limited to routine data such as name and age; if the scope is "write:finance:high", the user is granted write permissions to high-level financial data, allowing them to modify and update key financial data.
[0080] The system continuously monitors the data access environment. When it detects any abnormalities that violate risk rules, such as accessing highly sensitive data via a public IP address, it immediately initiates an automatic response process. This process automatically lowers access privilege levels, for example, reducing a high-level user with full access to sensitive information to a low-level user who can only view some key information. Simultaneously, it strengthens data anonymization, for example, upgrading sensitive data that was previously only partially obfuscated to undergo complete replacement or deep encryption of key content to ensure data security in high-risk environments.
[0081] Upon receiving the aforementioned context parameters, the rules engine quickly loads them. These context parameters cover key elements such as user roles, environmental information, and data sensitivity levels. Leveraging a powerful matching algorithm, the rules engine efficiently matches data from a vast policy template library, accurately determining the most suitable policy template for the current request. Based on the selected template, the system uses intelligent generation technology to generate a detailed and comprehensive set of de-identification instructions. This instruction set is highly flexible, supporting priority ranking of multiple de-identification strategies and rationally arranging the execution order of various de-identification strategies according to different scenario requirements. Simultaneously, the instruction set incorporates an advanced conflict resolution mechanism. When conflicts arise among multiple de-identification strategies during execution, it can quickly identify and take effective measures to resolve them, ensuring effective execution of strategies even in complex and ever-changing scenarios.
[0082] Step S4: Verify access permissions based on the user authentication token, and dynamically adjust the desensitization level in combination with the access environment characteristics;
[0083] Specifically, as a key component of the data anonymization gateway, this module is responsible for real-time processing of response data. Given the diverse data format requirements, it possesses accurate parsing capabilities for common data formats such as JSON, XML, and CSV. In the anonymization process, advanced byte stream modification technology is employed. The significant advantage of this technology lies in achieving non-intrusive anonymization, meaning that sensitive data is processed efficiently without interfering with the original business system architecture and data transmission flow, effectively ensuring the security and integrity of data during transmission.
[0084] Step S5: Perform real-time desensitization processing on sensitive fields in the response data according to the generated real-time desensitization strategy and desensitization intensity.
[0085] In a specific embodiment of the present invention, step S5 includes the real-time desensitization process:
[0086] Identify data formats and perform different processing based on different data formats, including:
[0087] If the data is in JSON format, sensitive fields in the JSON data will be masked or replaced.
[0088] If the data is in XML format, then the sensitive nodes in the XML data will be truncated.
[0089] If the data is in CSV format, then sensitive columns in the CSV data are encrypted while preserving their format.
[0090] Specifically, the system establishes a strict positive correlation between permission levels and the degree of data anonymization through rigorous logical design. In a real-world scenario, a user with permission level L4, possessing high privileges within the system, can access 30% of the plaintext content of L2-level sensitive data through precise calculation and control. This portion of plaintext content satisfies their necessary information needs in their work while avoiding security risks caused by excessive data exposure. Conversely, a user with only permission level L2, whose privileges are relatively low, is only allowed to access 10% of the plaintext content of L2-level sensitive data based on security and reasonable considerations. This ensures a balance between security and reasonableness in data access across all permission levels.
[0091] In one specific embodiment of the present invention, step S6 is further included:
[0092] Record the operation logs for steps S1-S5, including the context parameters involved in each de-identification operation, including user information, environment parameters, and data characteristics, and record the application's policy version information and data modification trajectory.
[0093] Specifically, it meticulously records the contextual parameters involved in each data anonymization operation, including user information, environmental parameters, and data characteristics. Simultaneously, it accurately records the applied policy version information, ensuring the traceability of policy changes. Furthermore, it fully retains the data modification trajectory, meticulously recording every step of the data's transformation from its original state to its anonymized state. This functional module can serve as a key optional entry point for system expansion, providing comprehensive data support for subsequent security audits, facilitating rapid identification and tracing of the root cause of problems, and effectively improving system security and maintainability.
[0094] Example 2
[0095] One embodiment of the present invention provides a context-aware real-time data anonymization system, referring to... Figure 2 As shown, it includes:
[0096] Request interception module 10: Used to intercept HTTP / HTTPS requests through the gateway and extract user authentication tokens, URL parameters, IP addresses, timestamps, and request body data from the request header;
[0097] Context parsing module 20: used to parse user role information based on the user authentication token, extract access environment features based on the IP address and timestamp in the request header, and identify and classify sensitive fields in the request body data to determine the data sensitivity level;
[0098] In a specific embodiment of the present invention, the sensitive field identification and classification in the context parsing module 20 includes:
[0099] Natural language processing models are used to perform semantic analysis on the request body data to identify sensitive fields containing personal identification information, financial data, or medical records.
[0100] Based on the preset sensitivity standards, the identified sensitive fields are marked as five levels, L1-L5, where L1-L5 represent the highest to the lowest sensitivity levels, respectively.
[0101] Dynamic desensitization engine module 30: is used to generate a real-time desensitization strategy containing field-level desensitization instructions by matching a predefined desensitization strategy template through a rule engine based on the user role information, access environment characteristics and data sensitivity level.
[0102] In a specific embodiment of the present invention, the dynamic desensitization engine module 30 uses Drools as its rule engine, and the matching logic of the rule engine includes:
[0103] When the user role is a regular user and the data sensitivity level is ≥L3, a complete replacement desensitization method is adopted;
[0104] When the user role is an administrator and the access environment is an intranet, a partially hidden desensitization method is used;
[0105] When abnormal access behavior is detected, the desensitization intensity is automatically increased.
[0106] Permission verification module 40: used to verify access permissions based on the user authentication token, and dynamically adjust the desensitization level in combination with the access environment characteristics;
[0107] Desensitization Execution Module 50: Used to perform real-time desensitization processing on sensitive fields in the corresponding data according to the real-time desensitization strategy and desensitization intensity.
[0108] In a specific embodiment of the present invention, the real-time desensitization processing in the desensitization execution module includes:
[0109] Identify data formats and perform different processing based on different data formats, including:
[0110] If the data is in JSON format, sensitive fields in the JSON data will be masked or replaced.
[0111] If the data is in XML format, then the sensitive nodes in the XML data will be truncated.
[0112] If the data is in CSV format, then sensitive columns in the CSV data are encrypted while preserving their format.
[0113] In one specific embodiment of the present invention, a log recording module is also included:
[0114] The operation log is used to record steps S1-S5, including the context parameters involved in each de-identification operation, including user information, environment parameters and data characteristics, and records the application's policy version information and data modification trajectory.
[0115] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0116] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes. Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the invention. Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0117] The methods and apparatus provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
[0118] In the description of this specification, references to terms such as "an embodiment," "some embodiments," "example," "specific example," or "a specific embodiment" or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A context-aware real-time data anonymization method, characterized in that, include: Step S1: Intercept HTTP / HTTPS requests through the gateway and extract the user authentication token, URL parameters, IP address, timestamp, and request body data from the request header; Step S2: Based on the user authentication token, parse the user role information, extract access environment features based on the IP address and timestamp, and identify and classify sensitive fields in the request body data to determine the data sensitivity level; Step S3: Based on the user role information, access environment characteristics, and data sensitivity level, the rule engine matches the predefined de-identification strategy template to generate a real-time de-identification strategy containing field-level de-identification instructions; Step S4: Verify access permissions based on the user authentication token, and dynamically adjust the desensitization level in conjunction with the access environment characteristics; Step S5: Perform real-time desensitization processing on the sensitive fields in the corresponding data according to the real-time desensitization strategy and desensitization intensity; In step S2, the identification and classification of sensitive fields includes: Natural language processing models are used to perform semantic analysis on the request body data to identify sensitive fields containing personal identification information, financial data, or medical records. Based on the preset sensitivity standards, the identified sensitive fields are marked into five levels, L1-L5, where L1-L5 represent the highest to the lowest sensitivity levels, respectively. In step S3, the rule engine is implemented using Drools, and the matching logic of the rule engine includes: When the user role is a regular user and the data sensitivity level is ≥L3, a complete replacement desensitization method is adopted; When the user role is an administrator and the access environment is an intranet, a partially hidden desensitization method is used.
2. The context-aware real-time data anonymization method according to claim 1, characterized in that, It also includes step S6: Record the operation logs for steps S1-S5, including the context parameters involved in each de-identification operation, including user information, environment parameters, and data characteristics, and record the application's policy version information and data modification trajectory.
3. The context-aware real-time data anonymization method according to claim 1, characterized in that, Step S3 also includes: Continuously monitor the data access environment, and when an anomaly that violates risk rules is detected, immediately initiate an automatic response process to reduce access privilege levels and increase de-identification efforts.
4. The context-aware real-time data anonymization method according to claim 3, characterized in that, The abnormal situations that violate the risk rules include accessing highly sensitive data via public IP address, sudden changes in user roles, abnormal access time, abnormal device, abnormal access frequency, abnormal geographical location, abnormal operational behavior, abnormal environmental parameters, and abnormal audit logs.
5. The context-aware real-time data anonymization method according to claim 1, characterized in that, In step S3, the de-identification instructions include field replacement, data truncation, and mask display.
6. The context-aware real-time data anonymization method according to claim 1, characterized in that, In step S5, the real-time desensitization process includes: Identify data formats and perform different processing based on different data formats, including: If the data is in JSON format, sensitive fields in the JSON data will be masked or replaced. If the data is in XML format, then the sensitive nodes in the XML data will be truncated. If the data is in CSV format, then sensitive columns in the CSV data are encrypted while preserving their format.
7. A context-aware real-time data anonymization system, characterized in that, include: Request interception module: Used to intercept HTTP / HTTPS requests through the gateway and extract user authentication tokens, URL parameters, IP addresses, timestamps, and request body data from the request headers; Context parsing module: used to parse user role information based on the user authentication token, extract access environment features based on the IP address and timestamp, and identify and classify sensitive fields in the request body data to determine the data sensitivity level; Dynamic desensitization engine module: Based on the user role information, access environment characteristics and data sensitivity level, it generates a real-time desensitization strategy containing field-level desensitization instructions by matching a predefined desensitization strategy template through a rule engine. Permission verification module: used to verify access permissions based on the user authentication token, and dynamically adjust the desensitization level in combination with the access environment characteristics; The desensitization execution module is used to perform real-time desensitization processing on sensitive fields in the corresponding data according to the real-time desensitization strategy and desensitization intensity. In the context parsing module, the identification and classification of sensitive fields includes: Natural language processing models are used to perform semantic analysis on the request body data to identify sensitive fields containing personal identification information, financial data, or medical records. Based on the preset sensitivity standards, the identified sensitive fields are marked into five levels, L1-L5, where L1-L5 represent the highest to the lowest sensitivity levels, respectively. In the dynamic desensitization engine module, the rule engine is implemented using Drools, and the matching logic of the rule engine includes: When the user role is a regular user and the data sensitivity level is ≥L3, a complete replacement desensitization method is adopted; When the user role is an administrator and the access environment is an intranet, a partially hidden desensitization method is used.
8. The context-aware real-time data anonymization system according to claim 7, characterized in that, It also includes a logging module: Used to record operation logs, including the context parameters involved in each de-identification operation, including user information, environment parameters and data characteristics, and to record the application's policy version information and data modification trajectory.
Citation Information
Patent Citations
Dynamic data desensitization method and system
CN119885259A
Hospital database management method and system based on adaptive data desensitization
CN120030601A