CN105450785B - File transmission method and device - Google Patents

File transmission method and device Download PDF

Info

Publication number
CN105450785B
CN105450785B CN201610050733.5A CN201610050733A CN105450785B CN 105450785 B CN105450785 B CN 105450785B CN 201610050733 A CN201610050733 A CN 201610050733A CN 105450785 B CN105450785 B CN 105450785B
Authority
CN
China
Prior art keywords
transmitted
file
subfile
subfiles
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610050733.5A
Other languages
Chinese (zh)
Other versions
CN105450785A (en
Inventor
孙昭全
周全
李晓峰
金鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Qingdao Hisense Electronics Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Qingdao Hisense Electronics Co Ltd filed Critical Qingdao Hisense Electronics Co Ltd
Priority to CN201610050733.5A priority Critical patent/CN105450785B/en
Publication of CN105450785A publication Critical patent/CN105450785A/en
Application granted granted Critical
Publication of CN105450785B publication Critical patent/CN105450785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The invention provides a file transmission method and a file transmission device, wherein after a file to be transmitted is acquired, the file to be transmitted is divided into at least one subfile, each subfile carries the same priority as the corresponding file to be transmitted, the subfiles are transmitted according to the sequence of the priority from high to low, if the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted subfile in the transmission process, the transmission process of the current file to be transmitted is suspended, and the transmitted subfiles in the current file to be transmitted are recorded; the subfiles are then transmitted in the new priority order. And after the sub-file with the higher priority is transmitted, recovering the original transmission process which is not transmitted completely. Even if the current file to be transmitted is very large, the transmission process of the file with higher priority can be responded in time, and the file to be transmitted can be recovered after the transmission of the file with higher priority is finished no matter how much the current file to be transmitted is transmitted, so that the increase of the total transmission time is avoided.

Description

File transmission method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a file transmission method and apparatus.
Background
The file transmission between two devices is performed, for example, one device sends a picture or a piece of advertisement video, or a piece of control information to the other device, and different files require different sending occasions, i.e., different priorities, and the transmission order is generally determined according to the sequence of the priorities from high to low.
When a file with higher priority than a currently transmitted file is found in the transmission process, the transmission sequence needs to be adjusted, and the common method is to transmit the file with higher priority after the currently transmitted file is transmitted, for example, the priority of the files 1 to 5 is arranged from high to low, and the files are transmitted according to the sequence, if a file 6 with higher priority than the file 3 needs to be transmitted when the file 3 is transmitted, the file 3 is transmitted according to the sequence of the file 6, the file 4 and the file 5 after all the files 3 are transmitted, so that the real-time response of the priority is not rapid enough, and particularly, when the currently transmitted file is too large, the file with higher priority cannot be processed in time. However, if the file being transmitted is simply abandoned to ensure the real-time response speed, and the file with higher priority is transmitted preferentially, the total transmission time will be increased, for example, the currently transmitted file X with the size of 10Mbytes has already transmitted 9Mbytes, at this time, the file Y with higher priority needs to be transmitted, and if the transmission process of the file Y is executed immediately, the file X still needs to be retransmitted after the transmission is completed, which is equivalent to the increase of the total transmission time.
Disclosure of Invention
The invention provides a file transmission method and a file transmission device, which aim to solve the problem that the total transmission time is not influenced under the condition of ensuring the real-time response speed of priority.
In order to solve the above problems, the invention discloses a file transmission method, which comprises the following steps:
acquiring at least one file to be transmitted;
splitting the file to be transmitted into at least one subfile, wherein each subfile carries the same priority as the corresponding file to be transmitted;
transmitting the subfiles according to the priority from high to low; if the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted file to be transmitted, suspending the transmission process of the currently transmitted file and recording the transmitted subfiles in the currently transmitted file; transmitting the subfiles according to the new priority order;
and when all the subfiles with higher priority than the current file to be transmitted are completely transmitted, continuously transmitting the subfiles which are not transmitted in the current file to be transmitted.
compared with the prior art, the invention has the following advantages:
After a file to be transmitted is obtained, the file to be transmitted is split into at least one subfile, each subfile carries the same priority as the corresponding file to be transmitted, the subfiles are transmitted in the sequence from high priority to low priority, if the priority of the newly obtained file to be transmitted is higher than that of the currently transmitted subfile in the transmission process, the transmission process of the current file to be transmitted is suspended, and the transmitted subfiles in the current file to be transmitted are recorded; and then, the subfiles are transmitted according to the new priority order, so that the files with higher priority can be selected in real time to be preferentially transmitted in the transmission process of the files. And after the transmission of the subfiles with higher priority is finished, the original transmission process which is not finished is recovered, namely, the original subfiles which are not transmitted in the current file to be transmitted are continuously transmitted. Compared with the prior art, the method and the device have the advantages that the transmission process of the file with higher priority can be responded in time even if the current file to be transmitted is very large, and the file can be recovered after the transmission of the file with higher priority is finished no matter how much the current file to be transmitted is transmitted, so that the increase of the total transmission time is avoided.
Drawings
FIG. 1 is a schematic diagram of a file transfer between two devices according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating steps of a file transmission method according to an embodiment of the present invention;
FIG. 3 is a diagram of a file to be transmitted with header information added thereto according to an embodiment of the present invention;
Fig. 4 is a schematic diagram of a file to be transmitted being split into N sub-files according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating steps of a file transfer method according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of a transmitting end of a file transfer apparatus according to another embodiment of the present invention;
fig. 7 is a schematic diagram of a receiving end structure of a file transmission apparatus according to another embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The invention relates to file transmission between two devices, and the device can be a device which can realize communication connection, such as a mobile phone, a personal computer, a television, a panel and the like, and can also be two modules in the device. As shown in fig. 1, which shows a schematic diagram of file transmission between two devices according to the present invention, a mark 11 describes a file transmission direction, wherein a real line segment represents transmission from a device a to a device B, a dotted line segment represents transmission from the device B to the device a, a mark 12 describes a device role determined according to the file transmission direction, when a file is transmitted from the device a to the device B, the device a serves as a transmitting end, and the device B serves as a receiving end; when a file is transmitted from device B to device a, device B acts as the sender and device a acts as the receiver. In practical applications, the device a or the device B may be a party that actively transmits a file, or a party that passively receives file data. In the following description, a device that transmits a file is also referred to as a transmitting side, and a device that receives a file is also referred to as a receiving side.
The first embodiment is as follows:
Referring to fig. 2, a file transmission method according to a first embodiment of the present invention is shown, where the method may specifically include the following steps:
step 201, at least one file to be transmitted is obtained.
In the embodiment of the invention, the file to be transmitted comprises characters, pictures, videos or control information. For each determined file, if the file is to be transmitted from the device a to the device B, the user sets the priority attribute of the file to be transmitted in advance before the file is transmitted, and therefore the invention proposes the concept of file header information, and the file header information is used to identify the relevant attributes of the file to be transmitted, including the size and the priority information of the file to be transmitted, so that the set priority can be notified to the splitting unit of the next layer (which will be described in detail below) through the file header information. Fig. 3 is a schematic diagram of adding file header information to a file to be transmitted. It can be seen that the data of the file to be transmitted remains unchanged, and only at the start position of the file to be transmitted, additional fields describing the size and priority of the file are attached, and information such as whether the file needs to be checked can be included.
Specifically, the priority can be set by presetting 1-P (P > 1) levels according to the actual requirements of the user, wherein the priority corresponding to 1 is set to be the highest, and the higher the numerical value is, the lower the priority is.
step 202, splitting the file to be transmitted into at least one subfile, wherein each subfile carries the same priority as the corresponding file to be transmitted.
In order to facilitate splitting, the maximum transmission size M of the subfiles is set, the maximum transmission size M is equivalent to one data unit, and for each file to be transmitted, the file is divided again based on the data unit. Each new data generated based on a data unit is called a subfile.
And assuming that the size of the file to be transmitted is K, rounding up the K/M to obtain the number N of the file to be transmitted divided into the subfiles. Specifically, if K can be evenly divided by M, then n = K/M; if K cannot be evenly divided by M, then n = K/M + 1, and the size of the last subfile is determined by the remainder of the entire file size to be transferred divided by the maximum transfer size of the subfile.
The value of the maximum transmission size M may be determined according to the actual performance of the platform, and in the actual operation process, the size of the file to be transmitted is combined with the influence of different values on the transmission speed, and in this embodiment, 1Mbytes is used, but is not limited to this, and values such as 64Kbytes, 256Kbytes, 512Kbytes, 2Mbytes and the like may also be used.
In order to enable each subfile to carry priority information, extra subfile header information is required to be attached to the subfile at this time, where the extra subfile header information includes an identifier of the corresponding to-be-transmitted file, the number of the subfiles, a sequence number of the subfile, and priority information of the subfile, and fig. 4 shows a schematic diagram of splitting the to-be-transmitted file into N subfiles. In the figure, the identifier of the file to be transmitted in the subfile header information of the subfile 1 is used to indicate which file to be transmitted the subfile 1 is split from. The number of the subfiles is used for representing the total number N of the transmission files divided into the subfiles, the sequence numbers of the subfiles are used for representing the number of the subfiles 1 in the sequence of the subfiles, and the priority information of the subfiles 1 inherits the priority of the files to be transmitted.
Step 203, transmitting the subfiles according to the sequence of the priority from high to low; if the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted file to be transmitted, suspending the transmission process of the currently transmitted file and recording the transmitted subfiles in the currently transmitted file; and transmits the subfiles in the new priority order.
For example, in step 201, 3 files D1, D2, D3 to be transmitted are obtained. The priority is in order from high to low: d2, D1, D3. In step 202, the file D1 to be transmitted is split into 2 sub-files Z11 and Z12, the file D2 to be transmitted is split into 2 sub-files Z21 and Z22, and the file D3 to be transmitted is split into 4 sub-files Z31, Z32, Z33 and Z34. Then, the subfiles are transmitted in order of priority from high to low, in the order: z21, Z22, Z11, Z12, Z31, Z32, Z33, Z34. The transmission process of the file to be transmitted is defined as the process of completely transmitting all the subfiles corresponding to the file to be transmitted, and for the file D3 to be transmitted, the transmission process of the file D3 to be transmitted is completed only by sending out the subfiles Z31, Z32, Z33 and Z34.
For the transmission process of a file to be transmitted, the subfiles corresponding to the transmission process can be transmitted according to the sequence of the subfiles, and can also be transmitted randomly. For example, the transmission process of the file D3 to be transmitted can be in the order of Z31, Z32, Z33 and Z34, and can also be in the order of Z33, Z32, Z31 and Z34. The present embodiment preferably transmits in order of the sequence number of the subfiles so that the files are merged in order when they are received.
assuming that the subfile Z12 of the file D1 to be transmitted currently is completely transmitted, and the subfile Z11 is already transmitted, at this time, if there is a newly acquired file D4 to be transmitted, the priority is higher than the priority of D1, that is, in the remaining files D1, D3, and D4 to be transmitted which are not completely transmitted, the priorities are sorted from high to low: d4, D1, D3. At this time, the transmission process of the file D1 to be transmitted is suspended, the transmitted subfile Z11 is recorded, and the file with higher priority is preferentially sent according to the sequence of D4, D1 and D3. Because the subfile header information comprises the contents of the number of the subfiles, the sequence numbers of the subfiles and the like, the transmitted subfiles are easy to record.
And step 204, after all the subfiles with higher priority than the current file to be transmitted are transmitted, continuously transmitting the subfiles which are not transmitted in the current file to be transmitted.
Taking the above example as an illustration, the sender sends files in the order of D4, D1, and D3, and after the transmission process of the newly acquired file to be transmitted D4 is finished, when the file to be transmitted D1 is sent, because the sub-file Z11 that has been transmitted has been recorded, only the remaining sub-file Z12 that has not been transmitted is sent.
the embodiment of the invention introduces a splitting mechanism to divide the file to be transmitted into smaller data units, so that even if the whole file to be transmitted is very large, when the file with higher priority is transmitted in real time, the transmitted sub-file is not influenced, and the transmission is recovered only after the file with higher priority is transmitted.
Example two:
referring to fig. 5, a schematic step diagram of a file transfer method according to a second embodiment of the present invention is shown, where the method includes the following steps.
Step 501, a sending end obtains at least one file to be transmitted.
Step 502, determining whether the size of the file to be transmitted is smaller than or equal to the maximum transmission size of the subfile, if so, executing step 503, otherwise, executing step 504.
Step 503, the file to be transmitted is taken as a single subfile.
And when the size of the file to be transmitted is determined to be smaller than or equal to the maximum transmission size of the subfile, the file to be transmitted is not required to be split, and the file to be transmitted is taken as a subfile. The number of subfiles in the subfile header information of the subfile is 1, and the sequence number of the subfile is 1.
Step 504, the file to be transmitted is split into at least two subfiles, and each subfile carries the same priority as the corresponding file to be transmitted.
Step 505, storing the subfiles into a memory data unit, where the memory data unit includes an information area and a data area, the information area is used for storing the file header information and the subfile header information, and the data area is used for storing the subfile data.
In order to manage each subfile more conveniently and find the subfile with higher priority more quickly, this embodiment sets a memory format described below, and divides all memory spaces into a plurality of identical memory partition structures, each partition is called a memory data unit, and the number of the memory data units is determined by "memory space/(size of subfile + file header information + subfile header information)". In a specific application, the size of the memory space that can be allocated by the platform and the time for polling each memory data unit from beginning to end are considered in combination, so as to determine how many memory data units are more reasonable. Each memory data unit comprises an information area and a data area, wherein the information area is used for storing an occupied identifier indicating whether the memory data unit is occupied, file header information and subfile header information. The data area is used for storing real subfile data. Specifically, the occupied flag value may be set to 0 or 1, and if the sender fills a subfile into a certain memory data unit, the sender sets the subfile to 1, and the priority determining unit (described in detail later) may obtain priority information from the memory data unit to determine the priority level, and if the data sending module has taken the data of the memory data unit, the priority determining unit sets the priority level to 0, which indicates that the memory filling unit (described in detail later) may reload a new subfile at this position.
preferably, step 505 further comprises the steps of:
step 505a, when it is determined that there is a newly acquired file to be transmitted, determining whether there is an unoccupied memory data unit according to the occupied identifier, if so, executing step 505b, otherwise, executing step 505 c.
In step 505b, if there is an unoccupied memory data unit, storing the subfile corresponding to the newly acquired file to be transmitted to the unoccupied memory data unit.
Step 505c, if there are no unoccupied memory data units and the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted file to be transmitted, releasing the memory data units according to the number of the subfiles corresponding to the newly acquired file to be transmitted; and storing the subfiles corresponding to the newly acquired file to be transmitted to the released memory data unit.
It should be noted that, under the condition that the memory is full, when the priority of the newly acquired file to be transmitted is higher than the priority of the currently transmitted subfile, the newly acquired file to be transmitted needs to be preferentially sent, and the memory data units of the corresponding number (it can be understood that all the memory data units are possibly released) are released according to the number of the newly acquired file to be transmitted split into the subfiles, so as to free up a space to fill the subfile with the high priority.
it can be understood that if the priority of the newly acquired file to be transmitted is lower than or equal to that of the currently transmitted subfile, the waiting for one clock cycle is continued.
step 506, polling all the memory data units, and determining the transmission sequence according to the priority information of the information area.
Specifically, the first available memory data unit is first fetched as the next memory data unit to be sent, and then the first available memory data unit is searched down until the last memory data unit is found, and if there is a memory data unit with higher priority, the memory data unit is changed into the next memory data unit to be sent.
Step 507, when it is determined that a new subfile is stored in the memory data unit and the priority of the new subfile is higher than that of the currently transmitted subfile, adjusting the transmission sequence and determining the new subfile as the subfile with the highest priority.
when the File to be transmitted 2 with higher priority is detected to exist in the memory data unit, assuming that the File to be transmitted 1 already sends 10 sub-files at this time, the transmission is suspended, the first sub-File of File2 is started, and if no higher-priority File enters during the transmission of File2, the transmission of the 11 th sub-File of File1 is continued after the File2 is completely received.
and step 508, after determining that all the subfiles corresponding to the file to be transmitted are transmitted, discarding the file header information and the subfile header information according to the sequence numbers of the subfiles, and sequentially combining the subfile data.
Specifically, whether all the subfiles are transmitted can be judged by the number of the subfiles and the sequence numbers of the subfiles. And after discarding the file header information and the subfile header information, sequentially combining the subfile data to obtain the data part of the whole file to be transmitted.
Preferably, the receiving end checks the merged subfile data, and if the merged subfile data is different from the original file to be transmitted, the receiving end notifies the sending end to resend the merged subfile data.
Example three:
Referring to fig. 6, a schematic diagram of a structure of a transmitting end of a file transfer apparatus according to another embodiment of the present invention is shown. The transmitting end includes the following.
The obtaining unit 601 is configured to obtain at least one file to be transmitted.
The splitting unit 602 is configured to split the file to be transmitted into at least one subfile, where each subfile carries a priority level that is the same as that of the corresponding file to be transmitted.
A transmission unit 603 for transmitting the subfiles in the order of priority from high to low, wherein the transmission unit comprises.
A priority determining unit 604, configured to determine whether the priority of the newly acquired file to be transmitted is higher than the priority of the currently transmitted subfile.
The transmission unit 603 is further configured to, when it is determined that the priority of the newly acquired file to be transmitted is higher than the priority of the currently transmitted file to be transmitted, suspend the transmission process of the currently transmitted file, and record the transmitted subfiles in the currently transmitted file; the subfiles are transmitted in the new priority order.
The transmission unit 603 is further configured to, after all the subfiles with higher priority than the current file to be transmitted are completely transmitted, continue to transmit the subfiles that are not transmitted in the current file to be transmitted.
Preferably, the sending end further includes a memory filling unit, configured to determine whether there is an unoccupied memory data unit according to the occupied identifier when it is determined that there is a newly acquired file to be transmitted; if the unoccupied memory data units exist, storing the subfiles corresponding to the newly acquired file to be transmitted to the unoccupied memory data units; if the unoccupied memory data units do not exist and the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted file to be transmitted, releasing the memory data units according to the number of the subfiles corresponding to the newly acquired file to be transmitted; and storing the subfiles corresponding to the newly acquired file to be transmitted to the released memory data unit.
Preferably, the priority judging unit is further configured to poll all the memory data units, and determine a transmission sequence according to the priority information of the information area; and when determining that a new subfile is stored in the memory data unit and the priority of the new subfile is higher than that of the currently transmitted subfile, adjusting the transmission sequence and determining the new subfile as the subfile with the highest priority.
Referring to fig. 7, a schematic diagram of a receiving end structure of a file transmission apparatus according to another embodiment of the present invention is shown, where the receiving end includes the following contents.
a receiving unit 701, configured to receive the subfile transmitted by the sending end.
The subfile determining unit 702 is configured to determine whether all subfiles corresponding to one file to be transmitted are transmitted completely.
The merging unit 703 is configured to discard the file header information and the subfile header information after all the subfiles corresponding to one file to be transmitted are transmitted, and sequentially merge all the subfiles.
preferably, the receiving end further includes a data checking module, configured to perform integrity checking on the merged subfile data, and notify the sending end to resend the merged subfile data if the merged subfile data is different from the original file to be transmitted.
For convenience of understanding, the complete file transmission process between the sending end and the receiving end is described herein.
Firstly, a sending end sets a corresponding priority level for each file to be sent, then all file data including attached file header information are sent to a splitting unit, the file splitting operation is carried out, if the file to be transmitted is very small and does not exceed the maximum transmission size of a preset subfile, the file is not split, but is directly sent as a subfile after the sub file header information is added. Otherwise, the file to be transmitted is cut by taking the preset size as a basic unit, and each subfile contains the subfile header information at the starting position. After the file is split, the memory filling unit writes the obtained subfiles into a specific memory data unit, marks each memory data unit which is newly written with data to indicate that the memory data unit is occupied, then the priority judging unit can poll all the memory data units sequentially, and after finding out a memory data unit with the highest priority, the content of the memory data unit is submitted to the transmission unit, and the transmission unit informs a receiving unit of a receiving end to acquire the data, so that the receiving unit completely receives one subfile. And returning to the priority judging unit, continuing to poll all the memory data units sequentially, finding a data unit with the highest priority, and after the interaction of the transmission unit and the receiving unit, receiving a second subfile by the receiving terminal, and repeating the steps until the subfile with the higher priority cannot be found, or detecting that the number of the received subfiles is equal to the total number of all the subfiles by the receiving terminal, which means that all the subfiles are completely transmitted, and discarding the file header information and the sub-packet header information, wherein other data which are combined sequentially are real effective data of the file. And after the data of the whole file is obtained, the data is sent to a data checking module, whether the data is completely transmitted or not is checked, and if the data is different from the original file to be transmitted, the receiving end informs the sending end of resending the data.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The present invention has been described in detail, and the principle and embodiments of the present invention are explained herein by using specific examples, which are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (6)

1. A file transmission method is characterized by comprising the following steps: acquiring at least one file to be transmitted, wherein the file to be transmitted comprises file header information, and the file header information comprises the size and priority information of the file to be transmitted; splitting the file to be transmitted into at least one subfile, wherein each subfile carries the same priority as the corresponding file to be transmitted, each subfile comprises subfile header information, the subfile header information comprises an identifier of the file to be transmitted, the number of the subfiles, the sequence number of the subfile and the priority information of the subfile, the subfile is stored in a memory data unit, the memory data unit comprises an information area and a data area, the information area is used for storing the file header information and the subfile header information, and the data area is used for storing the subfile data; transmitting the subfiles according to the priority from high to low; if the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted file to be transmitted, suspending the transmission process of the currently transmitted file and recording the transmitted subfiles in the currently transmitted file; transmitting the subfiles according to the new priority order; and when all the subfiles with higher priority than the current file to be transmitted are completely transmitted, continuously transmitting the subfiles which are not transmitted in the current file to be transmitted.
2. the method of claim 1, wherein the memory data unit further comprises an occupied flag indicating whether the memory data unit is occupied, and wherein depositing the subfile to the memory data unit comprises: when a newly acquired file to be transmitted is determined, judging whether an unoccupied memory data unit exists according to the occupied identifier; if the unoccupied memory data units exist, storing the subfiles corresponding to the newly acquired file to be transmitted to the unoccupied memory data units; if the unoccupied memory data units do not exist and the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted file to be transmitted, releasing the memory data units according to the number of the subfiles corresponding to the newly acquired file to be transmitted; and storing the subfiles corresponding to the newly acquired file to be transmitted to the released memory data unit.
3. The method of claim 1, wherein the subfiles are transmitted according to the sequence of the priority from high to low, if the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted file to be transmitted, the transmission process of the currently transmitted file is suspended, and the number of the transmitted subfiles in the currently transmitted file is recorded; and transmitting the subfiles in the new priority order comprises: polling all the memory data units, and determining a transmission sequence according to the priority information of the information area; and when determining that a new subfile is stored in the memory data unit and the priority of the new subfile is higher than that of the currently transmitted file to be transmitted, adjusting the transmission sequence and determining the new subfile as the subfile with the highest priority.
4. The method of claim 1, further comprising: and after determining that all the subfiles corresponding to the file to be transmitted are transmitted, discarding the file header information and the subfile header information according to the sequence numbers of the subfiles, and sequentially combining the subfiles.
5. the method of claim 1, wherein dividing the file to be transmitted into at least one subfile, each subfile carrying the same priority as its corresponding file to be transmitted comprises: and when the size of the file to be transmitted is determined to be smaller than or equal to the maximum transmission size of the subfiles, taking the file to be transmitted as an independent subfile.
6. A file transmission device comprises a sending end and a receiving end, wherein the sending end comprises:
the device comprises an acquisition unit, a transmission unit and a transmission unit, wherein the acquisition unit is used for acquiring at least one file to be transmitted;
The file transmission device comprises a splitting unit, a storage unit and a data processing unit, wherein the splitting unit is used for splitting a file to be transmitted into at least one subfile, each subfile carries the same priority as the corresponding file to be transmitted, the splitting unit is also used for annotating subfile header information in the subfile, the subfile header information comprises an identifier of the file to be transmitted, the number of the subfiles, the serial numbers of the subfiles and the priority information of the subfiles, the subfile header information corresponds to the subfile header information, the subfiles are stored in a memory data unit, the memory data unit comprises an information area and a data area, the information area is used for storing the file header information and the subfile header information, and the data area is used for storing the subf;
the transmission unit is used for transmitting the subfiles from high priority to low priority, and comprises:
The priority judging unit is used for judging whether the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted file to be transmitted;
The transmission unit is also used for pausing the transmission process of the current file to be transmitted and recording the transmitted subfiles in the current file to be transmitted when the priority of the newly acquired file to be transmitted is higher than that of the currently transmitted subfiles; transmitting the subfiles according to the new priority order;
The transmission unit is further used for continuing to transmit the sub-files which are not transmitted in the current file to be transmitted after all the sub-files with higher priority than the current file to be transmitted are transmitted;
The receiving end includes:
the receiving unit is used for receiving subfiles transmitted by a transmitting end, the subfiles are obtained by splitting a file to be transmitted acquired by the transmitting end, each subfile carries the same priority as the corresponding file to be transmitted, the receiving unit is further used for receiving subfile information in the subfiles, the subfile header information comprises an identifier of the file to be transmitted, the number of the subfiles, the sequence number of the subfiles and the priority information of the subfiles, the subfile header information corresponds to the subfile header information, the subfiles are stored in a memory data unit, the memory data unit comprises an information area and a data area, the information area is used for storing the file header information and the subfile header information, and the data area is used for storing the subfile data;
the subfile judging unit is used for judging whether all subfiles corresponding to one file to be transmitted are transmitted completely;
And the merging unit is used for sequentially merging all the subfiles after all the subfiles corresponding to one file to be transmitted are transmitted.
CN201610050733.5A 2016-01-26 2016-01-26 File transmission method and device Active CN105450785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610050733.5A CN105450785B (en) 2016-01-26 2016-01-26 File transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610050733.5A CN105450785B (en) 2016-01-26 2016-01-26 File transmission method and device

Publications (2)

Publication Number Publication Date
CN105450785A CN105450785A (en) 2016-03-30
CN105450785B true CN105450785B (en) 2019-12-06

Family

ID=55560551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610050733.5A Active CN105450785B (en) 2016-01-26 2016-01-26 File transmission method and device

Country Status (1)

Country Link
CN (1) CN105450785B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106686078B (en) * 2016-12-26 2020-03-24 北汽福田汽车股份有限公司 Data transmission method and device
CN106790633B (en) * 2017-01-03 2019-11-08 北京电子工程总体研究所 A kind of long-range multifile transmission method based on priority dynamic adjustment
CN109818710A (en) * 2017-11-21 2019-05-28 中移(杭州)信息技术有限公司 A kind of data transmission method and corresponding intrument
CN109905392A (en) * 2019-02-27 2019-06-18 苏州浪潮智能科技有限公司 A kind of data transmission security verification method and system
CN110266814B (en) * 2019-07-09 2021-08-17 联想(北京)有限公司 Transmission method and transmission device
CN112565109A (en) * 2020-12-28 2021-03-26 常州信息职业技术学院 Industrial data transmission method and system
WO2022151480A1 (en) * 2021-01-18 2022-07-21 华为技术有限公司 Data transmission method and apparatus
CN113326124A (en) * 2021-05-20 2021-08-31 深圳证券通信有限公司 Method for presetting priority of file transmission task
CN113852563B (en) * 2021-09-22 2023-10-31 深圳市元征科技股份有限公司 Message data transmission method and device, terminal equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1705295A (en) * 2004-05-29 2005-12-07 华为技术有限公司 Packet transmission system having priority and method therefor
CN102611760A (en) * 2012-04-16 2012-07-25 苏州阔地网络科技有限公司 File transmission method and system
CN102790771A (en) * 2012-07-25 2012-11-21 山东中创软件商用中间件股份有限公司 File transmission method and system
CN103237300A (en) * 2013-04-28 2013-08-07 北京小米科技有限责任公司 Method, device and system for downloading file
CN104519090A (en) * 2013-09-27 2015-04-15 深圳市腾讯计算机系统有限公司 Method and device for file transfer

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5063280B2 (en) * 2007-09-28 2012-10-31 株式会社日立製作所 File transfer system, client, server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1705295A (en) * 2004-05-29 2005-12-07 华为技术有限公司 Packet transmission system having priority and method therefor
CN102611760A (en) * 2012-04-16 2012-07-25 苏州阔地网络科技有限公司 File transmission method and system
CN102790771A (en) * 2012-07-25 2012-11-21 山东中创软件商用中间件股份有限公司 File transmission method and system
CN103237300A (en) * 2013-04-28 2013-08-07 北京小米科技有限责任公司 Method, device and system for downloading file
CN104519090A (en) * 2013-09-27 2015-04-15 深圳市腾讯计算机系统有限公司 Method and device for file transfer

Also Published As

Publication number Publication date
CN105450785A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN105450785B (en) File transmission method and device
CN105812287B (en) Efficient circuit in packet switching network
KR101745456B1 (en) Ecu for transmitting large data in hil test environment, system including the same and method thereof
CN103581230A (en) File transmission system and method, receiving end and sending end
CN113014528B (en) Message processing method, processing unit and virtual private network server
CN105100140B (en) Document transmission method and system
WO2014121630A1 (en) Method and device for transferring file
CN113179327B (en) High concurrency protocol stack unloading method, equipment and medium based on large-capacity memory
WO2014200386A1 (en) Data transmission from a web-server to terminal devices by means of a wireless network
JP7046983B2 (en) Packet transmission method and equipment
CN104079623B (en) Multistage cloud storage synchronisation control means and system
CN115174490B (en) Data transmission method and network application terminal
CN112583529A (en) Data processing method, device, equipment and storage medium
CN111083204A (en) File transmission method, device and storage medium
CN111404842B (en) Data transmission method, device and computer storage medium
CN103731424B (en) A kind of transmission method of network data, apparatus and system
CN111200640B (en) Uploading method based on client and client
CN104079368B (en) A kind of the test data transmission method and server of application software
CN105119968A (en) Picture transmission method and device
CN101989896B (en) Feedback method and device for ARQ connection
CN110895517A (en) Method, equipment and system for transmitting data based on FPGA
US8942146B2 (en) Signal transmission method and apparatus in wireless communication system
CN104348711A (en) Apparatus and method for receiving messages
CN110266814B (en) Transmission method and transmission device
EP2458780A1 (en) Cyclic data delivery using a multicast scheme

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No.

Patentee after: Hisense Video Technology Co.,Ltd.

Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No.

Patentee before: HISENSE ELECTRIC Co.,Ltd.