CN104123385A - File storage and management method - Google Patents

File storage and management method Download PDF

Info

Publication number
CN104123385A
CN104123385A CN201410383857.6A CN201410383857A CN104123385A CN 104123385 A CN104123385 A CN 104123385A CN 201410383857 A CN201410383857 A CN 201410383857A CN 104123385 A CN104123385 A CN 104123385A
Authority
CN
China
Prior art keywords
storage block
file
user
reference count
unique identification
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
CN201410383857.6A
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 CHERILEAD TECH Co Ltd
Original Assignee
BEIJING CHERILEAD TECH 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 CHERILEAD TECH Co Ltd filed Critical BEIJING CHERILEAD TECH Co Ltd
Priority to CN201410383857.6A priority Critical patent/CN104123385A/en
Publication of CN104123385A publication Critical patent/CN104123385A/en
Pending legal-status Critical Current

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/18File system types
    • G06F16/182Distributed file systems
    • 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/11File system administration, e.g. details of archiving or snapshots
    • 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/13File access structures, e.g. distributed indices

Landscapes

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

Abstract

The invention discloses a file storage and management method, belongs to the technical field of computers, and particularly relates to a distributed file storage system. The method comprises the steps of A, setting up a user object container, and setting up only one storage block for each file; B, when a user uses a certain file, inquiring the user object container of the file; C, judging whether the storage block is set up for the file or not, and if the storage block is set up, executing the step D; if the storage block is not set up, setting up the file storage block, and setting the reference count to be 0; D, inquiring the file storage block, and inspecting the reference counting; if the reference counting is 0, writing in the file content, adding 1 to the reference counting, and executing the step E; if the reference counting is larger than or equal to 1, further judging a user operating type, and conducting different operations; E, inspecting the reference counting of the file storage block, and if the reference counting is larger than or equal to 1, stopping executing the step; if the reference counting is smaller than 1, deleting the file storage block, and stopping executing the step. By utilizing the file storage and management method, use efficiency of the memory space in the distributed file storage system can be effectively improved, and the retrieval speed is improved.

Description

A kind of file storage and management method
Technical field
The invention belongs to field of computer technology, particularly distributed file storage system.
Background technology
In distributed file storage system, conventional method is that each file of each user is stored in to some positions, while using this file, retrieves its position, obtains file data.Along with rolling up of number of users and user file quantity, can cause larger pressure to the storage capacity of server and recall precision.
Summary of the invention
The object of the invention is: a kind of file storage and management method of saving storage space, accelerating recall precision is provided.
Technical scheme of the present invention is: a kind of file storage and management method, comprises the following steps:
A, on server for each user sets up user object container, wherein record this user's unique identification, the used listed files of this user, storage block unique identification and the memory location of each file; For each file set up storage block, wherein record this document content, reference count, the identical file that different user is used is only set up a storage block;
When B, user use certain file, according to user's unique identification, inquire about its user object container; As this user object container, not yet set up, set up this user object container;
C, judge the whether built vertical storage block of file that user uses, as set up, turn D step; As not yet set up, according to this document content, generate this document storage block unique identification, set up this document storage block, its reference count is set to 0;
D, according to this document storage block unique identification inquiry file storage block, check its reference count, as it is 0, this document content is write to this document storage block, by its reference count+1, turn E step; As its reference count >=1, further judge user's action type:
If create, open, transmit, receive one of operation,, after executable operations, by reference count+1, turn E step;
If rename operation, after executable operations, is revised the listed files in this user object container, turn E step;
If deletion action, delete the storage block unique identification of this document in this user object container, by reference count-1, turn E step;
If copy function, in this user object container, add the storage block unique identification of this document, by reference count+1, turn E step;
If retouching operation, according to file content after revising, generate and revise rear file storage block unique identification, set up and revise rear file storage block, its reference count is set to 0, write and revise rear file, by its reference count+1, in this user object container, add and revise rear file storage block unique identification, turn E step;
E, the reference count of inspection this document storage block, if >=1, finish; Otherwise finish after deleting this document storage block.
Utilize the present invention can effectively improve the service efficiency of storage space in distributed file storage system, improve retrieval rate.
Accompanying drawing explanation
Accompanying drawing 1 is schematic flow sheet in the present invention.
Embodiment
Referring to accompanying drawing 1, a kind of file storage and management method, comprises the following steps:
A, on server for each user sets up user object container, wherein record this user's unique identification, the used listed files of this user, storage block unique identification and the memory location of each file; For each file set up storage block, wherein record this document content, reference count, the identical file that different user is used is only set up a storage block;
When B, user use certain file, according to user's unique identification, inquire about its user object container; As this user object container, not yet set up, set up this user object container;
C, judge the whether built vertical storage block of file that user uses, as set up, turn D step; As not yet set up, according to this document content, generate this document storage block unique identification, set up this document storage block, its reference count is set to 0;
D, according to this document storage block unique identification inquiry file storage block, check its reference count, as it is 0, this document content is write to this document storage block, by its reference count+1, turn E step; As its reference count >=1, further judge user's action type:
If create, open, transmit, receive one of operation,, after executable operations, by reference count+1, turn E step;
If rename operation, after executable operations, is revised the listed files in this user object container, turn E step;
If deletion action, delete the storage block unique identification of this document in this user object container, by reference count-1, turn E step;
If copy function, in this user object container, add the storage block unique identification of this document, by reference count+1, turn E step;
If retouching operation, according to file content after revising, generate and revise rear file storage block unique identification, set up and revise rear file storage block, its reference count is set to 0, write and revise rear file, by its reference count+1, in this user object container, add and revise rear file storage block unique identification, turn E step;
E, the reference count of inspection this document storage block, if >=1, finish; Otherwise finish after deleting this document storage block.

