Livelihood card data security protection method and system based on hierarchical encryption and dynamic desensitization
By implementing layered encryption and dynamic desensitization of public service card data, the problems of easy cracking of single encryption and easy restoration of fixed desensitization are solved, achieving a balance between data security and availability, and reducing implementation costs and system complexity.
Patent Information
- Application Number
- CN202511807535.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, the single encryption algorithm for public service card data is easily cracked, the fixed desensitization method is easily restored, and it is difficult to adapt to the differentiated security requirements of data with different sensitivity levels, resulting in insufficient data security and limited usability.
A hierarchical encryption and dynamic desensitization approach is adopted to classify and encrypt the data of the public service card. Asymmetric encryption, homomorphic encryption and symmetric encryption are used to process different types of data respectively. Access risks are determined based on user roles and access requests, and desensitization strategies are dynamically adjusted. The encryption keys are managed through distributed storage to achieve hierarchical protection of the data.
It improves data security and availability, reduces implementation costs and system complexity, meets the dynamic needs of different business scenarios, and achieves a balance between data security and availability.
Smart Images

Figure CN121502789A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security and privacy protection, and particularly relates to a livelihood card data security protection method and system based on hierarchical encryption and dynamic desensitization. BACKGROUND
[0002] With the wide application of information technology in the livelihood field, livelihood cards such as social security cards and medical insurance cards carry a large amount of personal sensitive information, including names, ID numbers, account balances, medical records, etc. It is crucial to protect the security of these data.
[0003] At present, data security protection mainly adopts traditional encryption technology and fixed desensitization methods. Traditional encryption technology is mostly single encryption algorithm, such as symmetric encryption AES algorithm or asymmetric encryption RSA algorithm. These algorithms have limitations, and once a single algorithm is cracked, the data will face the risk of leakage, and it is difficult to adapt to the differentiated security needs of different sensitive level data.
[0004] Fixed desensitization methods usually perform simple transformation or replacement on data, such as masking part of the digits of an ID number with asterisks. However, this desensitization method is easy to be reversed to restore the original data, and the security is insufficient. At the same time, in the scenarios of data sharing and business collaboration, the fixed desensitized data often cannot meet the dynamic needs of the business, resulting in limited data availability.
[0005] In addition, some high-security level data protection schemes are too complex, requiring a large number of hardware devices and professional technical personnel for maintenance, with high implementation costs and complicated processes, making it difficult to be widely promoted in large-scale application livelihood card systems. SUMMARY
[0006] In view of the above analysis, the embodiments of the present application aim to provide a livelihood card data security protection method and system based on hierarchical encryption and dynamic desensitization, to solve the problems of existing single encryption being easy to be cracked and desensitization technology being easy to be restored.
[0007] In one aspect, the embodiments of the present application provide a livelihood card data security protection method based on hierarchical encryption and dynamic desensitization, comprising the following steps:
[0008] Obtaining original livelihood card data, classifying the original livelihood card data, and performing hierarchical encryption on different types of data;
[0009] Receiving a user access request, determining the access risk based on the user role and the access request;
[0010] Based on the access risk, the access request data is desensitized, and the requested data is returned.
[0011] Further improvement based on the above method, the original data of the people's livelihood card is classified, and different types of data are layered encrypted, including:
[0012] The original data of the people's livelihood card is classified by using a hybrid classification engine. The data types include: identity data, transaction record data and user attribute data;
[0013] The identity data is encrypted by asymmetric encryption; the transaction record data is encrypted by homomorphic encryption; and the user attribute data is symmetrically encrypted;
[0014] The encryption key is managed by distributed storage.
[0015] Further improvement based on the above method, the access risk is determined based on the user role and the access request, including:
[0016] The user request is verified by two-factor authentication, and if the verification fails, the access is denied; otherwise:
[0017] The user role, request access time and geographic location are analyzed, and the access risk is determined based on the analysis result.
[0018] Further improvement based on the above method, the access request data is graded desensitized based on the access risk, and the requested data is returned, including:
[0019] If the access risk is high, trigger homomorphic encryption operation, and return the requested data in ciphertext form;
[0020] If the access risk is medium, blur the sensitive fields in the requested data according to the preset desensitization matrix, and return the desensitized requested data;
[0021] If the access risk is low, the user request is verified again, and the requested data is returned in plaintext form after verification.
[0022] Further improvement based on the above method, the encryption key is managed by distributed storage, including:
[0023] The generated key is checked for compliance;
[0024] For asymmetric encryption, the master private key is hosted by the hardware security module, and the user-level key pair is dynamically generated;
[0025] For homomorphic encryption, the key is split and stored by Shamir fragmentation technology;
[0026] For symmetric encryption, the HKDF algorithm is used to derive the key from the master key;
[0027] The generated key is stored in the blockchain distributed ledger;
[0028] Periodically update the key.
[0029] Based on the further improvement of the above method, the method further comprises:
[0030] Save the access request, user information and data information in the log;
[0031] Periodically or irregularly perform a security audit analysis on the log.
[0032] In another aspect, the embodiments of the present application provide a livelihood card data security protection system based on hierarchical encryption and dynamic desensitization, comprising:
[0033] A hierarchical encryption module is configured to obtain livelihood card original data, classify the livelihood card original data, and perform hierarchical encryption on different types of data.
[0034] A risk determination module is configured to receive a user access request and determine an access risk based on a user role and the access request.
[0035] A dynamic desensitization module is configured to perform hierarchical desensitization on access request data based on the access risk and return the requested data.
[0036] Based on the further improvement of the above system, the livelihood card original data is classified, and different types of data are hierarchically encrypted, comprising:
[0037] The livelihood card original data is classified using a hybrid classification engine, and the data types include identity identification data, transaction record data and user attribute data.
[0038] The identity identification data is asymmetrically encrypted, the transaction record data is homomorphically encrypted, and the user attribute data is symmetrically encrypted.
[0039] The encryption key is managed using distributed storage.
[0040] Based on the further improvement of the above system, the access risk is determined based on the user role and the access request, comprising:
[0041] The user request is verified using a two-factor credential, and if the verification fails, the access is denied; otherwise:
[0042] The user role, request access time and geographic location are analyzed, and the access risk is determined based on the analysis result.
[0043] Based on the further improvement of the above system, the access request data is desensitized based on the access risk, and the requested data is returned, comprising:
[0044] If the access risk is high, a homomorphic encryption operation is triggered, and the requested data is returned in the form of ciphertext.
[0045] If the access risk is medium risk, the sensitive fields in the requested data are blurred according to a preset desensitization matrix, and the desensitized requested data is returned;
[0046] If the access risk is low risk, the user request is subjected to secondary verification, and the requested data is returned in plaintext after verification.
[0047] Compared with the prior art, the application realizes the balance between data security, availability and cost-effectiveness by layering encryption of original livelihood card data, determining access risk based on user roles and access requests, and dynamically desensitizing access request data based on the access risk.
[0048] In the application, the above technical solutions can be combined with each other to realize more preferred combination solutions. Other features and advantages of the application will be described in the subsequent specification, and some advantages will become apparent from the specification or be understood by implementing the application. The purposes and other advantages of the application can be realized and obtained from the contents specifically pointed out in the specification and the drawings. BRIEF DESCRIPTION OF DRAWINGS
[0049] The accompanying drawings are included to provide a further understanding of the application and are incorporated herein and constitute a part of the application. The same reference numbers in the drawings indicate the same elements throughout the drawings;
[0050] Figure 1 A flowchart of a livelihood card data security protection method based on hierarchical encryption and dynamic desensitization according to an embodiment of the application is shown in FIG. 1.
[0051] Figure 2 A block diagram of a livelihood card data security protection system based on hierarchical encryption and dynamic desensitization according to an embodiment of the application is shown in FIG. 2. DETAILED DESCRIPTION
[0052] The preferred embodiments of the application will be specifically described below with reference to the accompanying drawings, wherein the drawings constitute a part of the application and are used to illustrate the principles of the embodiments of the application, but are not used to limit the scope of the application.
[0053] One specific embodiment of the application discloses a livelihood card data security protection method based on hierarchical encryption and dynamic desensitization, as shown in FIG. 1, which comprises the following steps: Figure 1
[0054] S1, obtaining original livelihood card data, classifying the original livelihood card data, and layering encryption of different types of data;
[0055] S2, receiving a user access request, determining access risk based on user roles and access requests;
[0056] S3, based on the access risk, grading desensitization is performed on the access request data, and the requested data is returned.
[0057] Compared with the prior art, the life card data security protection method based on hierarchical encryption and dynamic desensitization provided by the embodiment classifies the life card original data, encrypts different types of data in layers, uses different strength encryption algorithms for different levels of data, increases the cracking difficulty, determines the access risk based on the user role and the access request, performs grading desensitization on the access request data based on the access risk, returns the requested data, and flexibly processes the data according to the business scenario. While protecting privacy, meeting the dynamic needs of business for data, balancing data availability and security. And by reasonably selecting the encryption algorithm and desensitization strategy, resource waste is avoided, implementation cost and system complexity are reduced, performance and maintainability are improved.
[0058] Specifically, the life card original data is classified, and different types of data are encrypted in layers, including:
[0059] The life card original data is classified by using a hybrid classification engine, and the data types include: identity data, transaction record data, and user attribute data;
[0060] Asymmetric encryption is used for identity data; homomorphic encryption is used for transaction record data; and symmetric encryption is used for user attribute data;
[0061] The encryption key is managed by distributed storage.
[0062] In implementation, for example, a hybrid classification engine is formed by using rule matching and a machine learning model to classify the life card original data and identify three types of data:
[0063] Identity data, representing personal identity information, such as ID number, mobile phone number, etc.
[0064] Transaction record data, including transaction amount, account balance, etc.
[0065] User attribute data, such as user age, gender, etc.
[0066] For identity data, which is high-sensitivity data, asymmetric encryption algorithm is used for encryption. For example, the SM9 algorithm of the national standard encryption algorithm is used. The main private key is hosted by a hardware security module (HSM), and a user-level key pair is dynamically generated.
[0067] RSA2048 asymmetric encryption algorithm can also be used. When encrypting, the private key of the life card issuing institution is used, and the user decrypts it through the public key provided by the issuing institution. The private key is split and stored in different secure servers, and multiple servers need to be verified and combined to restore the complete private key.
[0068] Transaction record data belongs to sensitive data, and when implemented, it can be encrypted using homomorphic encryption algorithm. For example, Paillier homomorphic encryption supports ciphertext operations.
[0069] User attribute data belongs to low-sensitive data, and when implemented, it can be encrypted using symmetric encryption algorithm. For example, AES-256-GCM high-efficiency encryption.
[0070] In order to improve security, the encrypted data and the key are stored separately, and the encryption key is managed by distributed storage to ensure traceability and tamper resistance.
[0071] The key is stored in the blockchain distributed ledger.
[0072] When implemented, for the generated key, first check for compliance, such as key length meeting FIPS140-3 standard, if not, re-generate.
[0073] For asymmetric encryption, the master private key is hosted by the hardware security module, and the user-level key pair is dynamically generated. When implemented, the hardware security module (HSM) hosts the master private key of the asymmetric key, and the user-level key pair is dynamically generated
[0074] For homomorphic encryption keys, the key is split and stored by Shamir fragmentation technology. In order to improve security, at least 3 fragments are required to decrypt jointly.
[0075] For symmetric encryption keys, HKDF algorithm is used to derive keys from master keys.
[0076] The generated key is stored in the blockchain distributed ledger to ensure traceability and tamper resistance.
[0077] And update the key regularly. For example, regular rotation and emergency rotation.
[0078] Regular rotation: update the key version automatically every 90 days, and the old key is kept for 14 days before archiving.
[0079] Emergency rotation: when brute force cracking is detected, a new key is generated within 30 seconds and the old key is discarded.
[0080] After archiving the key for 1 year, use physical destruction (demagnetization) and logical destruction (blockchain invalidation declaration) dual mechanism.
[0081] Improve data security through key life cycle management.
[0082] When receiving a user's data access request, determine the access risk based on the user's role and access request.
[0083] Specifically, it includes:
[0084] Perform two-factor authentication on the user's request; if authentication fails, deny access; otherwise:
[0085] Perform feature analysis on user roles, request access times, and geographical locations, and determine access risks based on the feature analysis results.
[0086] During implementation, after a user submits an access request, authentication is performed first. The system verifies two-factor authentication credentials (password + device fingerprint). If the verification fails, access is immediately blocked, denied, and logged.
[0087] If two-factor authentication passes, a dynamic policy assessment is performed to determine the access risk.
[0088] During implementation, feature analysis is performed on user roles, request access time, and geographical location. Role weighting is applied (e.g., internal employees 0.3, third-party organizations 0.7). Time sensitivity is considered (access risk during non-working hours increases by 20%). Geographical location is also considered (cross-regional access triggers additional verification).
[0089] Weighted aggregate feature values generate a risk score of 0-100, with thresholds for high risk (≥80), medium risk (40-79), and low risk (<40).
[0090] Then, responses and dynamic desensitization are implemented based on access risk classification.
[0091] Specifically, based on the access risks, the access request data is graded and anonymized, and the returned request data includes:
[0092] If the access risk is high, homomorphic encryption is triggered, and the requested data is returned in ciphertext form;
[0093] If the access risk is medium risk, the sensitive fields in the request data will be obfuscated according to the preset desensitization matrix, and the desensitized request data will be returned.
[0094] If the access risk is low, the user request will be verified a second time. Once the verification is successful, the requested data will be returned in plaintext.
[0095] During implementation, for high-risk access requests, homomorphic encryption is triggered, and the data is returned in ciphertext form (such as the Paillier ciphertext summation of the cumulative transaction amount).
[0096] For medium-risk access requests, sensitive fields in the requested data are obfuscated according to a preset de-identification matrix. For example, an ID number is displayed as the first 6 digits + the last 4 digits (110105******1234). The de-identified requested data is then returned.
[0097] For low-risk access requests, plaintext access is allowed, but secondary authentication is required. This could be achieved through dynamic password authentication or biometric verification. Once authentication is successful, the requested data is returned in plaintext.
[0098] Dynamic data masking allows for flexible data processing based on business scenarios, protecting privacy while meeting dynamic business data needs and balancing data availability and security. By appropriately selecting encryption algorithms and data masking strategies, resource waste is avoided, implementation costs and system complexity are reduced, and performance and maintainability are improved.
[0099] For end-to-end security management, the data security protection method for public service cards based on layered encryption and dynamic desensitization in this embodiment of the invention further includes:
[0100] Access requests, user information, and data information are stored in logs;
[0101] Perform security audit analysis on logs regularly or irregularly.
[0102] During implementation, full-link logging is performed, with fields including user identity, role, access time, data fingerprint, risk score, and de-identification rules, and stored in a tamper-proof database.
[0103] Security threats and unusual access behaviors can be identified through regular or ad-hoc audit analysis. For example, feature weights can be dynamically adjusted based on historical log analysis (such as increasing the weight of geographic location due to frequent cross-regional access).
[0104] During implementation, monthly audit reports can be automatically generated, marking abnormal events and their handling results.
[0105] A specific embodiment of the present invention discloses a data security protection system for public service cards based on layered encryption and dynamic desensitization, such as... Figure 2 As shown, it includes:
[0106] The layered encryption module is used to acquire the original data of the public service card, classify the original data of the public service card, and perform layered encryption on different types of data;
[0107] The risk assessment module is used to receive user access requests and determine access risks based on user roles and access requests.
[0108] The dynamic data masking module is used to perform hierarchical data masking on access request data based on the access risk and return the requested data.
[0109] Based on further improvements to the above system, the original data of the public service card is classified, and different types of data are encrypted in layers, including:
[0110] A hybrid classification engine is used to classify the raw data of the Minsheng Card, including data types such as identity identification data, transaction record data, and user attribute data.
[0111] Asymmetric encryption is used for identity data; homomorphic encryption is used for transaction record data; and symmetric encryption is used for user attribute data.
[0112] The encryption keys are managed using distributed storage.
[0113] Based on further improvements to the above system, access risks are determined based on user roles and access requests, including:
[0114] Perform two-factor authentication on the user's request; if authentication fails, deny access; otherwise:
[0115] Perform feature analysis on user roles, request access times, and geographical locations, and determine access risks based on the feature analysis results.
[0116] Based on further improvements to the above system, the access request data is hierarchically anonymized according to the access risk, and the returned request data includes:
[0117] If the access risk is high, homomorphic encryption is triggered, and the requested data is returned in ciphertext form;
[0118] If the access risk is medium risk, the sensitive fields in the request data will be obfuscated according to the preset desensitization matrix, and the desensitized request data will be returned.
[0119] If the access risk is low, the user request will be verified a second time. Once the verification is successful, the requested data will be returned in plaintext.
[0120] The above-described method and system embodiments are based on the same principles, and their related aspects can be referenced from each other to achieve the same technical effects. For specific implementation processes, please refer to the foregoing embodiments, which will not be repeated here.
[0121] Electronic device example:
[0122] One specific implementation of this application discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the data security protection method for civil service cards based on layered encryption and dynamic desensitization in the method embodiment.
[0123] Examples of readable storage media:
[0124] One specific implementation of this application discloses a non-transitory computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the data security protection method for people's livelihood cards based on layered encryption and dynamic desensitization in the method embodiment.
[0125] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0126] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A data security protection method for public service cards based on layered encryption and dynamic desensitization, characterized in that, Includes the following steps: Obtain the original data of the public service card, classify the original data of the public service card, and perform layered encryption on different types of data; Receive user access requests and determine access risks based on user roles and access requests; Based on the access risks mentioned above, the access request data is classified and anonymized, and the requested data is returned.
2. The data security protection method for public service cards based on layered encryption and dynamic desensitization according to claim 1, characterized in that, The raw data from the public service card is categorized, and different types of data are encrypted in layers, including: A hybrid classification engine is used to classify the raw data of the Minsheng Card, including data types such as identity identification data, transaction record data, and user attribute data. Asymmetric encryption is used for identity data; homomorphic encryption is used for transaction record data; and symmetric encryption is used for user attribute data. The encryption keys are managed using distributed storage.
3. The data security protection method for public service cards based on layered encryption and dynamic desensitization according to claim 1, characterized in that, Access risks are determined based on user roles and access requests, including: Perform two-factor authentication on the user's request; if authentication fails, deny access; otherwise: Perform feature analysis on user roles, request access times, and geographical locations, and determine access risks based on the feature analysis results.
4. The data security protection method for public service cards based on layered encryption and dynamic desensitization according to claim 1, characterized in that, Based on the aforementioned access risks, the access request data is graded and anonymized, and the returned request data includes: If the access risk is high, homomorphic encryption is triggered, and the requested data is returned in ciphertext form; If the access risk is medium risk, the sensitive fields in the request data will be obfuscated according to the preset desensitization matrix, and the desensitized request data will be returned. If the access risk is low, the user request will be verified a second time. Once the verification is successful, the requested data will be returned in plaintext.
5. The data security protection method for public service cards based on layered encryption and dynamic desensitization according to claim 2, characterized in that, The encryption key is managed using distributed storage, including: Perform a compliance check on the generated key; For asymmetric encryption, the master private key is hosted by a hardware security module, which dynamically generates user-level key pairs. For homomorphic encryption, the key is split and stored using Shamir fragmentation technology; For symmetric encryption, the HKDF algorithm is used to derive the key from the master key; The generated key is stored in the blockchain distributed ledger; Update the key regularly.
6. The data security protection method for public service cards based on layered encryption and dynamic desensitization according to claim 1, characterized in that, The method further includes: Access requests, user information, and data information are stored in logs; Perform security audit analysis on logs regularly or irregularly.
7. A data security protection system for public service cards based on layered encryption and dynamic desensitization, characterized in that, include: The layered encryption module is used to acquire the original data of the public service card, classify the original data of the public service card, and perform layered encryption on different types of data; The risk assessment module is used to receive user access requests and determine access risks based on user roles and access requests. The dynamic data masking module is used to perform hierarchical data masking on access request data based on the access risk and return the requested data.
8. The data security protection system for public service cards based on layered encryption and dynamic desensitization according to claim 7, characterized in that, The raw data from the public service card is categorized, and different types of data are encrypted in layers, including: A hybrid classification engine is used to classify the raw data of the Minsheng Card, including data types such as identity identification data, transaction record data, and user attribute data. Asymmetric encryption is used for identity data; homomorphic encryption is used for transaction record data; and symmetric encryption is used for user attribute data. The encryption keys are managed using distributed storage.
9. The data security protection system for public service cards based on layered encryption and dynamic desensitization according to claim 8, characterized in that, Access risks are determined based on user roles and access requests, including: Perform two-factor authentication on the user's request; if authentication fails, deny access; otherwise: Perform feature analysis on user roles, request access times, and geographical locations, and determine access risks based on the feature analysis results.
10. The data security protection system for public service cards based on layered encryption and dynamic desensitization according to claim 7, characterized in that, Based on the aforementioned access risks, the access request data is graded and anonymized, and the returned request data includes: If the access risk is high, homomorphic encryption is triggered, and the requested data is returned in ciphertext form; If the access risk is medium risk, the sensitive fields in the request data will be obfuscated according to the preset desensitization matrix, and the desensitized request data will be returned. If the access risk is low, the user request will be verified a second time. Once the verification is successful, the requested data will be returned in plaintext.