CN1113304C - Method for merging archives and method for opening or executing aggregated archives - Google Patents
Method for merging archives and method for opening or executing aggregated archives Download PDFInfo
- Publication number
- CN1113304C CN1113304C CN 98119623 CN98119623A CN1113304C CN 1113304 C CN1113304 C CN 1113304C CN 98119623 CN98119623 CN 98119623 CN 98119623 A CN98119623 A CN 98119623A CN 1113304 C CN1113304 C CN 1113304C
- Authority
- CN
- China
- Prior art keywords
- file
- original
- files
- merged
- collection
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000008569 process Effects 0.000 claims description 9
- 230000015572 biosynthetic process Effects 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000003786 synthesis reaction Methods 0.000 claims 1
- 230000009471 action Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000010276 construction Methods 0.000 description 2
- 239000000654 additive Substances 0.000 description 1
- 230000000996 additive effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method for merging files that can be read by a computer, which merges a plurality of files (hereinafter referred to as original files, i.e. files to be merged) into a file includes: a file header, for providing an index for executing or opening the original file: and the collection file of each original file, even if a plurality of file files are to be opened or executed, the file header opening action is only needed to be executed once, so that the related data of each original file can be obtained and further read by a computer, the stealing of the file files is prevented, and the speed of opening or executing the file files is improved.
Description
The present invention relates to a kind of method of merged file files, the particularly mode that merges by files further reaches the protection raw file and is not stolen or utilizes, and reaches conserve system resources, promotes the method for the execution speed of files.
The present general enormous amount all of the used files of computer software, and comprise huge bibliographic structure, generally speaking, software does not all have simple and effective safeguard measure to its files, files also are easy to obtained and utilize, for example recreation that includes 50 figure, and its circular files are easy to be obtained by the user, and transforming other purposes into, software creator's interests will be encroached on like this; Though the software that has has carried out encrypting (encryption) to the files of oneself, owing to all to carry out one time decrypting process when each files opened or carry out, thereby the execution efficient of software is had many influences.On the other hand; bibliographic structure is complicated more; then computing machine will be slow more in the speed of the unlatching of carrying out files or execution; along with the huge day by day trend of computer software; the bibliographic structure of software is also increasingly sophisticated; and files merging method provided by the present invention; then can make whole software only use files one or two; thereby simplified bibliographic structure greatly; in the execution speed that improves software; can prevent from again the stealing of files strengthened the protection to software creator interests.
Fundamental purpose of the present invention will solve aforesaid problem exactly, provides a kind of raw file that can prevent to be stolen, to improve the execution speed of software and merging method that can the conserve system resources files.
The method according to this invention is that a majority raw file is reconfigured is set files, and utilizes the method that index information is set at this set files start-up portion, reaches the purpose to the raw file protection.
The present invention is merged into set files with a plurality of raw files, and its formation includes: one in order to providing the index file head of carrying out or opening raw file, and a plurality of and multiple raw file; Wherein file header write down the raw file title, size of each merged raw file, with respect to the relative position of set archives reference position, even desire is opened or is carried out a plurality of raw files, also only need to carry out the action of a file opening head, just can obtain the related data of each raw file, further read for computing machine, not only prevent from also can improve the speed of opening or carrying out files to the stealing of raw file.
For realizing described purpose, the invention provides a kind of method that merges files, this method comprises the following steps:
A. select to be shown in the raw file that desire merges in the display by an input media;
B. read the relevant information of this raw file that a recording medium desire that is arranged in embodied on computer readable merges by a microprocessor (CPU);
C. be created as a file header and a file body according to the obtained relevant information of step b;
D. by this document head of microprocessor (CPU) with step c, and all this raw file of merging of desire is merged into set files; And
E. store aforesaid set files in the recording medium of embodied on computer readable, for example in Winchester disk drive, floppy drive, dribbling machine or the storer, in order to opening or carry out this raw file in these set archives.
Fig. 1 is to be method synoptic diagram of the present invention, shows the mode that a plurality of multiple raw files is merged into set files.
Fig. 2 is the formation table for file header.
Fig. 3 is the location diagram for each raw file in the set files.
Fig. 4 is to be process flow diagram of the present invention, shows the flow process that merges files.
Fig. 5 is to be local process flow diagram of the present invention, shows the flow process of opening the set files.
Fig. 6 is to be hardware construction calcspar of the present invention.
Fig. 7 A, 7B is the comparison diagram for method of the present invention and classic method.
With reference to Fig. 1; the method according to this invention; for files are carried out high efficiency management; and the protection raw file is not obtained arbitrarily or is utilized; all raw files are merged; make it become big set files, and merged raw file can have a plurality of and comprise multiple different file type, for example: carry out archives (Exe), Graphic Documentation file (Bmp), voice files (Wav).
Merge the set files of finishing, its composition includes:
One file header; And
Each merged raw file.
File header mainly is the index (index) of carrying out or opening merged raw file in order to provide.
As shown in Figure 2, the content of file header includes at least:
1. file mark (Tutorial), it is guide to visitors as the set files, wherein record the relevant information of these set files, for example: the sign of these set files, synthetic date, version sequence number etc., whether can be used as these files of differentiation is the relevant information of set files;
2. the raw file sum that is comprised in the set files;
3. merged raw file is arranged in the relative position (OP:opposite position) of the section start of set files with respect to set files starting position; For example: the starting position of set files is (OP0), then with respect to the relative position (OP1) of (OP0), is the reference position that first merged raw file is arranged in the set files.And the position of each raw file relation in the set files, with reference to shown in Figure 3.
4. the title of merged each raw file:
5. the store path of merged each raw file; And
6. the size of merged each raw file.
Consult Fig. 3,4,5, be to be process flow diagram of the present invention and hardware construction calcspar; For example, have following 4 raw files to be stored in the recording medium e of embodied on computer readable: for example under Winchester disk drive, floppy drive, dribbling machine or the user data of storer (userData) catalogue:
Raw file title size (byte)
e:\userDate\a1.bmp 40
e:\userDate\a2.bmp 20
e:\userDate\dat\b1.dat 10
e:\userDate\dat\b2.dat 50
The method according to this invention merges the step of a plurality of files, as shown in Figure 4, includes:
A. by an input media, for example selections such as mouse, numerical digit plate, light pen, keyboard are shown in the raw file that desire merges in the display;
B. read the recording medium that is positioned at embodied on computer readable by a microprocessor (CPU), the relevant information of the raw file that desire merges in Winchester disk drive, floppy drive, dribbling machine or the storer for example, for example: the title of merged each raw file, the store path of merged each raw file; And the size of merged each raw file;
C. be created as a file header and a file body according to the obtained relevant information of step (b);
D. by the file header of microprocessor (CPU) with step (c), and whole merged raw file is merged into set files; And
E. store aforesaid set files in the recording medium of embodied on computer readable, for example in Winchester disk drive, floppy drive, dribbling machine or the storer, in order to opening or carry out the files in the set archives.
Step wherein (c) also includes:
(c1). set up the file header of set files, in order to the index of carrying out or opening merged raw file to be provided, the content of this file header comprises:
1. file mark (Tutorial);
2. the raw file sum that is comprised in the set files;
3. relative position (OP);
4. the title of merged each raw file;
5. the store path of merged each raw file; And
6. the size of merged each raw file;
(c2). set merged raw file section start, with respect to the relative position (OP) of set files starting position;
At the alleged relative position of step (c2), be in order to when opening or carrying out merged raw file, the real reference position that finds raw file that can be quick and correct must be very simple and find out the method for the actual position of raw file, just is unlikely the speed that influences program; And the mode of actual position of decision raw file has a lot, below enumerates wherein feasible several:
(1) relative position of raw file (OP) points to the actual position of raw file exactly, need not carry out any reduction or conversion;
(2) actual position of raw file is exactly that relative position (OP) adds a constant (C; Constant); For example, " actual position "=(OP-C), and this constant can be arbitrary integer;
(3) actual position of raw file is exactly that relative position (OP) adds a parameter (V; And this parameter V can be the archives sequence number of raw file in file header Variable); For example: " actual position "=(OP+V);
At the alleged relative position of the present invention (OP), be to be the relative position of merged raw file with respect to set files starting position; And first kind of embodiment of the method according to this invention determined by microprocessor than a relative position (OP), therefore can be any relative position, or represent the actual position value at raw file place.
(c3). according to the relative position (OP) of step (c2), store the actual position of merged raw file in the set files, become a files body.
Merge the set files of finishing, shown in its table composed as follows:
| Size | Relative position | Definition | ||
| Com.dat.... | The distinguishing mark of set files | File header | ||
| 4 | The sum that comprises raw file | |||
| e: | 40 | 0 | The information of raw file one | |
| e: | 20 | 40 | The information of raw file two | |
| e:userDatadatb1.dat | 10 | 60 | The information of raw file three | |
| e:userDaradatb2.dat | 50 | 70 | The information of raw file four | |
| Xxxxx | The content of A1.bmp | The case shelves | ||
| Yyyyy | The content of A2.bmp | |||
| Zzzzz | The content of B1.bmp | |||
| Aaaaa | The content of B2.bmp |
The method according to this invention, when opening or carrying out a certain set files, as shown in Figure 5, its step includes:
1. utilize a microprocessor (CPU) 30 to read the recording medium 40 that is positioned at embodied on computer readable, for example the data of the file header of the set files in Winchester disk drive, floppy drive, dribbling machine or the storer;
2. the file header data in the storing step 1 is in the recording medium 40 of an embodied on computer readable, for example Winchester disk drive, floppy drive, dribbling machine or storer, become a concordance list, in order to the index of inquiring about merged raw file or reading merged raw file to be provided;
When real work, be to find the set files by microprocessor (CPU) 30, be stored in the recording medium 40 of an embodied on computer readable in then the files head being read in, for example Winchester disk drive, floppy drive, dribbling machine or storer, be created as a concordance list, be used for retrieval and quick location, opening or carry out each sub-raw file for application program gets ready, certainly, this action of setting up concordance list also can be carried out when the raw file of a certain appointment is opened or carried out in specific requirement again.
3. according to the raw file relative position that is write down in the file header, point to the true reference position of this raw file that is selected, and read the raw file that is selected; For example: the raw file a2.bmp that read is the content from 20 bytes (byte) of relative position 40 beginnings, at first navigate to the relative position of raw file, know that from index raw file is 40 parts from relative position, so just can read the content of 20 bytes on request.
4. close raw file; And
5. close the set files by microprocessor (CPU) 30, or stop to carry out this set files, and the described recording medium 40 that is stored in an embodied on computer readable of deletion abovementioned steps (2), the concordance list in Winchester disk drive, floppy drive, dribbling machine or the storer for example is to treat unlatching and execution next time.
And step wherein (3) also includes following steps:
Step 31 judges that whether obtained raw file type is execution archives, if then carry out step 33, if not, then carries out next step;
Corresponding application software is called out and carried out to step 32 according to obtained raw file type, by microprocessor (CPU) 30;
The raw file that is selected is opened or read to step 33 by this microprocessor (CPU) 30.
Step 4 wherein also includes following steps:
Step 41 obtains the handle (handle) of the raw file of desiring to close;
Step 42 judges whether raw file also is being used, if, then will be stored in access times record value corresponding in the handle and subtract 1, and carry out next step, if not, then carry out next step;
Here should note: be to be provided with the user mode of a sign among the raw file handle in order to the record raw file, if the access times record value that a certain in principle raw file just is being used then correspondence adds 1, in case this raw file does not re-use, just automatically the access times record value is subtracted 1, when the access times record value is 0, show that just this raw file no longer is used; And
Step 43 judges whether the access times record value of whole raw files in these set files is 0, if, then carry out step 5, if not, then do not process.
Aforesaid step 31 to step 33 as application program when opening a certain raw file, must obtain the related data of this raw file earlier, in order to judge that this raw file is one and carries out archives (Exe), Graphic Documentation file (Bmp), voice files (Wav), literal archives (Txt) ... Deng in the file type any one, and the present state of arbitrary raw file, for example whether this raw file just is used, or the number of times that uses, so that application program can be carried out corresponding application software or safeguards in the zone of an appointment or edit according to the file type of this raw file.
In the disclosed method of the present invention, the relative position of raw file (OP): be the starting position that is used for writing down in the set files of raw file after merging, therefore the calculating of relative position (OP) can have many kinds of diverse ways, except aforementioned by the method that microprocessor determined, also can specify by calculation mode, for example:
If the set raw file number that files comprised is n, then relative position (OP) can be a parameter (P; Parameter) with the file sequence number (Fn of raw file; File Number) value that multiplies each other, that is be: OP=(P * Fn);
In like manner, relative position (OP) can be the value that microprocessor (CPU) gets according to an arithmetic expression computing.
Certain aforesaid relative position (OP), it also can be the reference position relative position each other of merged each raw file, with most the raw files of storing continuously from beginning to end each other is example, because each merged raw file is end to end arrangement in regular turn, therefore for wantonly two raw files of storing continuously each other, the reference position of the latter's raw file is with respect to the relative position (OP) of the former raw file reference position, be exactly the initial relative position of the former raw file and the additive value of the former raw file size, can try to achieve the relative position (OP) of latter's raw file.
Therefore at different computing method, when reading the merging files, just can find raw file to be arranged in the actual location of set files with corresponding method.
By above embodiment explanation, in the time of can understanding the unlatching of the method according to this invention desire or carry out raw file, at first to open the set files of merging, then according to the index information that is comprised in the set files, point out the position of raw file in the set files, the action that it is opened or carries out then.
Therefore by Fig. 7 A, the comparison of 7B, can find method of the present invention and classic method are compared, utilize method desire unlatching of the present invention or carry out a plurality of raw files, also only need to carry out the action of a file opening head, just can obtain the related data of each raw file, further read for computing machine from file header, not only can prevent from also can improve the speed of opening or carrying out files to the stealing of raw file.In the process of whole application program operation, the set files are not always to be in open mode, only when choosing sub-raw file, just open the set files, when the sub-raw file of neither one was selected, system just closed the set files.Like this, if the selected unlatching of a plurality of sub-raw files is arranged simultaneously or when carrying out, efficient can improve.
In addition, with regard to another possible embodiments of method of the present invention, In the view of the user, whole set files are just as transparent, when user's desire is opened some raw files, the user does not also know that this raw file is general files, still a son file of gathering in the files.Whole set files when the user will open or carry out some raw files, at first will obtain a sign by manager by a manager administration, just can open or carry out raw file with this sign later on.With regard to the program of opening or carry out a certain raw file, manager can be sought all set files automatically, if can not find, again to the recording medium of embodied on computer readable, seek chosen raw file, return a sign then and utilize for the user.Certainly the manager at this indication can be a kind of instrument in order to unlatching set files, and it can be used when needed, or a kind of resident program module, to assist the user when needed in order to open the set files.Certainly this explanation only is to illustrate embodiments of the invention, is not in order to limit method of the present invention.
For the problem of above-mentioned existence, the present invention proposes the method that a kind of most raw files are merged into set files, its advantage is;
1. by raw file being reassembled into set files, and at set files start-up portion the method for index information is set, can reaches the effect to the raw file protection. Owing to be that multiple raw file is merged into set files, so can not obtain easily, utilize for others, and open or carry out a certain raw file by set files, the wish of inventing after the method for setting forth is opened merging, be as good as with the mode of general unlatching or execution files, need to not be encrypted and decipher for each sub-raw file, thereby improve execution efficient. In addition, merge the memory space that the set files of finishing can also reduce software.
2. what raw files no matter saving system resource open simultaneously, and operating system only need be distributed the resource of set files to software. Because can open or carry out all raw files after opening the set files, just do not distribute the primary system resource so do not need whenever to open a raw file, thereby saved system resource, on the other hand, in the time of can having a plurality of resources to share same raw file simultaneously, prior art will be opened repeatedly a raw file, and the present invention then only need to open once all the time, thereby greatly saved system resource, improved the execution efficient of software.
3. unlatching or execution speed to software have been accelerated. Because the bibliographic structure of raw file is more complicated, then searching and unlatching or the time of carrying out a raw file are just longer. The present invention has simplified bibliographic structure, make unlatching or execution to all raw files become the action of gathering files to, improved obviously the running speed of software, this is particularly evident in the slow storage medium performance of read or write speed, such as CD, floppy disk etc.
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 98119623 CN1113304C (en) | 1998-09-18 | 1998-09-18 | Method for merging archives and method for opening or executing aggregated archives |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 98119623 CN1113304C (en) | 1998-09-18 | 1998-09-18 | Method for merging archives and method for opening or executing aggregated archives |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1248749A CN1248749A (en) | 2000-03-29 |
| CN1113304C true CN1113304C (en) | 2003-07-02 |
Family
ID=5226417
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 98119623 Expired - Fee Related CN1113304C (en) | 1998-09-18 | 1998-09-18 | Method for merging archives and method for opening or executing aggregated archives |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1113304C (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100347705C (en) * | 2004-12-24 | 2007-11-07 | 北京中星微电子有限公司 | Method for file merge |
| WO2009097710A1 (en) * | 2008-02-01 | 2009-08-13 | Huawei Technologies Co., Ltd. | Method for organizing and retrieving files, module and system for organizing files and storage media thereof |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100419680C (en) * | 2004-12-21 | 2008-09-17 | 中兴通讯股份有限公司 | A method and device for compatible loading of equipment software in a distributed control system |
| US20060173884A1 (en) * | 2005-01-31 | 2006-08-03 | Mediatek Incorporation | Methods for merging files and related systems |
| US7231627B2 (en) * | 2005-05-10 | 2007-06-12 | Via Technologies, Inc. | Merging a hardware design language source file with a separate assertion file |
| CN101651678B (en) * | 2009-09-11 | 2012-07-25 | 北京锐安科技有限公司 | Method and system for dynamically merging files and respectively executing merged PE files in network |
| CN102279858B (en) * | 2010-06-12 | 2013-05-29 | 汉王科技股份有限公司 | Method and device for realizing plurilingual display on electronic display equipment |
| CN102194011A (en) * | 2011-06-17 | 2011-09-21 | 北京互信互通信息技术股份有限公司 | Multi-path video data read-write method |
| CN103034642A (en) * | 2011-09-30 | 2013-04-10 | 高德软件有限公司 | Data file generating method, application program, data downloading system and data downloading method |
| CN104077363B (en) * | 2014-06-10 | 2017-11-03 | 新浪网技术(中国)有限公司 | Mail server and its method for carrying out mail full-text search |
| CN104166810A (en) * | 2014-07-29 | 2014-11-26 | 苏州乐米信息科技有限公司 | Encryption method for mobile phone game software |
| CN106570134A (en) * | 2016-10-27 | 2017-04-19 | 西安合众思壮导航技术有限公司 | File organization method and apparatus |
| CN109101639B (en) * | 2018-08-21 | 2021-03-23 | 赛凡信息科技(厦门)有限公司 | An Aggregate Mode to Improve File System Performance |
-
1998
- 1998-09-18 CN CN 98119623 patent/CN1113304C/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100347705C (en) * | 2004-12-24 | 2007-11-07 | 北京中星微电子有限公司 | Method for file merge |
| WO2009097710A1 (en) * | 2008-02-01 | 2009-08-13 | Huawei Technologies Co., Ltd. | Method for organizing and retrieving files, module and system for organizing files and storage media thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1248749A (en) | 2000-03-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1113304C (en) | Method for merging archives and method for opening or executing aggregated archives | |
| Crauser et al. | A theoretical and experimental study on the construction of suffix arrays in external memory | |
| CN1292371C (en) | Inverted index storage method, inverted index mechanism and on-line updating method | |
| Deorowicz et al. | Disk-based k-mer counting on a PC | |
| CN1297898C (en) | Partition creating method and deleting method | |
| Graefe | Sort-merge-join: An idea whose time has (h) passed? | |
| CN1214325C (en) | Methods and apparatus for improving locality of reference through memory management | |
| US20090210445A1 (en) | Method and system for optimizing data access in a database using multi-class objects | |
| Seo et al. | IO workload characterization revisited: A data-mining approach | |
| Choudhuri et al. | Deterministic service guarantees for NAND flash using partial block cleaning | |
| CN101039278A (en) | Data management method and system | |
| Bruno et al. | A study on garbage collection algorithms for big data environments | |
| CN1833241A (en) | Annotate Number Objects | |
| CN101960442B (en) | Method and device for inputting/outputting data using virtual technology | |
| MX2010012866A (en) | COMPARISON OF HIERARCHICAL DATA. | |
| US20100191717A1 (en) | Optimization of query processing with top operations | |
| JP2007287147A (en) | Fast file attribute search | |
| CN1719422A (en) | Virtual access method of storage document data | |
| CN101063976A (en) | Method and equipment for fast deletion of physically clustered data | |
| CN1766845A (en) | Method for realizing high security and recoverable file system | |
| Mackenzie et al. | Early termination heuristics for score-at-a-time index traversal | |
| Yang et al. | Improving f2fs performance in mobile devices with adaptive reserved space based on traceback | |
| Park et al. | FAST: Flash-aware external sorting for mobile database systems | |
| Thonangi et al. | A practical concurrent index for solid-state drives | |
| CN1924816A (en) | Method and apparatus for improving speed of multi-core system accessing critical resources |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C06 | Publication | ||
| PB01 | Publication | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C17 | Cessation of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20030702 Termination date: 20100918 |