WO2019227427A1 - Procédé, dispositif et appareil/terminal/serveur de téléchargement de fichier - Google Patents

Procédé, dispositif et appareil/terminal/serveur de téléchargement de fichier Download PDF

Info

Publication number
WO2019227427A1
WO2019227427A1 PCT/CN2018/089358 CN2018089358W WO2019227427A1 WO 2019227427 A1 WO2019227427 A1 WO 2019227427A1 CN 2018089358 W CN2018089358 W CN 2018089358W WO 2019227427 A1 WO2019227427 A1 WO 2019227427A1
Authority
WO
WIPO (PCT)
Prior art keywords
download
file
segment
request
downloaded
Prior art date
Application number
PCT/CN2018/089358
Other languages
English (en)
Chinese (zh)
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 优视科技新加坡有限公司
Priority to PCT/CN2018/089358 priority Critical patent/WO2019227427A1/fr
Priority to CN201880001152.XA priority patent/CN109496418B/zh
Publication of WO2019227427A1 publication Critical patent/WO2019227427A1/fr

Links

Images

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]

Definitions

  • the present application relates to the field of computer technology, and specifically to the field of Internet technology, and in particular, to a file downloading method, device, and device / terminal / server.
  • the file download link requested by the client may not be able to support multi-threaded segmented download, so it is necessary to determine in advance whether the server supports multi-threaded segmented download when downloading the file.
  • the traditional judgment method is to identify whether the file can be downloaded in segments according to the Accept-Range field in the response header of the HTTP request for file download (in the HTTP protocol, this field is used to indicate whether the download is supported in segments). If you support segmentation, you can think of it as supporting multi-threaded segmented download. However, this method of judgment does not guarantee 100% accuracy. For example, the server itself supports segmented download.
  • the Accept-Range field of the header of the response message to the download request is bytes.
  • the purpose of this application is to propose a file downloading method, device, and device / terminal / server to solve the problem that the existing file downloading method cannot accurately determine whether the file download link supports segmented downloading.
  • the present application provides a file downloading method, including: sending a first segment download request through a first thread, receiving a first response message for the first segment download request; and, through a second thread, Sending a second segment download request and receiving a second response message to the second segment download request; wherein the first segment download request is used to request download of a first portion of data of a file to be downloaded, and the second The segment download request is used to request to download the second part of the data of the file to be downloaded; if both the first response message and the second response message indicate that the corresponding segment download request was successfully executed, Download the file for multi-threaded segmented download.
  • an embodiment of the present application provides a file downloading apparatus, which includes: a request sending module configured to send a first segment download request through a first thread, and receive a first segment download request for the first segment download request. A response message; and sending a second segment download request through a second thread to receive a second response message for the second segment download request; wherein the first segment download request is used to request download to be downloaded.
  • the first partial data of the file, the second partial download request is used to request to download the second partial data of the file to be downloaded; the partial download module is configured to be used when the first response message and the second response
  • the messages all indicate that the multi-threaded segment download is performed on the file to be downloaded when the corresponding segment download request is successfully executed.
  • an embodiment of the present application provides a device / terminal / server, including: one or more processors; a memory for storing one or more programs; and when one or more programs are processed by one or more The processor executes such that one or more processors implement the method as described above.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method as described above is implemented.
  • the file downloading method, device, device / terminal / server and computer-readable storage medium provided in this application send a first segmented download request through a first thread, and a second thread send a second segmented download request to pass a second request
  • the file provider such as a server
  • the file provider can support multi-threaded segmented file downloads. If both the first response message responding to the first segment download request and the second response message responding to the second download request indicate that the segment download request was executed correctly , It indicates that the file providing end, such as the server, supports multi-threaded segmented downloading, and then downloads the file to be downloaded through the first and second threads or establishes more threads.
  • This method of detecting whether a file to be downloaded can be downloaded in multiple threads by using a secondary request can effectively ensure the accuracy of the detection result and avoid the Accept-Range field in the response header of a request that simply passes the HTTP protocol in the prior art.
  • the problem of judging whether a file can be downloaded in sections is that the inaccurate judgment causes errors in the downloaded file, which ensures the accuracy and success rate of the file download.
  • FIG. 1 is a flowchart of steps in a file download method according to the first embodiment of the present application
  • FIG. 3 is a structural block diagram of a file downloading device according to a third embodiment of the present application.
  • FIG. 4 is a structural block diagram of a file downloading device according to a fourth embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a device / terminal / server according to Embodiment 5 of the present application.
  • FIG. 1 shows a flowchart of steps in a file download method according to the first embodiment of the present application.
  • the file download method in this embodiment includes the following steps:
  • Step 102 Send a first segment download request through a first thread, receive a first response message for the first segment download request; and send a second segment download request through a second thread, and receive a second segment download Requested second response message.
  • the first segment download request is used to request download of the first part of data of the file to be downloaded
  • the second segment download request is used to request to download the second part of data of the file to be downloaded.
  • the first part of the data and the second part of the data may be completely different data, or may be the same data, or may have partially overlapping data, or may be a subset of the other.
  • the first part of the data is the entire data of the file to be downloaded
  • the second part of the data is the partial data of the file to be downloaded.
  • the first thread and the second thread are different threads.
  • description is made by taking data interaction and downloading a file through the HTTP protocol as an example.
  • the client may send a first segment download request through a first thread, and receive a corresponding first response message.
  • the first segment download request may be a request message (request) based on the HTTP protocol, which requests a segment download by adding a Range field to a header.
  • the first response message may be a response message (response) based on the HTTP protocol, which may indicate whether the first segment download request is successfully executed, and may further include the content requested to be downloaded by the first segment download request.
  • the second segment download request may refer to the description of the first segment download request
  • the second response message may refer to the description of the first response message
  • Step 104 If both the first response message and the second response message indicate that the corresponding segmented download request is successfully executed, perform multi-threaded segmented download of the file to be downloaded.
  • both the first response message and the second response message indicate that the corresponding segmented download request was successfully executed, it indicates that the file was downloaded through the multi-threaded segmented download method, and the file provider (for example, the server) can support multi-threaded segmentation. Segment download, and in the current state can correctly respond to and process multi-threaded segment download requests. According to this, multi-threaded segmented downloading can be performed on the downloaded file to improve the download efficiency.
  • the file provider for example, the server
  • a new thread sends a new segment download request through the new thread, and receives a corresponding response message to download other data segments of the file to be downloaded.
  • a first segmented download request is sent by a first thread
  • a second segmented download request is sent by a second thread to detect whether a file provider, such as a server, can support multi-threaded segmented file downloads through a secondary request. If both the first response message responding to the first segment download request and the second response message responding to the second download request indicate that the segment download request was performed correctly, it indicates that the file provider, such as a server, supports multi-threaded segment download, and further Download the files to be downloaded through the first and second threads or further establish more threads.
  • This method of detecting whether a file to be downloaded can be downloaded in multiple threads by using a secondary request can effectively ensure the accuracy of the detection result and avoid the Accept-Range field in the response header of a request that simply passes the HTTP protocol in the prior art.
  • the problem of judging whether a file can be downloaded in sections is that the inaccurate judgment causes errors in the downloaded file, which ensures the accuracy and success rate of the file download.
  • the file download method in this embodiment may be executed by a suitable application such as a browser or the like or a suitable functional component or a suitable electronic device (such as a tablet computer, a mobile phone, a desktop computer, a server, etc.) with data processing capabilities.
  • a suitable application such as a browser or the like or a suitable functional component or a suitable electronic device (such as a tablet computer, a mobile phone, a desktop computer, a server, etc.) with data processing capabilities.
  • Step S202 Send the first segment download request through the first thread, receive a first response message for the first segment download request; and send the second segment download request through the second thread, and receive the second segment download Requested second response message.
  • step S202 includes the following sub-steps:
  • Step S202a Send a first segment download request through a first thread, and receive a first response message for the first segment download request.
  • the first segment download request is used to request to download the first part of the data of the file to be downloaded.
  • the first part of the data may be part of the data of the file to be downloaded, or all of the data of the file to be downloaded.
  • the first part of the data is the entire data of the file to be downloaded as an example for description.
  • the first thread may send the first segment download request in any appropriate transmission mode, which is not limited in this embodiment.
  • the first thread sends a first segment download request by sending an HTTP protocol request message.
  • the first segment download request may be a request message using a GET method, and a Range field is added to the request message to perform a segment download request.
  • the value of the Range field may be "0-" to indicate that all data of the file to be downloaded is requested.
  • the first segment download request may be:
  • the address of the file to be downloaded in the GET method can be obtained from the file download link.
  • the first response message for the first segmented download request response will carry the size of the requested data.
  • the HTTP response message the HTTP In the protocol, the structure of the response message can be divided into two parts, the header and the message entity.
  • the content in the header file mainly includes an identifier (such as HTTP / 1.1) used to identify the corresponding HTTP version of the server, a status code (such as 200) used to indicate the processing result, and other response header fields (such as content -length, content-type, etc.).
  • the content in the message entity is mainly the resource entity (such as the data requested by the download request).
  • the content-length field (also called the transmission length field) that can be carried in the header of the response message is used to indicate the message entity transmission length of the first response message, that is, the size of the data requested by the Range field in the request message . This makes it easy to determine the size of the file to be downloaded.
  • the status code carried in the header of the response message is used to indicate whether the request was successfully executed and responded.
  • the corresponding status code is 206 (partial content), which indicates that the request containing the Range field was successfully executed.
  • the header of the response message may carry a transfer-encoding field, which is used to indicate the type of transfer encoding of the first response message, such as chunked.
  • a transfer-encoding field is used to indicate the type of transfer encoding of the first response message, such as chunked.
  • the status code in the first response message is 206, the following steps are continued; otherwise, the information indicated by the status code can be used. Execute the corresponding strategy. If the status code is 404, stop downloading and report an error.
  • Step S202b It is determined whether the first response message contains information used to indicate that the type of transmission coding is block coding.
  • the HTTP protocol it can be determined whether the value of the transfer-encoding field in the first response message is chunked, and whether the transmission encoding type of the first response message is block encoding.
  • the first response message carries a transfer-encoding field and the value is chunked, it is determined that the first response message includes information indicating that the type of the transmission encoding is block encoding, otherwise, it is determined that the first response message does not include Information used to indicate that the transmission encoding type is block encoding.
  • the response message is transmitted by the block encoding transmission method, which makes it difficult to determine the file size of the file to be downloaded, and it is not convenient to subsequently send a segmented download request.
  • the first thread can be directly used for single-threaded downloading of the file to be downloaded.
  • step S202b may be omitted and the second segment download request may be sent directly.
  • the value of the Range field in the second segment download request may be randomly determined or preset, such as 500-1000 and the like.
  • step S202f of sending a second segment download request through a second thread and receiving a second response message for the second segment download request may be directly performed, and Steps S202c to e described below may be performed, and then step S202f of sending a second segment download request through a second thread and receiving a second response message for the second segment download request may be performed.
  • Step S202c Obtain the file size of the file to be downloaded from the first response message.
  • the header file of the first response message includes a content-length field (transmission length field), which is used to indicate the message entity transmission length of the first response message.
  • transmission length field since the first part of the data requested by the first segment download request is the entire data of the file to be downloaded, the message entity transmission length of the first response message is the size of the file to be downloaded.
  • the content-length field in the response message determines the size of the file to be downloaded.
  • the value of the transmission length field (that is, the content-length) in the first response message is acquired, and the file size of the file to be downloaded is set to the value of the transmission length field.
  • step S202c may be omitted; or, the file size of the requested partial data is obtained from the first response message.
  • the value of the transmission length field (that is, content-length) in the first response message is acquired, and the file size of the requested partial data is set to the value of the transmission length field.
  • the file size of the file to be downloaded may also be obtained by other appropriate methods, such as requesting the file size from the server through another request different from the current request.
  • Step S202d Set N data download segments for the file to be downloaded according to the file size, where N is a positive integer greater than or equal to 2.
  • the file to be downloaded (or part of the requested data) can be segmented for subsequent multi-threaded segmented download. For example, in this embodiment, the file to be downloaded (or the requested partial data) is divided into N segments on an average, that is, N data download segments are set for the file to be downloaded (or the requested partial data).
  • the specific value of N can be determined according to requirements, for example, the specific value of N is determined according to the computing capacity of the client's computing device, the network status, and the like, as long as N is greater than or equal to 2 and is a positive integer.
  • Step S202e Select a segment from the N data download segments, and generate a second segment download request according to the selected segment.
  • the size of each segment is filesize / N, where filesize is the file of the file to be downloaded (or part of the requested data) Size, which is the value of content-length.
  • filesize / N is not an integer, those skilled in the art can use any appropriate strategy to treat it as an integer, such as rounding up or down, etc. (in this case, the size of the last segment may be Different from other segments), this embodiment of the present application does not limit this.
  • the selected segment is the last segment of the N data download segments.
  • the value of the Range field is the start position and end position of the data requested to be downloaded (the end position can be omitted).
  • the segment corresponding to the download request is the last segment of the file to be downloaded, so the value of the Range field can be easily and simply determined, and the efficiency of the secondary request detection is improved.
  • the starting position of the corresponding second segment data in the Range field may be: filesize -filesize / N; the end position of the second part of the data is filesize-1.
  • the filesize / N is not an integer, it can be processed by the person skilled in the art into any integer using any appropriate strategy.
  • Step S202f Send a second segment download request through a second thread, and receive a second response message for the second segment download request.
  • the second segment download request is generated, the second segment download request is sent through the second thread, and a second response message for the second segment download request is received.
  • step S204 is performed; otherwise, the first thread is used for single-thread downloading of the file to be downloaded.
  • Step S204 If both the first response message and the second response message indicate that the corresponding segmented download request is successfully executed, perform multi-threaded segmented download of the file to be downloaded.
  • the first thread and the second thread may continue to download, or one or two of them may be ended, and a new thread may be re-created for segmented download, or one of them may be Or based on both, continue to create new threads for downloading.
  • segment download request where each of the N-1 segment download requests is used to request download of data of one segment of the N-1 segments, and each requested segment is different; Send N-1 segment download requests through corresponding N-1 threads, and receive corresponding response messages to complete each segment download of the file to be downloaded, thereby completing the download of the entire file to be downloaded.
  • the first thread may be terminated or released to avoid repeated downloads occupying storage space and bandwidth.
  • N-2 threads can be created, and a new segment download request is sent using the first thread.
  • the download rate of the file to be downloaded can be increased, and time can be saved.
  • a first segmented download request is sent by a first thread
  • a second segmented download request is sent by a second thread to detect whether a file provider, such as a server, can support multi-threaded segmented file downloads through a secondary request. If both the first response message responding to the first segment download request and the second response message responding to the second download request indicate that the segment download request was performed correctly, it indicates that the file provider, such as a server, supports multi-threaded segment download, and further Download the files to be downloaded through the first and second threads or further establish more threads.
  • This method of detecting whether a file to be downloaded can be downloaded in multiple threads by using a secondary request can effectively ensure the accuracy of the detection result and avoid the Accept-Range field in the response header of a request that simply passes the HTTP protocol in the prior art.
  • the problem of judging whether a file can be downloaded in sections is that the inaccurate judgment causes errors in the downloaded file, which ensures the accuracy and success rate of the file download.
  • the file download method in this embodiment may be executed by a suitable application such as a browser or the like or a suitable functional component or a suitable electronic device (such as a tablet computer, a mobile phone, a desktop computer, a server, etc.) with data processing capabilities.
  • a suitable application such as a browser or the like or a suitable functional component or a suitable electronic device (such as a tablet computer, a mobile phone, a desktop computer, a server, etc.) with data processing capabilities.
  • the application scenario is described as an example of file downloading through the HTTP protocol, but it should be understood that the file downloading method can be applied to other scenarios, such as ftp protocol downloading. As long as the solution of detecting whether the file download link supports segment downloading through a secondary request is within the protection scope of this application.
  • FIG. 3 shows a structural block diagram of a file downloading apparatus according to Embodiment 3 of the present application.
  • the file downloading device of this embodiment includes: a request sending module 302 configured to send a first segment download request through a first thread, and receive a first response message for the first segment download request; and send via a second thread
  • the second segment download request receives a second response message for the second segment download request; wherein the first segment download request is used to request to download the first part of the data of the file to be downloaded, and the second segment download request is used to request Download the second part of the data of the file to be downloaded;
  • the segment download module 304 is configured to perform multi-thread segmentation on the file to be downloaded when the first response message and the second response message indicate that the corresponding segment download request is successfully performed download.
  • the first thread is used to send a first segmented download request
  • the second thread is used to send a second segmented download request to detect whether the file provider, such as a server, can support multi-threaded segmented file download through a second request. If both the first response message responding to the first segment download request and the second response message responding to the second download request indicate that the segment download request was performed correctly, it indicates that the file provider, such as a server, supports multi-threaded segment download, and then passes The first and second threads or further threads are created to download the file to be downloaded.
  • This method of detecting whether a file to be downloaded can be downloaded in multiple threads by using a secondary request can effectively ensure the accuracy of the detection result and avoid the Accept-Range field in the response header of a request that simply passes the HTTP protocol in the prior art.
  • the problem of judging whether a file can be downloaded in sections is that the inaccurate judgment causes errors in the downloaded file, which ensures the accuracy and success rate of the file download.
  • FIG. 4 shows a structural block diagram of a file download apparatus according to Embodiment 4 of the present application.
  • the file downloading device of this embodiment includes: a request sending module 402 configured to send a first segment download request through a first thread, and receive a first response message for the first segment download request; and send via a second thread
  • the second segment download request receives a second response message for the second segment download request; wherein the first segment download request is used to request to download the first part of the data of the file to be downloaded, and the second segment download request is used to request Download the second part of the data of the file to be downloaded;
  • the segment download module 404 is configured to perform multi-thread segmentation on the file to be downloaded when the first response message and the second response message indicate that the corresponding segment download request is successfully performed download.
  • the first part of the data is all the data of the file to be downloaded; the device further includes: a file size obtaining module 406 configured to obtain the to-be-read from the first response message before sending the second segment download request through the second thread
  • the file size of the downloaded file is configured to set N data download segments for the file to be downloaded according to the file size, where N is a positive integer greater than or equal to 2;
  • a second segment download request is generated Module 410 is configured to select a segment from the N data download segments, and generate a second segment download request according to the selected segment.
  • the first response message includes a transmission length field for indicating a transmission length of the message entity of the first response message; the file size obtaining module 406 is configured to obtain a value of the transmission length field in the first response message, The file size of the downloaded file is set to the value of the transmission length field to obtain the file size of the file to be downloaded from the first response message.
  • the segment download module 404 includes a remaining request creation module 4041 configured to generate corresponding N-1 segment download requests for the remaining N-1 segments of the N data download segments, Among them, each of the N-1 segment download requests is used to request download of data of one segment of the N-1 segments, and each requested segment is different; the remaining request sending module 4042 , Configured to send N-1 segmented download requests through corresponding N-1 threads, and receive corresponding response messages.
  • a remaining request creation module 4041 configured to generate corresponding N-1 segment download requests for the remaining N-1 segments of the N data download segments, Among them, each of the N-1 segment download requests is used to request download of data of one segment of the N-1 segments, and each requested segment is different; the remaining request sending module 4042 , Configured to send N-1 segmented download requests through corresponding N-1 threads, and receive corresponding response messages.
  • the selected segment is the last segment of the N data download segments.
  • the apparatus further includes: a transmission code determining module 412 configured to determine whether the first response message includes a type used to indicate that the type of the transmission code is a sub-address before the request sending module sends the second segment download request through the second thread. If the block-encoded information is not included, then it goes to the request sending module 402 to execute the step of sending the second segment download request through the second thread.
  • a transmission code determining module 412 configured to determine whether the first response message includes a type used to indicate that the type of the transmission code is a sub-address before the request sending module sends the second segment download request through the second thread. If the block-encoded information is not included, then it goes to the request sending module 402 to execute the step of sending the second segment download request through the second thread.
  • the transmission encoding determining module 412 is further configured to perform single-threaded downloading of the file to be downloaded using the first thread when the first response message includes information indicating that the transmission encoding type is block encoding.
  • the first thread is used to send a first segmented download request
  • the second thread is used to send a second segmented download request to detect whether the file provider, such as a server, can support multi-threaded segmented file download through a second request. If both the first response message responding to the first segment download request and the second response message responding to the second download request indicate that the segment download request was performed correctly, it indicates that the file provider, such as a server, supports multi-threaded segment download, and then passes The first and second threads or further threads are created to download the file to be downloaded.
  • This method of detecting whether a file to be downloaded can be downloaded in multiple threads by using a secondary request can effectively ensure the accuracy of the detection result and avoid the Accept-Range field in the response header of a request that simply passes the HTTP protocol in the prior art.
  • the problem of judging whether a file can be downloaded in sections is that the inaccurate judgment causes errors in the downloaded file, which ensures the accuracy and success rate of the file download.
  • FIG. 5 a schematic structural diagram of a device / terminal / server according to Embodiment 5 of the present application is shown.
  • the device / terminal / server may include a processor 502 and one or more memory devices 504.
  • the processor 502 is configured to execute a program 506, and may specifically perform related steps in the foregoing file download method embodiment.
  • the program 506 may include program code, where the program code includes a computer operation instruction.
  • the processor 502 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
  • the terminal device includes one or more processors, which can be processors of the same type, such as one or more CPUs; or different types of processors, such as one or more CPUs and one or more ASICs.
  • the electronic storage device 504 is configured to store one or more programs 506.
  • the storage device 504 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the program 506 may be specifically configured to cause the processor 502 to perform the following operations: sending a first segment download request through a first thread, and receiving a first response message for the first segment download request; and sending a second segment through a second thread A segment download request receives a second response message for a second segment download request; wherein the first segment download request is used to request the download of the first part of the file to be downloaded, and the second segment download request is used to request the download of the to-be-downloaded The second part of the data of the file; if both the first response message and the second response message indicate that the corresponding segmented download request was successfully executed, the multi-threaded segmented download of the file to be downloaded is performed.
  • the program 506 is further configured to cause the processor 502 to respond from the first response before sending the second segmented download request through the second thread.
  • Get the file size of the file to be downloaded in the message ; set N data download segments for the file to be downloaded according to the file size, where N is a positive integer greater than or equal to 2; select one segment from the N data download segments And generate a second segment download request based on the selected segment.
  • the program 506 is further configured to cause the processor 502 to obtain in the first response message When the file size of the file to be downloaded is obtained, the value of the transmission length field in the first response message is obtained, and the file size of the file to be downloaded is set to the value of the transmission length field.
  • the program 506 is further configured to cause the processor 502 to separately generate the remaining N-1 segments of the N data download segments when performing multi-threaded segment download of the file to be downloaded.
  • Corresponding N-1 segment download requests wherein each of the N-1 segment download requests is used to request download of data of one segment of the N-1 segments, and each request is The requested segments are different; N-1 segment download requests are sent through corresponding N-1 threads, and corresponding response messages are received.
  • the selected segment is the last segment of the N data download segments.
  • the program 506 is further configured to cause the processor 502 to determine whether the first response message includes a block used to indicate that the transmission encoding type is a block before sending the second segment download request through the second thread. Encoded information; if not, perform the step of sending a second segmented download request through a second thread.
  • the program 510 is further configured to cause the processor 502 to use the first thread to perform single-threading of the file to be downloaded when the first response message includes information indicating that the transmission encoding type is block encoding. download.
  • the first threaded download request is sent by the first thread
  • the second threaded download request is sent by the second thread to detect whether the file providing end such as the server can support the file through the second request.
  • Multi-threaded segment download If both the first response message responding to the first segment download request and the second response message responding to the second download request indicate that the segment download request was executed correctly, it indicates that the file provider, such as a server, supports multi-threading. Download in sections, and then download files to be downloaded through the first and second threads or further threads.
  • This method of detecting whether a file to be downloaded can be downloaded in multiple threads by using a secondary request can effectively ensure the accuracy of the detection result and avoid the Accept-Range field in the response header of a request that simply passes the HTTP protocol in the prior art.
  • the problem of judging whether a file can be downloaded in sections is that the inaccurate judgment causes errors in the downloaded file, which ensures the accuracy and success rate of the file download.
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • embodiments of the present application include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network through a communication section, and / or installed from a removable medium.
  • CPU central processing unit
  • the above functions defined in the method of the present application are performed.
  • the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programming read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal that is included in baseband or propagated as part of a carrier wave, and which carries computer-readable program code. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for performing the operations of this application may be written in one or more programming languages, or a combination thereof, including programming languages such as Java, Smalltalk, C ++, and also conventional Procedural programming language—such as "C" or a similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer, partly on a remote computer, or entirely on a remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider) Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider Internet service provider
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more functions to implement a specified logical function Executable instructions.
  • the functions labeled in the blocks may also occur in a different order than those labeled in the drawings. For example, two successively represented boxes may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented by a dedicated hardware-based system that performs the specified function or operation , Or it can be implemented with a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present application may be implemented by software or hardware.
  • the described unit may also be provided in a processor, for example, it may be described as: a processor includes a receiving unit, a parsing unit, an information selecting unit, and a generating unit.
  • a processor includes a receiving unit, a parsing unit, an information selecting unit, and a generating unit.
  • the names of these units do not in any way constitute a limitation on the unit itself.
  • the receiving unit may also be described as a "unit that receives a user's web browsing request.”
  • the present application also provides a computer-readable medium having stored thereon a computer program that implements the file download method when executed by a processor.
  • the computer-readable medium may be included in the device described in the foregoing embodiments; it may also exist alone without being assembled into the device.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device causes the device to send a first segment download request through a first thread and receive the first segment download request.
  • a first response message for the download request and sending a second segment download request through a second thread, and receiving a second response message for the second segment download request; wherein the first segment download request is used for Request to download the first part of the data of the file to be downloaded, and the second segment download request is used to request to download the second part of the data of the file to be downloaded; if both the first response message and the second response message indicate correspondence If the segment download request is successfully executed, multi-thread segment download is performed on the file to be downloaded.

