[utility model content]
The purpose of this utility model is to address the above problem, and by the file data that breaks suddenly in the transmission course is carried out breakpoint transmission, realizes the preservation of original file from the data of breakpoint.
Concrete technical scheme is as follows:
A kind of movable storage device of breakpoint transmission, comprise with external unit and carry out the interface of data interaction, the controller that is connected with interface, the storer that is connected with controller, reach and the controller microprocessor linked, also comprise the breakpoint transmission module that is connected with microprocessor, and the detection module that is used to detect the file situation that is connected with microprocessor.
Described breakpoint transmission module is connected with controller, and the breakpoint transmission module increases the flowing water sign for the data of transmission, described flowing water be designated at regular intervals add sign in the file data in order to.
The storage mode that described storer is taked is a sequential storage.
Described detection module carried out scan operation to the legacy data memory block before carrying out data transmission, and scanning result was reported to the microprocessing unit of movable storage device.
Whether described scanning result is for existing same file name and/or finish sign.
Described storer is flash memory or hard disk.
Described flash memory is a NAND type flash memory.
Described movable storage device is portable hard drive, digital recording pen, audio/video player, personal digital assistant.
Owing to used this technical scheme, under the situation that movable storage device transmission data procedures is broken suddenly, also can continue transmission to the file data after breaking, guarantee the transmission security and the integrality of data, and satisfied user's preservation requirement to data under the transmission data cases.
In order further to understand feature of the present utility model and technology contents, describe below in conjunction with specific embodiment of the utility model and accompanying drawing.But the drawings and Examples of lifting not are in order to the utility model is limited.
[embodiment]
As shown in Figure 1, being first embodiment of the present utility model, in the present embodiment, is to be example with the portable hard drive.Portable hard drive comprise with external electronic device (external electronic device can be computing machine) storer that carries out the USB interface of data interaction, the controller that is connected with interface, be connected (described storer take storage mode be sequential storage) with controller and with controller microprocessor linked (MPU), also comprise, the breakpoint transmission module that is connected with microprocessor (MPU), and the detection module that is used to detect the file situation that is connected with microprocessor (MPU).Wherein, the breakpoint transmission module increases the flowing water sign for the data of transmission, and described flowing water is designated at regular intervals (for example, every interval is 1 second) and adds sign in the file data of positive transmission in chronological order to.Described detection module carried out scan operation to the legacy data memory block before data transmission, and scanning result was reported to the microprocessing unit of movable storage device.Whether described scanning result is for existing same file name and/or finish sign.
As shown in Figure 2, still be example for second embodiment of the present utility model with the portable hard drive.Be that with the first embodiment difference breakpoint transmission module directly is not connected with controller.Structure is particularly: carry out the USB interface of data transmission with external unit, the controller that is connected with USB interface, the storer that is connected with controller, with controller microprocessor linked (MPU), the breakpoint transmission module and the detection module that connect microprocessor (MPU), wherein, detection module also is connected with controller, be used for detecting the transmission data that enter portable hard drive by USB interface, before data transmission, scan operation is carried out in the legacy data memory block, and scanning result is reported to the microprocessing unit of movable storage device.Whether described scanning result is for existing same file name and/or finish sign.
The file data information of transmitting enters portable hard drive by the USB interface of the portable hard drive of connection, at this moment, detection module has detected data and will transmit, attribute definition in elder generation's scanning this document data is whether the data of filename have identical property file-name with the data that are stored in the storer, if have, then begin to carry out the breakpoint transmission operation,, then carry out normal storage operation if do not have.Here, we need guarantee that the storage order of portable hard drive carries out in chronological order, so just can guarantee that the operation of breakpoint transmission is carried out with time sequencing.In addition, the interpolation of flowing water sign has guaranteed contrast original and the data that will continue between the storage file too, guarantees to find the breakpoint on the original, transmits so that can begin the continuation of data from correct breakpoint.
As shown in Figure 3, the working condition after finishing portable hard drive and computing machine is connected below in conjunction with the detailed explanation the utility model system of embodiment.This system comprises an external unit computing machine, computing machine comprises processor (CPU) at least, storage unit, and the USB interface of carrying out data interaction with computing machine, the controller that is connected with USB interface, the storer that is connected with controller, and with controller microprocessor linked (MPU), described computing machine passes through the data USB interface to described portable hard drive transmitting data information, the microprocessor of described portable hard drive scans already present file data with same file name in the storer by the transmission of breakpoint transmission module and the instruction to comparing, and comparative result is fed back to the processor (CPU) of computing machine, the processor of computing machine (CPU) to the Data Detection in the storage unit of computing machine and determine the corresponding breakpoint location of former transfer files, and is finished file from the not transmission that this breakpoint location begins to be transmitted in again the already present same file name of storing the portable hard drive by detection module.Described breakpoint transmission module is connected with microprocessor, and the breakpoint transmission module increases the flowing water sign for the data of transmission, described flowing water be designated at regular intervals add sign in the file data in order to.Described detection module at computing machine with after portable hard drive is connected, request according to the microprocessor (MPU) of portable hard drive is carried out scan operation to the legacy data in the storage unit of computing machine, and determine the breakpoint location of original according to ordinal relation, be the starting point of restarting to transmit data with this breakpoint location.
Specifically, the file 1 in the Computer Storage unit need be copied in the portable hard drive, but interrupts suddenly in transmission course, is kept at the just part of file 1 in the portable hard drive storer.Be connected computing machine and duplicate this document 1 this moment with portable hard drive.Because in last once transmission course, the breakpoint transmission module in the portable hard drive has been added the flowing water sign in chronological order for the data of transmission,, just can find the flowing water sign of the express time of a corresponding this document like this in the place of the last once end of file.According to this flowing water sign that obtains, can original file 1 be compared by the detection module in the computer operating system, find corresponding breakpoint location in the original file 1, and begin to transmit from the data of this breakpoint location.
As shown in Figure 4, a kind of breakpoint continuous transmission method of portable hard drive is as follows:
1), portable hard drive is connected the line data transmission of going forward side by side with computing machine;
2), detect the file will carry out data transmission whether the file of same file name arranged in portable hard drive, if there is not the file of identical filename, then carry out step 5); If the file of identical filename is arranged, then carry out step 3),
3), judge whether the file of this already present same file name has the sign of finishing, if having the sign of finishing, then change to the file of a new filename and carry out step 5); If do not finish sign, then carry out step 4),
4), portable hard drive carries out the operation of breakpoint transmission;
5), portable hard drive is with the data add file name and the flowing water sign that are transmitted;
6), finish data transmission, and add the sign that finishes in file data end.
Described portable hard drive comprises the breakpoint transmission module that is connected with microprocessor in the portable hard drive, and the detection module that is used to detect the file situation that is connected with described microprocessor.Described storer is flash memory or the hard disk of storing in order.Described breakpoint transmission module is connected with controller, is used to the data of transmission to increase the flowing water sign.
In conjunction with shown in Figure 5, further may further comprise the steps in the step 4) of the above method:
4.1), find the position of flowing water sign N of maximum of the file of the same file name of having stored;
4.2), be transmitted file and compare, find the relevant position point that will transmit file;
4.3), begin to transmit data from the relevant position point that is transmitted file, and begin to add flowing water sign from N+1.
As shown in Figure 6, the breakpoint continuous transmission method of another kind of movable storage device, described movable storage device adopt flash memory as storer, and this this storer comprises flash memory parameter region and flash memory storage district, and movable storage device may further comprise the steps with after external unit is connected:
(1), portable hard drive is connected with computing machine;
(2), detect the flash memory parameter region of portable hard drive, whether have and be transmitted file and have same file name, if do not have, then store the operation of this document; If have, then
(3), further detect the flash memory parameter region, detect the whether correspondence sign that do not finish of this document, if do not have, then rename a new filename, and store this document corresponding address; If have, then
(4), carry out the operation of breakpoint transmission;
(5), finish the transmission data, in the flash memory parameter region deletion sign that do not finish.
Described step (2) if in do not have a same file name, the operation of then storing this document further comprises:
(2.1), store the file address of this document at the flash memory parameter region;
(2.2), in the position of the corresponding this document of flash memory parameter region, the sign that do not finish is added in storage;
(2.3), the corresponding data of location storage this document of corresponding this document address in the flash memory storage district.
The position of the described sign that do not finish is finished or carries out the zone that initialization operation defines for being provided with in movable storage device in advance.
As shown in Figure 7, described step (4) further may further comprise the steps:
(4.1), find the address location (A) of end of this document data of preservation in the memory block, address of flash memory parameter region;
(4.2), according to the address location of being found (A), search backward along time sequencing in relevant position, flash data district, know a last address location (B) that finds the address location of not storing data;
(4.3), the data that will be transmitted institute's corresponding stored between file and the location address (A) to (B) compare, and find the repetition (A) that will the transmit file correspondence position point (C) to the data of storage between (B);
(4.4), begin to transmit data, and at parameter region from relevant position point (C) that is transmitted file from (B+1) beginning address, memory location and corresponding storage area stores data.
In sum; for the person of ordinary skill of the art; can make other various corresponding changes and distortion according to the technical solution of the utility model and technical conceive, and all these changes and distortion all should belong to the protection domain of claim described in the utility model.