Claims (1)

1. a file storage and management method, comprises the following steps:
A, on server for each user sets up user object container, wherein record this user's unique identification, the used listed files of this user, storage block unique identification and the memory location of each file; For each file set up storage block, wherein record this document content, reference count, the identical file that different user is used is only set up a storage block;
When B, user use certain file, according to user's unique identification, inquire about its user object container; As this user object container, not yet set up, set up this user object container;
C, judge the whether built vertical storage block of file that user uses, as set up, turn D step; As not yet set up, according to this document content, generate this document storage block unique identification, set up this document storage block, its reference count is set to 0;
D, according to this document storage block unique identification inquiry file storage block, check its reference count, as it is 0, this document content is write to this document storage block, by its reference count+1, turn E step; As its reference count >=1, further judge user's action type:
If create, open, transmit, receive one of operation,, after executable operations, by reference count+1, turn E step;
If rename operation, after executable operations, is revised the listed files in this user object container, turn E step;
If deletion action, delete the storage block unique identification of this document in this user object container, by reference count-1, turn E step;
If copy function, in this user object container, add the storage block unique identification of this document, by reference count+1, turn E step;
If retouching operation, according to file content after revising, generate and revise rear file storage block unique identification, set up and revise rear file storage block, its reference count is set to 0, write and revise rear file, by its reference count+1, in this user object container, add and revise rear file storage block unique identification, turn E step;
E, the reference count of inspection this document storage block, if >=1, finish; Otherwise finish after deleting this document storage block.
CN201410383857.6A 2014-08-07 2014-08-07 File storage and management method Pending CN104123385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410383857.6A CN104123385A (en) 2014-08-07 2014-08-07 File storage and management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410383857.6A CN104123385A (en) 2014-08-07 2014-08-07 File storage and management method

Publications (1)

Publication Number Publication Date
CN104123385A true CN104123385A (en) 2014-10-29

Family

ID=51768796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410383857.6A Pending CN104123385A (en) 2014-08-07 2014-08-07 File storage and management method

Country Status (1)