Landscapes

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

Abstract

L'invention concerne un procédé, un dispositif et un appareil/terminal/serveur de téléchargement de fichier. Dans un mode de réalisation spécifique, le procédé consiste à : envoyer, par un premier fil d'exécution, une première demande de téléchargement segmenté, et recevoir un premier message de réponse répondant à la première demande de téléchargement à segmentation; envoyer, par un second fil d'exécution, une seconde demande de téléchargement segmenté, et recevoir un second message de réponse répondant à la seconde demande de téléchargement segmenté, la première demande de téléchargement segmenté étant destinée à demander le téléchargement d'une première partie de données d'un fichier à télécharger, et la seconde demande de téléchargement segmenté étant destinée à demander un téléchargement d'une seconde partie de données du fichier à télécharger; et télécharger le fichier à télécharger au moyen d'une segmentation multi-fil d'exécution si le premier message de réponse et le second message de réponse indiquent tous les deux que la demande de téléchargement segmenté correspondante est réussie. La mise en oeuvre peut déterminer avec précision si un lien de téléchargement de fichier prend en charge un téléchargement segmenté.
PCT/CN2018/089358 2018-05-31 2018-05-31 Procédé, dispositif et appareil/terminal/serveur de téléchargement de fichier WO2019227427A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/089358 WO2019227427A1 (fr) 2018-05-31 2018-05-31 Procédé, dispositif et appareil/terminal/serveur de téléchargement de fichier
CN201880001152.XA CN109496418B (zh) 2018-05-31 2018-05-31 文件下载方法、装置及设备/终端/服务器

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/089358 WO2019227427A1 (fr) 2018-05-31 2018-05-31 Procédé, dispositif et appareil/terminal/serveur de téléchargement de fichier

