CN103853850B - Method and system for eliminating data for user-centered Android system - Google Patents

Method and system for eliminating data for user-centered Android system Download PDF

Info

Publication number
CN103853850B
CN103853850B CN201410123655.8A CN201410123655A CN103853850B CN 103853850 B CN103853850 B CN 103853850B CN 201410123655 A CN201410123655 A CN 201410123655A CN 103853850 B CN103853850 B CN 103853850B
Authority
CN
China
Prior art keywords
page
block
file
data
sequence number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410123655.8A
Other languages
Chinese (zh)
Other versions
CN103853850A (en
Inventor
何泾沙
黄娜
张玉强
赵斌
刘公政
万雪姣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen City, the number of principal Yuan Science and Technology Co Ltd
Original Assignee
Beijing University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN201410123655.8A priority Critical patent/CN103853850B/en
Publication of CN103853850A publication Critical patent/CN103853850A/en
Application granted granted Critical
Publication of CN103853850B publication Critical patent/CN103853850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a method and system for eliminating data for a user-centered Android system. The method comprises the following steps: 1, inputting file information of an object to be processed by the user, and reversely scanning all object head pages matched with the file information; 2, judging according to the object head information matched in the step 1 and correspondingly operating the object to be processed; 3, calling a write operation function of a file system, and performing full zero overwrite on a target surface of the object to be processed according to the block number and physical page address stored in the step 2; 4, checking whether effective pages of other files exist in target blocks of the object to be processed, and performing corresponding processing; and 5, triggering a garbage collection mechanism of the file system, recovering the target blocks according to the block number, and inserting the target blocks into a free block linked list to serve as a distributable storage space for reutilization. According to the system, the storage space of the object files can be recovered, and the utilization rate of the storage space is improved.

Description

The android system data clearing method of user-center and system
Technical field
The present invention relates to Android technical field of intelligence, the android system data of more particularly, to a kind of user-center Sweep-out method and system.
Background technology
With the extensive application of Android intelligent platform of new generation, increasing user profile data is had to be stored in On the Flash flash memory of Android intelligent terminal, the such as data such as address list, note, picture, memorandum, the sensitivity wherein comprising Property information, significant data, user would generally be deleted using common deletion action and prevent leaking data.But common deletes Data is not deleted from storage medium by division operation, simply the file system modification object page be designated idle condition or Delete the index of file, deleted file is not presented to operating system and user;Common formatting does not interfere with yet deposits Data on storage media, only creates an empty file index for operating system, allows operating system to think on storage medium There is no file.In this case, can be by logical method or physical method and deleted data recovery, do not ensure that User data is not compromised.The least unit of flash memory write operation is page, but erasing operation is using block as least unit, so storage Medium release physically will wait until that in a block, all pages all become idle condition, and file system just can carry out garbage reclamation This block is wiped.
Android adopts nand flash memory as kernel memory, and YAFFS2 is the log type literary composition aiming at nand flash memory design Part system, has some characteristics different from alternative document system.Flash data logic destroys technology at present mainly zero overriding Technology, block deleting technique, and encryption technology, but search for page to be deleted when be all not bound with file system data structure and Memory mechanism is considering time performance.
Content of the invention
For solve above-mentioned deficiency, the present invention provide a kind of customer-centric android system data clearing method and System.
The android system data clearing method of the customer-centric of the present invention, it includes:
Step 1, the fileinfo of the pending object of user input, all objects of inverted order scanning and this document information matches The head page;
Step 2, judges described pending object according to the object header of described step 1 coupling:
If the type of described pending object is file, according to this document at Parent_Objectid inverted order scanning The all page of data comprising under folder, this all page of data is the ID identical page with the object head page in described step 1 Face;Obtain block sequence number and the page physical address of described all page of data, and it is stored in respectively array block [m] and In adress [n];
If the type of described pending object is ordinary file, finds, with the object head page in described step 1, there is phase With the page of Objectid, this Objectid is the unique ID number for the obj ect file belonging to identified page;Obtain described page The block sequence number in face and page physical address, and it is stored in respectively in array block [m] and adress [n];
Step 3, calls the write operation function of file system, and the block sequence number according to the storage of described step 2 and the page are physically The target pages of described pending object are carried out complete zero overriding by location;
Whether step 4, have in the object block checking the described pending object after processing through step 3 and there are other files The effectively page:
If there is effective page, by this effective page be dumped to other less than block on;
If there is not effective page, directly execution step 5;
Step 5, the garbage reclamation mechanism of triggering file system, according to the block sequence number of storage, object block is reclaimed, and should Object block is inserted in free block chained list, waits as assignable memory space and recycling.
The android system data dump system of the customer-centric of the present invention, it includes:
Input matching module, the fileinfo of the pending object of user input, inverted order scanning and this document information matches All object head pages;
First processing module, judges described pending object according to the object header of described input matching module coupling:
If the type of described pending object is file, according to this document at Parent_Objectid inverted order scanning The all page of data comprising under folder, this all page of data is the ID phase with the object head page in described first processing module The same page;Obtain block sequence number and the page physical address of described all page of data, and it is stored in respectively array block In [m] and adress [n];
If the type of described pending object is ordinary file, find and the object head page in described first processing module There is the page of identical Objectid, this Objectid is the unique ID number for the obj ect file belonging to identified page;Obtain The block sequence number of the described page and page physical address, and it is stored in respectively in array block [m] and adress [n];
Overriding module, call the write operation function of file system, according to described first processing module storage block sequence number and The target pages of described pending object are carried out complete zero overriding by page physical address;
Whether Second processing module, have in the object block checking the described pending object after described overriding resume module There is effective page of other files:
If there is effective page, by this effective page be dumped to other less than block on;
If there is not effective page, directly execute recycling module;
Recycling module, the garbage reclamation mechanism of triggering file system, according to the block sequence number of storage, object block is reclaimed, and will This object block is inserted in free block chained list, waits as assignable memory space and recycling.
The beneficial effects of the present invention is:
The memory space of energy recycle object file of the present invention, improves memory space utilization rate.
Brief description
Fig. 1 is to page of data in the android system data clearing method of customer-centric of the present invention and system Operation chart;
Fig. 2 is the android system data clearing method flow chart of the customer-centric of the present invention;
Fig. 3 be in the android system data clearing method of customer-centric of the present invention and system file with general The relation schematic diagram of logical file;
Fig. 4 is the android system data dump system schematic of the customer-centric of the present invention.
Specific embodiment
Fig. 2 is the android system data clearing method flow chart of the customer-centric of the present invention.As shown in Fig. 2 this The android system data clearing method of the customer-centric of invention, it includes:
Step 1, the fileinfo of the pending object of user input, all objects of inverted order scanning and this document information matches The head page;
Step 2, judges described pending object according to the object header of described step 1 coupling:
If the type of described pending object is file, according to this document at Parent_Objectid inverted order scanning The all page of data comprising under folder, this all page of data is the ID identical page with the object head page in described step 1 Face;Obtain block sequence number and the page physical address of described all page of data, and it is stored in respectively array block [m] and In adress [n];
If the type of described pending object is ordinary file, finds, with the object head page in described step 1, there is phase With the page of Objectid, this Objectid is used for the unique ID number of the obj ect file belonging to identified page;Obtain this page Block sequence number and page physical address, and it is stored in respectively in array block [m] and adress [n];
Step 3, calls the write operation function of file system, and the block sequence number according to the storage of described step 2 and the page are physically The target pages of described pending object are carried out complete zero overriding by location;
Whether step 4, have the other literary composition of presence in the object block checking the described pending object after the overriding of described step 3 Effective page of part:
If there is effective page, by this effective page be dumped to other less than block on;
If there is not effective page, directly execution step 5;
Step 5, the garbage reclamation mechanism of triggering file system, according to block sequence number, object block is reclaimed, and by this object block It is inserted in free block chained list, wait as assignable memory space and recycling.
Fig. 4 is the android system data dump system schematic of the customer-centric of the present invention.As shown in figure 4, this The android system data dump system of the customer-centric of invention, it includes:
Input matching module 101, the fileinfo of the pending object of user input, inverted order scanning and this document information matches All object head pages;
First processing module 102, judges described pending according to the object header of described input matching module 101 coupling Object:
If the type of described pending object is file, according to this document at Parent_Objectid inverted order scanning The all page of data comprising under folder, this all page of data is the ID with the object head page in described input matching module 101 Number identical page;Obtain block sequence number and the page physical address of described all page of data, and it is stored in respectively array In block [m] and adress [n];
If the type of described pending object is ordinary file, find and object head in described input matching module 101 The page has the page of identical Objectid, and this Objectid is used for the unique ID number of the obj ect file belonging to identified page;Obtain Take block sequence number and the page physical address of this page, and it is stored in respectively in array block [m] and adress [n];
Overriding module 103, calls the write operation function of file system, according to the block of described first processing module 102 storage The target pages of described pending object are carried out complete zero overriding by sequence number and page physical address;
Second processing module 104, checks in the object block of the described pending object after processing through described overriding module 103 Whether there is the effective page that there are other files:
If there is effective page, by this effective page be dumped to other less than block on;
If there is not effective page, directly execute recycling module 105;
Recycling module 105, the garbage reclamation mechanism of triggering file system, according to block sequence number, object block is reclaimed, and should Object block is inserted in free block chained list, waits as assignable memory space and recycling.
The invention provides a kind of YAFFS2 file system widely used for Android intelligent platform, from user angle Degree sets out, and the method removing nand flash memory data, to protect user sensitive information and significant data not compromised.Different from common Deletion action, this method combine YAFFS2 file system data structure data access method, using inverted order scanning algorithm The file deleted to search for user to want, then calls write operation and the block erasing operation of file system, by data from flash memory Remove it is impossible to be recovered by logical method.The file that can remove not only includes simple binary stream file, also includes The strong jpeg file of structural comparing and pdf file etc., ensure that the security of various types of user data.
The Android data clearing method of customer-centric, mainly includes user interface, page to be deleted search, data Removing, space reclamation Four processes.The first step, user input will delete the information of file, filename, file type.Second step, Search for page to be deleted.Specifically searching method is:Using inverted order scanning algorithm, from the beginning of largest block sequence number, according to user input The filename elder generation sweep object head page.The characteristic being updated due to nand flash memory strange land, the file of modified operation has difference Old version is present on flash memory, so the file header page searching may be one or more.According in the object head page ObjectID search all page of data of file.
The bit manipulation of nand flash memory can only be changed into 0 from 1, and the 3rd step is then that the page of data execution complete zero searching is covered Write.After executing complete zero overriding, if storing effective page of alternative document in the block at page of data place to be deleted, Need for active page to be dumped to other blocks, then block erasing operation is executed to object block, as shown in Figure 1.Execution erasing operation it Afterwards, trigger the garbage reclamation mechanism of file system, object block is reclaimed, in insertion free block chained list, wait again as storage Space utilization simultaneously distributes a new block sequence number.
Not only store substantial amounts of user data in android system, also include system itself, application program is run and produced Data etc., page to be deleted to be searched by scanning the method for whole nand flash memory, time overhead is than larger.
Present embodiment is to load the Android intelligence of YAFFS2 file system using using nand flash memory as storage medium As a example energy mobile phone, provide a kind of user data sweep-out method of customer-centric, and the memory space of energy recycle object file, Improve memory space utilization rate.
Two kinds of different pages are had in YAFFS2 file system:Page of data(Data chunk)With the object head page (Object header), for the data content of storage object, the object head page is then used for the class of storage object to page of data Type, file size, object name, the establishment of object, modification time etc..Corresponding data structure yaffs_ of object head ObjectHeader includes member to be had(Only include the member for explaining the present invention):
Yaffs_ObjectType type;The type of // explanation object(File, catalogue etc.)
int parentObjectid;No. ID of // parent directory
YCHAR name[YAFFS_MAX_NAME_lenth+1];// object name
Can judge that currently object to be dealt with is as ordinary file or file according to the type field in object head.As Shown in Fig. 3, Fig. 3 is the relation between file and its subfile.
Page search to be deleted is to scan successively from the data BOB(beginning of block) with largest block sequence number, to each block from this block Following page begins stepping through to first page, and concrete scanning algorithm step is as follows:
(1)Scanning BlockN;
(2)PageM in scanning current block;If PageM is first page in current block, go to(4);
(3)M=M-1, goes to(2);
(4)If current block block is smallest blocks in current block, the end of scan;
(5)N=N-1, goes to(1).
User-in file name, all object head pages that inverted order scanning is mated with file name, if believe according to object head Breath judges pending object for ordinary file, then find and have the page of identical Objectid and obtain them with the object head page Block sequence number and Chunkid, wherein Objectid be used for identified page belonging to obj ect file unique ID number.Nand flash memory battle array Row be divided into a series of block, each block comprises 32 or 64 or 128 pages, each page all comprise 2048kb data field and The free area of 64kb.Initialization int type array block [m] and adress [n] are respectively intended to deposit the block sequence number getting and page The physical address in face.If object type is file, inverted order scans for all Parent_Objectid and object in the first step The ID identical page of the head page, the same block sequence number obtaining them and page physical address, are stored in array block respectively [m] and adress [n], now the traversal gained page is the All Files under currently pending file.YAFFS2 file system In data storage in strict accordance with order-assigned block sequence number, whenever one block of new distribution, block sequence number adds 1, all pages in this block This part sequence number is shared in face.So adopting above inverted order traversal method, it is the equal of the distribution time inverted order fully according to the page Traversal, therefore save sweep time.
Call the write operation function of file system, the block sequence number according to earlier stored and page physical address are by target pages Carry out complete zero overriding.Because the erasing operation of YAFFS2 is executed with block for least unit, before carrying out erasing operation, should First check in this block, whether there is the effective page belonging to other files.If having, these pages be dumped to flash memory other less than Block on.Then just can trigger the garbage reclamation mechanism of file system, according to block sequence number, object block be reclaimed, be inserted into the free time In block chained list, wait as assignable memory space and recycling.
Only as described above, only presently preferred embodiments of the present invention, professional who are familiar with this art such as.? After understanding the technological means of the present invention, natural energy, according to actual needs, is changed under the teachings of the present invention.Therefore all The equal change made according to scope of the present invention patent and modification, all should still remain within the scope of the patent.

Claims (2)

1. a kind of android system data clearing method of customer-centric is it is characterised in that include:
Step 1, the fileinfo of the pending object of user input, all object head pages of inverted order scanning and this document information matches Face;It is distribution time inverted order traverse scanning according to the page that described inverted order scans;
Step 2, judges described pending object according to the object header of described step 1 coupling:
If the type of described pending object is file, the lower bag of this document folder is scanned according to Parent_Objectid inverted order The all page of data containing, this all page of data is the ID identical page with the object head page in described step 1;Obtain The block sequence number of described all page of data and page physical address, and it is stored in respectively array block [m] and adress In [n];
If the type of described pending object be ordinary file, find with the object head page in described step 1 have identical The page of Objectid, this Objectid is the unique ID number for the obj ect file belonging to identified page;Obtain the described page Block sequence number and page physical address, and it is stored in respectively in array block [m] and adress [n];
Step 3, calls the write operation function of file system, and the block sequence number according to the storage of described step 2 and page physical address will The target pages of described pending object carry out complete zero overriding;
Whether step 4, have the effective page that there are other files in the object block checking described pending object:
If there is effective page, by this effective page be dumped to other less than block on;
If there is not effective page, directly execution step 5;
Step 5, the garbage reclamation mechanism of triggering file system, according to the block sequence number of storage, object block is reclaimed, and by this target Block is inserted in free block chained list, waits as assignable memory space and recycling.
2. a kind of android system data dump system of customer-centric is it is characterised in that include:
Input matching module, the fileinfo of the pending object of user input, inverted order scanning is all with this document information matches The object head page;It is distribution time inverted order traverse scanning according to the page that described inverted order scans;
First processing module, judges described pending object according to the object header of described input matching module coupling:
If the type of described pending object is file, scanned under this document folder according to Parent_Objectid inverted order The all page of data comprising, this all page of data is the ID identical page with the object head page in step 1;Obtain institute State block sequence number and the page physical address of all page of data, and it is stored in respectively array block [m] and adress [n] Interior;
If the type of described pending object be ordinary file, find with the object head page in step 1 have identical The page of Objectid, this Objectid is the unique ID number for the obj ect file belonging to identified page;Obtain the described page Block sequence number and page physical address, and it is stored in respectively in array block [m] and adress [n];
Overriding module, call the write operation function of file system, according to described first processing module storage block sequence number and the page The target pages of described pending object are carried out complete zero overriding by physical address;
Whether Second processing module, have the effective page that there are other files in the object block checking described pending object:
If there is effective page, by this effective page be dumped to other less than block on;
If there is not effective page, directly execute recycling module;
Recycling module, the garbage reclamation mechanism of triggering file system, according to the block sequence number of storage, object block is reclaimed, and by this mesh Mark block is inserted in free block chained list, waits as assignable memory space and recycling.
CN201410123655.8A 2014-03-28 2014-03-28 Method and system for eliminating data for user-centered Android system Active CN103853850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410123655.8A CN103853850B (en) 2014-03-28 2014-03-28 Method and system for eliminating data for user-centered Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410123655.8A CN103853850B (en) 2014-03-28 2014-03-28 Method and system for eliminating data for user-centered Android system

Publications (2)

Publication Number Publication Date
CN103853850A CN103853850A (en) 2014-06-11
CN103853850B true CN103853850B (en) 2017-02-15

Family

ID=50861505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410123655.8A Active CN103853850B (en) 2014-03-28 2014-03-28 Method and system for eliminating data for user-centered Android system

Country Status (1)

Country Link
CN (1) CN103853850B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943804A (en) * 2016-10-12 2018-04-20 中标软件有限公司 The system and method for data is periodically deleted on mobile terminal
CN116860658B (en) * 2023-06-21 2024-05-28 中国科学院软件研究所 Efficient semi-automatic garbage collection method and system for big data processing frame

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488153A (en) * 2009-02-12 2009-07-22 浙江大学 Method for implementing high-capacity flash memory file system in embedded type Linux
CN101206656B (en) * 2006-12-22 2010-05-19 英业达股份有限公司 File safety deletion system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206656B (en) * 2006-12-22 2010-05-19 英业达股份有限公司 File safety deletion system and method
CN101488153A (en) * 2009-02-12 2009-07-22 浙江大学 Method for implementing high-capacity flash memory file system in embedded type Linux

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
从物理上删除文件;陈庆章等;《计算机应用》;19940131(第1期);全文 *
用VB实现文件查找的集中方法;陈婷等;《郧阳示范高等专科学校学报》;20051231;第25卷(第6期);全文 *

Also Published As

Publication number Publication date
CN103853850A (en) 2014-06-11

Similar Documents

Publication Publication Date Title
US11036799B2 (en) Low RAM space, high-throughput persistent key value store using secondary memory
EP2521966B1 (en) Systems and methods for removing unreferenced data segments from deduplicated data systems
AU2010347733B2 (en) Systems and methods for garbage collection in deduplicated data systems
US20110231375A1 (en) Space recovery with storage management coupled with a deduplicating storage system
US20110219049A1 (en) System for permanent file deletion
CN103473296A (en) Recycle bin mechanism and recycle bin system applicable to cloud computing
Botelho et al. Memory efficient sanitization of a deduplicated storage system
CN105868122A (en) Data processing method and device for quick flashing storage equipment
CN102511044A (en) Method for deleting the data and device thereof
CN101206656B (en) File safety deletion system and method
CN103678337A (en) Data eliminating method, device and system
CN107391774A (en) The rubbish recovering method of JFS based on data de-duplication
CN106886370A (en) A kind of data safety delet method and system based on SSD duplicate removal technologies
CN105493080A (en) Method and apparatus for context aware based data de-duplication
CN104714864A (en) Intelligent computer data backup method
CN111382126A (en) System and method for deleting files and hindering file recovery
CN103853850B (en) Method and system for eliminating data for user-centered Android system
Tulkinbekov et al. CaseDB: Lightweight key-value store for edge computing environment
CN106528703A (en) Deduplication mode switching method and apparatus
CN116664129B (en) Block chain account book data iteration method, electronic equipment and readable storage medium
KR102453870B1 (en) Method And Computer Program For Deleting File Permanently
CN111291126B (en) Data recovery method, device, equipment and storage medium
Shibwabo et al. Data Recovery of Flash Memory
Shibwabo Data Recovery of Flash Memory Bernard Kasamani Shibwabo and Ismail Ateya Lukandu
Zhang et al. User level secure deletion for USB flash disks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170803

Address after: 518026 C, building 31B, electronic technology building, No. 2070 Shennan Road, Shenzhen, Guangdong, Futian District

Patentee after: Shenzhen City, the number of principal Yuan Science and Technology Co Ltd

Address before: 100124 Chaoyang District, Beijing Ping Park, No. 100

Patentee before: Beijing University of Technology

CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Zhao Bin

Inventor after: Huang Na

Inventor after: Zhang Yuqiang

Inventor after: He Jingsha

Inventor after: Liu Gongzheng

Inventor after: Wan Xuejiao

Inventor before: He Jingsha

Inventor before: Huang Na

Inventor before: Zhang Yuqiang

Inventor before: Zhao Bin

Inventor before: Liu Gongzheng

Inventor before: Wan Xuejiao