A method and system for enhancing the security of multiple types of sensitive data of an Android application
By introducing aspect-oriented programming and data anonymization configuration files into Android applications, and combining AES and RSA algorithms for large file block encryption and decryption, the security and real-time issues of sensitive data in Android applications are solved, and unified secure processing and efficient transmission of multiple types of sensitive data are achieved.
Patent Information
- Application Number
- CN202311806021.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-12-26
AI Technical Summary
In existing Android applications, there are security vulnerabilities in the storage and transmission of sensitive data. The lack of a unified overall framework leads to a high risk of data leakage, especially when dealing with large files, where there is a trade-off between real-time performance and security.
Adopting the concept of Aspect-Oriented Programming (AOP), a unified de-identification mechanism is established. An array of operation relationship tags is generated through the data de-identification configuration file. Large files are encrypted and decrypted in blocks using AES and RSA algorithms. A de-identification interceptor is introduced during data transmission to ensure the security of data during terminal display, persistence, and transmission.
It enables unified and secure processing of various types of sensitive data, reduces the risk of data leakage, improves the security of data transmission and storage, solves the real-time problem of large files, and enhances the portability and security of applications.
Smart Images

Figure CN117828636B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, specifically to a method and system for enhancing the security of multiple types of sensitive data in Android applications. Background Technology
[0002] Today, while providing various conveniences, mobile apps also involve the use of a large amount of user privacy data. However, some problems exist, as applications may store sensitive user data, such as passwords and personal information, insecurely. If the application does not properly encrypt or otherwise protect the stored data, and if the system or application itself has security vulnerabilities, sensitive data is at risk of being stolen, disseminated, or tampered with at any time. Through these security vulnerabilities, attackers may be able to access this data, leading to data leaks and causing more serious data security risks. To prevent these risks, we need to strengthen the security measures for applications, including properly implementing data encryption, promptly patching security vulnerabilities, and strictly controlling the storage and transmission of sensitive data. This will help ensure that user privacy data is effectively protected and improve the overall security level of applications.
[0003] In Android applications, data is stored in various ways, such as text data formats and image, audio, and video file formats. For text data, especially when dealing with sensitive data such as passwords, bank card numbers, ID card numbers, and mobile phone numbers, data anonymization algorithms are commonly used for security processing. These methods include replacement, masking algorithms, partial data deletion, hash functions, and encryption, all used to anonymize sensitive information during data storage.
[0004] In terms of protecting stored file format data, common methods include file masquerading and file encryption / decryption. File masquerading typically involves changing file extensions, hiding files in system directories, compressing files, or using hidden folders. These methods primarily aim to conceal the true content or type of a file, thereby deceiving users or applications to some extent. File encryption / decryption, on the other hand, is a highly secure method. By encrypting the entire file, it ensures that every part of the file is protected, with no part exposed. Even if the file is split or transmitted, the integrity and security of the data remain intact, preventing tampering during transmission or storage. Common file encryption methods include symmetric encryption algorithms such as AES and DES, and asymmetric encryption algorithms such as RSA and ECC. These methods effectively ensure that sensitive data is adequately protected during processing and storage.
[0005] Currently, in Android applications, data anonymization and security processing are usually fragmented and isolated tasks. In particular, there is a lack of a unified overall framework for front-end and back-end data uplink and downlink and persistent processing, resulting in low security protection levels and poor portability.
[0006] When encrypting or decrypting large files, such as audio and video files, the receiving end must wait for the entire file to load before decryption and decoding can begin, introducing a certain delay. Furthermore, the larger the file, the longer the decryption and decoding time. This is unacceptable in some applications requiring real-time performance. Audio and video files have strict requirements for real-time playback, therefore a trade-off must inevitably be made between security and real-time performance.
[0007] File masquerading is not a true security measure; it merely attempts to hide the true content or type of a file. For technically skilled attackers, cracking the actual data content is relatively easy. Therefore, for sensitive data, relying solely on file masquerading cannot guarantee data security. Summary of the Invention
[0008] This invention addresses the shortcomings of existing technologies by providing a method and system for enhancing the security of various types of sensitive data in Android applications.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] A method to enhance the security of multiple types of sensitive data in Android applications includes:
[0011] Create a data masking configuration file, extract the configuration attributes of text type data, file type data and request packet type data from the data masking configuration file, generate a data masking execution identifier, and construct an operation relationship tag array [S,D,M] based on the parameters in the data masking execution identifier, where S is the sensitive dataset masking tagging protocol, D is the uplink / downlink data control protocol, and M is the file data storage and reading protocol;
[0012] For text data, when there is a need to display sensitive fields of text data in an Android application, annotations are added to both the sensitive fields and the methods for obtaining the sensitive fields, based on the constraints of the sensitive dataset desensitization tagging protocol S. The annotation processor aspect class is responsible for intercepting the methods for obtaining sensitive fields and rearranging the output rules of the sensitive fields to prevent the target sensitive fields from being obtained. The aspect method function is executed to achieve the de-identification of sensitive fields through the predetermined rules in the desensitization strategy object, obtain the desensitized text data, return the desensitized text data, and output it to the terminal for display.
[0013] For file-type data, when there is a need for persistent data files of sensitive file types in Android applications, based on the constraints of the file data storage and reading protocol M, the ExecutorService asynchronously executes the file dynamic block encryption and decryption strategy according to the file size, and completes the real-time application after the file decryption, uplink and downlink and preloading process;
[0014] For request packet type data, when the Android client submits data to the backend, based on the constraints of the uplink / downlink data control protocol D, annotations are used to implement de-identified data detection during deserialization. Based on the detection results, retention or discard operations are performed. The retained request packets are stored in an encrypted database, and access control lists are used to control access to the database. When the Java backend business system returns data to the Android client, backend policies are applied to de-identify the API interface data based on interceptors.
[0015] To optimize the above technical solution, the specific measures also include:
[0016] Furthermore, the rules for writing the data desensitization configuration file are represented in the form of key-value pairs. The value in the key-value pair corresponds to the dictionary value of the desensitization strategy information base, which is used to match the correct desensitization strategy.
[0017] Furthermore, the specific process by which the aspect method function is executed to obtain de-identified text data by de-identifying sensitive fields through predetermined rules in the de-identification strategy object is as follows:
[0018] Using Android AOP aspect-oriented programming, and by adding the AspectJ plugin, different annotations are defined based on privacy data types to create classes that handle pointcuts. The privacy data types include mobile phone numbers, ID card numbers, and bank card numbers. Sensitive fields are de-identified through predetermined rules in the de-identification strategy object. The de-identified text data is then written back using Java reflection. The predetermined rules include replacement and deletion.
[0019] Furthermore, the specific process of asynchronously executing the file dynamic block encryption / decryption strategy based on file size through ExecutorService is as follows:
[0020] Set a minimum file size threshold MIN_FILE_SIZE and a large file structured chunking threshold MAX_CHUNK_SIZE. Based on the file size, select different chunking strategies and generate corresponding Chunk objects. Specifically, when the file size to be stored is lower than the minimum file size threshold MIN_FILE_SIZE, no chunking is performed. When the file size exceeds the large file structured chunking threshold MAX_CHUNK_SIZE, structured chunking is performed. When the file size is between the two or equal to the threshold, fixed chunking is performed.
[0021] When large files such as audio and video are written to the node, the large file is divided into several chunks according to the dynamic block size CHUNK_SIZE. A hash check value is added to each chunk file to ensure the integrity of the chunk file. At the same time, the index of each chunk file is recorded. Each small block is encrypted using the AES strong encryption algorithm, and the AES key is encrypted using the RSA algorithm. Key management is generated and distributed by the management system. When the file is read, the block decryption end decrypts the encrypted file, concatenates each chunk file according to the index, and verifies the integrity of the chunk file according to the hash check value. Each chunk file is loaded independently by the chunk executor.
[0022] Furthermore, the specific process of detecting desensitized data using annotations, performing retention or discard operations based on the detection results, and storing the retained request packets in an encrypted database is as follows:
[0023] The Android client submits a form request for data updates, initiating a POST request. The interceptor marks the POST request parameters into two categories: modified and unchanged. Modified parameters are displayed in plaintext, while unchanged parameters are anonymized and de-identified using a pre-emptive strategy. The data packet is then repackaged, and an HTTP request is initiated and sent to the backend via HTTP. Upon receiving the data request from the Android client, the update interface in the Controller layer extracts and filters the serialized object data that needs to be updated from the data packet. It checks whether sensitive data is included. If sensitive data is included, it checks whether it needs to be anonymized. If it is anonymized, it is discarded. If it is not anonymized, the Service layer and Dao layer sequentially check whether the anonymized data is valid, and update the database with valid data.
[0024] Furthermore, the specific steps of performing backend strategy desensitization on API interface data based on the interceptor are as follows:
[0025] The Service and Dao layers are responsible for retrieving sensitive data from the database and decrypting it to obtain plaintext content. When the query interface serializes the response data, the Controller layer of the business system performs pre-defined desensitization processing.
[0026] This invention also proposes a system for enhancing the security of multiple types of sensitive data in Android applications, comprising:
[0027] The protocol generation module is used to create a data anonymization configuration file, extract configuration attributes of text type data, file type data, and request packet type data from the data anonymization configuration file, generate a data anonymization execution identifier, and construct an operation relationship tag array [S,D,M] based on the parameters in the data anonymization execution identifier. S is the sensitive dataset anonymization tag protocol, D is the uplink / downlink data control protocol, and M is the file data storage and reading protocol.
[0028] The data masking executor is used to associate with masking strategies. Based on the operation relationship marker array [S,D,M], it executes different masking strategies for text type data, file type data, and request packet type data respectively.
[0029] The beneficial effects of this invention are:
[0030] 1. Establish a unified data masking mechanism and maintain a data dictionary for text masking categories, mapping dictionary terms to specific data types. Employing Aspect-Oriented Programming (AOP), the data masking logic in each module is extracted, enabling unified masking processing of various data types at runtime. By separating the data masking logic from the business logic, the coupling between different parts of the business logic is reduced. This design improves portability across different Android application development environments.
[0031] 2. This invention proposes a large file block encryption / decryption method based on the Android system, aiming to improve the security of sensitive file data. This method divides large files into smaller blocks according to dynamic block size, and each small block is then encrypted using a hybrid encryption method. The file encryption process uses the AES algorithm with an AES key. To ensure key security, the RSA algorithm combined with an RSA private key is used to encrypt the AES key. Decryption is the reverse operation of encryption. The decrypted block files can be executed independently or reassembled in index order to restore the original full file. Simultaneously, to address the real-time and continuous playback issues of encrypted audio and video files, a block responsibility chain processing unit completes the decryption and decoding of the stream blocks, ensuring that audio and video will not pause due to decryption and decoding delays. This scheme effectively improves the security of large file processing while solving the playback delay problem in audio and video scenarios.
[0032] 3. This invention introduces a data masking interceptor when designing the data interaction between the Android client and the Java backend. This interceptor is responsible for separately intercepting and processing request and response data. When data is written to the cloud database, incremental updates are used instead of the original full update method, effectively improving the efficiency of data updates. When data is written out of the database, the data masking interceptor intercepts at the Controller layer, completes the data masking processing of the response data, and then performs data serialization. This design makes data more secure and controllable during transmission and storage.
[0033] 4. This invention proposes to de-identify various types of sensitive data in Android applications, effectively enhancing the security of sensitive text, uplink / downlink, and persistent data types.
[0034] 5. When persistently storing large files, a block-based encryption / decryption method is used to ensure data security and integrity. This method also meets the needs of real-time applications, resolving latency issues during audio / video preloading, decryption, and decoding, while ensuring real-time playback of audio / video files.
[0035] 6. Utilize the concept of Aspect-Oriented Programming (AOP) to establish a unified front-end and back-end anonymization mechanism, enabling non-intrusive development and facilitating portability in different applications. Attached Figure Description
[0036] Figure 1 Build a flowchart for the desensitization strategy;
[0037] Figure 2 A framework diagram for desensitization strategy intervention;
[0038] Figure 3 Flowchart for de-identifying and intercepting front-end and back-end interface requests. Detailed Implementation
[0039] The invention will now be described in further detail with reference to the accompanying drawings.
[0040] In one embodiment, the present invention proposes a method to enhance the security of multiple types of sensitive data in Android applications.
[0041] Figure 1 This is a flowchart illustrating the construction process of a de-identification strategy for enhancing the security of multiple types of sensitive data based on the Android system, as described in this embodiment of the invention. Figure 1 As shown, this embodiment is a complete de-identification strategy loader, including operations such as importing configuration files, associating attributes at runtime, and building the de-identification strategy. The process sequence is as follows:
[0042] Step S101: Create a de-identification configuration file.
[0043] Specifically, create a folder named assets in the app / src / main directory of the Android project (skip this step if the folder already exists), and create a data masking configuration file named safe-config.properties in the assets directory. The configuration file is written in the form of key-value pairs, where the value corresponds to the value in the masking policy information database dictionary so that the subsequent data masking executor can match the correct masking policy.
[0044] Step S102: Launch the Android application.
[0045] This step completes two parts: cloud key synchronization and de-identification policy parameter initialization;
[0046] Cloud-based key synchronization: Specifically, key management is handled by the management backend system, which generates and distributes keys based on user IDs and manages them according to user IDs to ensure the security of file encryption and decryption.
[0047] The initialization of the desensitization strategy parameters involves associating properties during application startup initialization, opening the safe-config.properties configuration file using the open method of the AssetManager class, loading the configuration file into memory using the load method of the Properties class, and retrieving the required property values from memory using the getProperty method, thereby constructing the desensitization strategy parameters.
[0048] Step S103: Generate desensitization strategy at runtime.
[0049] Specifically, the desensitization strategy parameters in step S102 are passed to the data desensitization processor to extract and generate data desensitization execution identifiers, and at the same time, an operation relationship tag array [S,D,M] is constructed.
[0050] Furthermore, S in the relational operation tag array represents the in-memory sensitive dataset de-identification tagging protocol. This protocol aims to define the terminal display style and persistent storage method. The display style explicitly specifies how the in-memory data is formatted and displayed on the terminal user interface after the de-identification process. Depending on different requirements such as mobile phone numbers, ID card numbers, and bank card numbers, processing is performed through methods such as replacing or deleting partial data. As for the persistent storage method, it includes masking algorithms, encryption, hash functions, etc., and is a method for securely managing stored data. The specific persistent storage method is determined by matching configuration attribute values.
[0051] Furthermore, D in the relation operation label array represents the uplink / downlink data control protocol, which defines a set of directed edges for data control, containing the source / destination resource location relation quadruple p.<src,dst,str,ctr> src represents the data source, dst represents the local storage, str represents the data uplink and downlink policies, which include fixed-size grouping policies and whole-packet policies to ensure data packet management during policy execution, including packet splitting, packet assembly, packet verification, and ensuring the integrity verification of the entire file at the policy end node. ctr is used to configure data network security policies to restrict network communication between the application and the server to prevent man-in-the-middle attacks and other security threats.
[0052] Furthermore, M in the relational operation marker array represents the file data storage and retrieval protocol. To ensure the security of locally stored files, this protocol is implemented through encrypted storage and decrypted retrieval. The default file encryption method uses AES algorithm + AES key encryption, and RSA algorithm + RSA private key is used to encrypt the AES key to ensure the security of the key. The decryption process is the reverse operation of encryption.
[0053] Furthermore, the data desensitization executor is associated with subsequent desensitization policy objects to ensure privacy for users when displaying data, and to ensure security hardening when applying and persisting data.
[0054] Furthermore, a method for enhancing the security of multiple types of sensitive data in Android applications is provided, in which sensitive data undergoes de-identification strategy intervention during operation. For example... Figure 2 As shown, the method includes:
[0055] Step S201: When there are sensitive data fields displayed in an Android application, the fields need to be desensitized.
[0056] Step S202: Field desensitization employs a rule-based privacy-preserving strategy. Specifically, the desensitization method involves using notification annotations on methods that retrieve sensitive fields. The annotation processor aspect class intercepts and processes this information. Before the execution of the method, the aspect method's functionality is executed, achieving privacy preservation through predetermined rules in the desensitization strategy object. Finally, the target data value is returned and output to the terminal for display.
[0057] Specifically, the execution of the aspect method function is as follows: Utilizing the Android AOP aspect-oriented programming paradigm, by adding the AspectJ plugin, different annotations are defined based on the privacy data type to create classes that handle pointcuts. Based on data types such as phone numbers, ID card numbers, and bank card numbers, predetermined processing rules are configured through attributes to perform operations. Finally, the de-identified data is written back using Java reflection.
[0058] Step S203: When there is a need to persist sensitive data files in an Android application, the files need to be desensitized.
[0059] Step S204: During the persistence of sensitive data files, dynamic block encryption and decryption are performed based on the file size. Specifically, the dynamic block encryption and decryption method is as follows: Large files such as audio / video files are dynamically divided into chunks based on the file size, using block-by-block encryption and decryption. The characteristic is that when writing to a node, the large file is divided into several chunks according to the dynamic block size CHUNK_SIZE. A hash checksum (SHA-256) is added to each chunk file to ensure its integrity. Simultaneously, the index of each chunk is recorded. Each small block is encrypted using the AES strong encryption algorithm, and the AES key is encrypted using the RSA algorithm. Key management is generated and distributed by the management system. When performing a file read operation, the block decryption end performs the inverse operation of the encryption end to decrypt the encrypted data. Each chunk is operated on sequentially according to the index, and the integrity of the block file is verified according to the SHA-256 checksum. Each chunk file can be loaded independently by the chunk executor.
[0060] Specifically, dynamic chunking refers to defining a minimum file size threshold of MIN_FILE_SIZE and a maximum file size threshold of MAX_CHUNK_SIZE for structured chunking of very large files. Based on the file size, different chunking strategies are selected to generate corresponding Chunk objects. When the file size is below MIN_FILE_SIZE, no chunking is performed. When the file size exceeds MAX_CHUNK_SIZE, structured chunking is used. When the file size is in between, fixed chunking is used.
[0061] Specifically, independent loading of the Chunk executor means that each independent responsible thread completes the processing of the Chunk block file corresponding to the index. Since the Chunk block is the smallest processing unit, it has a faster execution efficiency. For example, in the processing of audio / video block files, it avoids the time-consuming decryption and decoding of the entire audio / video file. After the Chunk block file is decrypted, buffered, and decoded by the responsible chain processing unit, it can complete real-time playback and continuous playback.
[0062] Specifically, the Chunk block chain of responsibility processing unit code is as follows:
[0063]
[0064]
[0065] Specifically, the Chunk block responsibility handling code is as follows:
[0066]
[0067] Step S205: When there are uplink and downlink operations involving sensitive data in an Android application, the uplink and downlink data need to be handled securely.
[0068] Step S206: During data uplink and downlink, configure network security policies to prevent man-in-the-middle attacks and other security threats, adopt encrypted transmission methods, and complete file uploads and downloads by packet splitting / merging. Specifically, the method for configuring network security policies is as follows: Create an XML file named network_security_config.xml in the res / xml folder, configure basic network security policies, prohibit plaintext traffic, trust the root certificates of the system and users, define the domains protected by the network security policies, configure certificate binding, ensure that the server uses a specific public key certificate, and add the network security policy configuration attribute android:networkSecurityConfig="@xml / network_security_config" to the application's manifest file (AndroidManifest.xml).
[0069] Specifically, the file upload and download method uses a packet splitting / reassembling approach: At the sending end, the encrypted data is split into fixed-size data blocks, and identification information, such as the block sequence number and the total number of blocks, is added. At the receiving end, the received data blocks are reassembled into a complete data packet according to the identification information, and then decryption is performed. The specific code is as follows:
[0070] Android sender:
[0071]
[0072]
[0073] Java receiver:
[0074]
[0075]
[0076] Step S207: When there is a need for new and other sensitive data operations in the Android application.
[0077] Step S208: The other sensitive data operations are dynamically generated through pre-configured attributes to match the desensitization strategy.
[0078] Furthermore, in this invention, a method for enhancing the security of multiple types of sensitive data in Android applications is provided. For Android client data update requests and Android data query requests, a data desensitization interceptor is responsible for intercepting and processing push and pull data respectively. For example... Figure 3 As shown, the program sequence is as follows:
[0079] Step S301: When running the Android application, the user submits a form requesting data updates, initiating a POST request.
[0080] Step S302: Rule-based desensitization. Specifically, the interceptor marks POST request parameters into two categories: modified and unchanged. Modified parameters are displayed in plaintext, while unchanged parameters are desensitized using a pre-emptive strategy. The data packet is then re-encapsulated, and an HTTP request is initiated. The data packet is then sent to the backend via HTTP.
[0081] Step 303: Data Ingestion. The specific method is as follows: When the update interface in the Controller layer receives a data packet request, it extracts and filters the serialized object data that needs to be updated from the data packet, determining whether it contains sensitive data. If sensitive data is found, it checks whether it has been de-identified. If de-identified, the data is discarded. If not de-identified, the Service layer and Dao layer sequentially determine whether the de-identified data is valid and update the database with the valid data. In the database, an Access Control List (ACL) is created to control access, explicitly specifying which users, roles, or groups have what type of permissions for specific resources, ensuring that only authorized users or roles can access resources. The ACL is reviewed regularly to remove unnecessary permissions and ensure security.
[0082] Step 304: Information Query. The specific method is as follows: After the Java backend receives the POST request from the Android client to query data, it encapsulates the data from the database into a Serilizerbale object and then sends the data packet via an HTTP request.
[0083] Step 305: Rule-based data masking. The specific method is as follows: After the Android client receives the data packet, it is intercepted by the data masking interceptor. The data in the response packet will be detected to determine whether it contains sensitive data. If it does, it will be masked according to the data masking strategy. Otherwise, no processing will be done and the plaintext state will be retained.
[0084] Step 306: Interface display. After the Android client obtains the data, it renders the interface and displays the data information on the page through controls.
[0085] In another embodiment, the present invention proposes a system for enhancing the security of multiple types of sensitive data in Android applications, corresponding to the method of Embodiment 1, comprising:
[0086] The protocol generation module is used to create a data anonymization configuration file, extract configuration attributes of text type data, file type data, and request packet type data from the data anonymization configuration file, generate a data anonymization execution identifier, and construct an operation relationship tag array [S,D,M] based on the parameters in the data anonymization execution identifier. S is the sensitive dataset anonymization tag protocol, D is the uplink / downlink data control protocol, and M is the file data storage and reading protocol.
[0087] The data masking executor is used to associate with masking strategies. Based on the operation relationship marker array [S,D,M], it executes different masking strategies for text type data, file type data, and request packet type data respectively.
[0088] The functions and implementation methods of each module in the system are completely consistent with those in Example 1, so they will not be repeated here.
[0089] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A method for enhancing the security of multiple types of sensitive data in Android applications, characterized in that, include: Create a data masking configuration file, extract the configuration attributes of text type data, file type data and request packet type data from the data masking configuration file, generate a data masking execution identifier, and construct an operation relationship tag array [S,D,M] based on the parameters in the data masking execution identifier, where S is the sensitive dataset masking tagging protocol, D is the uplink / downlink data control protocol, and M is the file data storage and reading protocol; For text data, when there is a need to display sensitive fields of text data in an Android application, annotations are added to both the sensitive fields and the methods for obtaining the sensitive fields, based on the constraints of the sensitive dataset desensitization tagging protocol S. The annotation processor aspect class is responsible for intercepting methods that retrieve sensitive fields and rearranging the output rules for sensitive fields to prevent the target sensitive fields from being retrieved; it executes the aspect method function, realizes the de-identification of sensitive fields through the predetermined rules in the de-identification strategy object to obtain de-identified text data, returns the de-identified text data and outputs it to the terminal for display; For file-type data, when there is a need for persistent data files of sensitive file types in Android applications, based on the constraints of the file data storage and reading protocol M, the ExecutorService asynchronously executes the file dynamic block encryption and decryption strategy according to the file size, and completes the real-time application after the file decryption, uplink and downlink and preloading process; For request packet type data, when the Android client submits data to the backend, based on the constraints of the uplink / downlink data control protocol D, annotations are used to implement de-identified data detection during deserialization. Based on the detection results, retention or discard operations are performed. The retained request packets are stored in an encrypted database, and access control lists are used to control access to the database. When the Java backend business system returns data to the Android client, backend policies are applied to de-identify the API interface data based on interceptors.
2. The method for enhancing the security of multiple types of sensitive data in Android applications as described in claim 1, characterized in that, The rules for writing the data anonymization configuration file are represented in the form of key-value pairs. The value in the key-value pair corresponds to the dictionary value of the anonymization strategy information base, which is used to match the correct anonymization strategy.
3. The method for enhancing the security of multiple types of sensitive data in Android applications as described in claim 1, characterized in that, The specific process by which the aspect method function, through the predetermined rules in the desensitization strategy object, de-identifies sensitive fields to obtain desensitized text data, is as follows: Using Android AOP aspect-oriented programming, by adding the AspectJ plugin, different annotations are defined according to the privacy data types, and classes for handling pointcuts are created. The privacy data types include mobile phone numbers, ID card numbers, and bank card numbers. Sensitive fields are de-identified through predetermined rules in the de-identification strategy object. The de-identified text data is written back through Java reflection mechanism. The predetermined rules include replacement and deletion.
4. The method for enhancing the security of multiple types of sensitive data in Android applications as described in claim 1, characterized in that, The specific process of asynchronously executing the file dynamic block encryption / decryption strategy based on file size through ExecutorService is as follows: Set a minimum file size threshold MIN_FILE_SIZE and a large file structured chunking threshold MAX_CHUNK_SIZE. Based on the file size, select different chunking strategies and generate corresponding Chunk objects. Specifically, when the file size to be stored is lower than the minimum file size threshold MIN_FILE_SIZE, no chunking is performed. When the file size exceeds the large file structured chunking threshold MAX_CHUNK_SIZE, structured chunking is performed. When the file size is between the two or equal to the threshold, fixed chunking is performed. When large files such as audio and video are written to the node, the large file is divided into several chunks according to the dynamic block size CHUNK_SIZE. A hash check value is added to each chunk file to ensure the integrity of the chunk file. At the same time, the index of each chunk file is recorded. Each small block is encrypted using the AES strong encryption algorithm, and the AES key is encrypted using the RSA algorithm. Key management is generated and distributed by the management system. When the file is read, the block decryption end decrypts the encrypted file, concatenates each chunk file according to the index, and verifies the integrity of the chunk file according to the hash check value. Each chunk file is loaded independently by the chunk executor.
5. The method for enhancing the security of multiple types of sensitive data in Android applications as described in claim 1, characterized in that, The specific process of detecting desensitized data using annotations for deserialization, performing retention or discard operations based on the detection results, and storing the retained request packets in an encrypted database is as follows: The Android client submits a form request for data updates, initiating a POST request. The interceptor marks the POST request parameters into two categories: modified and unchanged. Modified parameters are displayed in plaintext, while unchanged parameters are anonymized and de-identified using a pre-emptive strategy. The data packet is then repackaged, and an HTTP request is initiated and sent to the backend via HTTP. Upon receiving the data request from the Android client, the update interface in the Controller layer extracts and filters the serialized object data that needs to be updated from the data packet. It checks whether sensitive data is included. If sensitive data is included, it checks whether it needs to be anonymized. If it is anonymized, it is discarded. If it is not anonymized, the Service layer and Dao layer sequentially check whether the anonymized data is valid, and update the database with valid data.
6. The method for enhancing the security of multiple types of sensitive data in Android applications as described in claim 1, characterized in that, The specific steps of performing backend strategy de-identification on API interface data based on the interceptor are as follows: The Service and Dao layers are responsible for retrieving sensitive data from the database and decrypting it to obtain plaintext content. When the query interface serializes the response data, the Controller layer of the business system performs pre-defined desensitization processing.
7. A system for enhancing the security of multiple types of sensitive data in Android applications, characterized in that, include: The protocol generation module is used to create a data anonymization configuration file, extract configuration attributes of text type data, file type data and request packet type data from the data anonymization configuration file, generate a data anonymization execution identifier, and construct an operation relationship tag array [S,D,M] based on the parameters in the data anonymization execution identifier. S is the sensitive dataset anonymization tag protocol, D is the uplink / downlink data control protocol, and M is the file data storage and reading protocol. The data masking executor, associated with a masking strategy, applies different masking strategies to text, file, and request packet data based on the operation relationship-labeled array [S,D,M]. For text data, when there is a need to display sensitive fields of text data in an Android application, annotations are added to both the sensitive fields and the methods for obtaining the sensitive fields, based on the constraints of the sensitive dataset desensitization tagging protocol S. The annotation processor aspect class is responsible for intercepting methods that retrieve sensitive fields and rearranging the output rules for sensitive fields to prevent the target sensitive fields from being retrieved; it executes the aspect method function, realizes the de-identification of sensitive fields through the predetermined rules in the de-identification strategy object to obtain de-identified text data, returns the de-identified text data and outputs it to the terminal for display; For file-type data, when there is a need for persistent data files of sensitive file types in Android applications, based on the constraints of the file data storage and reading protocol M, the ExecutorService asynchronously executes the file dynamic block encryption and decryption strategy according to the file size, and completes the real-time application after the file decryption, uplink and downlink and preloading process; For request packet type data, when the Android client submits data to the backend, based on the constraints of the uplink / downlink data control protocol D, annotations are used to implement de-identified data detection during deserialization. Based on the detection results, retention or discard operations are performed. The retained request packets are stored in an encrypted database, and access control lists are used to control access to the database. When the Java backend business system returns data to the Android client, backend policies are applied to de-identify the API interface data based on interceptors.
Citation Information
Patent Citations
Log desensitization method and system, electronic equipment and storage medium
CN113297622A
Secure data egress for sensitive data across networks
WO2018112075A1