Publications (1)

Publication Number Publication Date
WO2019227427A1 true WO2019227427A1 (fr) 2019-12-05

Family

ID=65713828

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089358 WO2019227427A1 (fr) 2018-05-31 2018-05-31 Procédé, dispositif et appareil/terminal/serveur de téléchargement de fichier

Country Status (2)

Country Link
CN (1) CN109496418B (fr)
WO (1) WO2019227427A1 (fr)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311897A (zh) * 2020-11-17 2021-02-02 腾讯科技(深圳)有限公司 资源文件下载方法、装置、设备及介质
CN114338651A (zh) * 2021-12-27 2022-04-12 中电金信软件有限公司 文件传输方法、装置、电子设备及可读存储介质
CN116028247A (zh) * 2023-03-27 2023-04-28 中新宽维传媒科技有限公司 一种基于消息中间件的文件采集系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311721B (zh) * 2019-07-25 2022-11-22 深信服科技股份有限公司 一种检测下载行为的方法及装置
CN114500496A (zh) * 2020-10-27 2022-05-13 华为终端有限公司 一种目标数据的下载方法及设备
CN112769949A (zh) * 2021-01-20 2021-05-07 杭州鸿泉物联网技术股份有限公司 文件传输方法及装置、电子设备和存储介质
CN114979113B (zh) * 2021-02-23 2023-12-15 华为技术有限公司 一种文件传输方法、装置及系统
CN113132489A (zh) * 2021-04-22 2021-07-16 中国工商银行股份有限公司 下载文件的方法、装置、计算设备和介质
CN118041929A (zh) * 2024-04-12 2024-05-14 云筑信息科技(成都)有限公司 一种基于流式实现浏览器大文件分片下载的方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702592A (zh) * 2015-01-08 2015-06-10 三星电子(中国)研发中心 流媒体下载方法和装置
US9197702B2 (en) * 2013-12-06 2015-11-24 Cellco Partnership System for and method for media upload multithreading for large file uploads
CN105933445A (zh) * 2016-06-27 2016-09-07 乐视控股(北京)有限公司 一种资源请求方法和装置
CN106982249A (zh) * 2017-03-03 2017-07-25 广州优视网络科技有限公司 多线程分段下载方法、设备、客户端设备及电子设备

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3896625B2 (ja) * 1997-03-07 2007-03-22 ソニー株式会社 データ送信装置、データ受信装置、データ送信方法およびデータ受信方法
CN102137278B (zh) * 2010-12-30 2013-08-07 广州市动景计算机科技有限公司 基于移动终端的流媒体播放分发系统及其方法
CN102368213B (zh) * 2011-09-26 2014-08-13 奇智软件(北京)有限公司 一种ie内核浏览器的页面下载控制方法和系统
CN103685480A (zh) * 2013-11-29 2014-03-26 云海创想信息技术(无锡)有限公司 一种传输控制协议网络实现方法以及一种服务器
CN103929427A (zh) * 2014-04-23 2014-07-16 无锡天脉聚源传媒科技有限公司 一种动态多线程下载装置及其下载方法
CN104506950A (zh) * 2014-12-29 2015-04-08 珠海全志科技股份有限公司 网络流媒体播放中的多线程下载方法、装置及下载设备
CN105430434A (zh) * 2015-11-17 2016-03-23 北京奇虎科技有限公司 下载视频的方法与装置
CN105897911A (zh) * 2016-05-20 2016-08-24 广州优视网络科技有限公司 下载文件的方法、装置及用户终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9197702B2 (en) * 2013-12-06 2015-11-24 Cellco Partnership System for and method for media upload multithreading for large file uploads
CN104702592A (zh) * 2015-01-08 2015-06-10 三星电子(中国)研发中心 流媒体下载方法和装置
CN105933445A (zh) * 2016-06-27 2016-09-07 乐视控股(北京)有限公司 一种资源请求方法和装置
CN106982249A (zh) * 2017-03-03 2017-07-25 广州优视网络科技有限公司 多线程分段下载方法、设备、客户端设备及电子设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311897A (zh) * 2020-11-17 2021-02-02 腾讯科技(深圳)有限公司 资源文件下载方法、装置、设备及介质
CN114338651A (zh) * 2021-12-27 2022-04-12 中电金信软件有限公司 文件传输方法、装置、电子设备及可读存储介质
CN116028247A (zh) * 2023-03-27 2023-04-28 中新宽维传媒科技有限公司 一种基于消息中间件的文件采集系统
CN116028247B (zh) * 2023-03-27 2023-06-13 中新宽维传媒科技有限公司 一种基于消息中间件的文件采集系统

