CN102331973A - Internal memory data storage system and internal memory data insertion and deletion method - Google Patents

Internal memory data storage system and internal memory data insertion and deletion method Download PDF

Info

Publication number
CN102331973A
CN102331973A CN201110066129A CN201110066129A CN102331973A CN 102331973 A CN102331973 A CN 102331973A CN 201110066129 A CN201110066129 A CN 201110066129A CN 201110066129 A CN201110066129 A CN 201110066129A CN 102331973 A CN102331973 A CN 102331973A
Authority
CN
China
Prior art keywords
data
data block
free list
internal memory
memory field
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.)
Pending
Application number
CN201110066129A
Other languages
Chinese (zh)
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.)
BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
Original Assignee
BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
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 DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd filed Critical BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
Priority to CN201110066129A priority Critical patent/CN102331973A/en
Publication of CN102331973A publication Critical patent/CN102331973A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to an internal memory data storage system and a data insertion and deletion method thereof, wherein the system comprises a data block and an idle list corresponding to the data block, the data block is arranged in an internal memory and is used for storing a plurality of data records, when a certain data record stored in the data block is deleted, the internal memory region occupied by the data record is not released, only a deletion mark is made on the data record; and the idle list is used for storing the coordinate information of the internal memory region which is stored in the data block, is not occupied by the data records and is marked with the deletion marks. In the insertion and deletion method, the internal memory space management is carried out through the idle list by using the system, the frequent application and release of the internal memory are greatly reduced, the internal memory insertion and deletion speed by an application program is also accelerated, and the speed is more than five times higher than that of the direct data region scanning.

Description

