CN101527152A - Method for realizing editable CD file data - Google Patents
Method for realizing editable CD file data Download PDFInfo
- Publication number
- CN101527152A CN101527152A CN200810065537A CN200810065537A CN101527152A CN 101527152 A CN101527152 A CN 101527152A CN 200810065537 A CN200810065537 A CN 200810065537A CN 200810065537 A CN200810065537 A CN 200810065537A CN 101527152 A CN101527152 A CN 101527152A
- Authority
- CN
- China
- Prior art keywords
- file
- data
- flow process
- editable
- implementation method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for realizing editable CD file data. A process of writing file data comprises the following steps: 11) according to file pointers, the length of new file data needing to be written, as well as the length of original file data, figuring out covering relation between new data and original data; 12) according to the covering relation, determining used space of a CD; 13) modifying old data by use of new data, or directly writing the new data into the CD; and 14) modifying the corresponding file pointers. Due to the proposal, the method can directly modify, replace, cover, add and delete the file data on the CD, and no longer needs to record a whole file again in order to modify only a small part of the data of one file. Therefore, the method has the advantages of greatly improving the efficiency of editing CD data, saving a large amount of processing time and space overhead and reducing use cost.
Description
[technical field]
The present invention relates to a kind of data processing method, particularly a kind of implementation method of optical file data edition.
[background technology]
At present, the CD burning on the ultrasonic diagnostic equipment, the file system specification that is burnt on the CD has two kinds: one, the file system of employing ISO 9660 standards, for example, the CD of the IU22 product imprinting of Philip company.Its two, adopt the UDF file system, for example, CD burning software Nero7.0.
Present main flow imprinting scheme, the file data that is burnt on the CD can not be revised again, the data of certain file on the CD are wrong to be wanted to revise in case discovery is burnt to, perhaps want in certain file, to append, delete, when revising data, all data that will be burnt on the CD are all wiped, then with all imprintings one time again of all data; Adopt the mode of appending imprinting, the new file on the hard disk is burnt on the CD.So just make the use of CD very inconvenient,, cause the process complexity, increased the time and the space expense of processing procedure, operate also very inconvenient because need prepare and organize the file data of imprinting again.
[summary of the invention]
Fundamental purpose of the present invention is: the editable implementation method of optical file data that a kind of highly-efficient treatment, saving expense are provided.
For achieving the above object, the present invention proposes the editable implementation method of a kind of optical file data, the editable implementation method of a kind of optical file data, the flow process that writes file data comprises the steps: 11) length of the new file data that writes according to file pointer, needs and the length of original file data, calculate the covering relation between new data and the legacy data; 12), determine the CD usage space according to this covering relation; 13) revise legacy data or directly new data is write CD with new data; 14) revise corresponding file pointer.
The above-mentioned editable implementation method of optical file data, but write on the rewritable discs in the flow process of file data, in described step 12), according to described covering relation, use has been had living space or has been applied for the space again, and adjusts the address designator AD among the file identifier descriptor FE.
The above-mentioned editable implementation method of optical file data, the detailed process of described step 12) comprises: according to this covering relation, determining has living space fails to hold when descending new data, finds untapped space from allocation of space bitmap descriptor SBD.
The above-mentioned editable implementation method of optical file data, the detailed process of described step 13) comprises: as determine between the new legacy data covering is arranged, the legacy data that then will need to revise reads out from CD, revises legacy data according to covering relation, and data are write CD; As determine between the new legacy data covering is not arranged, then directly new data is write CD.
The above-mentioned editable implementation method of optical file data, on the write-once CD, write in the flow process of file data, after described step 13), before the step 14), also comprise step:, adjust the address designator AD among the file identifier descriptor FE according to the actual address that writes data.Also comprise the close file flow process: the file handle that provides according to the user finds the file of opening, if found the file of opening of handle correspondence, when determining to the write-once CD, then file identifier descriptor FE is updated on the CD, and upgrades appropriate address item among the virtual allocation table VAT according to the actual address that writes data.
The above-mentioned editable implementation method of optical file data also comprises the read data flow process; This read data flow process comprises the steps: the length of the data that length and the needs according to file pointer, file data read, and calculates the length and the sevtor address of the data that can actually read; Read out file data from CD, and the revised file pointer; Return the data and the actual data length that reads that read.
The above-mentioned editable implementation method of optical file data also comprises the close file flow process; In this close file flow process, file identifier descriptor FE is updated on the CD.Described close file flow process comprises the steps: to find the file of opening according to the file handle that the user provides, if found the file of opening of handle correspondence, but when determining to rewritable discs, then FE is updated on the CD.
The above-mentioned editable implementation method of optical file data also comprises the reorientation flow process of file pointer; The reorientation flow process of this document pointer comprises the steps: to find according to the file handle that the user provides the file of opening of handle correspondence, according to the length of the side-play amount of using setting, drift marker, file data, the position of calculating new file pointer.During the file pointer reorientation, use the side-play amount that is provided with and adopt one of following three kinds of modes: side-play amount is a benchmark with the file starting position; Side-play amount is a benchmark with the file pointer current location; Side-play amount is a benchmark with end of file position.
The above-mentioned editable implementation method of optical file data also comprises the flow process that opens file; In this opens file flow process, when having the file that need open on the CD, from CD, file identifier descriptor FE is read out, therefrom obtain the length of the data of file, the stored position information of file data.In this opens file flow process, when not having the file that need open on the CD, and use to be provided with and create sign, then create a file identifier descriptor FE, the file data length of this moment is 0, does not have file data on the CD.
Because adopted above scheme, method of the present invention can directly revise replacements, cover, append and delete the file data on the CD, no longer need be just to the sub-fraction of a file data of modification, and the whole file of imprinting again; Therefore, the present invention significantly improves for the data of optical disk editorial efficiency, saves a large amount of processing times and space expense, and use cost reduces.
Method of the present invention, but at rewritable discs and write-once CD, can realize that all data write efficiently, the process simple and fast.
Use method of the present invention when the data management of ultrasonic diagnostic equipment,, comprise increasing patient, deletion patient or revising certain patient's information because can directly revise the patient data's library file on the CD; The time overhead and the complicated operation degree of data carving have been reduced; The data management of ultrasonic diagnostic equipment is more convenient, has saved the unnecessary imprinting time, improves the service efficiency of diasonograph.Use method of the present invention, the data that imprinting is come out on ultrasonic diagnostic equipment can be used on the ultrasonic diagnostic equipment of the present invention at other and make amendment, and have made things convenient for the data sharing between the ultrasonic diagnostic equipment.
[description of drawings]
Fig. 1 is the process flow diagram that opens file of the embodiment of the invention;
Fig. 2 is the write data process flow diagram of the embodiment of the invention;
Fig. 3 is the read data flow process figure of the embodiment of the invention;
Fig. 4 is the close file process flow diagram of the embodiment of the invention;
Fig. 5 is the revised file pointer process flow diagram of the embodiment of the invention.
[embodiment]
Also the present invention is described in further detail in conjunction with the accompanying drawings below by specific embodiment.
In present embodiment of the present invention, following method is adopted in editable realization to the optical file data:
One, opens file
Can use following sign when opening file:
● CREATE: create sign.If there is not establishment in file, create a new file.
● TRUNCATION: empty the file data sign.Empty original file data.
● APPEND: append sign.In the back of legacy data supplemental data.
● READ ONLY: open file with read-only mode.
● WRITE ONLY: open file with a WriteMode.
● READ AND WRITE: open file with read-write mode.
If open file successfully, application can obtain a handle, and by this handle, application can be operated this file of opening.Open file flow process as shown in Figure 1.
The descriptor of the definition of the UDF file system that relates among the figure has:
FE (File Entry, file entries), the file in the directory tree or the node of catalogue.AD (Allocation Descriptor distributes descriptor) is arranged, the address that is used to preserve file data or catalogue data among the FE.File data and catalogue data can be stored in discontinuous a plurality of storage block, and each storage block has an AD to be used to preserve its address in FE.
FID (File Identifier Descriptor, file identifier descriptor) is included in the catalogue data, has wherein preserved File Name (filename) or Directory Name (directory name).All preserved an address among each FID, the sub-directory (Sub Directory) in the sensing catalogue or the FE of file.
SBD (Space Bitmap Descriptor, allocation of space bitmap descriptor), the allocation of space situation that is used for the identification document system, during allocation space, need at first from SBD, to obtain untapped space, then with the space identification that distributes for using, during Free up Memory, corresponding position among the SBD need be changed to use.Only but the UDF file system on rewritable discs needs this descriptor.
VAT (Virtual Allocation Table, virtual allocation table) be used for the write-once CD, but the UDF file system on the rewritable discs does not need this descriptor.Preserve LBA (Logical Block Addressing) in this descriptor, be used for the conversion from the virtual address to the LBA (Logical Block Addressing).
If on CD, there is the file that need open, so at first the FE of file is read out from the CD, from FE, just can obtain the length of the data of file, the information such as memory location of file data.If there is not the file that need open on CD, and uses to be provided with and create sign, so, at first create a FE, the file data length of this moment is 0, and does not have file data on the CD.
Two, write file data
The flow process that writes file data as shown in Figure 2, but different for the processing of rewritable discs and write-once CD.
But on rewritable discs, the length of the new file data that writes according to file pointer, needs, the length of original file data, calculate the covering relation between new data and the legacy data,, just can determine whether to apply for the space again according to this covering relation.If determine existing insufficient space to hold new data down, need apply for the space again, so, just from SBD, find untapped space, and adjust the AD among the FE; Can hold new data down if determining has living space, then directly adjust the AD among the FE; If new legacy data does not have covering relation, then directly new data is write CD; If between the new legacy data covering is arranged, the legacy data that then will need to revise reads out from CD, according to covering relation, revises legacy data, and data are write CD; At last corresponding file pointer is made amendment.
But different with the flow process on the rewritable discs in the flow process on the write-once CD is not need to apply for the space from SBD, but directly begin to write data into CD from next one write address.If new legacy data does not have covering relation, then directly new data is write CD; If between the new legacy data covering is arranged, the legacy data that then will need to revise reads out from CD, according to covering relation, revises legacy data, and data are write CD; Adjust the AD among the FE then; At last corresponding file pointer is made amendment.
Three, read file data
The flow process that reads file data as shown in Figure 3, at first need the length according to file pointer, file data, the length of data that needs read, calculate the length and the sevtor address of the data that can actually read, read out file data from CD then, and the value of updating file pointer, return the data and the actual data length that reads that read at last.
Four, file closes
During close file, the FE of file need be updated on the CD, its flow process as shown in Figure 4.The file handle that provides according to the user finds the file of opening, if found the file of opening of handle correspondence, but when determining to rewritable discs, then FE is updated on the CD; If the write-once CD then is updated to FE on the CD, and according to appropriate address item among the actual address renewal VAT that writes data.
Five, the reorientation of file pointer
The reorientation of file pointer as shown in Figure 5, the file handle that provides according to the user is if found the file of opening of handle correspondence, then according to the length of using the side-play amount that is provided with, drift marker, file data, the position of calculating new file pointer.During the file pointer reorientation, application can be used following three kinds of modes:
● side-play amount is a benchmark with the file starting position.
● side-play amount is a benchmark with the file pointer current location.
● side-play amount is a benchmark with end of file position.
Use this interface of file pointer reorientation, application can be set to file pointer the optional position of file, reading and writing of files data then.So just can reach the purpose of revising and reading the optional position file data.
Above content be in conjunction with concrete preferred implementation to further describing that the present invention did, can not assert that concrete enforcement of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can also make some simple deduction or replace, all should be considered as belonging to protection scope of the present invention.
Claims (13)
1. editable implementation method of optical file data, the flow process that writes file data comprises the steps: 11) length of the new file data that writes according to file pointer, needs and the length of original file data, calculate the covering relation between new data and the legacy data; 12), determine the CD usage space according to this covering relation; 13) revise legacy data or directly new data is write CD with new data; 14) revise corresponding file pointer.
2. the editable implementation method of optical file data as claimed in claim 1, it is characterized in that: but on rewritable discs, write in the flow process of file data, in described step 12), according to described covering relation, use has been had living space or has been applied for the space again, and adjusts the address designator AD among the file identifier descriptor FE.
3. the editable implementation method of optical file data as claimed in claim 2, it is characterized in that: the detailed process of described step 12) comprises: according to this covering relation, determining has living space fails to hold when descending new data, finds untapped space from allocation of space bitmap descriptor SBD.
4. the editable implementation method of optical file data as claimed in claim 2, it is characterized in that: the detailed process of described step 13) comprises: as determine between the new legacy data covering is arranged, the legacy data that then will need to revise reads out from CD, revise legacy data according to covering relation, data are write CD; As determine between the new legacy data covering is not arranged, then directly new data is write CD.
5. the editable implementation method of optical file data as claimed in claim 1 or 2, it is characterized in that: on the write-once CD, write in the flow process of file data, after described step 13), before the step 14), also comprise step:, adjust the address designator AD among the file identifier descriptor FE according to the actual address that writes data.
6. as the editable implementation method of each described optical file data among the claim 1-4, it is characterized in that: also comprise the read data flow process; This read data flow process comprises the steps: the length of the data that length and the needs according to file pointer, file data read, and calculates the length and the sevtor address of the data that can actually read; Read out file data from CD, and the revised file pointer; Return the data and the actual data length that reads that read.
7. as the editable implementation method of each described optical file data among the claim 1-4, it is characterized in that: also comprise the close file flow process; In this close file flow process, file identifier descriptor FE is updated on the CD.
8. as the editable implementation method of each described optical file data among the claim 1-4, it is characterized in that: the reorientation flow process that also comprises file pointer; The reorientation flow process of this document pointer comprises the steps: to find according to the file handle that the user provides the file of opening of handle correspondence, according to the length of the side-play amount of using setting, drift marker, file data, the position of calculating new file pointer.
9. as the editable implementation method of each described optical file data among the claim 1-4, it is characterized in that: also comprise the flow process that opens file; In this opens file flow process, when having the file that need open on the CD, from CD, file identifier descriptor FE is read out, therefrom obtain the length of the data of file, the stored position information of file data.
10. as the editable implementation method of each described optical file data among the claim 1-4, it is characterized in that: also comprise the flow process that opens file; In this opens file flow process, when not having the file that need open on the CD, and use to be provided with and create sign, then create a file identifier descriptor FE, the file data length of this moment is 0, does not have file data on the CD.
11. the editable implementation method of optical file data as claimed in claim 5, it is characterized in that: also comprise the close file flow process: the file handle that provides according to the user finds the file of opening, if found the file of opening of handle correspondence, when determining to the write-once CD, then file identifier descriptor FE is updated on the CD, and upgrades appropriate address item among the virtual allocation table VAT according to the actual address that writes data.
12. the editable implementation method of optical file data as claimed in claim 7, it is characterized in that: described close file flow process comprises the steps: to find the file of opening according to the file handle that the user provides, if found the file of opening of handle correspondence, but when determining, then FE is updated on the CD to rewritable discs.
13. the editable implementation method of optical file data as claimed in claim 8 is characterized in that: during the file pointer reorientation, use the side-play amount that is provided with and adopt one of following three kinds of modes: side-play amount is a benchmark with the file starting position; Side-play amount is a benchmark with the file pointer current location; Side-play amount is a benchmark with end of file position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810065537A CN101527152A (en) | 2008-03-06 | 2008-03-06 | Method for realizing editable CD file data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810065537A CN101527152A (en) | 2008-03-06 | 2008-03-06 | Method for realizing editable CD file data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101527152A true CN101527152A (en) | 2009-09-09 |
Family
ID=41094982
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200810065537A Pending CN101527152A (en) | 2008-03-06 | 2008-03-06 | Method for realizing editable CD file data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101527152A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109684289A (en) * | 2018-11-05 | 2019-04-26 | 北京盛和大地数据科技有限公司 | The method and device of file process and imprinting |
CN113823331A (en) * | 2021-10-12 | 2021-12-21 | 成都统信软件技术有限公司 | Optical disc additional recording method and device and computing equipment |
-
2008
- 2008-03-06 CN CN200810065537A patent/CN101527152A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109684289A (en) * | 2018-11-05 | 2019-04-26 | 北京盛和大地数据科技有限公司 | The method and device of file process and imprinting |
CN109684289B (en) * | 2018-11-05 | 2024-05-14 | 北京盛和大地数据科技有限公司 | File processing and burning method and device |
CN113823331A (en) * | 2021-10-12 | 2021-12-21 | 成都统信软件技术有限公司 | Optical disc additional recording method and device and computing equipment |
CN113823331B (en) * | 2021-10-12 | 2023-02-28 | 成都统信软件技术有限公司 | Optical disc additional recording method and device and computing equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4388078B2 (en) | Method for generating symbolic link maintaining compatibility with file system, method and apparatus for accessing file / directory using symbolic link | |
CN101027651B (en) | FAT analysis for optimized sequential cluster management | |
CA2047696C (en) | Method of reading and writing files on non-erasable storage media | |
US7610434B2 (en) | File recording apparatus | |
US7631022B2 (en) | Information processing apparatus and recording medium | |
JP4076078B2 (en) | File management method | |
US7334099B2 (en) | Method and system for managing image files | |
CN100507919C (en) | FAT file system and its processing method | |
US20060212495A1 (en) | Method and system for storing data into a database | |
US7350049B1 (en) | Method and apparatus for managing access to a file allocation table | |
KR100938077B1 (en) | Extensible file format | |
CN104065906A (en) | Video recording method and device of digital video recording equipment | |
CN108089821A (en) | A kind of method of micro controller data storage management | |
CN102609492B (en) | Metadata management method supporting variable table modes | |
CN110297781B (en) | Method for recovering deleted data in APFS (advanced File System) based on copy-on-write | |
CN117473117A (en) | Video cyclic storage method, system and computer | |
JP4221959B2 (en) | Bridge file system, computer system, data management method and recording medium using bridge file system | |
CN101303667A (en) | Method and device for establishing magnetic disk null cluster table and seeking magnetic disk null cluster | |
US7548927B2 (en) | Abstracted metadata policy component and related architecture | |
CN103257928B (en) | Flash memory device data managing method and system | |
CN101527152A (en) | Method for realizing editable CD file data | |
KR102094786B1 (en) | File system and method of storing files based on the file system | |
CN102708107A (en) | Method and system for storing appended files | |
CN109918346A (en) | A kind of creation method and device of file | |
CN106202119A (en) | SNB e-book storage organization and wiring method thereof and read method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20090909 |