CN105912664A - Method and equipment for file processing - Google Patents
Method and equipment for file processing Download PDFInfo
- Publication number
- CN105912664A CN105912664A CN201610224098.8A CN201610224098A CN105912664A CN 105912664 A CN105912664 A CN 105912664A CN 201610224098 A CN201610224098 A CN 201610224098A CN 105912664 A CN105912664 A CN 105912664A
- Authority
- CN
- China
- Prior art keywords
- file
- deleted
- deletion
- delete
- equipment
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
Abstract
The invention discloses a method and equipment for file processing. The method and the equipment belong to the field of computers and aim to increase a utilization rate of storage space. The method comprises the steps that multiple files in need of storage are acquired, wherein the size of each file among the multiple files is smaller than a designated size; and the multiple files are stored in a file object in an aggregation manner, wherein the designated size is not bigger than the size of the file object. The method and the equipment disclosed by the invention are used for storage of small files.
Description
Technical field
The present invention relates to computer realm, particularly to a kind of document handling method and equipment.
Background technology
In distributed file system, the process scene of file system is designed for big file often,
Therefore the often inefficiency when processing mass small documents, it is impossible to meet practical application request.
In distributed file system, file data is stored, one or more disk holistic management can be gone out
It is used as storage pool to use, the object that granularity is fixed size that wherein space uses.Therefore, a big literary composition
Part often takies multiple object, and a small documents often takies a discontented entire object, causes storage
Space waste.
Summary of the invention
Embodiments provide a kind of document handling method and equipment, to improve memory space utilization rate.
First aspect, it is provided that a kind of document handling method, described method includes: obtain the multiple of needs storage
File;Determine that the size of each file in the plurality of file is less than specified bytes, by the plurality of file
Storing in file object with polymerization methods, wherein said specified bytes is not more than the size of described file object.
In embodiments of the present invention, the plurality of file is that small documents, i.e. file size are less than specified bytes
File, wherein, it is intended that byte as desired to set, but can need to ensure that described specified bytes is not more than file
The size of object.It is said that in general, small documents is those single files cannot take an entire object, and need
Multiple (such as, two or more) file just can take or major part takies the file of an entire object.
Polymerization methods storage refers to, multiple small documents make full use of the space in object, with a little literary composition when storage
Part stores by the mode of another small documents.Such as, a small documents can be stored in object
Divide in a band of bar.So, small documents is stored, compared to a traditional small documents list
Exclusive with one entire object, cause space waste, the embodiment of the present invention when carrying out small documents and storing be with
Band is that unit stores, by multiple small documents polymerization storage to file object, so, for little literary composition
The granularity of part storage is less, takes full advantage of object space, improves the utilization rate of memory space.
In conjunction with first aspect, in the implementation that the first is possible, after carrying out file storage, also may be used
Receiving file deletion commands, described file deletion commands may indicate that the file of deletion is to deposit in described file object
The file of storage;In embodiments of the present invention after receiving file deletion commands, described file can be deleted
Except order carries out record with the form of file deletion record, and delete what the instruction of described file deletion commands was deleted
The metadata of file.Compared to traditional direct direct deleting file data when receiving file deletion commands,
The embodiment of the present invention is only deleted when receiving file deletion commands corresponding metadata, and does not delete file
Data, are simultaneous for file deletion commands and preserve file deletion record, i.e. come with the form of file deletion record
Real file data is replaced to delete.So, both can realize in user side the deletion of file (it is true that literary composition
Part is the most really deleted), i.e. user can't see file to be deleted because the metadata of file by
Delete;Meanwhile, file deletion commands can be carried out merger again, whenever receiving a file deletion commands
The real file data deleting correspondence, simply one file deletion record of record, simple to operate, follow-up
Further rise when meeting certain condition and perform real file deletion action, improve the efficiency that file is deleted.
In conjunction with the first possible implementation of first aspect, alternatively, in the implementation that the second is possible
In, after deleting the metadata of the file that the instruction of described file deletion commands is deleted, the embodiment of the present invention is also
The file that can prompt the user with the instruction deletion of described file deletion commands is deleted.That is, file is shown to user
Delete, in order to allow user learn file process situation in time, facilitate user to carry out follow-up file operation.
In conjunction with the first possible implementation or the possible implementation of the second of first aspect, can at the third
In the implementation of energy, after deleting the metadata of the file that the instruction of described file deletion commands is deleted, this
The document handling method that inventive embodiments provides may also include that the file of scanning storage when meeting pre-conditioned
Deletion record;Determine that described file deletion record indicates owning in a complete point of bar in described file object
File on band is the most deleted, deletes the data on described complete point of bar.In embodiments of the present invention,
File deletion record is storable in data base.Described pre-conditioned can be that predetermined time interval, file are deleted
Except the bar number of record reaches to specify number.With pre-conditioned as predetermined time interval as a example by, available intervalometer
Setting described predetermined time interval, whenever reaching described predetermined time interval, the file that can scan storage is deleted
Except record.So, the scanning of file deletion record is carried out by setting trace interval, permissible
Ensure that scan efficiency is higher.Meanwhile, according to scanning result, reflect that one is completely divided in file deletion record
When file on bar is the most to be deleted, then the data on this completely point bar are performed deletion action, so with
Point bar is the least unit deleted, it is to avoid often receives a file deletion commands and is carried out a file and deletes
Division operation, by concentrative implementation file deletion action, reduces deletion frequency, improves deletion efficiency.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation, deleting
Except described file deletion commands indicates the metadata of the file deleted and completely divides the number on bar deleting one
According to afterwards, the document handling method that the embodiment of the present invention provides can farther include: determines described file object
In all points of bars the most deleted, delete the data on whole described file object.In embodiments of the present invention,
When a point of bar in file object is deleted, can further determine that whether this point of bar is in file object
Last point of bar, if this point of bar is last in file object point bar, then can determine that file object
All points of bars are the most deleted, then can delete the data on whole file object and relevant file object attribute.
Certainly, if file object exists point bar not being deleted, then can retain on these point bars not being deleted
Data.This kind is achieved in that supplementing further the third implementation, so ensure that file
Deletion action can be carried out more up hill and dale, saves system resource.
In conjunction with the possible implementation of any of the above kind of first aspect, in the 5th kind of possible implementation,
The plurality of file is the file in distributed file system.As a kind of typical case's application scenarios of the present invention,
The document handling method that the embodiment of the present invention provides can be applicable to distributed file system.Certainly, the present invention is real
The document handling method that executing example provides is not limited to process the file in distributed file system, as long as
Fine granularity operates, and all can be processed, at raising by this polymerization methods that the present invention provides
Rationality energy.
Second aspect, it is provided that a kind of document handling apparatus, this document processing equipment has and realizes above-mentioned first party
The function of document handling apparatus behavior in face.Described function can be realized by hardware, it is also possible to passes through hardware
Perform corresponding software to realize.Described hardware or software include one or more mould corresponding with above-mentioned functions
Block.
In a possible design, the structure of document handling apparatus includes processor and memorizer, described
Memorizer is for storing the program supporting that document handling apparatus performs said method, and described processor is configured to
For performing the program of storage in described memorizer.Described document handling apparatus can also include communication interface,
Equipment and other equipment or communication for file process.
The third aspect, embodiments provides a kind of non-transitory computer-readable storage medium, is used for storing
Performing above-mentioned aspect is the program designed by document handling apparatus, and described program includes above-mentioned document handling apparatus
Computer software instructions used.
The document handling method of embodiment of the present invention offer and document handling apparatus, to taking up room less than referring to
Determine multiple files (that is, small documents) of byte when storing, with polymerization methods, these multiple files are stored literary composition
In part object rather than a traditional file takies an object, thus, it is possible at an object
Interior storage multiple file, it is to avoid waste of storage space, improves memory space utilization rate.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, institute in embodiment being described below
The accompanying drawing used is needed to be briefly described, it should be apparent that, the accompanying drawing in describing below is only the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work,
Other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the document handling method that the embodiment of the present invention provides;
Fig. 2 is the schematic diagram of a kind of document handling method that the embodiment of the present invention provides;
Fig. 3 is the schematic diagram of the another kind of document handling method that the embodiment of the present invention provides;
Fig. 4 is the structural representation of the document handling apparatus that the embodiment of the present invention provides;
Fig. 5 is the structured flowchart of the document handling apparatus that the embodiment of the present invention provides.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to the present invention
Embodiment is described in further detail.
Embodiments providing a kind of document handling method, the method can be completed by terminal unit.
Wherein, terminal unit is alternatively referred to as subscriber equipment (User Equipment, referred to as " UE "), mobile station
(Mobile Station, referred to as " MS "), mobile terminal (Mobile Terminal) etc., this terminal sets
Standby can be through wireless access network (Radio Access Network, referred to as " RAN ") and one or more cores
Heart net communicates, and such as, terminal unit can be mobile phone (or being referred to as " honeycomb " phone), have
The computer etc. of mobile terminal, such as, terminal unit can also is that portable, pocket, hand-held, meter
The mobile device that calculation machine is built-in or vehicle-mounted, they can be with wireless access network exchange language and/or data.
The embodiment of the present invention provide terminal unit can be typically such as portable terminal, mobile phone,
The equipment such as mobile pad, server, panel computer, computer or personal digital assistant (PDA).
Certainly, within the scope of the invention, the document handling method that the embodiment of the present invention provides can also be by wrapping
The network system including various terminal unit performs.That is, various terminal unit can be included in network system,
Each terminal unit completes a specific action, and they cooperate document handling method of having come together.Its
In, terminal unit can include at least one processor, memorizer, communication interface and bus.Processor, deposit
Reservoir and communication interface are connected by bus and complete mutual communicating.Terminal unit and the tool of network system
Body structure is described further below.
Some relational languages related in the document handling method the most first provided the embodiment of the present invention solve
Release.
Object (Object): the elementary cell of object storage.Each to as if data and data property set combine
Fit.Data attribute can be configured, including data distribution, service quality etc. according to the demand of application.
The attribute of object maintenance oneself, thus simplify the management role of storage system, add motility.Object
Size can be different, whole data structures can be comprised, such as file, database table entry etc..
File object in the embodiment of the present invention can be in a storage device (such as disk), it is also possible to across many
Individual storage device, that is, multiple storage devices can store the data of file object.
Divide bar: a point bar can be arranged in multiple storage device (such as disk).When point bar is across multiple storage devices
Time, each storage device in these multiple storage devices can respectively choose band one point of bar of composition.
Band: the memory space unit of distribution in single storage device.For example, it is possible to a storage device
On multiple band is set, each band can distribute the memory space of such as 1M.
Fig. 1 is the flow chart of a kind of document handling method that the embodiment of the present invention provides.With reference to Fig. 1, the present invention
The document handling method that embodiment provides comprises the steps that
11, the multiple files needing to store are obtained;
12, determine that the size of each file in the plurality of file is less than specified bytes, by the plurality of literary composition
Part stores in file object with polymerization methods, and wherein said specified bytes is not more than the big of described file object
Little.
Wherein, the described multiple files needing storage can be the file in distributed file system.
Step 11 obtains and needs multiple files of storage can include various different modes.Such as receive from
Multiple files of network side, are specifically as follows and receive the multiple files downloaded from network, receive from network side
Another terminal on multiple files etc. of transmitting;Receive the multiple files from External memory equipment, example
As, receive the multiple files etc. transmitted on the hard disk connected by USB interface.The embodiment of the present invention pair
The concrete mode obtaining the multiple files needing storage is not specifically limited.
In step 12 after getting the multiple files needing storage, the plurality of literary composition can be judged further
Those files of file size no more than specified bytes are chosen out and are made by the size of each file in part
For small documents, the file then choosing out by these in the way of polymerization stores in file object.So
One, a file object often can store multiple small documents rather than traditional small documents accounts for
With an object, improve memory space utilization rate.
The document handling method that the embodiment of the present invention provides has been not only related to the storage of small documents, but also relates to
And arrived the operation to small documents, the such as deletion action to small documents.When deleting small documents by with right
As interior point bar is the ultimate unit deleted, a deletion action just deletes the data in whole point of bar, reduces
The frequency of deletion action, improves deletion efficiency.Process to file operation can refer to Fig. 2.
Fig. 2 is the schematic diagram of a kind of document handling method that the embodiment of the present invention provides.With reference to Fig. 2, the present invention
The document handling method that embodiment provides can be completed by terminal unit, can include foreground cluster in terminal unit
Agency (Cluster Agent, CA), data base, backstage CA and Metadata Service (Metadata Service,
MDS).Described document handling method can comprise the steps:
21, receiving file deletion commands, the file that the instruction of described file deletion commands is deleted is in file object
The file of storage.
Wherein, this step can be completed by foreground CA.File deletion commands can be that user passes through file system
Send, and received by foreground CA.The file that described instruction is deleted can be in distributed file system
File.
22, described file deletion commands is carried out record with the form of file deletion record, and delete described literary composition
The metadata of the file that the instruction of part delete command is deleted.
The file deletion commands received, after receiving file deletion commands, can be resolved by foreground CA,
And according to analysis result, perform corresponding file operation.Specifically, in embodiments of the present invention, foreground CA
File deletion commands can be changed to file deletion record, and can file deletion record be stored in data base,
But foreground CA can't delete the indicated file data deleted of file deletion commands, and simply delete instruction and delete
The metadata of the file (file the most to be deleted) removed.After the metadata of question paper is deleted, user will not see again
Need the file deleted.
In embodiments of the present invention, a file deletion record can be recorded for a file deletion commands,
Also the number of file deletion record can be added up.
The embodiment of the present invention utilizes data base to deposit deletion file record, it is possible to increase user deletes file request
Response speed.Wherein, the file deletion record deposited in data base can be as shown in the table:
Upper table maintains 3 the corresponding files formed in data base after receiving three file deletion commands and deletes
Except record, backstage meeting these file deletion records of periodic scanning carry out the real deletion of corresponding data, if swept
Retouch in object small documents on whole point of bar and all have record, then then delete whole point of bar in object, and then reach
Once deletion can delete the purpose of multiple small documents, specifically can be as will be described as further below.
23, the file prompting the user with the instruction deletion of described file deletion commands is deleted.
Step 23 can be completed by foreground CA.
Prompting the user with file when deleting, user can't see the file that instruction is deleted.Step 23 is optional
Step, within the scope of the invention, it is also possible to the file not prompting the user with instruction deletion is deleted.Due to
After the metadata deleting the file that instruction is deleted, user can't see the file needing to delete, thus, use
Family, when can't see the file needing to delete, i.e. would know that the file that instruction is deleted is the most deleted.
24, when meeting pre-conditioned, the file deletion record of scanning storage.
Step 24 can be completed by backstage CA.Step 24 adapts with step 22, in step 22
In store file deletion record, in step 24 when reaching the condition set, the literary composition of storage can be scanned
Part deletion record.Wherein, described pre-conditioned can be predetermined time interval, such as 1 minute, 5 minutes etc..
Wherein, predetermined time interval can be set by intervalometer.Can also be set it in embodiments of the present invention
He is pre-conditioned, triggers the file deletion record starting scanning storage when reaching pre-conditioned.Described pre-
If condition such as can also reach to specify number for the bar number of file deletion record, described in specify number such as
Be 10,15 etc..
25, determine that described file deletion record indicates all bars in described file object in a complete point of bar
File on band is the most deleted, deletes the data on described complete point of bar.
Step 25 can be completed by backstage CA.
Specifically, according to the scanning result of the file deletion record in step 24, i.e. would know that in file object
Whether there are following kind of one or more points of bars: in each in the one or more point of bar point bar
File on all bands is all deleted by file deletion record instruction.If existing such one or more
Divide bar, then show that the one or more point of bar is deleted by file deletion record instruction, thus can directly delete
File data on the one or more point of bar.
Certainly, if there are not such one or more points of bars, then show to there is also on point bar not by
The band that file takies, now, does not delete such point of bar, the literary composition on all bands on bar to be divided
When part is deleted by file deletion record instruction the most, just can delete the file data on such point of bar.
26, determine that in described file object, all points of bars are the most deleted, delete on whole described file object
Data.
Step 26 can be completed by backstage CA, and step 26 is optional step.Step 26 is in step 25
On the basis of further extension.In embodiments of the present invention, it is deleted when last point of bar of file object
Time, it may be determined that all points of bars of file object are the most deleted.If the literary composition on all points of bars in file object
Number of packages according to the most deleted, then needs to delete some other phases of file data and object on whole object
The attribute information etc. of associated data, such as object.Certainly, if file object exists file data not yet by
Point bar deleted, then can this point of bar on document retaining object.
It should be noted that when performing above step 22,24,25, as shown in Figure 2, it is also possible to anti-
Feedback confirmation, described confirmation can be to confirm that file deletion record is added successfully, confirmed file unit number
Delete successfully according to deleting successfully, confirm a point bar, confirm that object is deleted successfully etc..
It should be noted that foreground CA, backstage CA and MDS in the embodiment of the present invention can be with soft
The form of part program stores in memory.When CPU performs these software programs, above-mentioned can be performed and send out
The document handling method that bright embodiment provides.
The document handling method that the embodiment of the present invention provides, under mass small documents directory delete scene, passes through
It is polymerized deletion action with the form of file deletion record, improves bottom deletion efficiency, simultaneously by for right
As a point bar Free up Memory, improve file and delete space reclamation efficiency.
Fig. 3 is the schematic diagram of the another kind of document handling method that the embodiment of the present invention provides.With reference to Fig. 3, this
The document handling method that bright embodiment provides can be completed by the various terminal units on network.Such as, one
For receiving the subscriber equipment of the operational order of user, a front side equipment (example playing foreground CA effect
As, PC a), a storage being used for storing file (that is, playing the effect of data base shown in Fig. 2)
Equipment (such as, server a), one play backstage CA effect (such as, the rear side equipment of PC b),
And meta data server (such as, a server b) playing Metadata Service effect.
It should be noted that although the storage device in Fig. 3 is shown as one in the drawings, but can essentially
For being distributed on network multiple storage devices everywhere.File can be deposited in each described storage device and delete note
Record and file data.
It is pointed out that in embodiments of the present invention, subscriber equipment, front side equipment, storage device, after
Side apparatus, meta data server can be separate terminal unit, certain subscriber equipment, front side equipment,
Storage device, rear side equipment, meta data server integrate also dependent on needs, it is only necessary to complete phase
The function answered.Such as, front side equipment and meta data server can be that same terminal unit (i.e. services
Device a and b can be same server), the most such as, subscriber equipment and front side equipment can be same equipment etc..
Document handling method under situation shown in Fig. 3 can be similar with document handling method shown in Fig. 2,
Simply executive agent is different.Here, can refer to described above for the document handling method under this situation,
Do not repeat at this.
The document handling method that the embodiment of the present invention provides, same by multiple small documents data aggregates are stored
In one object, it is possible to increase system space utilisation.Meanwhile, data-base recording is utilized to delete file record,
User can be improved and delete the response speed of file request;Under mass small documents directory delete scene, pass through
It is polymerized deletion action with the form of file deletion record, improves bottom deletion efficiency, simultaneously by for right
As a point bar Free up Memory, improve file and delete space reclamation efficiency.
Fig. 4 is the structural representation of a kind of document handling apparatus that the embodiment of the present invention provides.With reference to Fig. 4, this
Inventive embodiments provide data process device 400 include: at least one processor 401, memorizer 402,
Communication interface 403 and bus.Processor 401, memorizer 402 and communication interface 403 are connected also by bus
Complete mutual communication.Described bus can be industry standard architecture (Industry Standard
Architecture, referred to as ISA) bus, external equipment interconnection (Peripheral Component, referred to as
PCI) bus or extended industry-standard architecture (Extended Industry Standard Architecture, letter
It is referred to as EISA) bus etc..Described bus can be divided into address bus, data/address bus, control bus etc..For
It is easy to represent, Fig. 4 only represents with a thick line, it is not intended that an only bus or a type of
Bus.Wherein:
Memorizer 402 is used for storing executable program code, and this program code includes computer-managed instruction.
Memorizer 402 can be high-speed RAM memorizer, it is also possible to for nonvolatile memory (non-volatile
Memory), for example, at least one disk memory.
In one embodiment, processor 401 is by reading the executable program generation of storage in memorizer 402
Code runs the program corresponding with described executable program code, for: obtain the multiple literary compositions needing storage
Part;Determine the size of each file in the plurality of file less than specified bytes, by the plurality of file with
Polymerization methods stores in file object, and wherein said specified bytes is not more than the size of described file object.
In one embodiment, processor 401 is by reading the executable program generation of storage in memorizer 402
Code runs the program corresponding with described executable program code, for: receive file deletion commands, institute
The file stating file deletion commands instruction deletion is the file of storage in described file object;Described file is deleted
Except order carries out record with the form of file deletion record, and delete what the instruction of described file deletion commands was deleted
The metadata of file.
In one embodiment, processor 401 is by reading the executable program generation of storage in memorizer 402
Code runs the program corresponding with described executable program code, for: delete at the described file of described deletion
After the metadata of the file of order instruction deletion, prompt the user with the instruction of described file deletion commands and delete
File delete.
In one embodiment, processor 401 is by reading the executable program generation of storage in memorizer 402
Code runs the program corresponding with described executable program code, for: delete at the described file of described deletion
After the metadata of the file of order instruction deletion, when meeting pre-conditioned, the file of scanning storage is deleted
Except record;Determine that described file deletion record indicates all bars in described file object in a complete point of bar
File on band is the most deleted, deletes the data on described complete point of bar.
In one embodiment, processor 401 is by reading the executable program generation of storage in memorizer 402
Code runs the program corresponding with described executable program code, for: delete at the described file of described deletion
After the metadata of the file of order instruction deletion, determine that in described file object, all points of bars are the most deleted,
Delete the data on whole described file object.
In embodiments of the present invention, the plurality of file can be the file in distributed file system.
The document handling apparatus that the embodiment of the present invention provides, same by multiple small documents data aggregates are stored
In one object, it is possible to increase system space utilisation.Meanwhile, data-base recording is utilized to delete file record,
User can be improved and delete the response speed of file request;Under mass small documents directory delete scene, pass through
It is polymerized deletion action with the form of file deletion record, improves bottom deletion efficiency, simultaneously by for right
As a point bar Free up Memory, improve file and delete space reclamation efficiency.
Fig. 5 is the structured flowchart of the document handling apparatus that the embodiment of the present invention provides.With reference to Fig. 5, the present invention is real
The equipment 500 executing the file process that example provides includes acquiring unit 501, processing unit 502 and memory element
503.Wherein:
Acquiring unit 501, for obtaining the multiple files needing storage;
Processing unit 502, for determining that the size of each file in the plurality of file is less than specified bytes,
Wherein said specified bytes is not more than the size of described file object;
Memory element 503, for storing the plurality of file in file object with polymerization methods.
Alternatively, in one embodiment, described equipment 500 also includes:
Receive unit 504, be used for receiving file deletion commands, the file that the instruction of described file deletion commands is deleted
For the file of storage in described file object;
Described memory element 503 specifically for: by described file deletion commands with the form of file deletion record
Store;
Described processing unit 502 specifically for: delete the unit of file that the instruction of described file deletion commands is deleted
Data.
Alternatively, in another embodiment, described equipment 500 also includes:
Tip element 505, for deleting what the instruction of described file deletion commands was deleted at described processing unit 502
After the metadata of file, the file prompting the user with the instruction deletion of described file deletion commands is deleted.
Alternatively, described processing unit 502 is deleting the unit of the file that the instruction of described file deletion commands is deleted
After data, it may also be used for:
File deletion record with the storage of predetermined time interval periodic scan;Determine described file deletion record
The file on all bands indicated in described file object in a complete point of bar is the most deleted, deletes institute
State the data on complete point of bar.
Further, described processing unit 502 can be additionally used in:
Determine that in described file object, all points of bars are the most deleted, delete the number on whole described file object
According to.
Wherein, the plurality of file in the embodiment of the present invention can be the file in distributed file system.
The document handling apparatus that the embodiment of the present invention provides, same by multiple small documents data aggregates are stored
In one object, it is possible to increase system space utilisation.Meanwhile, data-base recording is utilized to delete file record,
User can be improved and delete the response speed of file request;Under mass small documents directory delete scene, pass through
It is polymerized deletion action with the form of file deletion record, improves bottom deletion efficiency, simultaneously by for right
As a point bar Free up Memory, improve file and delete space reclamation efficiency.
It should be understood that the equipment of the file process of above-described embodiment offer is only with above-mentioned each functional module
Division is illustrated, and in actual application, can distribute above-mentioned functions by different merits as desired
Module can complete, the internal structure of equipment will be divided into different functional modules, described above to complete
All or part of function.It addition, the equipment of the file process of above-described embodiment offer and the side of file process
Method embodiment belongs to same design, and it implements process and refers to embodiment of the method, repeats no more here.
It should be noted that each embodiment in this specification all uses the mode gone forward one by one to describe, Mei Geshi
Execute that example stresses is all the difference with other embodiments, identical similar portion between each embodiment
Divide and see mutually.For equipment class embodiment, due to itself and embodiment of the method basic simlarity, institute
Fairly simple with describe, relevant part sees the part of embodiment of the method and illustrates.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, realizes shown in above-mentioned Fig. 4 for storage
The computer software instructions of document handling apparatus, it comprises for performing designed by said method embodiment
Program.The program stored by execution, it is possible to effectively filter the unrelated page, strengthen and perfect WEB page
The filtration in face, it is achieved that carry out file process more targetedly.
It should be noted that for aforesaid each method embodiment, in order to be briefly described, therefore it is all stated
For a series of combination of actions, but those skilled in the art should know, the present invention is not by described
The restriction of sequence of movement, because according to the present invention, some step can use other orders or carry out simultaneously.
Secondly, those skilled in the art also should know, embodiment described in this description belongs to be preferable to carry out
Example, necessary to involved action and the module not necessarily present invention.
It should be noted that for aforesaid each method embodiment, in order to be briefly described, therefore it is all stated
For a series of combination of actions, but those skilled in the art should know, the present invention is not by described
The restriction of sequence of movement, because according to the present invention, some step can use other orders or carry out simultaneously.
Secondly, those skilled in the art also should know, embodiment described in this description belongs to be preferable to carry out
Example, necessary to involved action and the module not necessarily present invention.
Although combine each embodiment invention has been described at this, but, required for protection in enforcement
In process of the present invention, those skilled in the art are by checking described accompanying drawing, disclosure and appended right
Claim, it will be appreciated that and realize other changes of described open embodiment.In the claims, " include "
(comprising) word is not excluded for other ingredients or step, and "a" or "an" is not excluded for multiple feelings
Condition.Single processor or other unit can realize some the functions enumerated in claim.Mutually different
Be recited in mutually different dependent some measure, the generation it is not intended that these measures can not combine
Good effect.
It will be understood by those skilled in the art that embodiments of the invention can be provided as method, equipment (equipment) or
Computer program.Therefore, the present invention can use complete hardware embodiment, complete software implementation or
Form in conjunction with the embodiment in terms of software and hardware.And, the present invention can use one or more wherein
Include computer usable program code computer-usable storage medium (include but not limited to disk memory,
CD-ROM, optical memory etc.) form of the upper computer program implemented.Computer program storage/
It is distributed in suitable medium, provides together with other hardware or as the part of hardware, it would however also be possible to employ
Other distribution forms, as by Internet or other wired or wireless telecommunication system.
The present invention is with reference to the method for the embodiment of the present invention, equipment (equipment) and the stream of computer program
Journey figure and/or block diagram describe.It should be understood that can be by computer program instructions flowchart and/or block diagram
In each flow process and/or the flow process in square frame and flow chart and/or block diagram and/or the combination of square frame.Can
There is provided these computer program instructions to general purpose computer, special-purpose computer, Embedded Processor or other can
The processor of programming document handling apparatus is to produce a machine so that by computer or other literary compositions able to programme
The instruction that the processor of part processing equipment performs produce for realize one flow process of flow chart or multiple flow process and/
Or the equipment of the function specified in one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide computer or other document handling apparatus able to programme
In the computer-readable memory worked in a specific way so that be stored in this computer-readable memory
Instruction produces the manufacture including commander equipment, and this commander equipment realizes at one flow process of flow chart or multiple stream
The function specified in journey and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded on computer or other document handling apparatus able to programme, makes
Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices
Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one
The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although in conjunction with specific features and embodiment, invention has been described, it is clear that, do not taking off
In the case of the spirit and scope of the present invention, it can be carried out various amendment and combination.Correspondingly, this theory
The exemplary illustration of the present invention that bright book and accompanying drawing only claims are defined, and be considered as covering
In the scope of the invention arbitrarily and all modifications, change, combine or equivalent.Obviously, the technology of this area
Personnel can carry out various change and modification without departing from the spirit and scope of the present invention to the present invention.So,
If these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof,
Then the present invention is also intended to comprise these change and modification.
Claims (14)
1. a document handling method, it is characterised in that described method includes:
Obtaining the multiple files needing storage, the size of each file in the plurality of file is respectively less than specifies
Size;
Then storing in file object by the plurality of file with polymerization methods, wherein said appointment size is little
Size in described file object.
Method the most according to claim 1, it is characterised in that after described method, also include:
Receiving file deletion commands, described file deletion commands indicates file to be deleted to be described file object
The file of middle storage;
Described file deletion commands is carried out record with the form of file deletion record, and deletes described to be deleted
The metadata of file.
Method the most according to claim 2, it is characterised in that at the described literary composition to be deleted of described deletion
After the metadata of part, described method also includes:
Prompt the user with described file to be deleted to delete.
The most according to the method in claim 2 or 3, it is characterised in that described to be deleted in described deletion
File metadata after, described method also includes:
When meeting pre-conditioned, scan described file deletion record;
If on all bands that described file deletion record indicates in described file object in a complete point of bar
File the most deleted, then delete the data on described complete point of bar.
Method the most according to claim 4, it is characterised in that at the described literary composition to be deleted of described deletion
After the metadata of part, described method also includes:
Determine that in described file object, all points of bars are the most deleted, delete the data on whole described file object.
6. according to claim 1-3, arbitrary described method in 5, it is characterised in that described method is applied to
Distributed file system.
7. according to claim 1-3, arbitrary described method in 5, it is characterised in that described by the plurality of
File stores file object with polymerization methods and includes:
Each file in the plurality of file takies a band in described file object.
8. a document handling apparatus, it is characterised in that described equipment includes:
Acquiring unit, for obtaining the multiple files needing storage;
Processing unit, specifies size for determining that the size of each file in the plurality of file is less than, its
Described in specify size to be not more than the size of described file object;
Memory element, for storing the plurality of file in file object with polymerization methods.
Equipment the most according to claim 8, it is characterised in that described equipment also includes:
Receive unit, be used for receiving file deletion commands, the file that the instruction of described file deletion commands is to be deleted
For the file of storage in described file object;
Described memory element specifically for: described file deletion commands is carried out with the form of file deletion record
Record;
Described processing unit specifically for: delete the metadata of described file to be deleted.
Equipment the most according to claim 9, it is characterised in that described equipment also includes:
Tip element, after delete the metadata of described file to be deleted at described processing unit, to
User points out described file to be deleted to delete.
11. according to the equipment described in claim 9 or 10, it is characterised in that described processing unit is described
After processing unit deletes the metadata of described file to be deleted, it is additionally operable to:
When meeting pre-conditioned, scan described file deletion record;Determine that described file deletion record indicates
In described file object one completely the file on all bands in point bar the most deleted, delete described completely
Divide the data on bar.
12. equipment according to claim 11, it is characterised in that described processing unit is additionally operable to:
Determine that in described file object, all points of bars are the most deleted, delete the data on whole described file object.
13. arbitrary described equipment in-10,12 according to Claim 8, it is characterised in that the plurality of literary composition
Part is the file in distributed file system.
14. arbitrary described methods in-10,12 according to Claim 8, it is characterised in that described storage list
Unit specifically for:
A band in described file object stores a file in the plurality of file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610224098.8A CN105912664B (en) | 2016-04-11 | 2016-04-11 | File processing method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610224098.8A CN105912664B (en) | 2016-04-11 | 2016-04-11 | File processing method and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105912664A true CN105912664A (en) | 2016-08-31 |
CN105912664B CN105912664B (en) | 2020-02-14 |
Family
ID=56745927
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610224098.8A Active CN105912664B (en) | 2016-04-11 | 2016-04-11 | File processing method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105912664B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106446155A (en) * | 2016-09-22 | 2017-02-22 | 北京百度网讯科技有限公司 | Method and device for cleansingdata in cloud storage system |
CN109947721A (en) * | 2017-12-01 | 2019-06-28 | 北京安天网络安全技术有限公司 | A kind of small documents treating method and apparatus |
CN110825694A (en) * | 2019-11-01 | 2020-02-21 | 北京锐安科技有限公司 | Data processing method, device, equipment and storage medium |
CN110874182A (en) * | 2018-08-31 | 2020-03-10 | 杭州海康威视系统技术有限公司 | Processing method, device and equipment for stripe index |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110225364A1 (en) * | 2004-04-30 | 2011-09-15 | Edwards John K | Extension of write anywhere file layout write allocation |
CN103605726A (en) * | 2013-11-15 | 2014-02-26 | 中安消技术有限公司 | Method and system for accessing small files, control node and storage node |
CN103718151A (en) * | 2013-08-09 | 2014-04-09 | 华为技术有限公司 | Document processing method and storage device |
CN104346384A (en) * | 2013-07-31 | 2015-02-11 | 上海云端广告有限公司 | Method and device for processing small files |
-
2016
- 2016-04-11 CN CN201610224098.8A patent/CN105912664B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110225364A1 (en) * | 2004-04-30 | 2011-09-15 | Edwards John K | Extension of write anywhere file layout write allocation |
CN104346384A (en) * | 2013-07-31 | 2015-02-11 | 上海云端广告有限公司 | Method and device for processing small files |
CN103718151A (en) * | 2013-08-09 | 2014-04-09 | 华为技术有限公司 | Document processing method and storage device |
CN103605726A (en) * | 2013-11-15 | 2014-02-26 | 中安消技术有限公司 | Method and system for accessing small files, control node and storage node |
Non-Patent Citations (2)
Title |
---|
刘元春: "《数字广播电视中心技术》", 31 May 2007, 中国广播电视出版社 * |
童维勤 等: "《数据密集型计算和模型》", 31 January 2015, 上海科学技术出版社 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106446155A (en) * | 2016-09-22 | 2017-02-22 | 北京百度网讯科技有限公司 | Method and device for cleansingdata in cloud storage system |
US10698863B2 (en) | 2016-09-22 | 2020-06-30 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method and apparatus for clearing data in cloud storage system |
CN109947721A (en) * | 2017-12-01 | 2019-06-28 | 北京安天网络安全技术有限公司 | A kind of small documents treating method and apparatus |
CN109947721B (en) * | 2017-12-01 | 2021-08-17 | 北京安天网络安全技术有限公司 | Small file processing method and device |
CN110874182A (en) * | 2018-08-31 | 2020-03-10 | 杭州海康威视系统技术有限公司 | Processing method, device and equipment for stripe index |
CN110874182B (en) * | 2018-08-31 | 2023-12-26 | 杭州海康威视系统技术有限公司 | Processing method, device and equipment for strip index |
CN110825694A (en) * | 2019-11-01 | 2020-02-21 | 北京锐安科技有限公司 | Data processing method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN105912664B (en) | 2020-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105912664A (en) | Method and equipment for file processing | |
CN104657058A (en) | Screenshot method | |
CN108476391A (en) | Activating method, wireless router and the user terminal of ESIM cards | |
CN105989076A (en) | Data statistical method and device | |
CN106453572B (en) | Method and system based on Cloud Server synchronous images | |
CN104679405A (en) | Terminal | |
CN108154035A (en) | Extensive website vulnerability scan method, device and electronic equipment | |
CN107656729A (en) | Updating device, method and the computer-readable recording medium of List View | |
CN110135993A (en) | Method, equipment and the storage medium of UTXO model adaptation intelligence contract account model | |
CN104219639A (en) | Method and device for displaying text message record | |
CN101847146A (en) | Searching method, system and searching server | |
CN106339632A (en) | Method for allocating M2M device administration authority, user device and system | |
CN110213290A (en) | Data capture method, API gateway and storage medium | |
CN107241312B (en) | A kind of right management method and device | |
CN109086289A (en) | A kind of media data processing method, client, medium and equipment | |
CN104424224A (en) | File index storage method and device | |
CN106411718B (en) | Data synchronization method and device based on instant messaging application | |
CN106933702A (en) | A kind of method of intelligent terminal storage space management, device and intelligent terminal | |
CN107357808B (en) | Data management method, device and equipment | |
CN106293658A (en) | A kind of interface assembly generates method and equipment thereof | |
CN110300222B (en) | Short message display method, system, terminal equipment and computer readable storage medium | |
CN115576973A (en) | Service deployment method, device, computer equipment and readable storage medium | |
CN106557530B (en) | Operation system, data recovery method and device | |
CN114978686A (en) | Digital asset chaining method and device | |
CN106998276A (en) | Data processing, storage, querying method and data handling system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |