WO2014187114A1 - 一种文件传输方法、装置及存储介质 - Google Patents

一种文件传输方法、装置及存储介质 Download PDF

Info

Publication number
WO2014187114A1
WO2014187114A1 PCT/CN2013/089185 CN2013089185W WO2014187114A1 WO 2014187114 A1 WO2014187114 A1 WO 2014187114A1 CN 2013089185 W CN2013089185 W CN 2013089185W WO 2014187114 A1 WO2014187114 A1 WO 2014187114A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
fragment
transmission
state
module
Prior art date
Application number
PCT/CN2013/089185
Other languages
English (en)
French (fr)
Inventor
廖志
廖海珍
张媛
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2014187114A1 publication Critical patent/WO2014187114A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/188Time-out mechanisms

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a file transmission method, apparatus, and storage medium. Background technique
  • the method of file transfer on the Internet usually divides the file into a plurality of fragments of the same size, and then sequentially transmits the pieces to the receiving end in order. If one of the fragments fails to transmit for some reason (such as server reasons, network failure, or transmission timeout, etc.), it will choose to retransmit the fragment immediately. If the number of retransmissions of the fragment reaches a preset threshold, the current transmission of the file fails, but the file may be retried to be transmitted, and then the fragment is successfully transmitted after the last transmission of the file. Pass until the completion of the transfer of the entire file.
  • a file transmission method includes the following steps: an extraction step: extracting a fragment from a file to be transmitted to a receiving end; transmitting step: submitting the fragment to a queue to be transmitted, and monitoring whether the fragment is successfully transmitted; : If the fragment is not successfully transmitted, determine the weight of the fragment Whether the number of transmissions reaches the preset number of times threshold; retransmission step: if the number of retransmissions of the fragment does not reach the threshold of the number of times, the transmission step is re-executed after waiting for a preset time, and the retransmission of the fragment is updated. frequency.
  • a file transmission device comprising: an extraction module, configured to extract a fragment from a file to be transmitted to a receiving end; a transmission module, configured to submit the fragment to a queue to be transmitted, and monitor whether the fragment is successfully transmitted; a determining module, configured to determine, if the fragment is not successfully transmitted, whether the number of retransmissions of the fragment reaches a preset number of times threshold; and a retransmission module, configured to: if the number of retransmissions of the fragment does not reach the threshold of the number of times, Then, the transmission step is re-executed after waiting for a preset time, and the number of retransmissions of the fragment is updated.
  • the present invention also provides a storage medium containing computer executable instructions for executing a file transfer method, comprising the steps of: extracting step: extracting a slice from a file to be transmitted to a receiving end
  • the transmission step is: submitting the fragment to the queue to be transmitted, and monitoring whether the fragment is successfully transmitted; determining step: if the fragment is not successfully transmitted, determining whether the number of retransmissions of the fragment reaches a preset number of times threshold
  • Retransmission step If the number of retransmissions of the fragment does not reach the threshold of the number of times, the transmission step is re-executed after waiting for a preset time, and the number of retransmissions of the fragment is updated.
  • the present invention will wait for a period of time to retransmit the fragment, which can improve the transmission success rate of the single fragment of the file, thereby improving the transmission success rate of the file.
  • FIG. 1 is a schematic diagram of an environment when a file transmission method according to a first embodiment of the present invention is executed.
  • FIG. 2 is a flowchart of a file transmission method according to a first embodiment of the present invention.
  • FIG. 3 is a flowchart of a file transmission method according to a second embodiment of the present invention.
  • Figure 4 is a flow chart of the method of Figure 3 for checking whether a file has been transferred.
  • FIG. 5 is a flowchart of a file transmission method according to a third embodiment of the present invention.
  • FIG. 6 is a flowchart of a file transmission method according to a fourth embodiment of the present invention.
  • FIG. 7 is a flowchart of a file transmission method according to a fifth embodiment of the present invention.
  • FIG. 8 is a flowchart of a file transmission method according to a sixth embodiment of the present invention.
  • FIG. 9 is a flowchart of a file transmission method according to a seventh embodiment of the present invention.
  • FIG. 10 is a block diagram of a file transfer apparatus according to an eighth embodiment of the present invention.
  • FIG. 11 is a block diagram of a file transfer apparatus according to a ninth embodiment of the present invention.
  • FIG. 12 is a block diagram of a file transfer apparatus according to a tenth embodiment of the present invention.
  • Figure 13 is a block diagram of a file transfer apparatus according to an eleventh embodiment of the present invention.
  • Figure 14 is a block diagram of a file transfer apparatus according to a twelfth embodiment of the present invention.
  • Figure 15 is a block diagram of a file transfer apparatus according to a thirteenth embodiment of the present invention.
  • a first embodiment of the present invention provides a file transmission method, which can be executed by a sender for transmitting a file to a receiving end.
  • the above-mentioned transmitting end and receiving end are, for example, computers, mobile electronic terminals or other similar computing devices.
  • FIG. 1 it is an environment diagram when the file transfer method described above is executed.
  • the transmitting end 110 is connected to the receiving end 120 via the network 10.
  • the network 10 can be any network connection, such as the Internet (Internet), mobile Internet (such as 2G, 3G networks provided by telecom operators), local area networks (wired or wireless), and the like.
  • FIG. 2 is a flowchart of a file transmission method provided by the first embodiment, and the file transmission method includes the following steps:
  • Step S101 Extract a fragment from the file to be transmitted to the receiving end 120; Step S102, submit the fragment to the queue to be transmitted, and monitor whether the fragment is successfully transmitted;
  • Step S103 If the fragment is not successfully transmitted, determine whether the number of retransmissions of the fragment reaches a preset number of times threshold;
  • Step S104 If the number of retransmissions of the fragment does not reach the threshold of the number of times, the step S102 is re-executed after waiting for a preset time, and the number of retransmissions of the fragment is updated.
  • the fragment after a single fragment transmission failure of the file, the fragment will be re-transmitted for a period of time, and the method can improve the file compared to the conventional method of retransmitting the fragment immediately after the transmission fails.
  • the success rate of the transmission of a single slice thereby increasing the transmission success rate of the file.
  • the file described in step S101 may be a picture, a document, a video, or the like.
  • the slice can be extracted from the file according to a fixed slice size. If the file is transmitted for the first time, the first fragment is extracted from the beginning of the first fragment of the file, and the first fragment is successfully transmitted to the receiving end 120, and then according to the fixed fragment. Size sets the starting point of the next shard, and so on. If the file is retransmitted after a failure, the first fragment is still extracted starting from the beginning of the first fragment of the file. After the first fragment is successfully transmitted to the receiving end 120, the number of bytes of the file successfully received by the receiving end 120 is received, and the number of bytes returned by the receiving end 120 is set as the next fragment. The starting point to achieve succession of the succeeded transmission of the fragmentation successor Continue to transfer the file, that is, "breakpoint resume".
  • the transmitting end 110 and the receiving end 120 may be connected according to a Transmission Control Protocol (TCP).
  • TCP Transmission Control Protocol
  • the to-be-transmitted queue may be an output buffer of TCP. Fragments located in this output buffer are sent to the operating system for physical layer transmission. The specific physical layer sending process is controlled by the operating system, and details are not described herein again.
  • the fragment and the file may be encrypted first, for example, by using an MD5 (Message-Digest Algorithm 5) encryption algorithm, and then the fragment and its encrypted value are used.
  • MD5 Message-Digest Algorithm 5
  • the encrypted value with the file is encapsulated into a data packet submitted to the queue to be transmitted to ensure the integrity of the fragment and file during transmission.
  • the number of retransmissions described in step S103 is the number of times the fragment is resubmitted to the to-be-transmitted queue for transmission after each transmission failure.
  • the number of retransmissions of the slice is initialized to zero, and then the number of retransmissions of the slice is accumulated each time the transmission is failed after the fragment transmission fails. If the number of retransmissions of the fragment reaches the threshold of the number of times, it is judged that the file transmission fails, and the transmission may be ended or the file may be retransmitted.
  • the preset time described in step S104 will be extended as the number of retransmissions of the slice increases.
  • the second embodiment provides a file transmission method, which is further included in the step S102 after the step S102 as compared with the file transmission method in the first embodiment.
  • Step S105 If the fragment transmission is successful, check whether the file has been transmitted. If the file is not transmitted, return to step S101. If the file has been transmitted, determine that the file is successfully transmitted. Specifically, referring to FIG. 4, the step of checking whether the file has been transmitted includes:
  • Step S105.1 Receive reply information returned by the receiving end 120, where the reply information includes a sum of all the fragment sizes of the file that the receiving end 120 has received.
  • Step S105.2 determining whether the sum of the size of all the fragments of the file received by the receiving end 120 is equal to the size of the file, and if so, determining that the file has been transmitted, and if not, determining that the file has not been transmitted.
  • files are transmitted on the Internet, and the fragments are sequentially extracted from the files according to a fixed slice size.
  • the transmission rate can reach the maximum value under the network. Therefore, when using fixed-size fragments for transmission, if the network quality is good and the fragment size is relatively small, the transmission rate may be limited.
  • the network belt In the mobile Internet where the bandwidth and quality are constantly changing, if the size of the fragment is not suitable, the network will not be able to exert the maximum transmission capacity and the file transmission speed cannot be improved.
  • a third embodiment of the present invention provides a file transmission method, which is compared with the file transmission method of the first embodiment, and the step S101 further includes:
  • Step S201 Obtain a transmission parameter of at least one fragment that has completed transmission in the file, where the transmission parameter includes a fragment size and a transmission rate.
  • Step S202 Calculate a rate change index according to a transmission parameter of the at least one fragment that has completed transmission, where the rate change index represents a rate at which the transmission rate changes with respect to the fragment size;
  • Step S203 determining whether the rate change index is less than a preset first threshold, and if yes, updating the current transmission state to a different state;
  • Step S204 Obtain a coefficient corresponding to the current transmission state, and set a size of the current to-be-transferred fragment to be a product of a fragment size of the most recently completed transmission in the file and the coefficient;
  • Step S205 The current fragment to be transmitted is intercepted from the file for transmission according to the set size of the current to-be-transmitted fragment.
  • the size of the current fragment to be transmitted is dynamically set according to the transmission parameters of the fragment that has been transmitted in the file, so that the size of the current fragment to be transmitted can be adapted to the network quality and bandwidth requirements. , thereby improving the effective bandwidth and file transfer speed of the network when transferring files.
  • the transmission rate described in step S201 can be calculated according to the size and transmission time of each fragment that has been transmitted.
  • the transmission time refers to a period of time between the transmission of the corresponding fragment and the reception of the information indicating the success of the reception by the receiving end 120.
  • the transmission rate can also be smoothed using a preset smoothing factor.
  • the rate change index described in step S202 represents a rate at which the transmission rate changes with respect to the fragment size, that is, in the fragment of the at least one that has completed transmission, when the fragment size changes, the transmission rate of the fragment changes correspondingly.
  • the transmission rate also increases accordingly, indicating that the growth rate of the fragment size can meet the requirement of the transmission rate increase.
  • the transmission rate does not increase correspondingly. This indicates that the growth rate of the fragment size cannot meet the requirements of the transmission rate increase, and the growth rate of the fragment size needs to be slowed down or the fragmentation needs to be maintained. The size does not change.
  • the first threshold value described in step S203 is used to define whether the growth rate of the fragment size can meet the requirement of the transmission rate increase.
  • the current transmission state indicates the growth speed of the fragment size.
  • the current transmission state includes a first state, a second state, and a third state.
  • Each state corresponds to a coefficient for indicating the growth rate of the tile size.
  • the coefficient corresponding to the first state and the second state is greater than 1, and the coefficient corresponding to the first state is greater than the coefficient corresponding to the second state, indicating that the growth rate of the slice size in the first state is higher than that in the second state.
  • the growth rate of the piece size corresponds to a coefficient of 1, indicating that the slice size remains unchanged in the third state.
  • step S203 further includes determining a current transmission state, if the rate change index is less than the first threshold, and the current transmission state is the first state, updating the current transmission state to the second state, that is, slowing down the The growth rate of the piece size. If the rate change index is less than the first threshold, and the current transmission state is the second state, updating the current transmission state to the third state, that is, further slowing down the growth rate of the fragment size.
  • Step S204 Obtain a coefficient corresponding to the updated current transmission state, and set a size of the current to-be-transferred fragment to be a product of the fragment size of the recently completed transmission and the coefficient. If the current transmission state is the first state or the second state, the corresponding size of the recently completed transmission is increased to set the size of the fragment to be transmitted. If the current transmission state is the third state, the size of the fragment to be transmitted is set to be the same as the fragment size of the most recently completed transmission.
  • Step S205 The current fragment to be transmitted is intercepted from the file according to the set size of the current to-be-transmitted fragment, and then the step S102 is performed to transmit the fragment. Fourth embodiment
  • a fourth embodiment of the present invention provides a file transmission method. Compared with the file transmission method of the third embodiment, the update condition of the current transmission state is further limited to enable the setting. The size of the fragment to be transmitted is more adapted to the transmission capacity of the network, thereby increasing the transmission speed of the file.
  • the file transmission method of this embodiment further includes:
  • step S200 before the step S201 is performed, it is determined whether the current fragment to be transmitted is the first fragment of the file. If the fragment to be transmitted is the first fragment of the file, step S206 is performed. If the current fragment to be transmitted is not the first fragment of the file, the step S201 is performed.
  • Step S206 setting a size of the current to-be-transmitted fragment to a default value of a fragment size under a current network type (for example, a 2G/3G network provided by a telecommunication carrier, a WIFI network, etc.), and updating the current transmission status to the first In a state, then step S205 is performed.
  • a current network type for example, a 2G/3G network provided by a telecommunication carrier, a WIFI network, etc.
  • Step S207 Before performing step S203, determine whether the current transmission state is the first state or the second state. If the current state is the first state or the second state, step S208 is performed. If the current state is the third state, step S209 is performed.
  • Step S208 Determine whether the number of uses of each fragment size reaches a preset second threshold (for example, 2 times) in the fragment of the at least one that has been completed. If the number of times of using each of the fragment sizes reaches the second threshold, the step S203 is performed, and if the number of uses of the each fragment size does not reach the second threshold, the step S204 is performed.
  • a preset second threshold for example, 2 times
  • Step S209 counting the transmission rate of the at least one fragment that has completed transmission continuously exceeds The number of times the preset range is exceeded, and it is determined whether the counted number reaches the preset third threshold. If the counted number of times does not reach the third threshold, the step S204 is performed. If the counted number reaches the third threshold, the step S206 is performed.
  • the size of the to-be-transmitted portion of the file may not be sufficient to intercept the current fragment to be transmitted from the file according to the size of the currently-to-be-transmitted fragment, or according to the current current to-be-transmitted segment.
  • the size of the slice is taken from the file, the size of the file to be transmitted is small, and it is not necessary to transmit the file to be transmitted as the next slice. Therefore, the step S204 and the step S206 are performed.
  • the method further includes: determining whether a size of the to-be-transmitted portion of the file is less than a preset fourth threshold.
  • step S205 If the size of the to-be-sent portion of the file is smaller than the fourth threshold, set the size of the current to-be-transmitted fragment to the size of the portion to be sent of the file, and then perform step S205. If the size of the to-be-sent portion of the file is not less than the fourth threshold, step S205 is directly performed.
  • the update condition of the current transmission state is further limited, so that the size of the set fragment to be transmitted can be more adapted to the transmission capability of the network, thereby improving the transmission speed of the file.
  • a fifth embodiment of the present invention provides a file transmission method.
  • the transmission parameters of the obtained fragment of at least one of the files that have been transmitted include: the size of the first fragment of the file S l
  • the smoothed value V l of the transmission rate under the fragment size Si is recently transmitted.
  • the slice size S n at the slice size of 8.
  • the size of the current to-be-transmitted fragment is S n+1 , and the step is compared to the file transmission method of the fourth embodiment.
  • Step S101 further includes:
  • Step S11 determines whether the S n is 0. If S n is not 0, it indicates that the current fragment to be transmitted is not the first fragment of the file, and the process proceeds to step S12. If S n is 0, it indicates that the current fragment to be transmitted is the first fragment of the file, and the process proceeds to step S25.
  • step S12 the number of uses N of the Sn is updated.
  • Step S13 according to the obtained ⁇ 1 3 ⁇ 4 S N , V S , V q calculates the rate change index S.
  • Step S14 determining the current transmission status. If the current transmission state is the first state, the process proceeds to step S15. If the current transmission state is the second state, the process proceeds to step S18. If the current transmission state is the third state, the process proceeds to step S21.
  • Step S 15 determining whether the number of uses N S n is equal to a preset second threshold value Nmax, and the calculated rate of change of the index S is smaller than a first predetermined threshold value Smin. If yes, go to step S16, if no, go to step S17.
  • step S16 the current transmission state is updated to the second state, and S n+1 is set as the product of the coefficients B and S n corresponding to the second state, and then proceeds to step S27.
  • step S17 S n+1 is set as the product of the coefficients A and S ⁇ corresponding to the first state, and then proceeds to step S27.
  • Step S 18 determining whether the number of uses N S n is equal to a preset second threshold value Nmax, and the calculated rate of change of the index S is smaller than a first predetermined threshold value Smin. If yes, go to step S19, if no, go to step S20.
  • step S19 the current transmission state is updated to the third state, and the setting is 8. +1 is equal to 8 11 and then proceeds to step S27.
  • step S20 it is set that S n+1 is the product of the coefficient B and S ⁇ corresponding to the second state, and then proceeds to step S27.
  • Step S21 determining whether the difference between V s and the reference rate V stable in the third state is small The preset fifth threshold. If no, indicating that the transmission rate of the recently completed fragment is beyond the preset range, the process proceeds to step S22. If yes, it indicates that the transmission rate of the fragment that has recently completed transmission does not exceed the preset range, and then proceeds to step S23.
  • the fifth threshold may be the product of the reference rate V stable and a certain percentage constant D.
  • Step S22 Update the number M of the transmission rate of the recently completed transmission beyond the preset range, that is, add 1 to the M.
  • Step S23 clearing the transmission rate of the recently completed fragment beyond the preset number of times M.
  • Step S24 Determine whether the transmission rate of the recently completed transmission fragment exceeds the preset range, M, reaches a preset third threshold Mmax. If yes, the process proceeds to step S25. If not, the process proceeds to step S26.
  • step S25 the current transmission state is updated to the first state, the setting 8 11+1 is equal to 8 1 , and then the process proceeds to step S27.
  • step S26 it is set that S n+1 is equal to S n .
  • Step S27 Determine whether the size Fs of the to-be-sent portion of the file is less than a preset fourth threshold F. If yes, the process proceeds to step S28. If no, the process proceeds to step S29.
  • step S28 it is set that S n+1 is equal to Fs.
  • Step S29 returning the set S n+1 , and intercepting the current fragment to be transmitted from the file according to the set size of the Sn +1 to perform transmission.
  • the file is transmitted on the Internet, and the timeout period for setting the reply information is not used to monitor whether the fragment is successfully transmitted.
  • the timeout period is generally a fixed value or a dynamic value estimated based on the slice size and the average bandwidth of the different Internet or the most recent historical bandwidth measured data.
  • the network quality of mobile Internet, especially non-WIFI networks changes very quickly and is very large, it is far less stable than wired networks.
  • the actual bandwidth under a certain mobile Internet has the average bandwidth obtained by statistics. big difference. Therefore, using the timeout estimated based on the fragment size and the average bandwidth of the Internet, it is very easy to time out during the actual transmission of file fragments.
  • a sixth embodiment of the present invention provides a file transmission method, which is compared with the file transmission method of the first embodiment, and the step S102 further includes:
  • Step S301 Submit a fragment extracted from the file to the to-be-transmitted queue in a main process
  • Step S302 continuously waiting for an interrupt signal
  • Step S303 monitoring whether the main process generates uplink data traffic within a predetermined time period, and if not, issuing an interrupt waiting request, and adding, in the interrupt waiting request, the main process does not generate uplink data traffic within a predetermined time period.
  • Step S304 if the interrupt waiting request or the reply information returned by the receiving end is received, the step S302 is ended.
  • the duration of the uplink data traffic is not generated by the monitoring main process to determine whether the fragmentation is successfully transmitted.
  • the method can better adapt to the unstable network environment.
  • Such as mobile internet improve fragment transmission The success rate and reduce the waste of traffic due to timeout issues during fragmentation.
  • the implementation details of the steps of the above method are as follows:
  • step S301 refers to the process of transmitting the slice.
  • a file transfer process where the application is located.
  • the shard can be encapsulated into a network packet according to the HyperText Transfer Protocol (HTTP).
  • HTTP HyperText Transfer Protocol
  • the interrupt signal described in step S302 includes the interrupt waiting request or the reply information returned by the receiving end 120, and the like. Further, during the execution of step S302, the execution of the main process can also be interrupted.
  • Step S303 can be performed in a new monitoring process different from the main process.
  • the predetermined time period is an allowable network timeout period, which can be set according to specific needs, for example, 5 seconds can be selected.
  • the uplink data traffic is generated after the main process submits the fragment to the to-be-transmitted queue, and the to-be-transmitted queue transfers the fragment to the operating system for transmission through the network.
  • the main process does not generate uplink data traffic within the predetermined time period, it indicates that the main process does not transmit any byte through the network during the predetermined time period, which means that the fragment transmission fails this time, so it is necessary to issue the
  • the interrupt waits for a request to cause the main process to stop waiting for an interrupt signal. After the interrupt waiting request is issued, the step S303 ends.
  • step S303 may also prompt the user that the file is being sent by animation, text, or the like.
  • step S304 if the step S302 is ended because the interrupt waiting request is received, the transmission of the fragment transmission failure is returned according to the information that the main process added in the interrupt waiting request does not generate uplink data traffic within a predetermined time period. result. If it is received by the receiving end 120 returns the reply message and ends step S302, and determines, according to the reply message, whether the receiving end 120 successfully receives the fragment. If the receiving end 120 does not successfully receive the fragment, it also returns the transmission result of the fragment transmission failure. If the receiving end 120 has successfully received the fragment, the transmission result of the successful fragment transmission is returned. After receiving the reply information returned by the receiving end 120, the triggering step S303 ends.
  • step S302 there may be a step of monitoring whether a network abnormality occurs, such as a network connection disconnection, a network connection is restricted, and the like. If the network abnormality occurs, step S302 and step S303 are ended, and the transmission result of the fragment transmission failure is returned. Seventh embodiment
  • a seventh embodiment of the present invention provides a file transmission method.
  • an implementation scheme is further proposed for the step S303: by periodically monitoring the file.
  • the uplink data traffic of the main process determines whether the main process generates uplink data traffic within a predetermined time period.
  • the step S303 includes:
  • Step S1 Start the monitoring process, and record that the uplink data flow generated by the main process is TBo.
  • a counter is started, and the initial value of the value T of the counter is assigned to zero, and the counter is used to time the duration in which the main process does not generate uplink data traffic.
  • a timer (Timer) is started, which is used to trigger step S2 every time a predetermined time t elapses.
  • Step S2 When triggered by the timer, record the uplink data traffic TBn that has been generated by the main process, and obtain the uplink data traffic TBo that has been generated by the main process recorded by the timer. If the timer is triggered for the first time, the uplink data traffic TBo generated by the main process recorded when the monitoring process starts is obtained.
  • step S3 it is determined whether the uplink data traffic TB generated by the main process is zero in the preset time t before being triggered by the timer, and the TB can be obtained by solving the difference between the TBn and the TBo. If the TB is not zero, step S4 is performed, and if the TB is zero, the step is performed. S5.
  • step S4 the value T of the counter is cleared, and the user is prompted to send the file.
  • the TB is not zero, indicating that the main process has uplink data traffic generated during the preset time t before being triggered by the timer.
  • the file is being sent, so the value T of the counter needs to be cleared to the main process.
  • the duration of no upstream data traffic is re-timed.
  • step S5 the value T of the counter is updated to T+t, and it is determined whether the value T after the counter update is less than the preset upper limit threshold Tmax.
  • the preset upper limit threshold Tmax is an integer multiple of the preset time t. If T is less than the Tmax, it returns to step S2. If T is not less than the Tmax, step S6 is performed.
  • Step S6 the interrupt waiting request is issued, and the information that the main process does not generate uplink data traffic within a predetermined time period is added to the interrupt waiting request.
  • the predetermined time period is a time period from the current time point that the preset upper limit threshold (e.g., 5 seconds) has just passed.
  • the file transmission method provided in this embodiment may further determine whether the main process is within a predetermined time period by periodically monitoring the uplink data traffic of the main process. There is upstream data traffic generated.
  • an eighth embodiment of the present invention provides a file transmission apparatus 100, which includes an extraction module 101, a transmission module 102, a determination module 103, and a retransmission module 104.
  • a file transmission apparatus 100 which includes an extraction module 101, a transmission module 102, a determination module 103, and a retransmission module 104.
  • each of the above modules refers to a computer program or program segment for performing one or more specific functions.
  • the distinction between the above modules does not mean that the actual program code must be separated.
  • the extracting module 101 is configured to extract a slice from a file to be transmitted to the receiving end.
  • the transmitting module 102 is configured to submit the fragment to the queue to be transmitted, and monitor whether the fragment is successfully transmitted.
  • the fragment and the file may be encrypted first, The fragment and its encrypted value and the encrypted value of the file are then encapsulated into a data packet to be submitted to the to-be-transmitted queue to ensure the integrity of the fragment and the file during transmission.
  • the determining module 103 is configured to determine whether the number of retransmissions of the fragment reaches a preset number of times threshold if the fragment is not successfully transmitted. If the number of retransmissions of the fragment reaches the threshold of the number of times, it is determined that the file transmission fails, and the transmission may be ended or the file may be retransmitted.
  • the retransmission module 104 is configured to re-execute the transmission module 102 after waiting for a preset time if the number of retransmissions of the fragment does not reach the threshold, and update the number of retransmissions of the fragment.
  • the preset time will be extended as the number of retransmissions of the slice increases.
  • the file transmission method provided by the first embodiment of the present invention can be further referred to, and will not be repeated here.
  • the file transmission apparatus 100 of this embodiment will wait for a period of time and then retransmit the fragment after the single fragment transmission of the file fails, and retransmit the fragment immediately after the transmission fails. In this way, the method can improve the transmission success rate of a single fragment of the file, thereby improving the transmission success rate of the file.
  • a ninth embodiment of the present invention provides a file transfer apparatus 200.
  • the file transfer apparatus 100 of the eighth embodiment further includes:
  • the checking module 105 is configured to check whether the file has been transmitted if the fragment transmission is successful. If the file has not been transferred, the extraction module 101 is executed. If the file has been transferred, it is determined that the file transfer was successful.
  • the checking module 105 first receives the reply information returned by the receiving end 120, and the reply information includes a sum of all the fragment sizes of the file that the receiving end 120 has received. Then, the checking module 105 determines whether the sum of all the fragment sizes of the file received by the receiving end 120 is equal to the size of the file, and if so, determines that the file has been transmitted, and if not, determines the file. No transfer completed.
  • the file transfer apparatus 200 of this embodiment can determine whether the file is completely transferred. If the file is not transferred, continue to extract the next slice from the file for transmission until the file transfer is completed.
  • a tenth embodiment of the present invention provides a file transmission apparatus 300.
  • the extraction module 101 further includes: an acquisition module 301, configured to acquire A transmission parameter of at least one fragment of the file that has completed transmission, the transmission parameter including a fragment size and a transmission rate.
  • the transmission rate can be calculated based on the size and transmission time of each fragment that has completed transmission. After the transmission rate is calculated, the transmission rate can also be smoothed using a preset smoothing factor.
  • the calculating module 302 is configured to calculate a rate change index according to a transmission parameter of the at least one fragment that has completed transmission, where the rate change index represents a rate at which the transmission rate changes with respect to the fragment size.
  • the first determining module 303 is configured to determine whether the rate change index is less than a preset first threshold, and if yes, update the current transmission state to a different state.
  • the current transmission state includes a first state, a second state, and a third state. Each state corresponds to a coefficient for indicating the growth rate of the tile size. The coefficient corresponding to the first state and the second state is greater than 1, and the coefficient corresponding to the first state is greater than the coefficient corresponding to the second state.
  • the coefficient corresponding to the third state is 1. Specifically, if the rate change index is less than the first threshold, and the current transmission state is the first state, updating the current transmission state to the second state. If the rate change index is less than the first threshold, and the current transmission state is the second state, updating the current transmission The input state is the third state.
  • the first setting module 304 is configured to acquire a coefficient corresponding to the current transmission state, and set a size of the current to-be-transferred fragment to be a product of a fragment size of the most recently completed transmission in the file and the coefficient.
  • the intercepting module 305 is configured to intercept the current fragment to be transmitted from the file according to the set size of the current to-be-transmitted fragment, and then execute the transmission module 102 to transmit the fragment.
  • the file transmission method provided by the third embodiment of the present invention can be further referred to, and will not be repeated here.
  • the file transmission device 300 of the embodiment dynamically sets the size of the current fragment to be transmitted according to the transmission parameters of the fragment that has been transmitted in the file, so that the size of the current fragment to be transmitted can be Adapt to network quality and bandwidth requirements, thereby increasing the effective bandwidth and file transfer speed of the network when transferring files.
  • an eleventh embodiment of the present invention provides a file transmission apparatus 400.
  • the extraction module 101 further includes a second determination module 306, which is different from the file transmission apparatus 300 of the tenth embodiment.
  • the second setting module 307, the determining module 308, the third determining module 309, and the fourth determining module 310 are different from the file transmission apparatus 300 of the tenth embodiment.
  • the second judging module 306 is configured to determine whether the current fragment to be transmitted is the first fragment of the file before executing the obtaining module 301. If the slice to be transmitted is the first slice of the file, the second setting module 307 is executed. If the fragment to be transmitted is not the first fragment of the file, the obtaining module 301 is executed.
  • the second setting module 307 is configured to set a default value of the size of the current to-be-transmitted fragment to the fragment size of the current network type, and update the current transmission status to the first state, and then execute the intercepting module 305.
  • the determining module 308 is configured to determine whether the current transmission state is the first state or the second state before executing the first determining module 303. If the current transmission state is the first state or the second state, the third determining module 309 is executed. If the current transmission state is the third state, the fourth determining module 310 is executed.
  • the third determining module 309 is configured to determine whether the number of uses of each fragment size reaches a preset second threshold in the fragment of the at least one that has been successfully transmitted. If the number of uses of each of the slice sizes reaches the second threshold, the first determining module 303 is executed. If the number of uses of each of the slice sizes does not reach the second threshold, the first setting module 304 is executed.
  • the fourth determining module 310 is configured to count the number of times that the transmission rate of the at least one fragment that has been successfully transmitted exceeds the preset range continuously, and determine whether the counted number of times reaches a preset third threshold. If the counted number of times does not reach the third threshold, the first setting module 304 is executed. If the counted number reaches the third threshold, the second setting module 307 is executed.
  • first setting module 304 and the second setting module 307 are further configured to further determine whether a size of the to-be-transmitted portion of the file is less than a preset fourth threshold, and if yes, setting a current fragment to be transmitted.
  • the size is the size of the portion of the file to be sent, and then the intercepting module 305 is executed. If not, the intercept module 305 is directly executed.
  • the file transmission method provided by the fourth embodiment of the present invention can be further referred to, and is not repeated here.
  • the file transmission device 400 of the present embodiment further defines the update condition of the current transmission state, so that the size of the slice to be transmitted can be more adapted to the transmission capability of the network, thereby improving the transmission speed of the file.
  • a twelfth embodiment of the present invention provides a file transfer apparatus 500.
  • the transfer module 102 further includes a file transfer device 100 according to the eighth embodiment. Includes:
  • the submitting module 501 is configured to submit the fragment extracted from the file into the to-be-transmitted queue in a main process.
  • the waiting module 502 is configured to continuously wait for an interrupt signal.
  • the first monitoring module 503 is configured to monitor whether the main process generates uplink data traffic within a predetermined time period, and if not, issue an interrupt waiting request, and attach the main process to the interrupt waiting request within a predetermined time period. Generates information about upstream data traffic.
  • the first monitoring module 503 After issuing the interrupt waiting request, the first monitoring module 503 will stop monitoring whether the main process generates uplink data traffic within a predetermined time period. If it is monitored that the main process generates uplink data traffic within a predetermined time period, the first monitoring module 503 can also prompt the user that the file is being sent by animation, text, or the like. In this embodiment, the first monitoring module 503 can execute in a new monitoring process different from the main process.
  • the second monitoring module 504 is configured to trigger the waiting module 502 to stop waiting for the interrupt signal if receiving the interrupt waiting request or the reply information returned by the receiving end.
  • the waiting module 502 If the waiting module 502 is stopped to wait for the interrupt signal due to receiving the interrupt waiting request, the information that the uplink data flow is not generated within the predetermined time period according to the interrupt pending request is returned, and the fragment transmission failure is returned. The result of the transmission.
  • the waiting module 102 is triggered to stop waiting for the interrupt signal due to receiving the reply message returned by the receiving end 120, it is determined according to the reply message whether the receiving end 120 successfully receives the fragment. If the receiving end 120 does not successfully receive the fragment, it also returns the transmission result of the fragment transmission failure. If the receiving end 120 has successfully received the fragment, it returns a transmission result of the successful transmission of the fragment.
  • the second monitoring module 504 also triggers the first monitoring module 503 to stop monitoring whether the main process generates uplink data traffic within a predetermined time period.
  • the file transmission device 500 may further include a third monitoring module 505 for During the waiting for the module 502 to continuously wait for an interrupt signal, it is monitored whether a network anomaly has occurred. If the network abnormality is detected, the waiting module 502 is triggered to stop waiting for the interrupt signal, and the first monitoring module 503 is triggered to end monitoring whether the main process generates uplink data traffic within a predetermined time period, and returns the fragment transmission failure. The result of the transmission.
  • the file transmission method provided by the sixth embodiment of the present invention can be further referred to, and will not be repeated here.
  • the file transmission apparatus 500 of this embodiment uses the duration of monitoring the main process that does not generate uplink data traffic to determine whether the fragmentation is successfully transmitted. Compared with the traditional processing method of sending timeout, the file transmission apparatus 500 can be better adapted.
  • An unstable network environment such as the mobile Internet, improves the success rate of fragment transmission and reduces the waste of traffic due to timeout problems during fragment transmission.
  • the first monitoring module 503 includes:
  • the startup sub-module 5031 is configured to start the monitoring process, record the uplink data traffic generated by the main process as TBo, start a counter, set the initial value of the counter T to zero, and start a timer (Timer The timer is used to trigger the acquisition sub-module 5032 every time a predetermined time t elapses.
  • the obtaining sub-module 5032 is configured to record, when triggered by the timer, the uplink data traffic TBn that has been generated by the main process, and obtain the uplink data traffic TBo that has been generated by the main process recorded by the timer. If this time is triggered by the timer for the first time, the uplink data traffic TB 0 generated by the main process recorded when the monitoring process is started is obtained.
  • the determining sub-module 5033 is configured to determine that the preset time t is triggered before the timer is triggered by the timer. Whether the uplink data traffic TB generated by the process is zero, the TB can be obtained by solving the difference between the TBn and the TBo.
  • the prompt sub-module 5034 is configured to clear the value T of the counter if the TB is not zero, and prompt the user that the file is being sent.
  • the update submodule 5035 is configured to update the counter value T to T+t if the TB is zero, and determine whether the counter updated value T is less than a preset upper threshold Tmax. If T is less than the Tmax, the acquisition sub-module 5032 is re-executed.
  • the sending submodule 5036 is configured to issue the interrupt waiting request if T is not less than the Tmax, and add, in the interrupt waiting request, information that the main process does not generate uplink data flow within a predetermined time period.
  • the file transmission method provided by the seventh embodiment of the present invention can be further referred to, and is not repeated here.
  • the file transmission apparatus 600 provided in this embodiment may further determine that the main process is in a predetermined period of time by periodically monitoring the uplink data traffic of the main process, compared to the file transmission apparatus 500 of the twelfth embodiment. Is there any upstream data traffic generated?
  • an embodiment of the present invention further provides a computer readable storage medium having stored therein computer executable storage medium, such as a nonvolatile memory such as an optical disk, a hard disk, or a flash memory.
  • computer executable instructions are for causing a computer or the like to perform various operations in the above file transfer method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明涉及一种文件传输方法,包括:提取步骤:从待传输至接收端的文件中提取一个分片;传输步骤:将该分片提交至待传输队列,并监控该分片是否传输成功;判断步骤:若该分片未传输成功,则判断该分片的重传次数是否达到预设的次数阈值;重传步骤:若该分片的重传次数未达到该次数阈值,则在等待一段预设时间后重新执行该传输步骤,并更新该分片的重传次数。本发明还提供一种文件传输装置及存储介质。利用本发明可以提高文件的单个分片的传输成功率,进而提升该文件的传输成功率。

Description

一种文件传输方法、 装置及存储介质:
技术领域
本发明涉及互联网技术领域, 特别涉及一种文件传输方法、 装置及存储 介质。 背景技术
目前在互联网上进行文件传输的方法通常是将该文件分成若干个大 小相同的分片, 然后将这若干个分片按照顺序依次传输至接收端。若其中 的某一个分片由于一些原因(如服务器原因、 网络故障或传输超时等)传 输失败, 则会选择立刻重传该分片。 若该分片的重传次数达到预设阈值, 则该文件的本次传输宣告失败,但可以重新尝试传输该文件, 并且接着该 文件前次传输时最后传输成功的分片之后做断点续传,直至完成整个文件 的传输。 在有线互联网下, 由于网络质量相对稳定, 这种一旦传输失败后立刻 重传分片的机制还是非常有效的,能够提升整个文件的传输成功率。然而, 在网络质量变化很快的移动互联网下,从故障状态恢复需要花费比有线互 联网更长的时间。 因此, 分片在立刻重传后再次失败的概率非常高, 无法 提升整个文件的传输成功率。
发明内容
有鉴于此, 有必要提供一种文件传输方法、 装置及存储介质, 可以提 高文件的单个分片的传输成功率, 进而提升该文件的传输成功率。
一种文件传输方法, 包括以下步骤: 提取步骤: 从待传输至接收端的 文件中提取一个分片; 传输步骤: 将该分片提交至待传输队列, 并监控该 分片是否传输成功; 判断步骤: 若该分片未传输成功, 则判断该分片的重 传次数是否达到预设的次数阈值; 重传步骤: 若该分片的重传次数未达到 该次数阈值, 则在等待一段预设时间后重新执行该传输步骤, 并更新该分 片的重传次数。
一种文件传输装置, 包括: 提取模块, 用于从待传输至接收端的文件 中提取一个分片; 传输模块, 用于将该分片提交至待传输队列, 并监控该 分片是否传输成功; 判断模块, 用于若该分片未传输成功, 则判断该分片 的重传次数是否达到预设的次数阈值; 重传模块, 用于若该分片的重传次 数未达到该次数阈值, 则在等待一段预设时间后重新执行该传输步骤, 并 更新该分片的重传次数。
此外, 本发明还提供一种包含计算机可执行指令的存储介质, 该计算 机可执行指令用于执行一种文件传输方法, 包括以下步骤: 提取步骤: 从 待传输至接收端的文件中提取一个分片; 传输步骤: 将该分片提交至待传 输队列, 并监控该分片是否传输成功; 判断步骤: 若该分片未传输成功, 则判断该分片的重传次数是否达到预设的次数阈值; 重传步骤: 若该分片 的重传次数未达到该次数阈值,则在等待一段预设时间后重新执行该传输 步骤, 并更新该分片的重传次数。 相对于现有技术, 本发明在文件的单个分片传输失败后, 将等待一段 时间再重传该分片, 可以提高文件的单个分片的传输成功率, 进而提升该 文件的传输成功率。
为让本发明的上述和其他目的、 特征和优点能更明显易懂, 下文特 举较佳实施例, 并配合所附图式, 作详细说明如下。
附图概述
图 1为本发明第一实施例提供的文件传输方法执行时的环境示意图。 图 2为本发明第一实施例提供的文件传输方法的流程图。 图 3为本发明第二实施例提供的文件传输方法的流程图。
图 4为图 3中检查文件是否已传输完成的方法的流程图。
图 5为本发明第三实施例提供的文件传输方法的流程图。
图 6为本发明第四实施例提供的文件传输方法的流程图。
图 7为本发明第五实施例提供的文件传输方法的流程图。
图 8为本发明第六实施例提供的文件传输方法的流程图。
图 9为本发明第七实施例提供的文件传输方法的流程图。
图 10为本发明第八实施例提供的文件传输装置的框图。
图 11为本发明第九实施例提供的文件传输装置的框图。
图 12为本发明第十实施例提供的文件传输装置的框图。
图 13为本发明第十一实施例提供的文件传输装置的框图。
图 14为本发明第十二实施例提供的文件传输装置的框图。
图 15为本发明第十三实施例提供的文件传输装置的框图。
本发明的较佳实施方式
为更进一步阐述本发明为实现预定发明目的所采取的技术手段及功 效, 以下结合附图及较佳实施例, 对依据本发明的具体实施方式、 结构、 特征及其功效, 详细说明如后。
第一实施例
本发明第一实施例提供一种文件传输方法, 其可由一发送端执行, 用 于将文件发送至一个接收端中。 上述的发送端与接收端例如是计算机、移 动电子终端或者其他类似的运算装置。 参阅图 1所示, 其为上述的文件传 输方法执行时的环境示意图。发送端 110通过网络 10与接收端 120相连。 该网络 10可为任意的网络连接方式, 例如互联网 (Internet ) 、 移动互联 网 (如电信运营商提供的 2G、 3G网络) 、 局域网 (有线或者无线) 等。
以下结合具体的实施例对上述的文件传输方法详细描述如下: 图 2为第一实施例提供的文件传输方法的流程图,该文件传输方法包 括以下步骤:
步骤 S101 , 从待传输至接收端 120的文件中提取一个分片; 步骤 S102, 将该分片提交至待传输队列, 并监控该分片是否传输成 功;
步骤 S103 , 若该分片未传输成功, 则判断该分片的重传次数是否达 到预设的次数阈值;
步骤 S104, 若该分片的重传次数未达到该次数阈值, 则在等待一段 预设时间后重新执行所述步骤 S102, 并更新该分片的重传次数。
按照上述的文件传输方法,在文件的单个分片传输失败后, 将等待一 段时间再重传该分片, 相比于传统的一旦传输失败就立刻重传分片的方 式, 该方法能够提高文件的单个分片的传输成功率, 进而提升该文件的 传输成功率。
在一些实例中, 上述方法的各步骤的实现细节如下:
步骤 S101所述的文件可以是图片、 文档、 视频等。 在本实施例中, 可以按照固定的分片大小从该文件中提取分片。 若为首次传输该文件, 则 以该文件的首字节为首个分片的起点提取该首个分片,当该首个分片成功 传输到该接收端 120后, 再根据该固定的分片大小设置下个分片的起点, 依此类推。 若为失败后重新传输该文件, 则依然以该文件的首字节为首个 分片的起点提取该首个分片。 当该首个分片成功传输到该接收端 120后, 接收该接收端 120返回的已成功接收的该文件的字节数, 再将接收端 120 返回的该字节数设为下个分片的起点,以实现接在已成功传输的分片后继 续传输该文件, 即 "断点续传" 。
步骤 S102中, 该发送端 110和该接收端 120可以是基于传输控制协 议 ( Transmission Control Protocol, TCP )连接的。 相应的, 所述的待传 输队列可以是 TCP的输出緩沖区。 位于该输出緩沖区内的分片会交由操 作系统完成物理层的发送。 具体的物理层发送过程由操作系统进行控制, 在此不再赘述。
在本实施例中,还可以先对该分片和该文件进行加密处理, 例如使用 MD5 ( Message-Digest Algorithm 5 , 消息摘要算法第五版 )加密算法处理, 然后将该分片及其加密值与该文件的加密值封装成一个数据包提交至该 待传输队列, 以确保该分片和文件在传输过程中的完整性。
监控该分片是否传输成功可以采用设定未收到回复信息的超时时间 的方法。在所设定的超时时间内,若未收到该接收端 120返回的回复信息, 则判断该分片传输失败。若在所设定的超时时间内收到该接收端 120返回 的回复信息, 则根据该回复信息判断该分片是否传输成功。
步骤 S103所述的重传次数为该分片每次传输失败后被再次提交至该 待传输队列进行传输的次数。 当一个分片首次被传输时,将该分片的重传 次数初始化为零,之后每当该分片传输失败后再次进行传输时,将累计该 分片的重传次数。 若该分片的重传次数达到该次数阈值, 则判断该文件传 输失败, 可以结束传输或重新传输该文件。
步骤 S104所述的预设时间将随着该分片的重传次数的增加而延长。 延长该预设时间可以采用指数回退的方法, 例如先设置一个基准时间 Ti, 假设该分片的重传次数为 C, 而该预设时间为 T0 , 则该 T0的计算公式可 以是: Τ0=Ή*2Λ(( -1)。 在该分片首次传输失败后等待该基准时间 Ti后再 重传, 如果这次重传后再传输失败, 则再等待比该基准时间 Ti多一倍的 时间后再重传该分片,依此类推。 由于在网络质量较差的互联网下从故障 状态恢复到正常状态需要花费较多的时间,经过预设时间的等待后再重传 该分片,可以使该分片的传输成功率相较于传输失败后立刻重传该分片更 高。 第二实施例
为了实现文件的完整传输, 参阅图 3所示, 第二实施例提供一种文件 传输方法, 其相比于第一实施例的文件传输方法, 在所述步骤 S102后进 一步包括:
步骤 S105 , 若该分片传输成功, 则检查该文件是否已传输完成, 若 该文件未传输完成, 则返回步骤 S101 , 若该文件已传输完成, 则判定该 文件传输成功。 具体而言, 参阅图 4所示, 所述检查该文件是否已传输完 成的步骤包括:
步骤 S105.1 ,接收该接收端 120返回的回复信息,该回复信息包括该 接收端 120已接收该文件所有分片大小的总和。
步骤 S105.2 ,判断该接收端 120已接收该文件所有分片大小的总和与 该文件的大小是否相等, 若是, 则判定该文件已传输完成, 若否, 则判定 该文件未传输完成。
经过上述流程,可以确定该文件是否传输完成,若该文件未传输完成, 则继续从该文件中提取下一个分片进行传输, 直至文件传输完成。 第三实施例
根据第一实施例提供的文件传输方法在互联网上传输文件,是按照固 定的分片大小从该文件中提取分片依次进行传输。然而在不同质量和带宽 的网络下, 文件分片的大小只有达到某一个值时,传输速率才能达到该网 络下的最大值。 因此, 采用固定大小的分片进行传输时, 如果网络质量很 好, 而分片的大小相对较小时, 就可能会限制传输速率。 尤其是在网络带 宽和质量经常变化的移动互联网中, 若分片的大小不合适, 就会使得网络 不能发挥最大的传输能力, 无法提升文件的传输速度。
为进一步解决上述问题, 参阅图 5所示, 本发明第三实施例提供一种 文件传输方法, 其相比于第一实施例的文件传输方法, 所述的步骤 S101 进一步包括:
步骤 S201 , 获取该文件中至少一个已经完成传输的分片的传输参数, 该传输参数包括分片大小以及传输速率;
步骤 S202 , 根据该至少一个已经完成传输的分片的传输参数计算速 率变化指数, 该速率变化指数表征传输速率相对于该分片大小变化的速 率;
步骤 S203 , 判断该速率变化指数是否小于预设的第一阈值, 若是, 则更新当前传输状态为一个不同的状态;
步骤 S204 , 获取与该当前传输状态对应的系数, 并设定当前待传输 分片的大小为该文件中最近完成传输的分片大小与该系数的乘积;
步骤 S205 , 按照所设定的该当前待传输分片的大小从该文件中截取 当前待传输的分片进行传输。
按照上述的文件传输方法, 根据文件中已完成传输的分片的传输参 数动态地设定文件当前待传输分片的大小, 可以使该当前待传输分片的 大小能够适应网络质量和带宽的要求,从而提升网络在传输文件时的有效 带宽和文件的传输速度。
在一些实例中, 上述方法的各步骤的实现细节如下:
步骤 S201所述的传输速率可以根据每个已经完成传输的分片的大小 和传输时间计算得出。该传输时间是指相应分片从发送出去到接收到该接 收端 120 回复的表示接收成功的信息之间的时间段。 计算出该传输速率 后, 还可以对该传输速率使用预先设定的平滑因子进行平滑处理。 步骤 S202所述的速率变化指数表征传输速率相对于该分片大小变化 的速率, 即在该至少一个已经完成传输的分片中, 当分片大小变化时, 分 片的传输速率相应的变化情况。 当分片大小以一定的增长速度增长时, 该 传输速率也有相应的提升,则说明此时分片大小的增长速度能满足该传输 速率提升的要求。 而当分片大小以该增长速度增长时, 该传输速率没有相 应的提升,则说明此时分片大小的增长速度已不能满足传输速率提升的要 求, 需要放慢分片大小的增长速度或保持分片大小不变。
步骤 S203所述的第一阈值用于界定分片大小的增长速度是否能够满 足传输速率提升的要求。所述的当前传输状态即表示该分片大小的增长速 度。在本实施例中,该当前传输状态包括第一状态、第二状态和第三状态。 每个状态对应一个用于表示分片大小的增长速度的系数。 其中, 该第一状 态和第二状态对应的系数大于 1 , 并且第一状态对应的系数大于第二状态 对应的系数,表示第一状态下分片大小的增长速度要高于第二状态下分片 大小的增长速度。 该第三状态对应的系数为 1 , 表示第三状态下分片大小 保持不变。
具体而言, 步骤 S203还包括确定当前传输状态, 若该速率变化指数 小于该第一阈值, 且当前传输状态为该第一状态, 则更新当前传输状态为 该第二状态, 即放慢该分片大小的增长速度。若该速率变化指数小于该第 一阈值, 且当前传输状态为该第二状态, 则更新当前传输状态为该第三状 态, 即进一步放慢该分片大小的增长速度。
步骤 S204获取与更新后的该当前传输状态对应的系数, 并设定当前 待传输分片的大小为该最近完成传输的分片大小与该系数的乘积。若该当 前传输状态为第一状态或第二状态,则在该最近完成传输的分片大小的基 础上相应增大以设定待传输分片的大小。 若该当前传输状态为第三状态, 则设定待传输分片的大小与该最近完成传输的分片大小相同。 步骤 S205按照所设定的该当前待传输分片的大小从该文件中截取当 前待传输的分片, 再执行所述步骤 S102以传输该分片。 第四实施例
参阅图 6所示, 本发明第四实施例提供一种文件传输方法,相比于第 三实施例的文件传输方法,对该当前传输状态的更新条件作出了进一步限 定, 以使所设定的待传输分片的大小更加适应网络的传输能力,从而提升 文件的传输速度。
相比于第三实施例的文件传输方法,本实施例的文件传输方法进一步 包括:
步骤 S200, 在执行所述步骤 S201前, 判断当前待传输的分片是否为 该文件的首个分片, 若当前待传输的分片为该文件的首个分片, 则执行步 骤 S206 , 若当前待传输的分片不为该文件的首个分片, 则执行所述步骤 S201。
步骤 S206 , 设定当前待传输分片的大小为当前网络类型 (例如电信 运营商提供的 2G/3G网络、 WIFI网络等) 下分片大小的默认值, 并将该 当前传输状态更新为该第一状态, 然后执行步骤 S205。
步骤 S207 , 在执行所述步骤 S203之前, 确定该当前传输状态是否为 该第一状态或第二状态。 若当前状态为第一状态或第二状态, 则执行步骤 S208。 若当前状态为第三状态, 则执行步骤 S209。
步骤 S208 , 判断该至少一个已经完成传输的分片中, 每种分片大小 的使用次数是否分别达到预设的第二阈值(例如 2次)。 若该每种分片大 小的使用次数达到该第二阈值, 则执行所述步骤 S203 , 若该每种分片大 小的使用次数未达到该第二阈值, 则执行所述步骤 S204。
步骤 S209 , 统计该至少一个已经完成传输的分片的传输速率连续超 出预设范围的次数, 并判断所统计的次数是否达到预设的第三阈值。若所 统计的次数未达到该第三阈值, 则执行所述步骤 S204。 若所统计的次数 达到该第三阈值, 则执行所述步骤 S206。
值得注意的是,由于文件待发送部分的大小可能不足以按照所设定的 当前待传输分片的大小从该文件中截取当前待传输的分片,或者在按照所 设定的当前待传输分片的大小从该文件中截取当前待传输的分片后,文件 待发送部分的大小较小,没必要再将文件待发送部分作为下一个分片进行 传输, 因此, 所述步骤 S204和步骤 S206可以进一步包括: 判断该文件 待发送部分的大小是否小于预设的第四阈值。若该文件待发送部分的大小 小于该第四阈值,则设定当前待传输分片的大小为该文件待发送部分的大 小, 然后再执行所述步骤 S205。 若该文件待发送部分的大小不小于该第 四阈值, 则直接执行该步骤 S205。
按照本实施的文件传输方法,对该当前传输状态的更新条件作出了进 一步限定, 可以使所设定的待传输分片的大小更加适应网络的传输能力, 从而提升文件的传输速度。 第五实施例
参阅图 7所示, 本发明第五实施例提供一种文件传输方法, 其相比于 第四实施例的文件传输方法, 进一步对所述步骤 S101提出一种具体的实 现方案。先设所获取的该文件中至少一个已经完成传输的分片的传输参数 包括: 该文件的首个分片的大小 Sl 在该分片大小 Si下的传输速率的平 滑值 Vl 最近完成传输的分片大小 Sn, 在该分片大小 8。下的传输速率的 平滑值 Vs, 与该分片大小 Sn不同且在该分片大小 Sn之前最近传输的分片 大小 S0, 在该分片大小 S0下的传输速率的平滑值 V0。 设该当前待传输分 片的大小为 Sn+1 , 则本实施例相比于第四实施例的文件传输方法, 所述步 骤 S101进一步包括:
步骤 S11 , 判断该 Sn是否为 0。 若 Sn不为 0, 则说明当前待传输的分 片不为该文件的首个分片, 进入步骤 S12。 若 Sn为 0, 则说明当前待传输 的分片为该文件的首个分片, 进入步骤 S25。
步骤 S12, 更新该 Sn的使用次数 N。
步骤 S 13 , 根据所获取的该 ν1 ¾ SN、 VS
Figure imgf000013_0001
Vq计算该速率变 化指数 S。 计算该 S的公式为: S = [(VS- VoV Vi]/ [(Sn - So)/ S!] 0
步骤 S14, 确定当前传输状态。 若当前传输状态为该第一状态, 则进 入步骤 S15。 若该当前传输状态为该第二状态, 则进入步骤 S18。 若当前 传输状态为该第三状态, 则进入步骤 S21。
步骤 S 15 , 判断是否该 Sn的使用次数 N等于预设的第二阈值 Nmax , 且所计算出的该速率变化指数 S小于预设的第一阈值 Smin。 若是, 则进 入步骤 S16, 若否, 则进入步骤 S17。
步骤 S16, 更新当前传输状态为第二状态, 设定 Sn+1为第二状态对应 的系数 B与 Sn的乘积, 然后进入步骤 S27。
步骤 S17 , 设定 Sn+1为第一状态对应的系数 A与 S 々乘积, 然后进 入步骤 S27。
步骤 S 18 , 判断是否该 Sn的使用次数 N等于预设的第二阈值 Nmax , 且所计算出的该速率变化指数 S小于预设的第一阈值 Smin。 若是, 则进 入步骤 S19, 若否, 则进入步骤 S20。
步骤 S19, 更新当前传输状态为第三状态, 设定 8。+1与 811相等, 然 后进入步骤 S27。
步骤 S20, 设定 Sn+1为第二状态对应的系数 B与 S 々乘积, 然后进 入步骤 S27。
步骤 S21 ,判断 Vs与第三状态下的基准速率 Vstable之间的差值是否小 于预设的第五阈值。 若否, 说明该最近完成传输的分片的传输速率超出 该预设范围, 则进入步骤 S22。 若是, 说明该最近完成传输的分片的传 输速率未超出该预设范围, 则进入步骤 S23。 该第五阈值可以为该基准 速率 Vstable与某百分比常量 D的乘积。
步骤 S22 , 更新该最近完成传输的分片的传输速率超出该预设范围的 次数 M, 即在该 M的基础上加 1。
步骤 S23 ,将该最近完成传输的分片的传输速率超出该预设范围的次 数 M清零。
步骤 S24 ,判断该最近完成传输的分片的传输速率超出该预设范围的 次数 M是否达到预设的第三阈值 Mmax。 若是, 则进入步骤 S25。 若否, 则进入步骤 S26。
步骤 S25 , 更新当前传输状态为第一状态, 设定 811+1与 81相等, 然 后进入步骤 S27。
步骤 S26 , 设定 Sn+1与 Sn相等。
步骤 S27 , 判断该文件待发送部分的大小 Fs是否小于预设的第四阈 值F。 若是, 则进入步骤 S28。 若否, 则进入步骤 S29。
步骤 S28 , 设定 Sn+1与 Fs相等。
步骤 S29 , 返回所设定的 Sn+1 , 按照所设定的 Sn+1的分片大小从该文 件中截取当前待传输的分片以进行传输。 第六实施例
根据第一实施例提供的文件传输方法在互联网上传输文件,是采用设 定未收到回复信息的超时时间来监控分片是否传输成功的。该超时时间一 般是根据分片大小和不同互联网的平均带宽或最近的历史带宽实测数据 所估算出来的一个固定值或动态值。 然而, 由于移动互联网特别是非 WIFI网络的网络质量变化非常快且 幅度很大, 远没有有线网络那么稳定, 在绝大多数时候, 某一种移动互联 网下的实际带宽都与统计得到的平均带宽有很大的差距。因此使用根据分 片大小和互联网的平均带宽估算出来的超时时间,在文件分片的实际传输 过程中将非常容易超时。而由于移动互联网的网络质量变化快而且经常是 "非连续" 、 "跳变" 的, 根据历史测量得到的前一刻的带宽很难作为一 个依据去估计后一刻的带宽。 因此,使用设定该超时时间来监控分片是否 传输成功, 容易导致文件单个分片的传输失败率很高。 此外, 由于达到超 时时间而宣告文件的分片传输失败后,数据还是会经网络传输完毕才会结 束该分片的传输过程,造成这个分片的整个发送过程所产生的流量都因为 传输失败的结果而浪费掉了。
为进一步解决上述问题, 参阅图 8所示, 本发明第六实施例提供一种 文件传输方法, 其相比于第一实施例的文件传输方法, 所述的步骤 S102 进一步包括:
步骤 S301 , 在一主进程内将从该文件中提取的分片提交至该待传输 队列中;
步骤 S302, 持续等待中断信号;
步骤 S303 ,监控该主进程在预定时间段内是否有上行数据流量产生, 若否, 则发出中断等待请求, 并在该中断等待请求中附加该主进程在预定 时间段内未产生上行数据流量的信息;
步骤 S304, 若接收到该中断等待请求或者该接收端返回的回复信息, 则结束该步骤 S302。
按照本实施例的文件传输方法, 采用监控主进程未产生上行数据流 量的持续时间来判断分片是否传输成功, 相比于传统的发送超时的处理 方式, 能够更好地适应不稳定的网络环境如移动互联网, 提高分片传输 的成功率, 并减少在分片传输过程中由于超时问题导致的流量浪费。 在一些实例中, 上述方法的各步骤的实现细节如下:
步骤 S301中所述的主进程是指要传输该分片的进程。 例如, 某一文 件传输应用所在的进程。 该分片可以按照超文本传输协议 (HyperText Transfer Protocol, HTTP )封装成网络数据包。
步骤 S302所述的中断信号包括所述的中断等待请求或者接收端 120 返回的回复信息等等。 此外, 在步骤 S302执行的过程中, 还可以中断主 进程的执行。
步骤 S303可以在不同于该主进程的一个新的监控进程中执行。 所述 的预定时间段是可以允许的网络超时时间,其可以按照具体的需要进行设 定, 例如可以选 5秒。所述的上行数据流量是主进程将该分片提交给该待 传输队列后,该待传输队列将该分片交由操作系统通过网络传输出去而产 生的。
若主进程在该预定时间段内未产生上行数据流量,则说明主进程在该 预定时间段内没有任何一个字节被通过网络传输出去,意味着本次该分片 传输失败, 因此需要发出该中断等待请求以使主进程停止等待中断信号。 在发出该中断等待请求后, 该步骤 S303结束。
若主进程在该预定时间段内有上行数据流量产生,则说明主进程在该 预定时间段内有数据被通过网络传输出去, 意味着该分片正在发送过程 中。 为了避免用户由于等待而产生的焦虑心情, 若主进程在该预定时间段 内有上行数据流量产生, 步骤 S303还可以通过动画、 文字等方式提示用 户该文件正在发送中。
步骤 S304中, 若是由于接收到该中断等待请求而结束步骤 S302, 则 根据该中断等待请求中附加的该主进程在预定时间段内未产生上行数据 流量的信息, 返回该分片传输失败的传输结果。 若是由于接收到接收端 120 返回的回复信息而结束步骤 S302, 则根据该回复信息判断该接收端 120是否成功接收该分片。 若该接收端 120未成功接收该分片, 也返回该 分片传输失败的传输结果。 若该接收端 120已成功接收该分片, 则返回该 分片传输成功的传输结果。 当接收到该接收端 120返回的回复信息后,触 发步骤 S303结束。
此外, 在步骤 S302后, 还可以有一个监控是否发生网络异常, 例如 网络连接断开、 网络连接受限制等网络异常的步骤。 若发生该网络异常, 则结束步骤 S302和步骤 S303 , 并返回该分片传输失败的传输结果。 第七实施例
参阅图 9所示, 本发明第七实施例提供一种文件传输方法, 其相比于 第六实施例的文件传输方法,进一步对所述步骤 S303提出一种实现方案: 通过周期性地监控该主进程的上行数据流量来判断主进程在预定时间段 内是否有上行数据流量产生。 具体而言, 该步骤 S303包括:
步骤 S1 , 启动所述的监控进程, 记录该主进程已产生的上行数据流 量为 TBo。 启动一个计数器, 将该计数器的值 T的初始值赋为零, 该计 数器用于对主进程未产生上行数据流量的持续时间进行计时。启动一个定 时器 (Timer ) , 该定时器用于每经过一段预设时间 t触发一次步骤 S2。
步骤 S2, 每当被该定时器触发时, 记录主进程已产生的上行数据流 量 TBn,并获取上一次被该定时器触发时所记录的主进程已产生的上行数 据流量 TBo。 若本次为第一次被该定时器触发, 则获取该监控进程启动时 所记录的主进程已产生的上行数据流量 TBo。
步骤 S3 , 判断在本次被定时器触发前的预设时间 t 内主进程产生的 上行数据流量 TB是否为零,该 TB可以通过求解所述 TBn与 TBo之差值 而得出。 若该 TB 不为零, 则执行步骤 S4, 若该 TB 为零, 则执行步骤 S5。
步骤 S4, 将计数器的值 T清零, 并提示用户该文件正在发送中。 该 TB不为零说明在本次被定时器触发前的预设时间 t内主进程有上行数据 流量产生, 该文件正在发送中, 因此需要将该计数器的值 T 清零, 以便 对该主进程未产生上行数据流量的持续时间重新进行计时。
步骤 S5 , 将计数器的值 T更新为 T+t, 并判断计数器更新后的值 T 是否小于预设上限阈值 Tmax。 该预设上限阈值 Tmax为所述预设时间 t 的整数倍。 若 T小于该 Tmax, 则返回步骤 S2。 若 T不小于该 Tmax, 则 执行步骤 S6。
步骤 S6, 发出该中断等待请求, 并在该中断等待请求中附加该主进 程在预定时间段内未产生上行数据流量的信息。该预定时间段即为从当前 时间点起, 刚刚过去的该预设上限阈值 (例如 5秒) 的时间段。
综上所述,在第六实施例的文件传输方法的基础上, 本实施例提供的 文件传输方法可以进一步通过周期性地监控该主进程的上行数据流量来 判断主进程在预定时间段内是否有上行数据流量产生。 第八实施例
参阅图 10所示, 本发明第八实施例提供一种文件传输装置 100, 包 括提取模块 101、 传输模块 102、 判断模块 103和重传模块 104。 可以理 解, 上述的各模块是指计算机程序或者程序段, 用于执行某一项或多项特 定的功能。 此外, 上述各模块的区分并不代表实际的程序代码也必须是分 开的。
提取模块 101 , 用于从待传输至接收端的文件中提取一个分片。
传输模块 102, 用于将该分片提交至待传输队列, 并监控该分片是否 传输成功。 在本实施例中, 还可以先对该分片和该文件进行加密处理, 然 后将该分片及其加密值与该文件的加密值封装成一个数据包提交至该待 传输队列, 以确保该分片和文件在传输过程中的完整性。
判断模块 103 , 用于若该分片未传输成功, 则判断该分片的重传次数 是否达到预设的次数阈值。 若该分片的重传次数达到该次数阈值, 则判断 该文件传输失败, 可以结束传输或重新传输该文件。
重传模块 104, 用于若该分片的重传次数未达到该次数阈值, 则在等 待一段预设时间后重新执行该传输模块 102, 并更新该分片的重传次数。 所述的预设时间将随着该分片的重传次数的增加而延长。
对于以上各模块的具体工作过程,可进一步参考本发明第一实施例提 供的文件传输方法, 在此不再重复。
综上所述, 本实施例的文件传输装置 100, 在文件的单个分片传输失 败后, 将等待一段时间再重传该分片,相比于传统的一旦传输失败就立刻 重传分片的方式, 该方法能够提高文件的单个分片的传输成功率, 进而 提升该文件的传输成功率。 第九实施例
参阅图 11所示, 本发明第九实施例提供一种文件传输装置 200, 其 相比于第八实施例的文件传输装置 100, 还包括:
检查模块 105 , 用于若该分片传输成功, 则检查该文件是否已传输完 成。若该文件未传输完成,执行所述提取模块 101。若该文件已传输完成, 则判定该文件传输成功。
具体而言, 该检查模块 105先接收该接收端 120返回的回复信息, 该 回复信息包括该接收端 120已接收该文件所有分片大小的总和。 然后,检 查模块 105判断该接收端 120已接收该文件所有分片大小的总和与该文件 的大小是否相等, 若是, 则判定该文件已传输完成, 若否, 则判定该文件 未传输完成。
对于以上模块的具体工作过程,可进一步参考本发明第二实施例提供 的文件传输方法, 在此不再重复。
综上所述, 本实施例的文件传输装置 200 , 可以确定该文件是否传输 完成,若该文件未传输完成,则继续从该文件中提取下一个分片进行传输, 直至文件传输完成。 第十实施例
参阅图 12所示, 本发明第十实施例提供一种文件传输装置 300 , 其 相比于第八实施例的文件传输装置 100 ,所述的提取模块 101进一步包括: 获取模块 301 , 用于获取该文件中至少一个已经完成传输的分片的传 输参数, 该传输参数包括分片大小以及传输速率。所述的传输速率可以根 据每个已经完成传输的分片的大小和传输时间计算得出。计算出该传输速 率后, 还可以对该传输速率使用预先设定的平滑因子进行平滑处理。
计算模块 302, 用于根据该至少一个已经完成传输的分片的传输参数 计算速率变化指数,该速率变化指数表征传输速率相对于该分片大小变化 的速率。
第一判断模块 303 , 用于判断该速率变化指数是否小于预设的第一阈 值, 若是, 则更新当前传输状态为一个不同的状态。 在本实施例中, 该当 前传输状态包括第一状态、 第二状态和第三状态。每个状态对应一个用于 表示分片大小的增长速度的系数。 其中, 该第一状态和第二状态对应的系 数大于 1 , 并且第一状态对应的系数大于第二状态对应的系数。 该第三状 态对应的系数为 1。 具体而言, 若该速率变化指数小于该第一阈值, 且当 前传输状态为该第一状态, 则更新当前传输状态为该第二状态。若该速率 变化指数小于该第一阈值, 且当前传输状态为该第二状态, 则更新当前传 输状态为该第三状态。
第一设定模块 304 , 用于获取与该当前传输状态对应的系数, 并设定 当前待传输分片的大小为该文件中最近完成传输的分片大小与该系数的 乘积。
截取模块 305 , 用于按照所设定的该当前待传输分片的大小从该文件 中截取当前待传输的分片, 再执行该传输模块 102以传输该分片。
对于以上各模块的具体工作过程,可进一步参考本发明第三实施例提 供的文件传输方法, 在此不再重复。
综上所述, 本实施例的文件传输装置 300 ,根据文件中已完成传输的 分片的传输参数动态地设定文件当前待传输分片的大小, 可以使该当前 待传输分片的大小能够适应网络质量和带宽的要求,从而提升网络在传输 文件时的有效带宽和文件的传输速度。 第十一实施例
参阅图 13所示, 本发明第十一实施例提供一种文件传输装置 400, 其相比于第十实施例的文件传输装置 300 , 所述的提取模块 101进一步包 括第二判断模块 306、 第二设定模块 307、 确定模块 308、 第三判断模块 309和第四判断模块 310。
第二判断模块 306, 用于在执行所述获取模块 301之前, 判断当前待 传输的分片是否为该文件的首个分片。若当前待传输的分片为该文件的首 个分片, 则执行第二设定模块 307。 若当前待传输的分片不为该文件的首 个分片, 则执行获取模块 301。
第二设定模块 307 , 用于设定当前待传输分片的大小为当前网络类型 下分片大小的默认值, 并将该当前传输状态更新为该第一状态, 然后执行 截取模块 305。 确定模块 308 , 用于在执行第一判断模块 303之前, 确定当前传输状 态是否为第一状态或第二状态。若该当前传输状态为该第一状态或第二状 态, 则执行第三判断模块 309。 若当前传输状态为第三状态, 则执行第四 判断模块 310。
第三判断模块 309, 用于判断该至少一个已经完成传输的分片中, 每 种分片大小的使用次数是否分别达到预设的第二阈值。若该每种分片大小 的使用次数达到该第二阈值, 则执行第一判断模块 303。 若该每种分片大 小的使用次数未达到该第二阈值, 则执行第一设定模块 304。
第四判断模块 310, 用于统计该至少一个已经完成传输的分片的传输 速率连续超出预设范围的次数,并判断所统计的次数是否达到预设的第三 阈值。 若所统计的次数未达到该第三阈值, 则执行第一设定模块 304。 若 所统计的次数达到该第三阈值, 则执行第二设定模块 307。
此外,所述的第一设定模块 304和第二设定模块 307还用于进一步判 断该文件待发送部分的大小是否小于预设的第四阈值, 若是, 则设定当前 待传输分片的大小为该文件待发送部分的大小,然后再执行所述截取模块 305。 若否, 则直接执行该截取模块 305。
对于以上各模块的具体工作过程,可进一步参考本发明第四实施例提 供的文件传输方法, 在此不再重复。
综上所述,本实施的文件传输装置 400对该当前传输状态的更新条件 作出了进一步限定,可以使所设定的待传输分片的大小更加适应网络的传 输能力, 从而提升文件的传输速度。 第十二实施例
参阅图 14所示, 本发明第十二实施例提供一种文件传输装置 500, 其相比于第八实施例的文件传输装置 100 , 所述的传输模块 102进一步包 括:
提交模块 501 , 用于在一主进程内将从该文件中提取的分片提交至该 待传输队列中。
等待模块 502, 用于持续等待中断信号。
第一监控模块 503 , 用于监控该主进程在预定时间段内是否有上行数 据流量产生, 若否, 则发出中断等待请求, 并在该中断等待请求中附加该 主进程在预定时间段内未产生上行数据流量的信息。
在发出该中断等待请求后,该第一监控模块 503将停止监控该主进程 在预定时间段内是否有上行数据流量产生。若监控到主进程在预定时间段 内有上行数据流量产生, 则第一监控模块 503还可以通过动画、文字等方 式提示用户该文件正在发送中。在本实施例中, 该第一监控模块 503可以 在不同于该主进程的一个新的监控进程中执行。
第二监控模块 504, 用于若接收到该中断等待请求或者该接收端返回 的回复信息, 则触发该等待模块 502停止等待该中断信号。
若是由于接收到该中断等待请求而触发该等待模块 502 停止等待中 断信号,则根据该中断等待请求中附加的该主进程在预定时间段内未产生 上行数据流量的信息, 返回该分片传输失败的传输结果。
若是由于接收到接收端 120 返回的回复信息而触发该等待模块 102 停止等待中断信号,则根据该回复信息判断该接收端 120是否成功接收该 分片。 若该接收端 120未成功接收该分片,也返回该分片传输失败的传输 结果。 若该接收端 120已成功接收该分片, 则返回该分片传输成功的传输 结果。 此外, 当接收到该接收端 120返回的回复信息后, 该第二监控模块 504还将触发该第一监控模块 503停止监控该主进程在预定时间段内是否 有上行数据流量产生。
此外, 该文件传输装置 500还可以包括一个第三监控模块 505 , 用于 在等待模块 502持续等待中断信号的过程中,监控是否发生网络异常。若 监控到发生网络异常, 则触发该等待模块 502停止等待中断信号, 以及触 发该第一监控模块 503 结束监控该主进程在预定时间段内是否有上行数 据流量产生, 并返回该分片传输失败的传输结果。
对于以上各模块的具体工作过程,可进一步参考本发明第六实施例提 供的文件传输方法, 在此不再重复。
综上所述, 本实施例的文件传输装置 500, 采用监控主进程未产生上 行数据流量的持续时间来判断分片是否传输成功, 相比于传统的发送超 时的处理方式, 能够更好地适应不稳定的网络环境如移动互联网, 提高 分片传输的成功率, 并减少在分片传输过程中由于超时问题导致的流量 浪费。 第十三实施例
参阅图 15所示, 本发明第十三实施例提供一种文件传输装置 600 , 其相比于第十二实施例的文件传输装置 500 , 所述的第一监控模块 503 包括:
启动子模块 5031 , 用于启动所述的监控进程, 记录该主进程已产生 的上行数据流量为 TBo , 启动一个计数器, 将该计数器的值 T的初始值 赋为零, 启动一个定时器 (Timer ) , 该定时器用于每经过一段预设时间 t触发一次获取子模块 5032。
获取子模块 5032 , 用于每当被该定时器触发时, 记录主进程已产生 的上行数据流量 TBn,并获取上一次被该定时器触发时所记录的主进程已 产生的上行数据流量 TBo。 若本次为第一次被该定时器触发, 则获取该监 控进程启动时所记录的主进程已产生的上行数据流量 TB 0。
判断子模块 5033 ,用于判断在本次被定时器触发前的预设时间 t内主 进程产生的上行数据流量 TB是否为零, 该 TB可以通过求解所述 TBn与 TBo之差值而得出。
提示子模块 5034, 用于若该 TB不为零, 则将计数器的值 T清零, 并提示用户该文件正在发送中。
更新子模块 5035 , 用于若该 TB为零,则将计数器的值 T更新为 T+t, 并判断计数器更新后的值 T是否小于预设上限阈值 Tmax。 若 T小于该 Tmax, 则重新执行该获取子模块 5032。
发送子模块 5036,用于若 T不小于该 Tmax,则发出该中断等待请求, 并在该中断等待请求中附加该主进程在预定时间段内未产生上行数据流 量的信息。
对于以上各模块的具体工作过程,可进一步参考本发明第七实施例提 供的文件传输方法, 在此不再重复。
综上所述, 相较于第十二实施例的文件传输装置 500, 本实施例提供 的文件传输装置 600 可以进一步通过周期性地监控该主进程的上行数据 流量来判断主进程在预定时间段内是否有上行数据流量产生。
此外, 本发明实施例还提供一种计算机可读存储介质, 其内存储有计 算机可执行指令,上述的计算机可读存储介质例如为非易失性存储器例如 光盘、 硬盘、 或者闪存。 上述的计算机可执行指令用于让计算机或者类似 的运算装置完成上述的文件传输方法中的各种操作。
以上所述,仅是本发明的较佳实施例而已, 并非对本发明作任何形式 上的限制, 虽然本发明已以较佳实施例揭示如上, 然而并非用以限定本发 明, 任何本领域技术人员, 在不脱离本发明技术方案范围内, 当可利用上 述揭示的技术内容做出些许更动或修饰为等同变化的等效实施例,但凡是 未脱离本发明技术方案内容,依据本发明的技术实质对以上实施例所作的 任何筒介修改、 等同变化与修饰, 均仍属于本发明技术方案的范围内。

Claims

权 利 要 求 书
1. 一种文件传输方法, 其特征在于, 该方法包括以下步骤: 提取步骤: 从待传输至接收端的文件中提取一个分片;
传输步骤:将该分片提交至待传输队列,并监控该分片是否传输成功; 判断步骤: 若该分片未传输成功, 则判断该分片的重传次数是否达到 预设的次数阈值; 及
重传步骤: 若该分片的重传次数未达到该次数阈值, 则在等待一段预 设时间后重新执行该传输步骤, 并更新该分片的重传次数。
2. 如权利要求 1 所述的文件传输方法, 其特征在于, 该预设时间随 着该重传次数的增加而延长。
3. 如权利要求 1 所述的文件传输方法, 其特征在于, 所述的判断步 骤还包括:
若该分片的重传次数达到该次数阈值, 则该文件传输失败。
4. 如权利要求 1 所述的文件传输方法, 其特征在于, 还包括检查步 骤:
若该分片传输成功, 则检查该文件是否已传输完成;
若该文件未传输完成, 则返回该提取步骤; 及
若该文件已传输完成, 则该文件传输成功。
5. 如权利要求 4所述的文件传输方法, 其特征在于, 所述检查该文 件是否已传输完成的步骤包括:
接收该接收端返回的回复信息,该回复信息包括该接收端已接收该文 件所有分片大小的总和; 及
若该接收端已接收该文件所有分片大小的总和与该文件的大小相等, 则判定该文件已传输完成。
6. 如权利要求 1 所述的文件传输方法, 其特征在于, 所述的传输步 骤中, 将该分片提交至待传输队列的步骤包括:
对该分片和该文件分别进行加密;
将该分片及其加密值与该文件的加密值封装成一个数据包,然后将该 数据包提交至该待传输队列。
7. 如权利要求 1 所述的文件传输方法, 其特征在于, 所述提取步骤 包括:
获取步骤: 获取该文件中至少一个已经完成传输的分片的传输参数, 该传输参数包括分片大小以及传输速率;
计算步骤:根据该至少一个已经完成传输的分片的传输参数计算速率 变化指数, 该速率变化指数表征传输速率相对于该分片大小变化的速率; 第一判断步骤:判断该速率变化指数是否小于预设的第一阈值,若是, 则更新当前传输状态为一个不同的状态;
第一设定步骤: 获取与该当前传输状态对应的系数, 并设定当前待传 输分片的大小为该文件中最近完成传输的分片大小与该系数的乘积; 及 截取步骤:按照所设定的该当前待传输分片的大小从该文件中截取当 前待传输的分片进行传输。
8. 如权利要求 7所述的文件传输方法, 其特征在于, 所述获取步骤 还包括:
对该传输速率进行平滑处理。
9. 如权利要求 7所述的文件传输方法, 其特征在于, 所述当前传输 状态包括第一状态、 第二状态和第三状态, 其中第一状态和第二状态对应 的系数大于 1 , 并且第一状态对应的系数大于第二状态对应的系数, 第三 状态对应的系数为 1。
10. 如权利要求 9所述的文件传输方法, 其特征在于, 在所述获取步 骤前还包括: 第二判断步骤: 判断当前待传输的分片是否为该文件的首个分片, 若 是, 则执行第二设定步骤, 若否, 则执行该获取步骤; 及
所述第二设定步骤:设定当前待传输分片的大小为当前网络类型下分 片大小的默认值, 并将当前传输状态更新为该第一状态, 然后执行该截取 步骤。
11. 如权利要求 10所述的文件传输方法, 其特征在于, 在所述第一 判断步骤前还包括确定步骤:
确定当前传输状态, 若该当前传输状态为该第一状态或第二状态, 则 执行该第一判断步骤。
12. 如权利要求 11 所述的文件传输方法, 其特征在于, 在所述第一 判断步骤前还包括第三判断步骤:
若该当前传输状态为该第一状态或第二状态,则判断该至少一个已经 完成传输的分片中,每种分片大小的使用次数是否分别达到预设的第二阈 值, 若是, 则执行该第一判断步骤, 若否, 则执行该第一设定步骤。
13. 如权利要求 11 所述的文件传输方法, 其特征在于, 所述第一判 断步骤包括:
若该速率变化指数小于该第一阈值, 且当前传输状态为该第一状态, 则更新当前传输状态为该第二状态; 及
若该速率变化指数小于该第一阈值, 且当前传输状态为该第二状态, 则更新当前传输状态为该第三状态。
14. 如权利要求 11 所述的文件传输方法, 其特征在于, 该方法还包 括第四判断步骤, 若该当前传输状态为该第三状态, 则执行该第四判断步 骤, 该第四判断步骤包括:
统计该至少一个已经完成传输的分片的传输速率连续超出预设范围 的次数, 并判断所统计的次数是否达到预设的第三阈值, 若否, 则执行该 第一设定步骤, 若是, 则执行该第二设定步骤。
15. 如权利要求 14所述的文件传输方法, 其特征在于, 所述第一设 定步骤和第二设定步骤还包括:
判断该文件待发送部分的大小是否小于预设的第四阈值, 若是, 则设 定当前待传输分片的大小为该文件待发送部分的大小。
16. 如权利要求 1所述的文件传输方法, 其特征在于, 所述传输步骤 包括:
提交步骤:在一主进程内将待传输至接收端的文件的一个分片提交至 一待传输队列中;
等待步骤: 在该提交步骤后持续等待中断信号;
第一监控步骤:监控该主进程在预定时间段内是否有上行数据流量产 生, 若否, 则发出中断等待请求, 并在该中断等待请求中附加该主进程在 预定时间段内未产生上行数据流量的信息; 及
第二监控步骤:若接收到该中断等待请求或者该接收端返回的回复信 息, 则结束该等待步骤。
17. 如权利要求 16所述的文件传输方法, 其特征在于, 在结束所述 等待步骤后还包括:
若该主进程在预定时间段内未产生上行数据流量,则返回该分片传输 失败的传输结果。
18. 如权利要求 16所述的文件传输方法, 其特征在于, 在发出该中 断等待请求后所述第一监控步骤结束。
19. 如权利要求 16所述的文件传输方法, 其特征在于, 在结束所述 等待步骤后还包括:
根据该回复信息判断该接收端是否成功接收该分片, 若否, 则返回该 分片传输失败的传输结果。
20. 如权利要求 16所述的文件传输方法, 其特征在于, 所述第二监 控步骤还包括:
在接收到该接收端返回的回复信息后结束该第一监控步骤。
21. 如权利要求 16所述的文件传输方法, 其特征在于, 所述第一监 控步骤在不同于该主进程的新监控进程中执行。
22. 如权利要求 16所述的文件传输方法, 其特征在于, 所述第一监 控步骤还包括:
若该主进程在预定时间段内有上行数据流量产生,则提示用户该文件 正在传输中。
23. 如权利要求 16所述的文件传输方法, 其特征在于, 在所述等待 步骤后还包括第三监控步骤:
监控是否发生网络异常, 若发生网络异常, 则结束该等待步骤和该第 一监控步骤, 并返回该分片传输失败的传输结果。
24. 一种文件传输装置, 其特征在于, 该装置包括:
提取模块, 用于从待传输至接收端的文件中提取一个分片; 传输模块, 用于将该分片提交至待传输队列, 并监控该分片是否传输 成功;
判断模块, 用于若该分片未传输成功, 则判断该分片的重传次数是否 达到预设的次数阈值; 及
重传模块, 用于若该分片的重传次数未达到该次数阈值, 则在等待一 段预设时间后重新执行该传输步骤, 并更新该分片的重传次数。
25. 如权利要求 24所述的文件传输装置, 其特征在于, 该预设时间 随着该重传次数的增加而延长。
26. 如权利要求 24所述的文件传输装置, 其特征在于, 所述的判断 模块还用于若该分片的重传次数达到该次数阈值, 则判定该文件传输失 败。
27. 如权利要求 24所述的文件传输装置, 其特征在于, 还包括检查 模块, 用于:
若该分片传输成功, 则检查该文件是否已传输完成;
若该文件未传输完成, 则返回该提取步骤; 及
若该文件已传输完成, 则该文件传输成功。
28. 如权利要求 27所述的文件传输装置, 其特征在于, 所述检查该 文件是否已传输完成包括:
接收该接收端返回的回复信息,该回复信息包括该接收端已接收该文 件所有分片大小的总和; 及
若该接收端已接收该文件所有分片大小的总和与该文件的大小相等, 则判定该文件已传输完成。
29. 如权利要求 24所述的文件传输装置, 其特征在于, 所述的传输 模块还用于:
对该分片和该文件分别进行加密; 及
将该分片及其加密值与该文件的加密值封装成一个数据包,然后将该 数据包提交至该待传输队列。
30. 如权利要求 24所述的文件传输装置, 其特征在于, 所述提取模 块进一步包括:
获取模块,用于获取该文件中至少一个已经完成传输的分片的传输参 数, 该传输参数包括分片大小以及传输速率;
计算模块,用于根据该至少一个已经完成传输的分片的传输参数计算 速率变化指数,该速率变化指数表征传输速率相对于该分片大小变化的速 率;
第一判断模块, 用于判断该速率变化指数是否小于预设的第一阈值, 若是, 则更新当前传输状态为一个不同的状态;
第一设定模块, 用于获取与该当前传输状态对应的系数, 并设定当前 待传输分片的大小为该文件中最近完成传输的分片大小与该系数的乘积; 及
截取模块,用于按照所设定的该当前待传输分片的大小从该文件中截 取当前待传输的分片进行传输。
31. 如权利要求 30所述的文件传输装置, 其特征在于, 所述获取模 块还用于对该传输速率进行平滑处理。
32. 如权利要求 30所述的文件传输装置, 其特征在于, 所述当前传 输状态包括第一状态、 第二状态和第三状态, 其中第一状态和第二状态对 应的系数大于 1 , 并且第一状态对应的系数大于第二状态对应的系数, 第 三状态对应的系数为 1。
33. 如权利要求 32所述的文件传输装置, 其特征在于, 所述提取模 块还包括:
第二判断模块, 用于在执行所述获取模块之前, 判断当前待传输的分 片是否为该文件的首个分片, 若是, 则执行第二设定模块, 若否, 则执行 该获取模块; 及
所述第二设定模块,用于设定当前待传输分片的大小为当前网络类型 下分片大小的默认值, 并将当前传输状态更新为该第一状态, 然后执行该 截取模块。
34. 如权利要求 33所述的文件传输装置, 其特征在于, 所述提取模 块还包括:
确定模块, 用于确定当前传输状态, 若该当前传输状态为该第一状态 或第二状态, 则执行该第一判断模块。
35. 如权利要求 34所述的文件传输装置, 其特征在于, 所述提取模 块还包括:
第三判断模块, 用于若该当前传输状态为该第一状态或第二状态, 则 判断该至少一个已经完成传输的分片中,每种分片大小的使用次数是否分 别达到预设的第二阈值, 若是, 则执行该第一判断模块, 若否, 则执行该 第一设定模块。
36. 如权利要求 34所述的文件传输装置, 其特征在于, 所述第一判 断模块用于:
若该速率变化指数小于该第一阈值, 且当前传输状态为该第一状态, 则更新当前传输状态为该第二状态; 及
若该速率变化指数小于该第一阈值, 且当前传输状态为该第二状态, 则更新当前传输状态为该第三状态。
37. 如权利要求 34所述的文件传输装置, 其特征在于, 所述提取模 块还包括第四判断模块, 用于当该当前传输状态为该第三状态时执行, 该 第四判断模块用于:
统计该至少一个已经完成传输的分片的传输速率连续超出预设范围 的次数, 并判断所统计的次数是否达到预设的第三阈值, 若否, 则执行该 第一设定模块, 若是, 则执行该第二设定模块。
38. 如权利要求 37所述的文件传输装置, 其特征在于, 所述第一设 定模块和第二设定模块还用于:
判断该文件待发送部分的大小是否小于预设的第四阈值, 若是, 则设 定当前待传输分片的大小为该文件待发送部分的大小。
39. 如权利要求 24所述的文件传输装置, 其特征在于, 所述传输模 块进一步包括:
提交模块,用于在一主进程内将待传输至接收端的文件的一个分片提 交至一待传输队列中; 等待模块, 用于持续等待中断信号;
第一监控模块,用于监控该主进程在预定时间段内是否有上行数据流 量产生, 若否, 则发出中断等待请求, 并在该中断等待请求中附加该主进 程在预定时间段内未产生上行数据流量的信息; 及
第二监控模块,用于若接收到该中断等待请求或者该接收端返回的回 复信息, 则触发该等待模块停止等待中断信号。
40. 如权利要求 39所述的文件传输装置, 其特征在于, 在触发该等 待模块停止等待中断信号后还包括:
若该主进程在预定时间段内未产生上行数据流量,则返回该分片传输 失败的传输结果。
41. 如权利要求 39所述的文件传输装置, 其特征在于, 在发出该中 断等待请求后所述第一监控模块停止执行。
42. 如权利要求 39所述的文件传输装置, 其特征在于, 在触发该等 待模块停止等待中断信号后还包括:
根据该回复信息判断该接收端是否成功接收该分片, 若否, 则返回该 分片传输失败的传输结果。
43. 如权利要求 39所述的文件传输装置, 其特征在于, 所述第二监 控模块还用于在接收到该接收端返回的回复信息后触发第一监控模块停 止监控该主进程在预定时间段内是否有上行数据流量产生。
44. 如权利要求 39所述的文件传输装置, 其特征在于, 所述第一监 控模块在不同于该主进程的新监控进程中执行。
45. 如权利要求 39所述的文件传输装置, 其特征在于, 所述第一监 控模块还用于若该主进程在预定时间段内有上行数据流量产生,则提示用 户该文件正在传输中。
46. 如权利要求 39所述的文件传输装置, 其特征在于, 还包括第三 监控模块, 用于监控是否发生网络异常, 若发生网络异常, 则触发该等待 模块停止等待中断信号,触发第一监控模块停止监控该主进程在预定时间 段内是否有上行数据流量产生, 并返回该分片传输失败的传输结果。
47. —个或多个包含计算机可执行指令的存储介质, 所述计算机可执 行指令用于执行一种文件传输方法, 其特征在于, 该方法包括以下步骤: 提取步骤: 从待传输至接收端的文件中提取一个分片;
传输步骤:将该分片提交至待传输队列,并监控该分片是否传输成功; 判断步骤: 若该分片未传输成功, 则判断该分片的重传次数是否达到 预设的次数阈值; 及
重传步骤: 若该分片的重传次数未达到该次数阈值, 则在等待一段预 设时间后重新执行该传输步骤, 并更新该分片的重传次数。
PCT/CN2013/089185 2013-05-20 2013-12-12 一种文件传输方法、装置及存储介质 WO2014187114A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310187224.3A CN104168093B (zh) 2013-05-20 2013-05-20 一种文件传输方法及装置
CN201310187224.3 2013-05-20

Publications (1)

Publication Number Publication Date
WO2014187114A1 true WO2014187114A1 (zh) 2014-11-27

Family

ID=51911748

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/089185 WO2014187114A1 (zh) 2013-05-20 2013-12-12 一种文件传输方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN104168093B (zh)
WO (1) WO2014187114A1 (zh)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872001A (zh) * 2015-12-21 2016-08-17 乐视云计算有限公司 基于p2p网络的数据传输方法及装置
CN107172112B (zh) * 2016-03-07 2020-10-02 阿里巴巴集团控股有限公司 一种计算机文件传输方法及装置
CN107645531B (zh) * 2016-07-22 2021-08-24 平安科技(深圳)有限公司 数据同步方法及系统
CN108401002B (zh) * 2017-02-07 2021-01-01 腾讯科技(深圳)有限公司 文件传输方法及设备
CN109150935B (zh) * 2017-06-19 2021-09-10 深圳联友科技有限公司 一种文件传输方法、装置以及移动终端
CN107360191B (zh) * 2017-08-28 2021-02-02 腾讯科技(深圳)有限公司 一种文件获取方法、装置及存储设备
CN114510401A (zh) * 2018-06-13 2022-05-17 姜锋 基于主机当前电力可持续时长的信息传输安全方法及系统
CN109257428A (zh) * 2018-09-27 2019-01-22 火烈鸟网络(广州)股份有限公司 应用包的分发方法、装置、存储介质和设备
CN109905479B (zh) * 2019-03-04 2022-06-07 腾讯科技(深圳)有限公司 文件传输方法和装置
CN110245164A (zh) * 2019-05-09 2019-09-17 阿里巴巴集团控股有限公司 一种数据回流检测方法、装置及设备
CN111586158B (zh) * 2020-05-06 2023-04-14 山东汇贸电子口岸有限公司 一种音视频分片上传与重传方法
CN113076283B (zh) * 2021-04-06 2022-02-18 中移(上海)信息通信科技有限公司 文件一致性验证方法、装置及电子设备
CN113315809B (zh) * 2021-04-22 2022-05-24 佛山市第二人民医院(佛山市便民医院) 一种医疗设备的高速数据传输延迟容忍方法及系统
CN113360435A (zh) * 2021-06-03 2021-09-07 三川智慧科技股份有限公司 一种智能水表串口通讯优化方法、装置、设备和介质
CN114866446A (zh) * 2022-04-15 2022-08-05 西安广和通无线通信有限公司 数据传输速率测试方法、系统、电子设备及存储介质
CN117971985B (zh) * 2024-04-01 2024-06-28 国家超级计算天津中心 作业文件同步方法以及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001054370A2 (en) * 2000-01-24 2001-07-26 The University Of Manitoba Method and system for segmented file transfer
CN101174930A (zh) * 2006-11-03 2008-05-07 华为技术有限公司 一种中继系统中自动重传请求的实现方法和装置
US20100153808A1 (en) * 2008-12-17 2010-06-17 Electronics And Telecommunications Research Institute Method of transmission of large data amounts in sensor network based on mac
CN102348253A (zh) * 2010-07-30 2012-02-08 华为技术有限公司 发送信息的方法、装置及系统
CN102438151A (zh) * 2011-12-14 2012-05-02 哈尔滨工业大学 一种嵌入数字水印的视频流媒体传输信道的差错控制方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100563238C (zh) * 2006-02-13 2009-11-25 杭州华三通信技术有限公司 一种发送报文的方法
CN101674235B (zh) * 2009-09-27 2011-11-30 中兴通讯股份有限公司 数据传输方法和设备
CN102143073A (zh) * 2011-03-23 2011-08-03 深圳创维数字技术股份有限公司 一种数据传输方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001054370A2 (en) * 2000-01-24 2001-07-26 The University Of Manitoba Method and system for segmented file transfer
CN101174930A (zh) * 2006-11-03 2008-05-07 华为技术有限公司 一种中继系统中自动重传请求的实现方法和装置
US20100153808A1 (en) * 2008-12-17 2010-06-17 Electronics And Telecommunications Research Institute Method of transmission of large data amounts in sensor network based on mac
CN102348253A (zh) * 2010-07-30 2012-02-08 华为技术有限公司 发送信息的方法、装置及系统
CN102438151A (zh) * 2011-12-14 2012-05-02 哈尔滨工业大学 一种嵌入数字水印的视频流媒体传输信道的差错控制方法

Also Published As

Publication number Publication date
CN104168093B (zh) 2017-07-25
CN104168093A (zh) 2014-11-26

Similar Documents

Publication Publication Date Title
WO2014187114A1 (zh) 一种文件传输方法、装置及存储介质
CN104168081B (zh) 一种文件传输方法及装置
WO2017124985A1 (zh) 一种数据传输的方法以及相关设备
CN104184753B (zh) 一种文件传输方法及装置
TWI559717B (zh) 互動式即時媒體之傳輸協議
CN111683019B (zh) 在通信设备中管理待发送的确认数据包
WO2016192478A1 (zh) 数据传输方法及装置
US8830852B2 (en) Communication device, communication system, program, and communication method
JP2002152308A (ja) データ通信システム、その通信方法及びその通信プログラムを記録した記録媒体
WO2017097201A1 (zh) 一种数据传输方法、发送装置及接收装置
KR20150030713A (ko) 낙관적인 윈도우 조정들을 이용한 원치않은 tcp 재송신들의 회피
WO2016201904A1 (zh) 一种基于tcp的数据传输方法及装置
WO2023179538A1 (zh) 数据传输方法、装置、电子设备和存储介质
EP2922241B1 (en) Methods and apparatus to determine network delay with location independence from retransmission delay and application response time
US11405148B2 (en) Communication system, communication device, method, and recording medium of program
WO2010022665A1 (zh) 一种实现物理层重传的方法、装置及系统
EP3939191B1 (en) Device and method for delivering acknowledgment in network transport protocols
CN109714135B (zh) 一种数据包传输方法及装置
US11962517B2 (en) Communications method, apparatus, and system for recovering lost packets
WO2014155495A1 (ja) 通信装置、受信装置、及び送信装置
JP6766817B2 (ja) データ通信装置、データ通信制御方法及びプログラム
JP2008236709A (ja) 通信品質制御方法と通信品質制御装置および通信システムとプログラム
CN105337704A (zh) 报文处理方法及装置
JP2016019198A (ja) 通信装置、通信装置の制御方法、プログラム
CN114268416B (zh) 数据传输方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13885432

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 05/04/2016)

122 Ep: pct application non-entry in european phase

Ref document number: 13885432

Country of ref document: EP

Kind code of ref document: A1