Country Link
CN (1) CN104123385A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426522A (en) * 2015-12-07 2016-03-23 浪潮(北京)电子信息产业有限公司 File system performance statistical method and system
CN106294870A (en) * 2016-08-25 2017-01-04 苏州酷伴软件科技有限公司 Object-based distributed cloud storage method
CN106487945A (en) * 2016-09-09 2017-03-08 中国互联网络信息中心 A kind of DNS forwarding inquiries method
CN112953812A (en) * 2021-01-29 2021-06-11 西藏宁算科技集团有限公司 File message uploading and storing method and device thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457555A (en) * 2010-10-28 2012-05-16 中兴通讯股份有限公司 Security system and method for distributed storage
US20120226869A1 (en) * 2010-03-31 2012-09-06 Hitachi Solutions, Ltd. File server apparatus, management method of storage system, and program
CN103399941A (en) * 2013-08-13 2013-11-20 广州中国科学院软件应用技术研究所 Distributed file processing method, device and system
CN103425785A (en) * 2013-08-22 2013-12-04 新浪网技术(中国)有限公司 Data storage system and user data storage and reading method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120226869A1 (en) * 2010-03-31 2012-09-06 Hitachi Solutions, Ltd. File server apparatus, management method of storage system, and program
CN102457555A (en) * 2010-10-28 2012-05-16 中兴通讯股份有限公司 Security system and method for distributed storage
CN103399941A (en) * 2013-08-13 2013-11-20 广州中国科学院软件应用技术研究所 Distributed file processing method, device and system
CN103425785A (en) * 2013-08-22 2013-12-04 新浪网技术(中国)有限公司 Data storage system and user data storage and reading method thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426522A (en) * 2015-12-07 2016-03-23 浪潮(北京)电子信息产业有限公司 File system performance statistical method and system
CN106294870A (en) * 2016-08-25 2017-01-04 苏州酷伴软件科技有限公司 Object-based distributed cloud storage method
CN106294870B (en) * 2016-08-25 2019-09-17 北京酷成长科技有限公司 Object-based distribution cloud storage method
CN106487945A (en) * 2016-09-09 2017-03-08 中国互联网络信息中心 A kind of DNS forwarding inquiries method
CN106487945B (en) * 2016-09-09 2019-05-17 中国互联网络信息中心 A kind of DNS forwarding inquiries method
CN112953812A (en) * 2021-01-29 2021-06-11 西藏宁算科技集团有限公司 File message uploading and storing method and device thereof

Similar Documents

Publication Publication Date Title
KR102007070B1 (en) Reference block aggregating into a reference set for deduplication in memory management
CN103150258B (en) Writing, reading and garbage collection method of solid-state memory system
GB2558478A (en) Copy-Redirect on write
CN104123385A (en) File storage and management method
RU2012154625A (en) METHOD FOR OPTIMIZATION OF STORAGE AND DATA TRANSFER
WO2014187285A3 (en) Regular-user-oriented interface editor, running system and method
WO2017107948A1 (en) File write-aggregation and read-aggregation method and system, and client
TW201508485A (en) Data storage device and FLASH memory control method
CN102158349A (en) Log management device and method thereof
JP2015525936A5 (en)
CN103577336A (en) Stored data processing method and device
CN104866428A (en) Data access method and data access device
CN103744913A (en) Database retrieval method based on search engine technology
SG11201707304RA (en) Data check method and storage system
WO2017028690A1 (en) File processing method and system based on etl
EP2495648A3 (en) Improving network efficiency for continuous remote copy
CN105243027A (en) Method for storing data in storage device and memory controller
CN103019891A (en) Method and system for restoring deleted file
WO2020192710A1 (en) Method for processing garbage based on lsm database, solid state hard disk, and storage apparatus
US20220083246A1 (en) Variable Length Deduplication of Stored Data
CN103955440A (en) Nonvolatile storage equipment and method of carrying out data manipulation therethrough
JPWO2017006675A1 (en) Information processing system, storage control device, storage control method, and storage control program
CN107135662A (en) A kind of variance data backup method, storage system and variance data back-up device
CN104050057A (en) Historical sensed data duplicate removal fragment eliminating method and system
CN101996228A (en) Method for sharing file data block and method for de-sharing file data block

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20141029