Also Published As

Publication number Publication date
CN109496418B (zh) 2021-10-08
CN109496418A (zh) 2019-03-19

Similar Documents

Publication Publication Date Title
WO2019227427A1 (fr) Procédé, dispositif et appareil/terminal/serveur de téléchargement de fichier
US9706371B2 (en) Push notification middleware
WO2017190641A1 (fr) Procédé et dispositif d'interception de robot, terminal de serveur et support lisible par ordinateur
US9088462B2 (en) Common web accessible data store for client side page processing
JP6314252B2 (ja) ネットワークビデオ再生方法及び装置
WO2013071747A1 (fr) Procédé et appareil permettant d'obtenir un fichier
CN110784528B (zh) 一种文件下载方法、装置和存储介质
US20150296014A1 (en) Picture download method and apparatus
CN108600377B (zh) 一种文件下载的暂停方法、装置、终端和存储介质
US20170034311A1 (en) Method for selecting between multiple RPC frameworks during a TCP/IP session
CN112261094A (zh) 一种报文处理方法及代理服务器
CN103581133A (zh) Web服务器对访问请求发送响应的方法和系统
JP2022536387A (ja) ビデオデータの処理方法、装置、電子機器およびコンピュータ可読媒体
CN107332854B (zh) 一种报文序列化协商方法及服务提供设备
CN108595574B (zh) 数据库集群的连接方法、装置、设备及存储介质
CN115297164A (zh) 网络代理方法、装置、电子设备及计算机可读存储介质
CN108600378B (zh) 一种文件下载方法、装置、终端和存储介质
TWI673983B (zh) 一種資料壓縮傳輸方法和系統、及其終端和伺服器
CN111800223A (zh) 生成发送报文、处理接收报文的方法、装置和系统
CN109218338B (zh) 信息处理系统、方法和装置
CN110740138B (zh) 数据传输方法和装置
US9754327B2 (en) Method and apparatus for configuring social networking site sharing functions
WO2023083367A1 (fr) Procédé et appareil pour reprendre le chargement d'un fichier en arrière-plan, et support de stockage et dispositif électronique
CN111338928A (zh) 基于chrome浏览器测试的方法及装置
CN114844870A (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: 18921221

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18921221

Country of ref document: EP

Kind code of ref document: A1