Summary of the invention
The invention provides a kind of download breaker point continuous transmission method and device, can realize download breakpoint transmission, strengthened terminal and user's interaction capabilities.
For achieving the above object, the present invention adopts following technical scheme:
First aspect, provides a kind of download breaker point continuous transmission method, and described method comprises:
The download path that obtains the file of pre-recovery download, described download path carries general unique identifier UUID, the partition holding of the movable storage device of the described file of described UUID sign storage;
Determine whether to exist the described UUID of carry;
If determine and have the described UUID of carry, obtain the information of the mount point that described UUID is corresponding;
According to the information of described mount point, continue to download described file to described partition holding.
In the possible implementation of first aspect the first, in conjunction with first aspect, described in determine whether to exist the described UUID of carry specifically to comprise:
Search the UUID of carry and the mapping relations between mount point;
If comprise described UUID in the UUID of described carry, determine and have the described UUID of carry;
If described definite existence is the described UUID of carry, the information of obtaining the mount point that described UUID is corresponding specifically comprises:
If determine and have the described UUID of carry, according to described mapping relations, the information that the information of the mount point that described in obtaining, the described UUID of carry is corresponding is described mount point.
In the possible implementation of first aspect the second, in conjunction with the possible implementation of first aspect the first, described according to the information of described mount point, continue to download described file to described partition holding and specifically comprise:
Described download path is replaced with to described mount point path;
By described mount point path, download described file to described partition holding.
In the third possible implementation of first aspect, in conjunction with the possible implementation of first aspect the second, by described mount point path, downloading described file to before described partition holding, described method also comprises:
Check whether store described file, and whether described file meets pre-conditioned;
If store described file, and described file meets described pre-conditionedly, by described mount point path, downloads described file to described partition holding.
In the 4th kind of possible implementation of first aspect, in conjunction with the possible implementation of first aspect the first, to the third possible implementation of first aspect, before the described download path that obtains the file that pre-recovery downloads, described method also comprises:
Obtain the mapping relations of described UUID and described mount point, wherein, described mapping relations are when described movable storage device interventional instrument, and the format of described movable storage device, after generating described UUID, by described equipment, described UUID carry to described mount point is set up afterwards.
Second aspect, provides a kind of download breakpoint transmission device, comprises acquiring unit, determining unit, download unit;
Described acquiring unit, for obtaining the download path of the file of pre-recovery download, described download path carries general unique identifier UUID, the partition holding of the movable storage device of the described file of described UUID sign storage;
Described determining unit, for determining whether to exist the described UUID of carry;
Described acquiring unit, if also determine and have the described UUID of carry for described determining unit, obtains the information of the mount point that described UUID is corresponding;
Described download unit, for according to the information of described mount point, continues to download described file to described partition holding.
In the possible implementation of second aspect the first, in conjunction with second aspect, described determining unit specifically for:
Search the UUID of carry and the mapping relations between mount point;
If comprise described UUID in the UUID of described carry, determine and have the described UUID of carry;
Described acquiring unit specifically for:
If determine and have the described UUID of carry, according to described mapping relations, the information that the information of the mount point that described in obtaining, the described UUID of carry is corresponding is described mount point.
In the possible implementation of second aspect the second, in conjunction with the possible implementation of second aspect the first, described download unit specifically for:
Described download path is replaced with to described mount point path;
By described mount point path, download described file to described partition holding.
In the third possible implementation of second aspect, in conjunction with the possible implementation of second aspect the second, also comprise inspection unit;
Described inspection unit, for downloading described file by described mount point path at described download unit to before described partition holding, check whether store described file, and whether described file meets pre-conditioned;
If store described file, and described file meets described pre-conditionedly, and described download unit is downloaded described file to described partition holding by described mount point path.
In the 4th kind of possible implementation of second aspect, in conjunction with the possible implementation of second aspect the first to the third possible implementation of second aspect, described acquiring unit also for:
Obtain the mapping relations of described UUID and described mount point, wherein, described mapping relations are when described movable storage device interventional instrument, and the format of described movable storage device, after generating described UUID, by described equipment, described UUID carry to described mount point is set up afterwards.
A kind of download breaker point continuous transmission method provided by the invention and device, method comprises: obtain the download path of the file of pre-recovery download, download path carries UUID, the partition holding of the movable storage device of this UUID sign storage file; Determine whether to exist the UUID of carry; If determine and have the UUID of carry, obtain the information of the mount point that UUID is corresponding; According to the information of mount point, continue download file to partition holding.By a kind of download breaker point continuous transmission method provided by the invention and device, because carry UUID in the download path of the file that the pre-recovery that download breakpoint transmission device obtains is downloaded, the partition holding of the movable storage device of the file that this this pre-recovery of UUID sign storage is downloaded, by UUID, distinguish different movable storage devices, therefore the file that recovers in advance to download can be downloaded on correct movable storage device, realize and download breakpoint transmission, strengthened terminal and user's interaction capabilities.
Embodiment
A kind of download breaker point continuous transmission method and the device that the embodiment of the present invention are provided below in conjunction with accompanying drawing are described in detail.
Embodiment mono-,
The embodiment of the present invention provides a kind of download breaker point continuous transmission method, and specifically as shown in Figure 1, the method comprises:
101, download the download path that breakpoint transmission device obtains the file of pre-recovery download, wherein, this download path carries general unique identification code (Universally Unique Identifier, UUID), the partition holding of the movable storage device of this UUID sign storage file.
Concrete, when movable storage device first interventional instrument carry out data while downloading, when this movable storage device of format, can generate the UUID that this movable storage device is corresponding, the partition holding of this this movable storage device of UUID unique identification.Vold(is used for the state of mobile memory and relevant information to collect and report the program on upper strata in Android system, by C Plus Plus, realized) as the software module in equipment, after receiving the equipment insertion event of movable storage device driving transmission, can provide function to obtain UUID by system, and the partition holding in movable storage device is mounted under a certain particular path.Wherein, equipment may be intelligent television, computer, may be also the download equipments such as Ipad, and the embodiment of the present invention is not done concrete restriction to this, and movable storage device may be USB flash disk.May be portable hard drive etc., the embodiment of the present invention not be done concrete restriction yet to this yet.
User, interrupt after data download, if want, continue to recover to download, now, user needs this movable storage device to be again connected with equipment, first download breakpoint transmission device in equipment obtains the download path of the file of pre-recovery download, this download path carries UUID, the partition holding of the movable storage device of the file that the pre-recovery of this UUID sign storage is downloaded.
102, download breakpoint transmission device and determine whether to exist the UUID that download path of carry carries.
Concrete, after user obtains the download path of the file that pre-recovery downloads, the UUID that download path of carry carries will be determined whether to exist, may be to obtain one by one next UUID and the mount point information of carry by MountService, if download, check that the next UUID that UUID of carry has carried with download file mates, there is the UUID that download path of carry carries, otherwise continue traversal next UUID and the mount point information of carry, until all traversal finishes, the UUID that the UUID carrying with download file if do not exist mates, there is not the UUID that download path of carry carries.Said process can be summarized as follows:
Search the UUID of carry and the mapping relations between mount point;
If comprise the UUID that download path carries in the UUID of carry, determine and have the UUID that download path of carry carries.
If determine and have the UUID that download path of carry carries, execution step 103;
It should be noted that, when determining whether to exist the UUID that download path of carry has carried, if determine, do not have the UUID that download path of carry carries, return and can not download, downloading process finishes.
If 103 determine and to have the UUID that download path of carry carries, download the information that breakpoint transmission device obtains the mount point that this UUID is corresponding.
Concrete, after there is if determine the UUID that download path of carry has carried, downloading breakpoint transmission device may be according to the UUID of the carry obtaining and the mapping relations between mount point, obtains the information of the mount point that UUID that download path of carry has carried is corresponding as the information of mount point corresponding to this UUID.
It should be noted that, the carry in the embodiment of the present invention refers to an equipment (normally memory device) is articulated in an already present catalogue, and this already present catalogue is called mount point.
104, download breakpoint transmission device according to the information of mount point, continue download file to partition holding.
Concrete, download breakpoint transmission device after obtaining mount point information, according to the information of mount point, continue download file to partition holding and specifically can comprise:
Download path is replaced with to mount point path;
Partition holding by mount point path download file to movable storage device.
Exemplary, when determining whether to exist the UUID of carry, if download, check that the UUID of next carry and UUID in mount point information are consistent with the UUID that carries of downloading, UUID is replaced to corresponding mount point path and download concrete path partly to obtain to have completed.Such as:
<UUID>:/abc/1.txt=GreatT.Grea T.GT/mnt/usb/sda1/abc/1.txt, wherein ,/mnt/usb/sda1/ is mount point path.
Description based on above-described embodiment, the embodiment of the present invention provides a kind of download breaker point continuous transmission method, comprising: obtain the download path of the file of pre-recovery download, download path carries UUID, the partition holding of the movable storage device of this UUID sign storage file; Determine whether to exist the UUID of carry; If determine and have the UUID of carry, obtain the information of the mount point that UUID is corresponding; According to the information of mount point, continue download file to partition holding.Pass through said method, because carry UUID in the download path of the file that the pre-recovery that download breakpoint transmission device obtains is downloaded, the partition holding of the movable storage device of the file that this this pre-recovery of UUID sign storage is downloaded, by UUID, distinguish different movable storage devices, therefore the file that recovers in advance to download can be downloaded on correct movable storage device, realize and download breakpoint transmission, strengthened terminal and user's interaction capabilities.
Embodiment bis-,
The embodiment of the present invention provides a kind of download breaker point continuous transmission method, and specifically as shown in Figure 2, the method comprises:
201, download the download path that breakpoint transmission device obtains the file of pre-recovery download, wherein, this download path carries UUID, the partition holding of the movable storage device of this UUID sign storage file.
Concrete, when movable storage device first interventional instrument carry out data while downloading, when this movable storage device of format, can generate the UUID that this movable storage device is corresponding, the partition holding of this this movable storage device of UUID unique identification.Vold, as the software module in equipment, after receiving the equipment insertion event of movable storage device driving transmission, can provide function to obtain UUID by system, and the partition holding in movable storage device is mounted under particular path.Wherein, equipment may be intelligent television, computer, may be also the download equipments such as Ipad, and the embodiment of the present invention is not specifically limited this, and movable storage device may be USB flash disk.May be portable hard drive etc., the embodiment of the present invention not be done concrete restriction yet to this yet.
User, interrupt after data download, if want, continue to recover to download, now, user needs this movable storage device to be again connected with equipment, first download breakpoint transmission device in equipment obtains the download path of the file of pre-recovery download, this download path carries UUID, the partition holding of the movable storage device of the file that the pre-recovery of this UUID sign storage is downloaded.
202, download breakpoint transmission device and search the UUID of carry and the mapping relations between mount point.
If 203 have comprised the UUID that download path carries in the UUID of carry, download breakpoint transmission device and determine and have the UUID that download path of carry carries.
Concrete, the description of integrating step 202, downloading breakpoint transmission device may be to obtain one by one next UUID and the mount point information of carry by MountService, if download, check that the next UUID that UUID of carry has carried with download file mates, there is the UUID that download path of carry carries, otherwise continue traversal next UUID and the mount point information of carry, until all traversal finishes,, there is not the UUID that download path of carry carries in the UUID that the UUID carrying with download file if do not exist mates.
204, download breakpoint transmission device according to mapping relations, the information of obtaining the mount point that UUID that download path of carry has carried is corresponding is the information of the mount point that the UUID that carries of download path is corresponding.
Concrete, download breakpoint transmission device after determining and having the UUID that download path of carry has carried, will be according to mapping relations, the information of obtaining the mount point that UUID that download path of carry has carried is corresponding is the information of the mount point that the UUID that carries of download path is corresponding.
Exemplary, as shown in Table 1, suppose to exist the mapping relations shown in table one, if carry the UUID carrying in path, be C, mount point is c.
Table one
The UUID of carry |
Mount point |
A |
a |
B |
b |
C |
c |
D |
d |
205, download breakpoint transmission device download path is replaced with to mount point path.
Exemplary, can replace as follows:
<UUID>:/abc/1.txt=GreatT.Grea T.GT/mnt/usb/sda1/abc/1.txt, wherein ,/mnt/usb/sda1/ is mount point path.
206, download breakpoint transmission device and whether check storage file, and whether file meets pre-conditioned.
Concrete, after interrupting download, in the process that continues to download, may there is the non-existent situation of former download file, now in order to guarantee mounted mass under file, when actual download, download breakpoint transmission device and whether also check storage file, and whether file meets pre-conditioned.
It should be noted that, pre-conditioned may be download progress whether between 0-100%, may be also whether download time overtime etc., this is pre-conditioned is to set in advance in downloading breakpoint transmission device, the embodiment of the present invention is not done concrete restriction to this.
If 207 storage files, and file meet pre-conditioned, download breakpoint transmission device by mount point path download file the partition holding to movable storage device.
Concrete, at definite storage file, and file meets in pre-conditioned situation, downloads breakpoint transmission device and will pass through mount point path download file to the partition holding of movable storage device.
Further, before the download path of file that obtains pre-recovery download, also comprise:
Obtain the mapping relations of UUID and mount point, wherein, these mapping relations are when movable storage device interventional instrument, and movable storage device format, after generating UUID, by equipment, UUID carry are set up to mount point.
By setting up this mapping relations, can determine the information of the mount point that UUID is corresponding.
Description based on above-described embodiment, the embodiment of the present invention provides a kind of download breaker point continuous transmission method, comprising: obtain the download path of the file of pre-recovery download, download path carries UUID, the partition holding of the movable storage device of this UUID sign storage file; Determine whether to exist the UUID of carry; If determine and have the UUID of carry, obtain the information of the mount point that UUID is corresponding; According to the information of mount point, continue download file to partition holding.Pass through said method, because carry UUID in the download path of the file that the pre-recovery that download breakpoint transmission device obtains is downloaded, the partition holding of the movable storage device of the file that this this pre-recovery of UUID sign storage is downloaded, by UUID, distinguish different movable storage devices, therefore the file that recovers in advance to download can be downloaded on correct movable storage device, realize and download breakpoint transmission, strengthened terminal and user's interaction capabilities.
Embodiment tri-,
The embodiment of the present invention provides a kind of download breakpoint transmission device 300, specifically as shown in Figure 3, comprises acquiring unit 301, determining unit 302, download unit 303.
Acquiring unit 301, for obtaining the download path of the file of pre-recovery download, download path carries general unique identifier UUID, the partition holding of the movable storage device of UUID sign storage file.
Determining unit 302, for determining whether to exist the UUID of carry.
Acquiring unit 301, if also determine and have the UUID of carry for determining unit 302, obtains the information of the mount point that UUID is corresponding.
Download unit 303, for according to the information of mount point, continues download file to partition holding.
Further, determining unit 302 specifically for:
Search the UUID of carry and the mapping relations between mount point;
If comprise UUID in the UUID of carry, determine and have the UUID of carry;
Acquiring unit 301 specifically for:
If determine, there is the UUID of carry, according to mapping relations, the information that the information of obtaining the mount point that the UUID of carry is corresponding is mount point.
Further, download unit 303 specifically for:
Download path is replaced with to mount point path;
By mount point path download file to partition holding.
Further, as shown in Figure 4, download breakpoint transmission device 300 and also comprise inspection unit 304.
Inspection unit 304, at download unit 303 by mount point path download file to before partition holding, whether check storage file, and whether file meets pre-conditioned.
If storage file, and file meet pre-conditioned, download unit 303 by mount point path download file to partition holding.
Further, acquiring unit 301 also for:
Obtain the mapping relations of UUID and mount point, wherein, mapping relations are when movable storage device interventional instrument, and movable storage device format, after generating UUID, by equipment, UUID carry are set up to mount point.
Concrete, by downloading breakpoint transmission device, downloading the method for breakpoint transmission can reference example one and the description of embodiment bis-, and the embodiment of the present invention does not repeat them here.
Description based on above-described embodiment, the embodiment of the present invention provides a kind of download breakpoint transmission device, comprise: acquiring unit obtains the download path of the file of pre-recovery download, and download path carries UUID the partition holding of the movable storage device of UUID sign storage file; Determining unit determines whether to exist the UUID of carry; If determining unit is determined, have the UUID of carry, acquiring unit obtains the information of the mount point that UUID is corresponding; Download unit, according to the information of mount point, continues download file to partition holding.Because carry UUID in the download path of the file that the pre-recovery that the download breakpoint transmission device that the embodiment of the present invention provides obtains is downloaded, the partition holding of the movable storage device of the file that this this pre-recovery of UUID sign storage is downloaded, by UUID, distinguish different movable storage devices, therefore the file that recovers in advance to download can be downloaded on correct movable storage device, realize and download breakpoint transmission, strengthened terminal and user's interaction capabilities.
Those skilled in the art can be well understood to, for convenience and simplicity of description, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the internal structure that is about to device is divided into different functional modules, to complete all or part of function described above.The specific works process of the device of foregoing description, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that disclosed apparatus and method can realize by another way.For example, device embodiment described above is only schematic.Another point, shown or discussed coupling each other or direct-coupling can be by some interfaces, the indirect coupling of device can be electrically, machinery or other form.
Unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be a physical location or a plurality of physical location, can be positioned at a place, or also can be distributed to a plurality of different local.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and also can adopt the form of SFU software functional unit to realize.
If the form of SFU software functional unit of usining integrated unit realizes and during as production marketing independently or use, can be stored in a read/write memory medium.Understanding based on such, the all or part of of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this software product is stored in a storage medium, comprise that some instructions are with so that an equipment (can be single-chip microcomputer, chip etc.) or processor (processor) are carried out all or part of step of each embodiment method of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CDs.
Above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.