CN104933062B - A kind of Piece file mergence method and device - Google Patents
A kind of Piece file mergence method and device Download PDFInfo
- Publication number
- CN104933062B CN104933062B CN201410102521.8A CN201410102521A CN104933062B CN 104933062 B CN104933062 B CN 104933062B CN 201410102521 A CN201410102521 A CN 201410102521A CN 104933062 B CN104933062 B CN 104933062B
- Authority
- CN
- China
- Prior art keywords
- directory
- file
- item
- information
- directory entry
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of Piece file mergence method and device, is related to data processing field.This document merging method, includes the following steps:After detecting the file to be combined that user has selected, the directory entry information of the file to be combined is extracted, generates original directory;User is obtained to the operation information of the operation of the original directory/not, directory entry information is updated, generates target directory;The file data of the target directory is merged, file destination is generated.The method of the present invention solves the problems, such as that existing file merges the whole catalogue that cannot generate system, is more convenient the access of user.
Description
Technical field
The present invention relates to data processing field, more particularly to a kind of Piece file mergence method and device.
Background technology
With the development of electronic technology, increasingly become a kind of trend by way of electronic equipment read books file.
And the source of electronic document, it is downloaded often by network.
Currently, when user select multifile be downloaded when, frequently with processing method be:Using be packaged compressed software or
For method by the file of the packing of multiple file synthesis one, existing common packings format is zip, rar, 7z, more by taking zip as an example
E-book is packaged into zip formats, and it is as shown in Figure 1 to be packaged flow.
Although multiple files can be packaged into a file by this method, the complete electronic bibliography of neither one
Record is presented to user;Even if software support parse the catalogue that packet is each file but if because there is no catalogue relationship description, only
It can be shown according to each file separate category, not be an entirety.Moreover, when user select an e-book in partial content into
Row is downloaded, and the content selected may be discontinuous, and above-mentioned method can not be handled, and the content that can only be selected according to user is only
Each piece of load is made, likewise, being hardly produced the catalogue of a system.
Invention content
The technical problem to be solved in the present invention is to provide a kind of Piece file mergence method and device, realizes and to be selected according to user
It waits for packaging file, a file destination with full directory is generated, to facilitate the purpose of access.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of Piece file mergence method, include the following steps:
After detecting the file to be combined that user has selected, the directory entry information of the file to be combined is extracted, is generated
Original directory;
User is obtained to the operation information of the operation of the original directory/not, directory entry information is updated, generates target mesh
Record;
The file data of the target directory is merged, file destination is generated.
Wherein, user is obtained to the operation information of the operation of the original directory/not, is updated directory entry information, is generated
The step of target directory includes:
Operation information of the user to the original directory is obtained, directory entry information is updated, generates target directory;Or
User is obtained to the not operation information of the original directory, target mesh is directly generated according to original directory entry information
Record.
Wherein, the directory entry information includes:Directory entry ID, directory entry title, father ID, brother ID.
Wherein, operation information of the user to the original directory is obtained, directory entry information is updated, generates target directory
The step of include:
In the delete operation for detecting user, the directory entry chosen is deleted;
Whether the judgement item that deltrees has subdirectory item, if there is subdirectory item, by all sons of the item that deltrees
The father ID of directory entry is revised as the father ID of the item that deltrees;
It deltrees next directory entry of item described in judgement and whether the item that deltrees is coordination, if arranged side by side
A brother of next directory entry of the item that deltrees ID is then revised as the brother ID of the item that deltrees by relationship.
Wherein, operation information of the user to the original directory is obtained, directory entry information is updated, generates target directory
The step of further include:
When detecting that user edits the operation of directory entry title, judge whether new directory item title is empty, if new directory
Item title is not sky, then is new directory item title by former directory entry name modifications;If the entitled sky of new directory item, retains former mesh
Record item title.
Wherein, operation information of the user to the original directory is obtained, directory entry information is updated, generates target directory
The step of further include:
When detecting that user adjusts the operation of directory entry position, judge whether the parent directory item for adjusting directory entry becomes
Change, if the variation of parent directory item and presence, new father ID is revised as to the directory entry ID of current parent directory item;If parent directory item becomes
Change but be not present, then new father ID is set as 0;
Judge whether the brother's directory entry for adjusting catalogue changes, if the variation of brother's directory entry and presence, by new brother ID
It is revised as the directory entry ID of current brother's directory entry;If brother's directory entry changes but is not present, new brother ID is set as 0.
Wherein, the file data of the target directory is merged, generate file destination the step of include:
File destination header is generated, the header includes:Directory information area quantity and directory information area offset;
Judge whether each file needs to compress according to target directory sequence, if desired compresses, then basis is specified
Compress mode carries out compression and active data area tail portion is written in current file stream;It, directly ought be above if need not compress
Active data area tail portion is written in part stream;
Fileinfo is inserted into file information structure;
Catalogue data area data are generated according to the target directory information, generating file according to the file information structure reflects
Penetrate Data Area data, filling file directory information area;
It is deviated according to the directory information area quantity of file directory information area data modification File header information and directory information area
Amount.
The embodiment of the present invention additionally provides a kind of Piece file mergence device, including:
Original directory generation module, for after detecting the file to be combined that user has selected, extraction to be described to be combined
The directory entry information of file generates original directory;
Target directory generation module is updated for obtaining user to the operation information of the operation of the original directory/not
Directory entry information generates target directory;
File destination generation module is merged for the file data to the target directory, generates file destination.
Wherein, the target directory generation module includes:
First object catalogue generates submodule, and the operation information for obtaining user to the original directory updates
Directory entry information generates target directory;
Second target directory generates submodule, for obtaining not operation information of the user to the original directory, according to original
The directory entry information of beginning directly generates target directory.
Wherein, the directory entry information includes:Directory entry ID, directory entry title, father ID, brother ID.
Wherein, the first object catalogue generation submodule includes:
Deleting unit, in the delete operation for detecting user, deleting the directory entry chosen;
First processing units, if there is subdirectory item, are deleted for judging whether the item that deltrees has subdirectory item by described
Except the father ID of all subdirectory items of directory entry is revised as the father ID of the item that deltrees;
Second processing unit, for judge next directory entry of the item that deltrees with it is described deltree item whether be
A brother of next directory entry of the item that deltrees ID is then revised as the deletion mesh by coordination if coordination
The brother ID for recording item.
Wherein, the first object catalogue generation submodule further includes:
Third processing unit, for when detecting that user edits the operation of directory entry title, judging new directory item title
Whether it is empty, is new directory item title by former directory entry name modifications if new directory item title is not sky;If new directory key name
It is referred to as empty, then retain former directory entry title.
Wherein, the first object catalogue generation submodule further includes:
Fourth processing unit adjusts directory entry for when detecting that user adjusts the operation of directory entry position, judging
Whether parent directory item changes, if the variation of parent directory item and presence, new father ID is revised as to the mesh of current parent directory item
Record item ID;If parent directory item changes but is not present, new father ID is set as 0;
5th processing unit, for judge adjust catalogue brother's directory entry whether change, if brother's directory entry variation and
In the presence of new brother ID to be then revised as to the directory entry ID of current brother's directory entry;If brother's directory entry changes but is not present, by new brother
Item ID is set as 0.
Wherein, the file destination generation module includes:
File destination header generation unit, for generating file destination header, the header includes:Directory information
Area's quantity and directory information area offset;
File stream writing unit, for judging whether each file needs to compress according to target directory sequence, if needing
It compresses, then compression is carried out according to specified compress mode and active data area tail portion is written into current file stream;If not needing
Compression, then directly by current file stream write-in active data area tail portion;
File information structure inserts unit, for fileinfo to be inserted file information structure;
File directory information area inserts unit, for generating catalogue data area data, root according to the target directory information
File Mapping Data Area data, filling file directory information area are generated according to the file information structure;
File header information changes unit, for the directory information according to file directory information area data modification File header information
Area's quantity and directory information area offset.
The above-mentioned technical proposal of the present invention has the beneficial effect that:
The Piece file mergence method of the embodiment of the present invention, by after detecting the file to be combined that user has selected, extracting
The directory entry information of the file to be combined generates original directory;And further obtain behaviour of the user to the original directory
Make/not operation information, update directory entry information, generates target directory;And the file data of the target directory is carried out
Merge, generates file destination.In this way, user need to only choose file to be combined, and want in the selection of the original directory of generation
The chapters and sections content of reservation goes to arrange out new directory order according to the needs of oneself, eventually by above-mentioned steps will according to
The selection at family generates target directory and finally obtains file destination;If user does not carry out operation adjustment to original directory, will be direct
Target directory identical with original directory is obtained, after merging with file data, obtained file destination includes to need to be packaged
File content.The above method generates the whole catalogue of corresponding system, is more convenient the access of user.
Description of the drawings
Fig. 1 is that existing multifile is packaged flow chart of steps;
Fig. 2 is the step flow chart of the Piece file mergence method of the embodiment of the present invention;
Fig. 3 is the original directory schematic diagram of the embodiment of the present invention;
Fig. 4 is the specific steps flow chart 1 of the Piece file mergence method of the embodiment of the present invention;
Fig. 5 is that the original directory of the embodiment of the present invention deletes the schematic diagram after redundant term;
Fig. 6 is the specific steps flow chart 2 of the Piece file mergence method of the embodiment of the present invention;
Fig. 7 is that the original directory of the embodiment of the present invention adjusts the schematic diagram of directory location;
Fig. 8 is the destination file format physical container structural schematic diagram of the embodiment of the present invention;
Fig. 9 is the specific steps flow chart 3 of the Piece file mergence method of the embodiment of the present invention;
Figure 10 is the catalogue schematic diagram of the file destination of the embodiment of the present invention;
Figure 11 is the structural schematic diagram of the Piece file mergence device of the embodiment of the present invention.
Specific implementation mode
To keep the technical problem to be solved in the present invention, technical solution and advantage clearer, below in conjunction with attached drawing and tool
Body embodiment is described in detail.
The problem of present invention cannot generate the whole catalogue of system for existing Piece file mergence, provides a kind of Piece file mergence
Method and device is realized and waits for packaging file according to what user selected, a file destination with full directory is generated, to convenient
The purpose of access.
As shown in Fig. 2, a kind of Piece file mergence method of the embodiment of the present invention, includes the following steps:
Step 11, after detecting the file to be combined that user has selected, the directory entry letter of the file to be combined is extracted
Breath generates original directory;
Step 12, user is obtained to the operation information of the operation of the original directory/not, updates directory entry information, it is raw
At target directory;
Step 13, the file data of the target directory is merged, generates file destination.
Wherein, the directory entry information includes:Directory entry ID, directory entry title, father ID, brother ID.
In the Piece file mergence method of the embodiment of the present invention, user need to only choose file to be combined, and in generation
Original directory retains full content or the chapters and sections content retained is wanted in selection, goes to arrange out new catalogue according to the needs of oneself
Sequentially, this method will generate target directory according to the user's choice and finally obtain file destination, which has a pair
The complete catalogue of system of answering property is more convenient the access of user.
In the following, wanting to incite somebody to action with user《Highly skilled doctor Liuxia favour one》《Highly skilled doctor Liuxia favour two》《Highly skilled doctor Liuxia favour three》《First military god》
With《Nature's mystery》In section be merged into for a file, then according to the Piece file mergence method of the embodiment of the present invention, just
It needs:
These files to be combined are extracted after detecting the file to be combined that user has selected according to step 11 first
Directory entry ID, directory entry title, father ID, brother ID, generate original directory.This original directory is as shown in figure 3, wherein band saves
The chapters and sections of contracted notation indicate multiple chapters and sections in original.Certainly this original directory is first only shown, user could be facilitated to complete
Customized selection.It should be noted that directory entry ID is the ID number for the representative own identification that each directory entry carries;Father ID
Refer to the directory entry ID of the upper level directory entry of the directory entry, when the directory entry is first class catalogue item, father ID is 0;Brother
ID refers to the directory entry ID of the directory entry at the same level of the catalogue, when the directory entry is first first class catalogue imported, brother
ID is 0.The logical relation between directory entry can be well understood by father ID and brother ID.
It should be understood that the demand due to user is different, have it is desired be exactly by all Piece file mergences to be combined
For the file of an entirety, some is then the partial content needed in file to be combined, therefore step 12 includes:
Step 121, operation information of the user to the original directory is obtained, directory entry information is updated, generates target
Catalogue;Or
Step 122, not operation information of the user to the original directory is obtained, it is directly raw according to original directory entry information
At target directory.
In this way, if user wants to read《Highly skilled doctor Liuxia favour one》《Highly skilled doctor Liuxia favour two》《Highly skilled doctor Liuxia favour three》《First is military
God》With《Nature's mystery》In full content, do not make other modifications yet, user can be obtained according to step 122 to the original directory
Not operation information directly generates target directory according to original directory entry information(Including whole chapters and sections catalogues), but often,
People can adjust catalogue according to the reading habit of oneself, then obtaining operation of the user to the original directory according to step 121
Information updates directory entry information, generates target directory
Step 121 is the step of generating new target directory after user is according to oneself needing to adjust original directory.That
For the different adjustment operations of user, specific steps are again different.Sometimes some otiose mesh are had in original directory
Record item is added, so the operation that user often has is to delete extra unwanted directory entry, at this moment, as shown in figure 4,
Step 121 includes:
Step 1211, in the delete operation for detecting user, the directory entry chosen is deleted;
Step 1212, judge whether the item that deltrees has subdirectory item, if there is subdirectory item, by the item that deltrees
The father ID of all subdirectory items be revised as the father ID of the item that deltrees;
Step 1213, it deltrees next directory entry of item described in judgement and whether the item that deltrees is to close side by side
A brother of next directory entry of the item that deltrees ID is then revised as the item that deltrees by system if coordination
Brother ID.
It, will be by the chapters and sections catalogue entry deletion, then such as when detecting that user deletes the operation of " nature's mystery chapter 1 "
Judge whether the directory entry has subdirectory item, know as shown in Figure 3 the chapters and sections be no subdirectory item need not just carry out it is next
Step, if the chapters and sections are Section 1.1 there are subdirectory item hypothesis, then just needing Section 1.1 of parent directory item ID(Chapter 1
Directory entry ID)It is revised as the parent directory item ID of chapter 1.Finally also to judge the next directory entry and the catalogue of the directory entry
The relationship of item, next directory entry is " nature's mystery chapter 2 " and the directory entry is coordination, so just needing to change " nature's mystery second
The brother ID of chapter " is revised as the brother ID of the directory entry.Bibliographic structure as shown in Figure 5 is obtained after deleting extra directory entry, this
One operation purpose is in order to facilitate follow-up adjustment bibliographic structure, if certain user wants reservation all the elements and can not also carry out
This operation.
Step 1211, step 1212, step 1213 not only realizes the purpose for deleting the deletion item that user chooses, but also will
The information of other directory entries associated with item is deleted is modified, and ensure that the orderliness of the logical relation of whole catalogue is clear.
Sometimes, directory entry name modifications can be the content oneself being more familiar in order to which later stage lookup facilitates by user, work as user
Operation be change directory entry title when, step 121 further includes:
Step 1214, when detecting that user edits the operation of directory entry title, judge whether new directory item title is sky,
It is new directory item title by former directory entry name modifications if new directory item title is not sky;If the entitled sky of new directory item,
Retain former directory entry title.
Certainly, more often, user can also adjust to the sequence of positions of directory entry, at this point, as shown in fig. 6, step
Rapid 121 further include:
Step 1215, when detecting that user adjusts the operation of directory entry position, judge the parent directory item for adjusting directory entry
Whether change, if the variation of parent directory item and presence, new father ID is revised as to the directory entry ID of current parent directory item;If
Parent directory item changes but is not present, then new father ID is set as 0;
Step 1216, judge whether the brother's directory entry for adjusting catalogue changes, it, will if the variation of brother's directory entry and presence
New brother ID is revised as the directory entry ID of current brother's directory entry;If brother's directory entry changes but is not present, new brother ID is arranged
It is 0.
For example, as shown in fig. 7, by " highly skilled doctor's Liuxia's favour(Two)Chapter 1 " it is put into " highly skilled doctor's Liuxia's favour(One)Chapter 1 "
In subdirectory, user's adjustment " highly skilled doctor's Liuxia's favour is being detected(Two)When this operation of position chapter 1 ", the mesh will be judged
Whether the parent directory item of record item changes, and finds the parent directory item variation of the directory entry at this time and exists, is " highly skilled doctor's Liuxia's favour
(One)Chapter 1 ", then by highly skilled doctor's Liuxia's favour(Two)Chapter 1 " new father ID is revised as " highly skilled doctor's Liuxia's favour(One)Chapter 1 "
Directory entry ID, parent directory item changes but is not present sometimes certainly, then new father ID is set as 0.The directory entry is judged again
Brother's directory entry whether change, at this point, the variation of brother's directory entry but being not present, then new brother ID is set as 0, if brother's catalogue
New brother ID is then revised as the directory entry ID of current brother's directory entry by item variation and presence.
Likewise, step 1215, step 1216 by other and adjusts location entries while adjusting directory entry position
The information of associated directory entry is modified, and ensure that the orderliness of the logical relation of whole catalogue is clear.
In this way, just having obtained user-defined target directory, the demand that can be directed to individual subscriber goes to adjust, and has more
Specific aim and applicability.
Finally, according to step 13, the file data of the target directory is merged, generates file destination.User is most
What is obtained eventually is exactly the file destination.In embodiments of the present invention, destination file format physical container is as shown in figure 9, include
File header information:Vessel head, the information such as description copyright, version, old version quantity;File data area:Container contents, each file
The information such as format, version, file size;File directory information area:(Newly-generated)Each file in file directory information, file
Map information.Wherein file directory information area and file data area are likely to occur multiple in a vessel, are formed one group and are gone through
The Piece file mergence of history records.Such as file header description information list structure is as shown in table 1(Wherein packet is above-mentioned file destination
Similarly hereinafter):
1 file header description information list structure explanation of table
It should be understood that encryption and copyright protection can be added in extending information.
And file directory information plot structure is as shown in table 2:
2 file directory information plot structure explanation of table
It should be appreciated that:
(1)Directory entry can be the non-directory entry selected in e-book, that is, support virtual directory item(Corresponding catalogue source length
It is 0), whole catalogue is completed to facilitate;
(2)Same directory information area directory entry be it is unique, that is, be not present same directory area there are two or more catalogue
ID is identical, reports an error when present;
(3)Same directory entry is subject to and is finally occurred when multiple directory areas occur, but directory entry operation is locking
When, ignore subsequent same directory entry;
(4)It is 0 to allow directory information length, indicates that this packet without catalogue, occurs with electronic book documentary in File Mapping table
Sequentially, it is that fraternal catalogue at the same level shows by each e-book root.
Illustrated according to the structure of table 1 and table 2, as shown in figure 9, step 13 specifically includes:
Step 131, file destination header is generated, the header includes:Directory information area quantity and directory information area
Offset;
Step 132, judge whether each file needs to compress according to target directory sequence, if desired compress, then root
Compression is carried out according to specified compress mode and active data area tail portion is written into current file stream;If need not compress, directly
By current file stream write-in active data area tail portion;
Step 133, fileinfo is inserted into file information structure;
Step 134, catalogue data area data are generated according to the target directory information, is given birth to according to the file information structure
At File Mapping Data Area data, filling file directory information area;
Step 135, believed according to the directory information area quantity of file directory information area data modification File header information and catalogue
Cease area's offset.
In embodiments of the present invention, the file data of 131-135 completions target directory merges through the above steps, final
To file destination, such as continue above-mentioned example, obtains target mesh file as shown in Figure 10.The file destination includes according to mesh
Heading records tactic each file, has reached User Defined selection, sequence, has realized and wait being packaged according to what user selected
File generates a file destination with full directory, to facilitate the purpose of access.
The file for omitting selection sometimes during Piece file mergence occasionally wants to add new file it is necessary to merge
Increment is changed in good file, and the structure tail portions shown in original Fig. 8 increase new file data area and file directory information area;
Next directory information area offset of the last one original directory information block is directed toward to the starting in this newly-increased directory information area
Position.
In conclusion the Piece file mergence method of the embodiment of the present invention, system cannot be generated by solving existing file merging
The problem of whole catalogue, is more convenient the access of user.
In order to preferably reach above-mentioned purpose, the embodiment of the present invention additionally provides a kind of file packing processing unit, such as schemes
Shown in 11, including:
Original directory generation module 1, for after detecting the file to be combined that user has selected, extraction to be described to be combined
The directory entry information of file generates original directory;
Target directory generation module 2 is compiled again for obtaining user to the operation information of the operation of the original directory/not
Directory entry information is collected, target directory is generated;
File destination generation module 3 is merged for the file data to the target directory, generates file destination.
Wherein, the target directory generation module includes:
First object catalogue generates submodule, and the operation information for obtaining user to the original directory updates
Directory entry information generates target directory;
Second target directory generates submodule, for obtaining not operation information of the user to the original directory, according to original
The directory entry information of beginning directly generates target directory.
Wherein, the directory entry information includes:Directory entry ID, directory entry title, father ID, brother ID.
Wherein, the first object catalogue generation submodule includes:
Deleting unit, in the delete operation for detecting user, deleting the directory entry chosen;
First processing units, if there is subdirectory item, are deleted for judging whether the item that deltrees has subdirectory item by described
Except the father ID of all subdirectory items of directory entry is revised as the father ID of the item that deltrees;
Second processing unit, for judge next directory entry of the item that deltrees with it is described deltree item whether be
A brother of next directory entry of the item that deltrees ID is then revised as the deletion mesh by coordination if coordination
The brother ID for recording item.
Wherein, the first object catalogue generation submodule further includes:
Third processing unit, for when detecting that user edits the operation of directory entry title, judging new directory item title
Whether it is empty, is new directory item title by former directory entry name modifications if new directory item title is not sky;If new directory key name
It is referred to as empty, then retain former directory entry title.
Wherein, the first object catalogue generation submodule further includes:
Fourth processing unit adjusts directory entry for when detecting that user adjusts the operation of directory entry position, judging
Whether parent directory item changes, if the variation of parent directory item and presence, new father ID is revised as to the mesh of current parent directory item
Record item ID;If parent directory item changes but is not present, new father ID is set as 0;
5th processing unit, for judge adjust catalogue brother's directory entry whether change, if brother's directory entry variation and
In the presence of new brother ID to be then revised as to the directory entry ID of current brother's directory entry;If brother's directory entry changes but is not present, by new brother
Item ID is set as 0.
Wherein, the file destination generation module includes:
File destination header generation unit, for generating file destination header, the header includes:Directory information
Area's quantity and directory information area offset;
File stream writing unit, for judging whether each file needs to compress according to target directory sequence, if needing
It compresses, then compression is carried out according to specified compress mode and active data area tail portion is written into current file stream;If not needing
Compression, then directly by current file stream write-in active data area tail portion;
File information structure inserts unit, for fileinfo to be inserted file information structure;
File directory information area inserts unit, for generating catalogue data area data, root according to the target directory information
File Mapping Data Area data, filling file directory information area are generated according to the file information structure;
File header information changes unit, for the directory information according to file directory information area data modification File header information
Area's quantity and directory information area offset.
The Piece file mergence device of the embodiment of the present invention also can generate the whole catalogue of a system according to the demand of user,
Facilitate the access of user.
It should be noted that the device is the device for including above-mentioned Piece file mergence method, the realization side of Piece file mergence method
Formula can also reach identical technique effect suitable for the embodiment of the device.
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art
For, without departing from the principles of the present invention, it can also make several improvements and retouch, these improvements and modifications
It should be regarded as protection scope of the present invention.
Claims (12)
1. a kind of Piece file mergence method, which is characterized in that include the following steps:
After detecting the file to be combined that user has selected, the directory entry information of the file to be combined is extracted, is generated original
Catalogue;
User is obtained to the operation information of the operation of the original directory/not, directory entry information is updated, generates target directory;
The file data of the target directory is merged, file destination is generated;Wherein,
The file data of the target directory is merged, generate file destination the step of include:
File destination header is generated, the header includes:Directory information area quantity and directory information area offset;
Judge whether each file needs to compress according to target directory sequence, if desired compresses, then according to specified compression
Mode carries out compression and active data area tail portion is written in current file stream;If need not compress, directly by current file stream
Active data area tail portion is written;
Fileinfo is inserted into file information structure;
Catalogue data area data are generated according to the information of the target directory, File Mapping is generated according to the file information structure
Data Area data, filling file directory information area;
According to the directory information area quantity of file directory information area data modification File header information and directory information area offset.
2. Piece file mergence method according to claim 1, which is characterized in that obtain behaviour of the user to the original directory
The step of making/not operation information, updating directory entry information, generate target directory include:
Operation information of the user to the original directory is obtained, directory entry information is updated, generates target directory;Or
User is obtained to the not operation information of the original directory, target directory is directly generated according to original directory entry information.
3. Piece file mergence method according to claim 2, which is characterized in that the directory entry information includes:Directory entry ID,
Directory entry title, father ID, brother ID.
4. Piece file mergence method according to claim 2 or 3, which is characterized in that obtain user to the original directory
Operation information, updates directory entry information, and the step of generating target directory includes:
In the delete operation for detecting user, the directory entry chosen is deleted;
Whether the judgement item that deltrees has subdirectory item, if there is subdirectory item, by all subdirectories of the item that deltrees
The father ID of item is revised as the father ID of the item that deltrees;
It deltrees next directory entry of item described in judgement and whether the item that deltrees is coordination, closed if arranged side by side
A brother of next directory entry of the item that deltrees ID is then revised as the brother ID of the item that deltrees by system.
5. Piece file mergence method according to claim 2 or 3, which is characterized in that obtain user to the original directory
Operation information, updates directory entry information, and the step of generating target directory further includes:
When detecting that user edits the operation of directory entry title, judge whether new directory item title is empty, if new directory key name
It is not referred to as empty, then is new directory item title by former directory entry name modifications;If the entitled sky of new directory item, retains former directory entry
Title.
6. Piece file mergence method according to claim 2 or 3, which is characterized in that obtain user to the original directory
Operation information, updates directory entry information, and the step of generating target directory further includes:
When detecting that user adjusts the operation of directory entry position, judge whether the parent directory item for adjusting directory entry changes,
If parent directory item changes and exists, new father ID is revised as to the directory entry ID of current parent directory item;If parent directory item changes
But it is not present, then new father ID is set as 0;
Judge whether the brother's directory entry for adjusting catalogue changes, if the variation of brother's directory entry and presence, new brother ID is changed
For the directory entry ID of current brother's directory entry;If brother's directory entry changes but is not present, new brother ID is set as 0.
7. a kind of Piece file mergence device, which is characterized in that including:
Original directory generation module, for after detecting the file to be combined that user has selected, extracting the file to be combined
Directory entry information, generate original directory;
Target directory generation module updates catalogue for obtaining user to the operation information of the operation of the original directory/not
Item information, generates target directory;
File destination generation module is merged for the file data to the target directory, generates file destination;Wherein,
The file destination generation module includes:
File destination header generation unit, for generating file destination header, the header includes:Directory information area number
Amount and directory information area offset;
If desired file stream writing unit is pressed for judging whether each file needs to compress according to target directory sequence
Contracting then carries out compression according to specified compress mode and active data area tail portion is written in current file stream;If need not compress,
Then directly by current file stream write-in active data area tail portion;
File information structure inserts unit, for fileinfo to be inserted file information structure;
File directory information area inserts unit, for generating catalogue data area data according to the information of the target directory, according to
The file information structure generates File Mapping Data Area data, filling file directory information area;
File header information changes unit, for the directory information area number according to file directory information area data modification File header information
Amount and directory information area offset.
8. Piece file mergence device according to claim 7, which is characterized in that the target directory generation module includes:
First object catalogue generates submodule, and the operation information for obtaining user to the original directory updates catalogue
Item information, generates target directory;
Second target directory generates submodule, for obtaining not operation information of the user to the original directory, according to original
Directory entry information directly generates target directory.
9. Piece file mergence device according to claim 8, which is characterized in that the directory entry information includes:Directory entry ID,
Directory entry title, father ID, brother ID.
10. Piece file mergence device according to claim 8 or claim 9, which is characterized in that the first object catalogue generates submodule
Block includes:
Deleting unit, in the delete operation for detecting user, deleting the directory entry chosen;
First processing units, for judging whether the item that deltrees has subdirectory item, if there is subdirectory item, by the deletion mesh
The father ID for recording all subdirectory items of item is revised as the father ID of the item that deltrees;
Second processing unit described deltrees next directory entry of item and whether the item that deltrees is arranged side by side for judging
A brother of next directory entry of the item that deltrees ID is then revised as the item that deltrees by relationship if coordination
Brother ID.
11. Piece file mergence device according to claim 8 or claim 9, which is characterized in that the first object catalogue generates submodule
Block further includes:
Third processing unit, for whether when detecting that user edits the operation of directory entry title, judging new directory item title
It is new directory item title by former directory entry name modifications if new directory item title is not sky for sky;If new directory item is entitled
Sky then retains former directory entry title.
12. Piece file mergence device according to claim 8 or claim 9, which is characterized in that the first object catalogue generates submodule
Block further includes:
Fourth processing unit, for when detecting that user adjusts the operation of directory entry position, judging father's mesh of adjustment directory entry
Whether record item changes, if the variation of parent directory item and presence, new father ID is revised as to the directory entry of current parent directory item
ID;If parent directory item changes but is not present, new father ID is set as 0;
5th processing unit, for judging whether the brother's directory entry for adjusting catalogue changes, if the variation of brother's directory entry and presence,
New brother ID is then revised as to the directory entry ID of current brother's directory entry;If brother's directory entry changes but is not present, by new brother ID
It is set as 0.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410102521.8A CN104933062B (en) | 2014-03-19 | 2014-03-19 | A kind of Piece file mergence method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410102521.8A CN104933062B (en) | 2014-03-19 | 2014-03-19 | A kind of Piece file mergence method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104933062A CN104933062A (en) | 2015-09-23 |
CN104933062B true CN104933062B (en) | 2018-09-04 |
Family
ID=54120230
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410102521.8A Active CN104933062B (en) | 2014-03-19 | 2014-03-19 | A kind of Piece file mergence method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104933062B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106066874B (en) * | 2016-05-27 | 2019-11-12 | 腾讯科技(深圳)有限公司 | Object processing method and terminal |
CN107622067B (en) * | 2016-07-13 | 2020-11-20 | 杭州海康威视数字技术股份有限公司 | Method and device for storing, reading and displaying multiple multimedia files |
CN109683744B (en) * | 2018-12-24 | 2022-05-13 | 杭州达现科技有限公司 | Display interface-based directory integration method and device |
CN116016553B (en) * | 2023-03-27 | 2023-08-11 | 天津联想协同科技有限公司 | File sharing method and device based on network disk, network disk and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008063800A2 (en) * | 2006-11-02 | 2008-05-29 | Microsoft Corporation | Virtual deletion in merged file system directories |
CN102508880A (en) * | 2011-10-18 | 2012-06-20 | 广东威创视讯科技股份有限公司 | Method for joining files and method for splitting files |
CN103034642A (en) * | 2011-09-30 | 2013-04-10 | 高德软件有限公司 | Data file generating method, application program, data downloading system and data downloading method |
CN103150402A (en) * | 2013-03-27 | 2013-06-12 | 网宿科技股份有限公司 | Index-code-based virtual file system, establishment method and access method |
CN103390005A (en) * | 2012-05-11 | 2013-11-13 | 北大方正集团有限公司 | Method and system for merging documents |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7873683B2 (en) * | 2005-07-01 | 2011-01-18 | Qnx Software Systems Gmbh & Co. Kg | File system having transaction record coalescing |
-
2014
- 2014-03-19 CN CN201410102521.8A patent/CN104933062B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008063800A2 (en) * | 2006-11-02 | 2008-05-29 | Microsoft Corporation | Virtual deletion in merged file system directories |
CN103034642A (en) * | 2011-09-30 | 2013-04-10 | 高德软件有限公司 | Data file generating method, application program, data downloading system and data downloading method |
CN102508880A (en) * | 2011-10-18 | 2012-06-20 | 广东威创视讯科技股份有限公司 | Method for joining files and method for splitting files |
CN103390005A (en) * | 2012-05-11 | 2013-11-13 | 北大方正集团有限公司 | Method and system for merging documents |
CN103150402A (en) * | 2013-03-27 | 2013-06-12 | 网宿科技股份有限公司 | Index-code-based virtual file system, establishment method and access method |
Also Published As
Publication number | Publication date |
---|---|
CN104933062A (en) | 2015-09-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104933062B (en) | A kind of Piece file mergence method and device | |
CN106469158B (en) | Method of data synchronization and device | |
US20070244935A1 (en) | Method, system, and computer-readable medium to provide version management of documents in a file management system | |
US20060294468A1 (en) | Storage and utilization of slide presentation slides | |
AU2007202768B2 (en) | Document processing device, program, and document processing method | |
US20060294046A1 (en) | Storage and utilization of slide presentation slides | |
CN103873719B (en) | Document processing device, image processing apparatus and document processing method | |
Turner | Selective and intelligent imaging using digital evidence bags | |
US20150106683A1 (en) | Case data visualization application | |
CN103037005B (en) | The file synchronisation method of online storage service and device | |
KR101690587B1 (en) | Method, device, program, and recording medium for updating data in an electronic document | |
CN102227728A (en) | Device and method for filtering file system | |
CN113239004B (en) | Method and device for synchronizing notes | |
US10255233B2 (en) | System and method for organizing, retrieving and displaying information using HTML indices | |
CN106326035A (en) | File-metadata-based incremental backup method | |
CN104331342B (en) | The matched method of file path and its device | |
US20150324414A1 (en) | Information processing device and information processing method | |
CN101833559B (en) | Method and device for reading FAT ( disk files | |
CN105760244B (en) | It is a kind of based on the assumption that the exFAT of verification formats restoration methods and device | |
CN105446951B (en) | Space of a whole page generation method and device | |
CN106663050A (en) | Differential Data Creating System, Data Updating System, And Differential Data Creating Method | |
CN105630969A (en) | File display method and device and electronic equipment | |
CN105718496A (en) | cross-platform file attribute synchronization method and computer readable storage medium | |
US9009107B2 (en) | Object-sharing system, method and non-transitory computer readable storage medium for storing the method for maintaining hierarchical naming contexts in object sharing system | |
JP2003167761A (en) | Information processor |
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 |