Insertion, the delet method of a kind of internal storage data storage system and internal storage data
Technical field
The present invention relates to a kind of internal storage data storage mode, relate to the dynamic memory of internal storage data and search fast.
Background technology
For dynamic data storage in the internal memory, generally adopt following dual mode:
A. application at any time, the mechanism that discharges at any time when needs insert data, applies for that then a new internal memory is used for store data; When deleted data, then discharge this piece internal memory.
When B. inserting data, the same A of processing mode; Different is during deleted data, not to be direct releasing memory, but to stamp delete flag for the core position that when having new data to insert again, then from first to last scan whole data field, discovery has the memory field of delete flag, then is placed on this position to new data.
In a single day mode A handles simple, but runs into frequent insertion deletion action, then can cause the frequent application and the release of internal memory, and frequent system call meeting reduces the efficient of operations such as insertion, deletion.
Though mode B can avoid frequent internal memory application and release,, along with the increase of data volume; Each when inserting data, all to scan whole data field, can confirm that just which blocks of data district played delete flag; This will consume cpu resource greatly, significantly reduce the efficient of inserting operation.
Summary of the invention
Technical matters to be solved by this invention provides a kind of new internal storage data storage system and the insertion and the delet method of internal storage data, reducing frequent application and the release to internal memory, and reduces the consumption of cpu resource, improves the operating efficiency to internal storage data.
The present invention solves the problems of the technologies described above the internal storage data storage system that is provided, and comprises the data block that is arranged in the internal memory and the free list corresponding with said data block; Said data block is used to store many data recording, when certain bar data recording of storing in to said data block is carried out deletion action, does not discharge the shared memory field of this data recording, only this data recording is done delete flag; Said free list is used for storing said data block memory field coordinate information that do not taken by data recording and that stamp delete flag.
The beneficial effect of above-mentioned data-storage system is: utilize the delete flag that gets beat up of which position in the free list recording data blocks; When inserting new data; Can find a clear position fast through free list; Avoid scanning whole data field, thereby both can effectively reduce the frequent application and the release of internal memory, can improve insertion and the deletion speed of application program again internal storage data.
Further, first byte of said data recording is the delete flag position, when certain bar data recording of storing in to said data block is carried out deletion action, only on the delete flag position of this data recording, does delete flag.
Adopt the beneficial effect of above-mentioned further scheme to be, be convenient to the data record is carried out deletion action.
Further, the capacity of said data block store data recording is 100000.
Adopt the beneficial effect of above-mentioned further scheme to be; The storage space of each 100000 data recording of data block application is when inserting or during deletion action, only the record space to these 100000 data scans; After the storage space of treating these 100000 data recording takes; Apply for the storage space of 100000 new data recording again, new storage space is scanned and operates, thereby avoided whole internal storage data district is scanned; Reduce the resource consumption of CPU, improved operating efficiency.
The insertion method of internal storage data provided by the invention comprises the steps:
Step 1: in the inquiry free list whether a memory field coordinate information is arranged, if having then execution in step 2, otherwise execution in step 3;
Step 2: new data records is stored in the memory field of the pairing data block of this memory field coordinate information, and this memory field coordinate information is deleted from free list;
Step 3: the new data block of application from internal memory, and the foundation free list corresponding with new data block are stored in new data recording in this new data block and upgrade said free list.
The beneficial effect of above-mentioned internal storage data insertion method is: utilize free list to write down operable memory field coordinate information, substitute the scanning to internal memory through the inquiry to free list, thereby saved cpu resource, improved the efficient of inserting operation.
Further; Said step 3 comprises: the new data block of application from internal memory; New data records is stored in first memory field of this data block; Set up the free list corresponding, and will write this free list except this first other memory field coordinate informations memory field with new data block.
Further; Said step 3 comprises: the new data block of application from internal memory; Set up the free list corresponding with this new data block; And memory field coordinate informations all in the new data block write this free list, new data records is stored in the memory field of the pairing data block of article one coordinate record of this free list, and article one coordinate record of free list is deleted from free list.
The delet method of internal storage data provided by the invention comprises: in the data block the data recording that will delete do delete flag; With in the data block the coordinate information of the shared memory field of the data recording that will delete write the pairing space list of this data block.
The beneficial effect of above-mentioned internal storage data delet method is: saved the internal memory operation time, thereby accelerated internal storage data deletion speed.
Description of drawings
The data storage area structural representation that Fig. 1 forms for data block in the internal storage data storage system of the present invention;
Fig. 2 is the structural representation of free list in the internal storage data storage system of the present invention;
Fig. 3 is the process flow diagram of an embodiment of internal storage data insertion method of the present invention;
Fig. 4 is the process flow diagram of an embodiment of internal storage data delet method of the present invention.
Embodiment
Below in conjunction with accompanying drawing principle of the present invention and characteristic are described, institute gives an actual example and only is used to explain the present invention, is not to be used to limit scope of the present invention.
Internal storage data storage system of the present invention comprises the data block that is arranged in the internal memory and the free list corresponding with said data block; Said data block is used to store many data recording, when certain bar data recording of storing in to said data block is carried out deletion action, does not discharge the shared memory field of this data recording, only this data recording is done delete flag; Said free list is used for storing said data block memory field coordinate information that do not taken by data recording and that stamp delete flag.
As an embodiment, as shown in Figure 1, each data block can be stored 100,000 data recording, and a plurality of data blocks have been formed a big data storage area.In the data block; The 1st byte of every data recording is the delete flag position, and the back is right after the value of each field, when delete data record; Do not discharge its shared memory headroom; Only on this delete flag position, mark (like the 0 expression deletion of delete flag position, delete flag position 1 is illustrated in usefulness), can reuse this partial memory space when treating follow-up insertion data.
Fig. 2 has represented free list structure corresponding with said data block in the specific embodiment of the invention.The space of data storage area is carried out to piece application (as shown in Figure 1), applies for that at every turn a data block stores 100,000 records, and pairing data field, the space coordinate of temporarily not using in the data block is filled out in the free list shown in Figure 2.When certain the bar data recording in the data block is deleted, its corresponding data field coordinate also will be filled out in the free list.When adding data recording, check at first whether free list is empty, if be not empty, then from free list, take out a data field coordinate, and the data recording that will newly add writes in the corresponding data field of this coordinate.After a data block record among Fig. 1 had been expired, it is empty that a free list among its pairing Fig. 2 also will become; When applying for a new data block once more, will through one of the pointed among Fig. 2 new with the corresponding free list of data block of application once more.
To above-mentioned internal storage data storage system, the present invention also provides a kind of insertion method and delet method of internal storage data.
Internal storage data provided by the invention inserts method step and comprises:
Step 1: in the inquiry free list whether a memory field coordinate information is arranged, if having then execution in step 2, otherwise execution in step 3;
Step 2: new data records is stored in the memory field of the pairing data block of this memory field coordinate information, and this memory field coordinate information is deleted from free list;
Step 3: the new data block of application from internal memory, and the foundation free list corresponding with new data block are stored in new data recording in this new data block and upgrade said free list.
Fig. 3 is the process flow diagram (wherein the memory block of application can be stored 100,000 data recording) of an embodiment of above-mentioned internal storage data insertion method; Wherein, The implementation of step 3 is: the new data block of application from internal memory; New data records is stored in first memory field of this data block, sets up the free list corresponding, and will write this free list except this first other memory field coordinate informations memory field with new data block.
In addition; Step 3 can also realize in the following manner: the new data block of application from internal memory; Set up the free list corresponding with this new data block; And memory field coordinate informations all in the new data block write this free list, new data records is stored in the memory field of the pairing data block of article one coordinate record of this free list, and article one coordinate record of free list is deleted from free list.
As shown in Figure 4, the delet method of internal storage data provided by the invention comprises: in the data block the data recording that will delete do delete flag; With in the data block the coordinate information of the shared memory field of the data recording that will delete write the pairing space list of this data block.
Utilize above-mentioned internal storage data storage system to adopt the insertion and the delet method of above-mentioned internal storage data, once apply for the space of 100,000 data recording, can effectively avoid frequent application and release, prevent owing to increasing of memory fragmentation wastes internal memory to internal memory; In addition, come not have in the management data district memory headroom of use, when inserting new data records, can on free list, obtain an idle position of writing down fast through free list, faster more than 5 times than all data fields of direct scanning.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (7)

1. internal storage data storage system is characterized in that: comprise the data block that is arranged in the internal memory and the free list corresponding with said data block; Said data block is used to store many data recording, when certain bar data recording of storing in to said data block is carried out deletion action, does not discharge the shared memory field of this data recording, only this data recording is done delete flag; Said free list is used for storing said data block memory field coordinate information that do not taken by data recording and that stamp delete flag.
2. internal storage data storage system according to claim 1; It is characterized in that: first byte of said data recording is the delete flag position; When certain bar data recording of storing in to said data block is carried out deletion action, only on the delete flag position of this data recording, do delete flag.
3. internal storage data storage system according to claim 1 and 2 is characterized in that: the capacity of said data block store data recording is 100000.
4. the insertion method of an internal storage data is characterized in that, comprises the steps:
Step 1: in the inquiry free list whether a memory field coordinate information is arranged, if having then execution in step 2, otherwise execution in step 3;
Step 2: new data records is stored in the memory field of the pairing data block of this memory field coordinate information, and this memory field coordinate information is deleted from free list;
Step 3: the new data block of application from internal memory, and the foundation free list corresponding with new data block are stored in new data recording in this new data block and upgrade said free list.
5. the insertion method of internal storage data according to claim 4; It is characterized in that; Said step 3 comprises: the new data block of application from internal memory; New data records is stored in first memory field of this data block, sets up the free list corresponding, and will write this free list except this first other memory field coordinate informations memory field with new data block.
6. the insertion method of internal storage data according to claim 4; It is characterized in that; Said step 3 comprises: the new data block of application from internal memory, and set up the free list corresponding, and memory field coordinate informations all in the new data block is write this free list with this new data block; New data records is stored in the memory field of the pairing data block of article one coordinate record of this free list, and article one coordinate record of free list is deleted from free list.
7. the delet method of an internal storage data is characterized in that, comprising: in the data block the data recording that will delete do delete flag; With in the data block the coordinate information of the shared memory field of the data recording that will delete write the pairing space list of this data block.
CN201110066129A 2011-03-18 2011-03-18 Internal memory data storage system and internal memory data insertion and deletion method Pending CN102331973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110066129A CN102331973A (en) 2011-03-18 2011-03-18 Internal memory data storage system and internal memory data insertion and deletion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110066129A CN102331973A (en) 2011-03-18 2011-03-18 Internal memory data storage system and internal memory data insertion and deletion method

Publications (1)

Publication Number Publication Date
CN102331973A true CN102331973A (en) 2012-01-25

Family

ID=45483755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110066129A Pending CN102331973A (en) 2011-03-18 2011-03-18 Internal memory data storage system and internal memory data insertion and deletion method

Country Status (1)

Country Link
CN (1) CN102331973A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014056398A1 (en) * 2012-10-11 2014-04-17 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN104461923A (en) * 2014-10-31 2015-03-25 深圳市锐明视讯技术有限公司 Hard disc physical block management method and system
CN104572323A (en) * 2015-01-28 2015-04-29 深圳市锐明视讯技术有限公司 Hard disk drive reading method and device
CN113568581A (en) * 2021-07-29 2021-10-29 武汉天喻信息产业股份有限公司 Multi-application resource recovery method and system for embedded equipment
CN114153395A (en) * 2021-11-30 2022-03-08 浙江大华技术股份有限公司 Object storage data life cycle management method, device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1427342A (en) * 2001-12-21 2003-07-02 上海贝尔有限公司 Internal storage management system and its distribution method
JP2003248620A (en) * 2002-02-25 2003-09-05 Kyocera Corp Dynamic memory managing method and dynamic memory management information processing device
CN1622055A (en) * 2003-11-25 2005-06-01 日本电气株式会社 Application data management method for mobile terminal and mobile terminal used therein
CN1764981A (en) * 2003-03-27 2006-04-26 皇家飞利浦电子股份有限公司 Playlist synchronization
CN1848118A (en) * 2005-04-14 2006-10-18 三星电子株式会社 Apparatus and method for a managing file system
CN101051317A (en) * 2007-05-11 2007-10-10 北京中星微电子有限公司 FAT file system and its processing method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1427342A (en) * 2001-12-21 2003-07-02 上海贝尔有限公司 Internal storage management system and its distribution method
JP2003248620A (en) * 2002-02-25 2003-09-05 Kyocera Corp Dynamic memory managing method and dynamic memory management information processing device
CN1764981A (en) * 2003-03-27 2006-04-26 皇家飞利浦电子股份有限公司 Playlist synchronization
CN1622055A (en) * 2003-11-25 2005-06-01 日本电气株式会社 Application data management method for mobile terminal and mobile terminal used therein
CN1848118A (en) * 2005-04-14 2006-10-18 三星电子株式会社 Apparatus and method for a managing file system
CN101051317A (en) * 2007-05-11 2007-10-10 北京中星微电子有限公司 FAT file system and its processing method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014056398A1 (en) * 2012-10-11 2014-04-17 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN104461923A (en) * 2014-10-31 2015-03-25 深圳市锐明视讯技术有限公司 Hard disc physical block management method and system
WO2016065695A1 (en) * 2014-10-31 2016-05-06 深圳市锐明视讯技术有限公司 Hard disk physical block management method and system
CN104461923B (en) * 2014-10-31 2018-07-03 深圳市锐明技术股份有限公司 A kind of hard disc physical block management method and system
CN104572323A (en) * 2015-01-28 2015-04-29 深圳市锐明视讯技术有限公司 Hard disk drive reading method and device
CN104572323B (en) * 2015-01-28 2017-12-12 深圳市锐明技术股份有限公司 A kind of hard disk read method and device
CN113568581A (en) * 2021-07-29 2021-10-29 武汉天喻信息产业股份有限公司 Multi-application resource recovery method and system for embedded equipment
CN113568581B (en) * 2021-07-29 2023-08-01 武汉天喻信息产业股份有限公司 Multi-application resource recovery method and system for embedded equipment
CN114153395A (en) * 2021-11-30 2022-03-08 浙江大华技术股份有限公司 Object storage data life cycle management method, device and equipment

Similar Documents

Publication Publication Date Title
US10303596B2 (en) Read-write control method for memory, and corresponding memory and server
CN103425435B (en) Disk storage method and disk storage system
CN104238962B (en) The method and device of data is write into caching
CN103370691A (en) Managing buffer overflow conditions
CN103646063B (en) A kind of spaceborne high speed document management system
JP2006235960A (en) Method for increasing speed of garbage collection
CN102223681B (en) IOT system and cache control method therein
CN104881371A (en) Persistent internal memory transaction processing cache management method and device
CN102331973A (en) Internal memory data storage system and internal memory data insertion and deletion method
EP3309685A1 (en) Method and apparatus for writing data to cache
CN107015763A (en) Mix SSD management methods and device in storage system
CN107256196A (en) The caching system and method for support zero-copy based on flash array
CN103838830A (en) Data management method and system of HBase database
US9047174B2 (en) Method and system for hierarchically managing storage resources
CN107391544B (en) Processing method, device and equipment of column type storage data and computer storage medium
CN104281528A (en) Data storage method and device
CN103838853A (en) Mixed file system based on different storage media
CN110750372A (en) Log system based on shared memory and log management method
CN102799660A (en) JAVA card object management method
CN105138282A (en) Storage space recycling method and storage system
CN102682108A (en) Row and line mixed database storage method
CN106156301A (en) A kind of processing method and processing device of big field data
CN102567225A (en) Method and device for managing system memory
CN102339318A (en) File system management method and system
CN102609492A (en) Metadata management method supporting variable table modes

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100085 Haidian District, Zhongguancun, South Street, No. 6,, building information, floor, No. 16

Applicant after: SI-TECH Information Technology Ltd.

Address before: 100085, Beijing, Haidian District on the nine Street 9 digital science and Technology Plaza, two floor

Applicant before: Beijing Digital China SI-TECH Information Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY LTD. TO: BEIJING SI-TECH INFORMATION TECHNOLOGY LTD.

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120125