[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN105991728B - File downloading method and terminal - Google Patents

File downloading method and terminal Download PDF

Info

Publication number
CN105991728B
CN105991728B CN201510080527.4A CN201510080527A CN105991728B CN 105991728 B CN105991728 B CN 105991728B CN 201510080527 A CN201510080527 A CN 201510080527A CN 105991728 B CN105991728 B CN 105991728B
Authority
CN
China
Prior art keywords
download
user
downloading
target files
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201510080527.4A
Other languages
Chinese (zh)
Other versions
CN105991728A (en
Inventor
刘京强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510080527.4A priority Critical patent/CN105991728B/en
Publication of CN105991728A publication Critical patent/CN105991728A/en
Application granted granted Critical
Publication of CN105991728B publication Critical patent/CN105991728B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention discloses a method and a terminal for downloading a file, wherein the method comprises the following steps: the terminal receives a downloading instruction aiming at least two target files sent by a user; responding to the downloading instruction, and detecting whether the current speed of accessing the external network of the home terminal is less than a preset speed threshold value; if so, determining the sizes of the at least two target files, and generating a first downloading request according to the sequence of the at least two target files from small to large; and sending the first downloading request to a server side so that the server side sends a file corresponding to the first downloading request to the local side. By implementing the embodiment of the invention, when receiving the downloading instructions aiming at least two target files sent by the user, the downloading sequence can be flexibly adjusted according to the current speed of accessing the external network at the local terminal, thereby improving the downloading flexibility.

Description

一种文件下载的方法及终端A method and terminal for downloading files

技术领域technical field

本发明涉及互联网技术领域,尤其涉及一种文件下载的方法及终端。The present invention relates to the field of Internet technologies, and in particular, to a method and terminal for downloading files.

背景技术Background technique

随着互联网的快速发展以及终端的迅速普及,终端的功能日益增强。用户可以利用终端拍照、听歌以及下载文件等等。目前下载文件的过程主要是终端接收用户输入的下载指令,终端响应下载指令,并将与所述下载指令对应的下载请求发送至服务器端,以使服务器端将与该下载请求对应的文件发送至终端,则完成了下载。然而,当用户输入至少一个下载指令时,终端则将上述至少一个下载指令按照接收的时间先后顺序发送至服务器端,服务器端则根据接收到下载请求的时间先后顺序将与下载请求对应的文件发送至终端。由于服务器端是按照接收到下载请求的时间先后顺序发送文件。若当前的下载速度比较慢,且某个下载请求对应的文件所需存储空间比较大时,则下载完成需要的时间会比较长,从而导致后面接收到的下载请求长时间不被响应。可见,目前下载文件的方法不够灵活。With the rapid development of the Internet and the rapid popularization of terminals, the functions of terminals are increasingly enhanced. Users can use the terminal to take pictures, listen to songs, download files, and so on. At present, the process of downloading a file is mainly that the terminal receives the download instruction input by the user, the terminal responds to the download instruction, and sends the download request corresponding to the download instruction to the server side, so that the server side sends the file corresponding to the download request to the terminal, the download is complete. However, when the user inputs at least one download command, the terminal sends the at least one download command to the server in the chronological order of receipt, and the server sends the file corresponding to the download request according to the chronological order of receiving the download request. to the terminal. Because the server sends the files in the order of time when the download request is received. If the current download speed is relatively slow and the storage space required for a file corresponding to a download request is relatively large, it will take a long time for the download to complete, resulting in a long time that the download request received later will not be responded to. It can be seen that the current method for downloading files is not flexible enough.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种文件下载的方法及终端,能够提高下载文件时的灵活性。The embodiments of the present invention provide a method and terminal for downloading files, which can improve the flexibility when downloading files.

本发明实施例公开了一种文件下载的方法,包括:The embodiment of the present invention discloses a method for downloading a file, including:

接收用户发送的针对至少两个目标文件的下载指令;Receive download instructions sent by the user for at least two target files;

响应所述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值;In response to the download instruction, detect whether the current speed of the local end accessing the external network is less than a preset speed threshold;

若是,确定所述至少两个目标文件的大小,并按照所述至少两个目标文件从小到大的顺序,生成第一下载请求;If so, determine the size of the at least two target files, and generate a first download request according to the order of the at least two target files from small to large;

将所述第一下载请求发送至服务器端,以使所述服务器端将与所述第一下载请求对应的文件发送至所述本端。The first download request is sent to the server end, so that the server end sends the file corresponding to the first download request to the local end.

相应地,本发明实施例还公开了一种文件下载的终端,包括:Correspondingly, the embodiment of the present invention also discloses a terminal for downloading files, including:

接收单元,用于接收用户发送的针对至少两个目标文件的下载指令;a receiving unit, configured to receive download instructions for at least two target files sent by a user;

检测单元,用于响应所述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值;a detection unit, configured to detect whether the current speed of the local end accessing the external network is less than a preset speed threshold in response to the download instruction;

生成单元,用于本端当前的访问外部网络的速度小于预先设定的速度阈值时,确定所述至少两个目标文件的大小,并按照所述至少两个目标文件从小到大的顺序,生成第一下载请求;A generating unit, used for determining the size of the at least two target files when the current speed of the local end accessing the external network is less than a preset speed threshold, and generating the size of the at least two target files in ascending order of the at least two target files the first download request;

发送单元,用于将所述第一下载请求发送至服务器端,以使所述服务器端将与所述第一下载请求对应的文件发送至所述本端。A sending unit, configured to send the first download request to the server end, so that the server end sends the file corresponding to the first download request to the local end.

本发明实施例中,终端先接收用户发送的针对至少两个目标文件的下载指令;响应所述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值;若是,确定所述至少两个目标文件的大小,并按照所述至少两个目标文件从小到大的顺序,生成第一下载请求;将所述第一下载请求发送至服务器端,以使所述服务器端将与所述第一下载请求对应的文件发送至所述本端。实施本发明实施例,能够在接收用户发送的针对至少两个目标文件的下载指令时,可以根据本端当前的访问外部网络的速度的灵活调整下载顺序,从而提高了下载文件时的灵活性。In this embodiment of the present invention, the terminal first receives download instructions for at least two target files sent by the user; in response to the download instructions, detects whether the current speed of the local end accessing the external network is less than a preset speed threshold; if so, determine whether The size of the at least two target files, and according to the order of the at least two target files from small to large, generate a first download request; send the first download request to the server, so that the server will The file corresponding to the first download request is sent to the local end. By implementing the embodiments of the present invention, when receiving download instructions for at least two target files sent by a user, the download sequence can be flexibly adjusted according to the current speed of the local end accessing an external network, thereby improving the flexibility of downloading files.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1是本发明实施例公开的一种文件下载的方法的流程示意图;1 is a schematic flowchart of a method for downloading a file disclosed in an embodiment of the present invention;

图2是本发明实施例公开的另一种文件下载的方法的流程示意图;2 is a schematic flowchart of another method for downloading a file disclosed in an embodiment of the present invention;

图3是本发明实施例公开的一种文件下载的终端的结构示意图;3 is a schematic structural diagram of a terminal for downloading files disclosed in an embodiment of the present invention;

图4是本发明实施例公开的又一种文件下载的终端的结构示意图。FIG. 4 is a schematic structural diagram of another terminal for downloading files disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例公开了一种文件下载的方法及终端,能够在接收用户发送的针对至少两个目标文件的下载指令时,可以根据本端当前的访问外部网络的速度的灵活调整下载顺序,从而提高了下载文件时的灵活性。The embodiment of the present invention discloses a file download method and terminal, which can flexibly adjust the download sequence according to the current speed of the local end accessing an external network when receiving download instructions for at least two target files sent by a user, thereby Improved flexibility when downloading files.

请参阅图1,图1是本发明实施例公开的一种文件下载的方法的流程示意图;其中,图1所示的方法可以包括但不限于智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端中。如图1所示,该文件下载的方法可以包括以下步骤:Please refer to FIG. 1, which is a schematic flowchart of a method for downloading a file disclosed in an embodiment of the present invention; wherein, the method shown in Computers, PDAs, and terminals such as Mobile Internet Devices (MID) and PAD. As shown in Figure 1, the method for downloading the file may include the following steps:

S101、接收用户发送的针对至少两个目标文件的下载指令。S101. Receive a download instruction sent by a user for at least two target files.

本发明实施例中,用户发送上述至少两个目标文件的下载指令的方式可以是用户先选择需要下载的至少两个目标文件,当选择目标文件完毕后,则点击下载按钮,如下载指示框,发送下载请求。In this embodiment of the present invention, the user may send the download instructions of the at least two target files in a manner that the user first selects at least two target files to be downloaded, and after selecting the target files, clicks a download button, such as a download instruction box, Send a download request.

举例来说,若用户需要下载最近热播的电视剧,则用户可以按顺序下载该电视剧近期更新的每一集,也可以选择用户喜欢的片段播放。若用户需要下载该电视剧的每一集时,则用户可以先点击进入下载界面,再选择需要下载的电视剧的剧集,当选择完毕后则点击下载按钮,如下载指示框,以将该下载请求发送至终端。For example, if the user needs to download a recently popular TV series, the user can download each recently updated episode of the TV series in sequence, or select a segment that the user likes to play. If the user needs to download each episode of the TV series, the user can first click to enter the download interface, then select the episode of the TV series to be downloaded, and click the download button after the selection is complete, such as the download instruction box, to request the download sent to the terminal.

S102、响应上述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值。S102. In response to the above download instruction, detect whether the current speed of the local end accessing the external network is less than a preset speed threshold.

本发明实施例中,本端当前的访问外部网络数据的速度,可以通过安装速度检测软件去获取,也可以根据当前所连接的网络的带宽来确定。In the embodiment of the present invention, the current speed of the local end accessing external network data may be acquired by installing speed detection software, or may be determined according to the bandwidth of the currently connected network.

作为一种可选的实施方式,可以在终端预先设定一个速度阈值,该速度阈值可以是根据终端连接的惯用网络来设定。其中,该惯用网络可以是用户经常连接的网络。该速度阈值也可以是用户自己设定。举例来说,若终端经常连接到家庭用网,且其家庭用网的带宽为4M,则可以将速度阈值设定为356KB/S。As an optional implementation manner, a speed threshold may be preset in the terminal, and the speed threshold may be set according to the usual network to which the terminal is connected. Wherein, the common network may be a network frequently connected by the user. The speed threshold may also be set by the user. For example, if the terminal is often connected to the home network and the bandwidth of the home network is 4M, the speed threshold can be set to 356KB/S.

S103、若是,确定上述至少两个目标文件的大小,并按照上述至少两个目标文件从小到大的顺序,生成第一下载请求。S103. If yes, determine the sizes of the at least two target files, and generate a first download request in an ascending order of the at least two target files.

本发明实施例中,上述至少两个目标文件的大小是指下载上述至少两个目标文件所需的存储空间的大小。由于当访问外部网络数据资源的速度一定的时候,文件越大,则下载该文件所需的时间就越长。所以当上述至少两个目标文件的下载优先级都相同时,则可以将上述至少两个目标文件按所需存储空间从小到大依次排序。In this embodiment of the present invention, the size of the at least two target files refers to the size of the storage space required for downloading the at least two target files. Because when the speed of accessing external network data resources is constant, the larger the file, the longer the time required to download the file. Therefore, when the download priorities of the at least two target files are the same, the at least two target files may be sorted in descending order according to the required storage space.

本发明实施例中,由于访问外部网络数据资源的速度低于预先设定的速度阈值,则说明此时的下载速度比较慢。为了使相同的时间内,接收到服务器端发送的更多完整的目标文件至终端,则可以将所述至少两个目标文件按照上述文件大小从小到大的顺序,生成第一下载请求。其中,上述第一下载请求是包含顺序标识的,且是根据目标文件的大小从小到大依次排序。In the embodiment of the present invention, since the speed of accessing the external network data resource is lower than the preset speed threshold, it means that the download speed at this time is relatively slow. In order to receive more complete target files sent by the server to the terminal within the same time period, the at least two target files may be generated according to the above-mentioned order of file sizes from small to large to generate a first download request. The above-mentioned first download request includes a sequence identifier, and is sorted in descending order according to the size of the target file.

S104、将上述第一下载请求发送至服务器端,以使上述服务器端将与上述第一下载请求对应的文件发送至所述本端。S104. Send the first download request to the server end, so that the server end sends the file corresponding to the first download request to the local end.

本发明实施例中,上述第一下载请求包含上述至少两个目标文件对应的子下载请求。当服务器端接收到该第一下载请求时,则会将所述至少两个目标文件以文件从小到大的顺序发送至终端。In this embodiment of the present invention, the first download request includes sub-download requests corresponding to the at least two target files. When the server side receives the first download request, it will send the at least two target files to the terminal in the order of files from small to large.

举例来说,当上述至少两个目标文件包含一集电视剧、一部电影以及一首歌。当一集电视剧所对应的文件大小为141MB,一部电影对应的文件大小为956MB,一首歌所对应的文件大小为65MB,由于上述一集电视剧、上述一部电影以及上述一首歌按照文件从小到大的排序为一首音乐、一集电视剧、以及一部电影,所以终端发送的第一下载请求对应的下载顺序为先下载上述一首音乐,再下在上述一集电视剧,最后下载上述一部电影。For example, when the at least two target files include a TV series, a movie and a song. When the file size corresponding to an episode of a TV series is 141MB, the file size corresponding to a movie is 956MB, and the file size corresponding to a song is 65MB, because the above-mentioned TV series, the above-mentioned movie and the above-mentioned song are in accordance with the file size The order from small to large is a piece of music, an episode of a TV series, and a movie, so the download sequence corresponding to the first download request sent by the terminal is to download the above piece of music first, then download the above-mentioned TV series, and finally download the above-mentioned a movie.

在图1中,终端先接收用户发送的针对至少两个目标文件的下载指令;响应所述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值;若是,确定所述至少两个目标文件的大小,并按照所述至少两个目标文件从小到大的顺序,生成第一下载请求;将所述第一下载请求发送至服务器端,以使所述服务器端将与所述第一下载请求对应的文件发送至所述本端。实施本发明实施例,能够在接收用户发送的针对至少两个目标文件的下载指令时,可以根据本端当前的访问外部网络的速度的灵活调整下载顺序,从而提高了下载文件时的灵活性。In FIG. 1, the terminal first receives the download instructions for at least two target files sent by the user; in response to the download instructions, it detects whether the current speed of accessing the external network at the local end is less than a preset speed threshold; the size of the at least two target files, and generate a first download request according to the order of the at least two target files from small to large; send the first download request to the server, so that the server will The file corresponding to the first download request is sent to the local end. By implementing the embodiments of the present invention, when receiving download instructions for at least two target files sent by a user, the download sequence can be flexibly adjusted according to the current speed of the local end accessing an external network, thereby improving the flexibility of downloading files.

请参阅图2,图2是本发明实施例公开的另一种文件下载的方法的流程示意图;如图2所示,该文件下载的方法可以包括以下步骤:Please refer to FIG. 2. FIG. 2 is a schematic flowchart of another method for downloading a file disclosed in an embodiment of the present invention; as shown in FIG. 2, the method for downloading a file may include the following steps:

S201、接收用户发送的针对至少两个目标文件的下载指令。S201. Receive a download instruction sent by a user for at least two target files.

本发明实施例中,用户发送上述至少两个目标文件的下载指令的方式可以是用户先选择需要下载的至少两个目标文件,当选择目标文件完毕后,则点击下载指示按钮,如下载指示框,发送下载请求。其中,上述目标文件至少包括两个文件。In this embodiment of the present invention, the user may send the download instructions of the at least two target files in a manner that the user first selects at least two target files to be downloaded, and after selecting the target files, clicks a download instruction button, such as a download instruction box. , to send a download request. Wherein, the above-mentioned target file includes at least two files.

举例来说,若用户需要下载最近热播的电视剧,则用户可以按顺序下载该电视剧近期更新的每一集,也可以选择用户喜欢的片段播放。若用户需要下载该电视剧的每一集时,则用户可以先点击进入下载界面,再选择需要下载的电视剧的剧集,当选择完毕后则点击下载按钮,如下载指示框,以将该下载请求发送至终端。For example, if the user needs to download a recently popular TV series, the user can download each recently updated episode of the TV series in sequence, or select a segment that the user likes to play. If the user needs to download each episode of the TV series, the user can first click to enter the download interface, then select the episode of the TV series to be downloaded, and click the download button after the selection is complete, such as the download instruction box, to request the download sent to the terminal.

S202、响应上述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值。S202. In response to the above download instruction, detect whether the current speed of the local end accessing the external network is less than a preset speed threshold.

本发明实施例中,本端当前的访问外部网络数据的速度,可以通过安装速度检测软件去获取,也可以根据当前所连接的网络的带宽来确定。In the embodiment of the present invention, the current speed of the local end accessing external network data may be acquired by installing speed detection software, or may be determined according to the bandwidth of the currently connected network.

作为一种可选的实施方式,可以在终端预先设定一个速度阈值,该速度阈值可以是根据终端连接的惯用网络来设定。其中,该惯用网络可以是用户经常连接的网络。该速度阈值也可以是用户自己设定。举例来说,若终端经常连接到家庭用网,且其家庭用网的带宽为4M,则可以将速度阈值设定为356KB/S。As an optional implementation manner, a speed threshold may be preset in the terminal, and the speed threshold may be set according to the usual network to which the terminal is connected. Wherein, the common network may be a network frequently connected by the user. The speed threshold may also be set by the user. For example, if the terminal is often connected to the home network and the bandwidth of the home network is 4M, the speed threshold can be set to 356KB/S.

S203、若是,确定上述至少两个目标文件的大小,并按照上述至少两个目标文件从小到大的顺序,生成第一下载请求。S203. If yes, determine the sizes of the at least two target files, and generate a first download request in an ascending order of the at least two target files.

本发明实施例中,上述至少两个目标文件的大小是指下载上述至少两个目标文件所需的存储空间的大小。由于当访问外部网络数据资源的速度一定的时候,若文件越大,则下载该文件所需的时间就越长。所以当上述至少两个目标文件的下载优先级都相同时,则可以将上述至少两个目标文件按所需存储空间从小到大依次排序。In this embodiment of the present invention, the size of the at least two target files refers to the size of the storage space required for downloading the at least two target files. Because when the speed of accessing external network data resources is constant, the larger the file size, the longer the time required to download the file. Therefore, when the download priorities of the at least two target files are the same, the at least two target files may be sorted in descending order according to the required storage space.

本发明实施例中,由于访问外部网络数据资源的速度低于预先设定的速度阈值,则说明此时的下载速度比较低。为了使相同的时间内,接收到服务器端发送的更多完整的目标文件至终端,则可以将所述至少两个目标文件按照上述文件大小从小到大的顺序,生成第一下载请求。其中,上述第一下载请求是包含顺序标识的,且是根据目标文件的大小从小到大依次排序。In the embodiment of the present invention, since the speed of accessing the external network data resource is lower than the preset speed threshold, it means that the download speed at this time is relatively low. In order to receive more complete target files sent by the server to the terminal within the same time period, the at least two target files may be generated according to the above-mentioned order of file sizes from small to large to generate a first download request. The above-mentioned first download request includes a sequence identifier, and is sorted in descending order according to the size of the target file.

S204、将上述第一下载请求发送至服务器端,以使上述服务器端将与上述第一下载请求对应的文件发送至上述本端。S204. Send the first download request to the server end, so that the server end sends the file corresponding to the first download request to the local end.

本发明实施例中,上述第一下载请求包含上述至少两个目标文件对应的子下载请求。当服务器端接收到该第一下载请求时,则会将所述至少两个目标文件以文件从小到大的顺序发送至终端。In this embodiment of the present invention, the first download request includes sub-download requests corresponding to the at least two target files. When the server side receives the first download request, it will send the at least two target files to the terminal in the order of files from small to large.

举例来说,当上述至少两个目标文件包含一集电视剧、一部电影以及一首歌。当一集电视剧所对应的文件大小为141MB,一部电影对应的文件大小为956MB,一首歌所对应的文件大小为65MB,由于上述一集电视剧、上述一部电影以及上述一首歌按照文件从小到大的排序为一首音乐、一集电视剧、以及一部电影,所以终端发送的第一下载请求对应的下载顺序为先下载上述一首音乐,再下在上述一集电视剧,最后下载上述一部电影。For example, when the at least two target files include a TV series, a movie and a song. When the file size corresponding to an episode of a TV series is 141MB, the file size corresponding to a movie is 956MB, and the file size corresponding to a song is 65MB, because the above-mentioned TV series, the above-mentioned movie and the above-mentioned song are in accordance with the file size The order from small to large is a piece of music, an episode of a TV series, and a movie, so the download sequence corresponding to the first download request sent by the terminal is to download the above piece of music first, then download the above-mentioned TV series, and finally download the above-mentioned a movie.

S205、若检测上述本端当前的访问外部网络的速度大于或等于上述预先设定的速度阈值,则向用户输出第一提示信息。S205. If it is detected that the current speed of the local end accessing the external network is greater than or equal to the preset speed threshold, output first prompt information to the user.

本发明实施例中,上述第一提示信息用于提示用户是否修改当前的下载顺序。其中,上述第一提示信息可以是语音提示,也可以是文字提示,还可以是在输出文字提示的时候,同时也输出语音提示。In the embodiment of the present invention, the above-mentioned first prompt information is used to prompt the user whether to modify the current download sequence. The above-mentioned first prompt information may be a voice prompt, or a text prompt, or a voice prompt is also output when the text prompt is output.

作为一种可选的实施方式,当上述终端当前的访问外部网络的速度大于或等于预先设定的速度阈值,则说明终端当前访问外部网络的速度比较快。为使用户可以根据当时需求调整上述至少两个目标文件的下载顺序,则终端向用户输出第一提示信息,以提示用户当前可以修改上述至少两个目标文件的下载顺序。As an optional implementation manner, when the current speed of the terminal accessing the external network is greater than or equal to a preset speed threshold, it means that the current speed of the terminal accessing the external network is relatively fast. In order for the user to adjust the download sequence of the at least two target files according to the current demand, the terminal outputs first prompt information to the user to prompt the user that the download sequence of the at least two target files can be modified currently.

S206、检测是否接收到用户输入的下载顺序修改指令。S206. Detect whether a download sequence modification instruction input by the user is received.

本发明实施例中,下载顺序修改指令是用户根据自身需求输入的指令,该顺序修改指令是为了修改上述至少两个目标文件的下载顺序。举例来说,当上述至少两个目标文件包含音乐、电视剧以及电影时,当用户在选择下载的目标文件时,是先选择音乐,再选择电视剧,最后才选择电影。但用户突然想先下载电影,再下载音乐,最后下载电视剧,则用户则可以发送修改指令至上述终端。其中,上述下载顺序修改指令是在发送下载请求至上述终端前输入的指令。In this embodiment of the present invention, the download sequence modification instruction is an instruction input by the user according to his own needs, and the sequence modification instruction is for modifying the download sequence of the at least two target files. For example, when the at least two target files include music, TV series and movies, when the user selects the target file to download, he first selects music, then TV series, and finally movies. However, if the user suddenly wants to download movies first, then music, and finally a TV series, the user can send a modification instruction to the above-mentioned terminal. Wherein, the above-mentioned download sequence modification instruction is an instruction input before sending the download request to the above-mentioned terminal.

S207、当未接收到用户输入的上述下载顺序修改指令时,生成第二下载请求;将上述第二下载请求发送至上述服务器端,以使上述服务器端将与上述第二下载请求对应的文件发送至上述本端。S207, when the above-mentioned download sequence modification instruction input by the user is not received, generate a second download request; send the above-mentioned second download request to the above-mentioned server, so that the above-mentioned server sends the file corresponding to the above-mentioned second download request to the above end.

本发明实施例中,当终端向用户发送了第一提示信息后,若在预先设定的时间段内用户并未对该第一提示信息输入响应指令,则终端默认不修改当前的下载顺序,而是以用户发送上述至少两个目标文件的时间先后顺序,将与其对应的第二下载请求发送至到服务器端,以使服务器端将与所述第二下载请求对应的数据资源发送至终端。In this embodiment of the present invention, after the terminal sends the first prompt information to the user, if the user does not input a response command to the first prompt information within a preset time period, the terminal does not modify the current download sequence by default, Instead, the user sends the second download request corresponding to the at least two target files to the server in the chronological order of sending the above-mentioned at least two target files, so that the server sends the data resource corresponding to the second download request to the terminal.

作为一种可选的实施例,若上述至少两个目标文件包含两集电视剧,一部电影,且用户是先选择电视剧,再选择电影的。若用户并未输入下载顺序修改指令,终端将电视剧对应的下载请求发送至服务器端,再将与电影对应的下载请求发送至服务器端。从而,服务器端则是先将电视剧相对应的数据资源发送至终端,再将是应对应的数据资源发送至终端。其中,与该两集电视剧对应的下载请求以及与该电影对应的下载请求都是第二下载请求中与上述至少两个目标文件的子下载请求。As an optional embodiment, if the above at least two target files include two episodes of TV series and one movie, and the user selects the TV series first and then the movie. If the user does not input the download sequence modification instruction, the terminal sends the download request corresponding to the TV series to the server, and then sends the download request corresponding to the movie to the server. Therefore, the server first sends the data resources corresponding to the TV series to the terminal, and then sends the corresponding data resources to the terminal. Wherein, the download request corresponding to the two TV episodes and the download request corresponding to the movie are both sub-download requests in the second download request and the at least two target files.

S208、若接收到用户输入的上述下载顺序修改指令,则响应上述下载顺序修改指令,生成第三下载请求。将上述第三下载请求发送至上述服务器端,以使上述服务器端将与上述第三下载请求对应的文件发送给上述本端。S208. If the above-mentioned download order modification instruction input by the user is received, generate a third download request in response to the above-mentioned download order modification instruction. The above-mentioned third download request is sent to the above-mentioned server end, so that the above-mentioned server end sends the file corresponding to the above-mentioned third download request to the above-mentioned local end.

本发明实施例中,若接收到用户输入的下载顺序修改指令,则终端响应该下载顺序修改指令,并生成第三下载请求。其中,上述第三下载请求的顺序是根据下载顺序修改指令修改后的下载顺序。In this embodiment of the present invention, if a download sequence modification instruction input by the user is received, the terminal responds to the download sequence modification instruction and generates a third download request. Wherein, the sequence of the third download request is the download sequence modified according to the download sequence modification instruction.

作为一种可选的实施例,若上述至少两个目标文件包含三集电视剧,以及一首歌,当用户在选择下载的目标文件时,首先选了一首歌,随后又选了三集电视剧。但随后用户突然想先看电视剧,再听歌,则需将上述目标文件的下载顺序进行修改。修改后的下载顺序是先下载电视剧,再下载歌,当先将与上述三集电视剧对应的下载请求发送至服务器端,再将上述一首歌的下载请求发送至服务器端。当服务器端接收到与上述至少两个目标文件对应的下载请求时,则先将与上述三集电视剧对应的数据资源发送至终端,再将与上述一首歌对应的数据资源发送至终端。其中,上述终端发送至服务器端的与上述三集电视剧对应的下载请求,以及与上述一首歌对应的下载请求都是第三下载请求中与上述至少两个目标文件对应的子下载请求。As an optional embodiment, if the above-mentioned at least two target files contain three episodes of TV series and one song, when the user selects the target file to download, he first selects a song, and then selects three episodes of TV series. . But then the user suddenly wants to watch the TV series first and then listen to the song, so the download sequence of the above target files needs to be modified. The modified download sequence is to download the TV series first, and then download the song, and then send the download request corresponding to the three-episode TV series to the server first, and then send the download request for the above one song to the server. When the server side receives the download requests corresponding to the at least two target files, it first sends the data resources corresponding to the three-episode TV series to the terminal, and then sends the data resources corresponding to the one song to the terminal. The download request corresponding to the three-episode TV series and the download request corresponding to the song sent by the terminal to the server are both sub-download requests corresponding to the at least two target files in the third download request.

S209、获取上述终端的存储空间当前的容量值;判断上述容量值是否低于预先设定的容量阈值;若是,则向用户输出第二提示信息。S209: Obtain the current capacity value of the storage space of the terminal; determine whether the capacity value is lower than a preset capacity threshold; if so, output second prompt information to the user.

本发明实施例中,上述第二提示信息用于提示用户清理上述存储空间。其中,可以在终端预先设定一个容量阈值,该容量阈值可以是由厂商设定,也可以是用户设定,还可以是根据终端根据实际的存储空间大小,默认一个值。In this embodiment of the present invention, the above-mentioned second prompt information is used to prompt the user to clear the above-mentioned storage space. Wherein, a capacity threshold may be preset in the terminal, and the capacity threshold may be set by the manufacturer, or may be set by the user, or may be a default value according to the actual storage space size of the terminal.

具体的,当服务器端将数据资源发送至服务器端时,终端则可获取此时存储空间的容量值,并判断上述存储空间的容量值与预先设定的容量阈值的大小关系。若上述存储空间的容量值小于预先设定的容量值,则说明当前存储空间不足,则终端可以向用户输出上述第二提示信息,以提示用户清理存储空间。Specifically, when the server sends data resources to the server, the terminal can obtain the capacity value of the storage space at this time, and determine the relationship between the capacity value of the storage space and the preset capacity threshold. If the capacity value of the storage space is smaller than the preset capacity value, it means that the current storage space is insufficient, and the terminal may output the second prompt information to the user to prompt the user to clear the storage space.

在图2中,详细描述了本段当前访问外部网络的速度大于或等于预先设定的速度阈值时,当接收到用户输入的至少两个下载请求时,能够向用户输出提示信息,提示用户是否修改当前的下载顺序。则用户可以根据自身需求灵活调整下载顺序。实施本发明实施例,可以提高终端下载过程中的灵活性。In Figure 2, it is described in detail that when the current speed of accessing the external network in this segment is greater than or equal to the preset speed threshold, when at least two download requests input by the user are received, prompt information can be output to the user, prompting the user whether Modify the current download order. Then users can flexibly adjust the download order according to their own needs. By implementing the embodiments of the present invention, the flexibility in the downloading process of the terminal can be improved.

请参阅图3,图3是本发明实施例公开的一种文件下载的终端的结构示意图;如图3所示,该终端可以包括:接收单元31、检测单元32、生成单元33以及发送单元34,其中,Please refer to FIG. 3 , which is a schematic structural diagram of a terminal for downloading files disclosed in an embodiment of the present invention; as shown in FIG. 3 , the terminal may include: a receiving unit 31 , a detecting unit 32 , a generating unit 33 and a sending unit 34 ,in,

上述接收单元31,用于接收用户发送的针对至少两个目标文件的下载指令。The above receiving unit 31 is configured to receive download instructions sent by the user for at least two target files.

本发明实施例中,用户发送上述至少两个目标文件的下载指令的方式可以是用户先选择需要下载的至少两个目标文件,当选择目标文件完毕后,则点击下载指示按钮,如下载指示框,发送下载请求。其中,上述目标文件至少包括两个文件。In this embodiment of the present invention, the user may send the download instructions of the at least two target files in a manner that the user first selects at least two target files to be downloaded, and after selecting the target files, clicks a download instruction button, such as a download instruction box. , to send a download request. Wherein, the above-mentioned target file includes at least two files.

举例来说,若用户需要下载最近热播的电视剧,则用户可以按顺序下载该电视剧近期更新的每一集,也可以选择用户喜欢的片段播放。若用户需要下载该电视剧的每一集时,则用户可以先点击进入下载界面,再选择需要下载的电视剧的剧集,当选择完毕后则点击下载按钮,如下载指示框,以将该下载请求发送至终端。For example, if the user needs to download a recently popular TV series, the user can download each recently updated episode of the TV series in sequence, or select a segment that the user likes to play. If the user needs to download each episode of the TV series, the user can first click to enter the download interface, then select the episode of the TV series to be downloaded, and click the download button after the selection is complete, such as the download instruction box, to request the download sent to the terminal.

上述检测单元32,用于响应上述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值。The above-mentioned detection unit 32 is configured to, in response to the above-mentioned download instruction, detect whether the current speed of the local end accessing the external network is less than a preset speed threshold.

本发明实施例中,本端当前的访问外部网络数据的速度,可以通过安装速度检测软件去获取,也可以根据当前所连接的网络的带宽来确定。In the embodiment of the present invention, the current speed of the local end accessing external network data may be acquired by installing speed detection software, or may be determined according to the bandwidth of the currently connected network.

作为一种可选的实施方式,可以在终端预先设定一个速度阈值,该速度阈值可以是根据终端连接的惯用网络来设定。其中,该惯用网络可以是用户经常连接的网络。该速度阈值也可以是用户自己设定。举例来说,若终端经常连接到家庭用网,且其家庭用网的带宽为4M,则可以将速度阈值设定为356KB/S。As an optional implementation manner, a speed threshold may be preset in the terminal, and the speed threshold may be set according to the usual network to which the terminal is connected. Wherein, the common network may be a network frequently connected by the user. The speed threshold may also be set by the user. For example, if the terminal is often connected to the home network and the bandwidth of the home network is 4M, the speed threshold can be set to 356KB/S.

上述生成单元33,用于本端当前的访问外部网络的速度小于预先设定的速度阈值时,确定上述至少两个目标文件的大小,并按照上述至少两个目标文件从小到大的顺序,生成第一下载请求。The above-mentioned generating unit 33 is used to determine the size of the above-mentioned at least two target files when the current speed of accessing the external network at the local end is less than the preset speed threshold, and generate the size of the above-mentioned at least two target files in an ascending order of the above-mentioned at least two target files. First download request.

本发明实施例中,上述至少两个目标文件的大小是指下载上述至少两个目标文件所需的存储空间的大小。由于当访问外部网络数据资源的速度一定的时候,文件越大,则下载该文件所需的时间就越长。所以当上述至少两个目标文件的下载优先级都相同时,则可以将上述至少两个目标文件按所需存储空间从小到大依次排序。In this embodiment of the present invention, the size of the at least two target files refers to the size of the storage space required for downloading the at least two target files. Because when the speed of accessing external network data resources is constant, the larger the file, the longer the time required to download the file. Therefore, when the download priorities of the at least two target files are the same, the at least two target files may be sorted in descending order according to the required storage space.

本发明实施例中,由于访问外部网络数据资源的速度低于预先设定的速度阈值,则说明此时的下载速度比较慢。为了使相同的时间内,上述接收单元31接收到服务器端发送的更多完整的目标文件至终端,则上述生成单元33可以将所述至少两个目标文件按照上述文件大小从小到大的顺序,生成第一下载请求。其中,上述第一下载请求是包含顺序标识的,且是根据目标文件的大小从小到大依次排序。In the embodiment of the present invention, since the speed of accessing the external network data resource is lower than the preset speed threshold, it means that the download speed at this time is relatively slow. In order to allow the receiving unit 31 to receive more complete target files sent by the server to the terminal within the same time period, the generating unit 33 may arrange the at least two target files in the order of the file sizes from small to large, A first download request is generated. The above-mentioned first download request includes a sequence identifier, and is sorted in descending order according to the size of the target file.

上述发送单元34,用于将上述第一下载请求发送至服务器端,以使上述服务器端将与上述第一下载请求对应的文件发送至所述本端。The sending unit 34 is configured to send the first download request to the server end, so that the server end sends the file corresponding to the first download request to the local end.

本发明实施例中,上述第一下载请求包含上述至少两个目标文件对应的子下载请求。当服务器端接收到该第一下载请求时,则会将所述至少两个目标文件以文件从小到大的顺序发送至终端。In this embodiment of the present invention, the first download request includes sub-download requests corresponding to the at least two target files. When the server side receives the first download request, it will send the at least two target files to the terminal in the order of files from small to large.

举例来说,当上述至少两个目标文件包含一集电视剧、一部电影以及一首歌。当一集电视剧所对应的文件大小为141MB,一部电影对应的文件大小为956MB,一首歌所对应的文件大小为65MB,由于上述一集电视剧、上述一部电影以及上述一首歌按照文件从小到大的排序为一首音乐、一集电视剧、以及一部电影,所以上述发送单元34发送的第一下载请求对应的下载顺序为先下载上述一首音乐,再下在上述一集电视剧,最后下载上述一部电影。For example, when the at least two target files include a TV series, a movie and a song. When the file size corresponding to an episode of a TV series is 141MB, the file size corresponding to a movie is 956MB, and the file size corresponding to a song is 65MB, because the above-mentioned TV series, the above-mentioned movie and the above-mentioned song are in accordance with the file size The order from small to large is a piece of music, an episode of a TV series, and a movie, so the download order corresponding to the first download request sent by the above-mentioned sending unit 34 is to download the above-mentioned piece of music first, and then download the above-mentioned drama series, Finally download one of the above movies.

在图3中,上述接收单元31先接收用户发送的针对至少两个目标文件的下载指令;上述检测单元32响应所述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值;若检测本端当前的访问外部网络的速度小于预先设定的速度阈值,则上述生成单元33确定所述至少两个目标文件的大小,并按照所述至少两个目标文件从小到大的顺序,生成第一下载请求;上述发送单元34将所述第一下载请求发送至服务器端,以使所述服务器端将与所述第一下载请求对应的文件发送至所述本端。实施本发明实施例,能够在上述接收单元31接收用户发送的针对至少两个目标文件的下载指令时,可以根据本端当前的访问外部网络的速度的灵活调整下载顺序,从而提高了下载文件时的灵活性。In FIG. 3, the above-mentioned receiving unit 31 first receives the download instructions for at least two target files sent by the user; the above-mentioned detection unit 32 responds to the download instructions and detects whether the current speed of accessing the external network at the local end is less than the preset speed. Speed threshold; if it is detected that the current speed of accessing the external network at the local end is less than the preset speed threshold, the above-mentioned generating unit 33 determines the size of the at least two target files, and according to the at least two target files from small to large The above-mentioned sending unit 34 sends the first download request to the server end, so that the server end sends the file corresponding to the first download request to the local end. By implementing the embodiment of the present invention, when the receiving unit 31 receives the download instructions for at least two target files sent by the user, the download sequence can be flexibly adjusted according to the current speed of the local end accessing the external network, thereby improving the time for downloading files. flexibility.

请参阅图4,图4是本发明实施例公开的又一种文件下载的终端的结构示意图。其中,图4是在图3的基础上进一步细化得到,如图4所示,该终端可以包括:接收单元41、检测单元42、生成单元43、发送单元44、输出单元45、执行单元46、获取单元47以及判断单元48,其中,Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of another terminal for downloading files according to an embodiment of the present invention. 4 is further refined on the basis of FIG. 3 . As shown in FIG. 4 , the terminal may include: a receiving unit 41 , a detecting unit 42 , a generating unit 43 , a sending unit 44 , an output unit 45 , and an executing unit 46 , obtaining unit 47 and judging unit 48, wherein,

上述接收单元41,用于接收用户发送的针对至少两个目标文件的下载指令。The above receiving unit 41 is configured to receive download instructions sent by the user for at least two target files.

本发明实施例中,用户发送上述至少两个目标文件的下载指令的方式可以是用户先选择需要下载的至少两个目标文件,当选择目标文件完毕后,则点击下载指示按钮,如下载指示框,发送下载请求。其中,上述目标文件至少包括两个文件。In this embodiment of the present invention, the user may send the download instructions of the at least two target files in a manner that the user first selects at least two target files to be downloaded, and after selecting the target files, clicks a download instruction button, such as a download instruction box. , to send a download request. Wherein, the above-mentioned target file includes at least two files.

举例来说,若用户需要下载最近热播的电视剧,则用户可以按顺序下载该电视剧近期更新的每一集,也可以选择用户喜欢的片段播放。若用户需要下载该电视剧的每一集时,则用户可以先点击进入下载界面,再选择需要下载的电视剧的剧集,当选择完毕后则点击下载按钮,如下载指示框,以将该下载请求发送至终端。For example, if the user needs to download a recently popular TV series, the user can download each recently updated episode of the TV series in sequence, or select a segment that the user likes to play. If the user needs to download each episode of the TV series, the user can first click to enter the download interface, then select the episode of the TV series to be downloaded, and click the download button after the selection is complete, such as the download instruction box, to request the download sent to the terminal.

上述检测单元42,用于响应上述下载指令,检测本端当前的访问外部网络的速度是否小于预先设定的速度阈值。The detection unit 42 is configured to respond to the download instruction and detect whether the current speed of the local end accessing the external network is less than a preset speed threshold.

本发明实施例中,本端当前的访问外部网络数据的速度,可以通过安装速度检测软件去获取,也可以根据当前所连接的网络的带宽来确定。In the embodiment of the present invention, the current speed of the local end accessing external network data may be acquired by installing speed detection software, or may be determined according to the bandwidth of the currently connected network.

作为一种可选的实施方式,可以在终端预先设定一个速度阈值,该速度阈值可以是根据终端连接的惯用网络来设定。其中,该惯用网络可以是用户经常连接的网络。该速度阈值也可以是用户自己设定。举例来说,若终端经常连接到家庭用网,且其家庭用网的带宽为4M,则可以将速度阈值设定为356KB/S。As an optional implementation manner, a speed threshold may be preset in the terminal, and the speed threshold may be set according to the usual network to which the terminal is connected. Wherein, the common network may be a network frequently connected by the user. The speed threshold may also be set by the user. For example, if the terminal is often connected to the home network and the bandwidth of the home network is 4M, the speed threshold can be set to 356KB/S.

作为一种可选的实施例,上述检测单元42,还用于检测是否接收到用户输入的下载顺序修改指令。As an optional embodiment, the foregoing detection unit 42 is further configured to detect whether a download sequence modification instruction input by the user is received.

本发明实施例中,下载顺序修改指令是用户根据自身需求输入的指令,该顺序修改指令是为了修改上述至少两个目标文件的下载顺序。举例来说,当上述至少两个目标文件包含音乐、电视剧以及电影时,当用户在选择下载的目标文件时,是先选择音乐,再选择电视剧,最后才选择电影。但用户突然想先下载电影,再下载音乐,最后下载电视剧,则用户则可以发送修改指令至上述终端。其中,上述下载顺序修改指令是在发送下载请求至上述终端前输入的指令。In this embodiment of the present invention, the download sequence modification instruction is an instruction input by the user according to his own needs, and the sequence modification instruction is for modifying the download sequence of the at least two target files. For example, when the at least two target files include music, TV series and movies, when the user selects the target file to download, he first selects music, then TV series, and finally movies. However, if the user suddenly wants to download movies first, then music, and finally a TV series, the user can send a modification instruction to the above-mentioned terminal. Wherein, the above-mentioned download sequence modification instruction is an instruction input before sending the download request to the above-mentioned terminal.

作为另一种可选的实施方式,上述检测单元42,还用于检测连接外部网络是否成功。As another optional implementation manner, the foregoing detection unit 42 is further configured to detect whether the connection to the external network is successful.

上述生成单元43,用于本端当前的访问外部网络的速度小于预先设定的速度阈值时,确定上述至少两个目标文件的大小,并按照上述至少两个目标文件从小到大的顺序,生成第一下载请求。The above-mentioned generating unit 43 is used to determine the size of the above-mentioned at least two target files when the current speed of accessing the external network at the local end is less than the preset speed threshold, and generate the above-mentioned at least two target files in the ascending order of the above-mentioned at least two target files. First download request.

本发明实施例中,上述至少两个目标文件的大小是指下载上述至少两个目标文件所需的存储空间的大小。由于当访问外部网络数据资源的速度一定的时候,文件越大,则下载该文件所需的时间就越长。所以当上述至少两个目标文件的下载优先级都相同时,则可以将上述至少两个目标文件按所需存储空间从小到大依次排序。In this embodiment of the present invention, the size of the at least two target files refers to the size of the storage space required for downloading the at least two target files. Because when the speed of accessing external network data resources is constant, the larger the file, the longer the time required to download the file. Therefore, when the download priorities of the at least two target files are the same, the at least two target files may be sorted in descending order according to the required storage space.

本发明实施例中,由于访问外部网络数据资源的速度低于预先设定的速度阈值,则说明此时的下载速度比较慢。为了使相同的时间内,上述接收单元31接收到服务器端发送的更多完整的目标文件至终端,则上述生成单元33可以将所述至少两个目标文件按照上述文件大小从小到大的顺序,生成第一下载请求。其中,上述第一下载请求是包含顺序标识的,且是根据目标文件的大小从小到大依次排序。In the embodiment of the present invention, since the speed of accessing the external network data resource is lower than the preset speed threshold, it means that the download speed at this time is relatively slow. In order to allow the receiving unit 31 to receive more complete target files sent by the server to the terminal within the same time period, the generating unit 33 may arrange the at least two target files in the order of the file sizes from small to large, A first download request is generated. The above-mentioned first download request includes a sequence identifier, and is sorted in descending order according to the size of the target file.

作为一种可选的实施方式,上述生成单元43,还用于当未接收到用户输入的所述下载顺序修改指令时,生成第二下载请求。As an optional implementation manner, the above-mentioned generating unit 43 is further configured to generate a second download request when the download sequence modification instruction input by the user is not received.

本发明实施例中,当上述输出单元45向用户发送了第一提示信息后,若在预先设定的时间段内用户并未对该第一提示信息输入响应指令,则默认不修改当前的下载顺序,而是以用户发送上述至少两个目标文件的时间先后顺序,将与其对应的第二下载请求发送至到服务器端,以使服务器端将与所述第二下载请求对应的数据资源发送至终端。In the embodiment of the present invention, after the above-mentioned output unit 45 sends the first prompt information to the user, if the user does not input a response command to the first prompt information within the preset time period, the current download is not modified by default. Instead, send the corresponding second download request to the server in the chronological order in which the user sends the at least two target files, so that the server sends the data resource corresponding to the second download request to terminal.

作为一种可选的实施例,若上述至少两个目标文件包含两集电视剧,一部电影,且用户是先选择电视剧,再选择电影的。若用户并未输入下载顺序修改指令,则将电视剧对应的下载请求发送至服务器端,再将与电影对应的下载请求发送至服务器端。从而,服务器端则是先将电视剧相对应的数据资源发送至终端,再将是应对应的数据资源发送至终端。其中,与该两集电视剧对应的下载请求以及与该电影对应的下载请求都统称为第二下载请求。As an optional embodiment, if the above at least two target files include two episodes of TV series and one movie, and the user selects the TV series first and then the movie. If the user does not input the download sequence modification instruction, the download request corresponding to the TV series is sent to the server, and then the download request corresponding to the movie is sent to the server. Therefore, the server first sends the data resources corresponding to the TV series to the terminal, and then sends the corresponding data resources to the terminal. Wherein, the download requests corresponding to the two episodes of the TV series and the download requests corresponding to the movie are collectively referred to as the second download request.

作为另一种可选的实施方式,上述生成单元43,还用于若接收到用户输入的上述下载顺序修改指令,则响应上述下载顺序修改指令,生成第三下载请求。As another optional implementation manner, the generation unit 43 is further configured to generate a third download request in response to the download sequence modification instruction if the download sequence modification instruction input by the user is received.

本发明实施例中,若上述接收单元41接收到用户输入的下载顺序修改指令,则上述生成单元43响应该下载顺序修改指令,并生成第三下载请求。其中,上述第三下载请求的顺序是根据用户修改后的下载顺序。In this embodiment of the present invention, if the receiving unit 41 receives the download sequence modification instruction input by the user, the generating unit 43 responds to the download sequence modification instruction and generates a third download request. Wherein, the sequence of the above-mentioned third download requests is based on the download sequence modified by the user.

作为一种可选的实施例,若上述至少两个目标文件包含三集电视剧,以及一首歌,当用户在选择下载的目标文件时,首先选了一首歌,随后又选了三集电视剧。但随后用户突然想先看电视剧,歌之后再听,则需将上述目标文件的下载顺序进行修改。修改后的下载顺序是先下载电视剧,再下载歌,当先将与上述三集电视剧对应的下载请求发送至服务器端,再将上述一首歌的下载请求发送至服务器端。当服务器端接收到与上述至少两个目标文件对应的下载请求时,则先将与上述三集电视剧对应的数据资源发送至终端,再将与上述一首歌对应的数据资源发送至终端。其中,上述终端发送至服务器端的与上述三集电视剧对应的下载请求以及与上述一首歌对应的下载请求都是第三下载请求中与上述至少两个目标文件的子下载请求。As an optional embodiment, if the above-mentioned at least two target files contain three episodes of TV series and one song, when the user selects the target file to download, he first selects a song, and then selects three episodes of TV series. . But then the user suddenly wants to watch the TV series first and then listen to the song, so the download sequence of the above target files needs to be modified. The modified download sequence is to download the TV series first, and then download the song, and then send the download request corresponding to the three-episode TV series to the server first, and then send the download request for the above one song to the server. When the server side receives the download requests corresponding to the at least two target files, it first sends the data resources corresponding to the three-episode TV series to the terminal, and then sends the data resources corresponding to the one song to the terminal. The download request corresponding to the three-episode TV series and the download request corresponding to the song sent by the terminal to the server are both sub-download requests of the at least two target files in the third download request.

上述发送单元44,用于将上述第一下载请求发送至服务器端,以使上述服务器端将与上述第一下载请求对应的文件发送至上述本端。The sending unit 44 is configured to send the first download request to the server end, so that the server end sends the file corresponding to the first download request to the local end.

作为一种可选的实施方式,上述发送单元44,还用于将上述第二下载请求发送至上述服务器端,以使上述服务器端将与上述第二下载请求对应的文件发送至上述本端。As an optional implementation manner, the sending unit 44 is further configured to send the second download request to the server, so that the server sends the file corresponding to the second download request to the local end.

作为另一种可选的实施方式,上述发送单元44,还用于将上述第三下载请求发送至上述服务器端,以使上述服务器端将与上述第三下载请求对应的文件发送给上述本端。As another optional implementation manner, the sending unit 44 is further configured to send the third download request to the server, so that the server sends the file corresponding to the third download request to the local end .

上述输出单元45,用于上述本端当前的访问外部网络的速度大于或等于所述预先设定的速度阈值时,向用户输出第一提示信息。The output unit 45 is configured to output the first prompt information to the user when the current speed of the local end accessing the external network is greater than or equal to the preset speed threshold.

本发明实施例中,上述第一提示信息用于提示用户是否修改当前的下载顺序。In the embodiment of the present invention, the above-mentioned first prompt information is used to prompt the user whether to modify the current download sequence.

上述执行单元46,用于若连接成功,则执行上述接收用户发送的针对至少两个目标文件的下载指令的步骤。The above-mentioned executing unit 46 is configured to execute the above-mentioned step of receiving a download instruction for at least two target files sent by a user if the connection is successful.

上述获取单元47,用于获取上述终端的存储空间当前的容量值。The obtaining unit 47 is configured to obtain the current capacity value of the storage space of the terminal.

上述判断单元48,用于判断上述容量值是否低于预先设定的容量阈值。The judging unit 48 is configured to judge whether the capacity value is lower than a preset capacity threshold.

本发明实施例中,上述第二提示信息用于提示用户清理上述存储空间。其中,可以在终端预先设定一个容量阈值,该容量阈值可以是由厂商设定,也可以是用户设定,还可以是根据终端根据实际的存储空间大小,默认一个值。In this embodiment of the present invention, the above-mentioned second prompt information is used to prompt the user to clear the above-mentioned storage space. Wherein, a capacity threshold may be preset in the terminal, and the capacity threshold may be set by the manufacturer, or may be set by the user, or may be a default value according to the actual storage space size of the terminal.

具体的,当服务器端将数据资源发送至服务器端时,终端则可获取此时存储空间的容量值,并判断上述存储空间的容量值与预先设定的容量阈值的大小关系。若上述存储空间的容量值小于预先设定的容量值,则说明当前存储空间不足,则终端可以向用户输出上述第二提示信息,以提示用户清理存储空间。Specifically, when the server sends data resources to the server, the terminal can obtain the capacity value of the storage space at this time, and determine the relationship between the capacity value of the storage space and the preset capacity threshold. If the capacity value of the storage space is smaller than the preset capacity value, it means that the current storage space is insufficient, and the terminal may output the second prompt information to the user to prompt the user to clear the storage space.

在图4中,详细描述了当上述检测单元42检测到本段当前访问外部网络的速度大于或等于预先设定的速度阈值时,且当上述接收单元接收到用户输入的至少两个下载请求时,上述输出单元45能够向用户输出提示信息,提示用户是否修改当前的下载顺序。则用户可以根据自身需求灵活调整下载顺序。实施本发明实施例,可以提高终端下载过程中的灵活性。In FIG. 4 , when the detection unit 42 detects that the current speed of accessing the external network in this segment is greater than or equal to the preset speed threshold, and when the receiving unit receives at least two download requests input by the user , the above-mentioned output unit 45 can output prompt information to the user, prompting the user whether to modify the current download sequence. Then users can flexibly adjust the download order according to their own needs. By implementing the embodiments of the present invention, the flexibility in the downloading process of the terminal can be improved.

具体的,本发明实施例中介绍的终端可以实施本发明结合图1、图2介绍的文件下载的方法实施例中的部分或全部流程。Specifically, the terminal introduced in the embodiments of the present invention may implement part or all of the processes in the method embodiments for downloading files introduced in conjunction with FIG. 1 and FIG. 2 of the present invention.

本发明所有实施例中的模块或子模块,可以通过通用集成电路,例如CPU(CentralProcessing Unit,中央处理器),或通过ASIC(Application Specific IntegratedCircuit,专用集成电路)来实现。The modules or sub-modules in all the embodiments of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit, central processing unit), or an ASIC (Application Specific Integrated Circuit, an application-specific integrated circuit).

本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present invention may be adjusted, combined and deleted in sequence according to actual needs.

本发明实施例终端中的单元可以根据实际需要进行合并、划分和删减。The units in the terminal in the embodiment of the present invention may be combined, divided and deleted according to actual needs.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存取存储器(Random AccessMemory,简称RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM for short).

以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and of course, the scope of the rights of the present invention cannot be limited by this. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims (9)

1. A method of file download, comprising:
receiving a downloading instruction aiming at least two target files sent by a user;
responding to the downloading instruction, and detecting whether the current speed of accessing the external network of the home terminal is less than a preset speed threshold value;
the preset speed threshold is set by a user at the home terminal;
if so, determining the sizes of the at least two target files, and generating a first downloading request according to the sequence of the at least two target files from small to large, wherein when the at least two target files comprise an episode, a movie and a song, and the episode, the movie and the song are sorted into a piece of music, an episode of drama and a movie according to the sequence of the files from small to large, the downloading sequence corresponding to the first downloading request is to download the piece of music first, then download the piece of drama and finally download the piece of movie;
sending the first downloading request to a server side so that the server side sends a file corresponding to the first downloading request to the local side;
if the current speed of accessing the external network of the home terminal is detected to be greater than or equal to the preset speed threshold, outputting first prompt information to a user, wherein the first prompt information is used for prompting the user whether to modify the current downloading sequence;
detecting whether a downloading sequence modification instruction input by a user is received;
when the download sequence modification instruction input by the user is not received, generating a second download request;
the second downloading request takes the time sequence of the at least two target files sent by the user as a downloading sequence, wherein when the downloading priorities of the at least two target files are the same, the at least two target files are sequentially sorted from small to large according to the required storage space;
and sending the second downloading request to the server side so that the server side sends the file corresponding to the second downloading request to the local side.
2. The method of claim 1, further comprising:
if the downloading sequence modification instruction input by the user is received, responding to the downloading sequence modification instruction and generating a third downloading request;
and sending the third downloading request to the server side so that the server side sends the file corresponding to the third downloading request to the local side.
3. The method of claim 2, further comprising:
receiving a connection instruction input by a user, wherein the connection instruction is used for connecting an external network;
detecting whether the connection of the external network is successful;
and if the connection is successful, executing a downloading instruction aiming at least two target files sent by the receiving user.
4. The method according to any one of claims 1 to 3, wherein after receiving the data resource sent by the server, the method further comprises:
acquiring a current capacity value of a storage space of a terminal;
judging whether the capacity value is lower than a preset capacity threshold value or not;
and if so, outputting second prompt information to the user, wherein the second prompt information is used for prompting the user to clean the storage space.
5. A terminal for downloading a file, comprising:
the receiving unit is used for receiving a downloading instruction which is sent by a user and aims at least two target files;
the detection unit is used for responding to the downloading instruction and detecting whether the current speed of accessing the external network of the local terminal is less than a preset speed threshold value; the preset speed threshold value is set by a user at the terminal;
a generating unit, configured to determine sizes of the at least two target files when a current speed of accessing the external network at the home terminal is less than a preset speed threshold, and generate a first download request according to a sequence of the at least two target files from small to large, where when the at least two target files include an episode of a television show, a movie, and a song, and the episode of the television show, the movie, and the song are sorted into a piece of music, an episode of the television show, and a movie according to a sequence of the files from small to large, a download sequence corresponding to the first download request is to download the piece of music first, then download the piece of music to the episode of the television show, and finally download the movie;
the sending unit is used for sending the first downloading request to a server side so that the server side sends a file corresponding to the first downloading request to the local side;
the output unit is used for outputting first prompt information to a user when the current speed of accessing the external network of the home terminal is greater than or equal to the preset speed threshold, wherein the first prompt information is used for prompting the user whether to modify the current downloading sequence;
the detection unit is also used for detecting whether a download sequence modification instruction input by a user is received;
the generating unit is further used for generating a second downloading request when the downloading sequence modification instruction input by the user is not received; the second downloading request takes the time sequence of the at least two target files sent by the user as a downloading sequence, wherein when the downloading priorities of the at least two target files are the same, the at least two target files are sequentially sorted from small to large according to the required storage space;
the sending unit is further configured to send the second download request to the server, so that the server sends a file corresponding to the second download request to the local terminal.
6. The terminal of claim 5,
the generating unit is further configured to respond to the download order modification instruction and generate a third download request if the download order modification instruction input by the user is received;
the sending unit is further configured to send the third download request to the server, so that the server sends a file corresponding to the third download request to the local terminal.
7. The terminal of claim 6, further comprising:
the receiving unit is further configured to receive a connection instruction input by a user, where the connection instruction is used to connect to an external network;
the detection unit is also used for detecting whether the connection with the external network is successful;
and the execution unit is used for executing the step of receiving the downloading instruction aiming at the at least two target files sent by the user if the connection is successful.
8. A terminal according to any of claims 5 to 7, further comprising:
the acquiring unit is used for acquiring the current capacity value of the storage space of the terminal;
the judging unit is used for judging whether the capacity value is lower than a preset capacity threshold value or not;
the output unit is further configured to output second prompt information to the user if the capacity value is lower than a preset capacity threshold, where the second prompt information is used to prompt the user to clean the storage space.
9. A computer-readable storage medium storing a computer program for instructing associated hardware to perform the method of any one of claims 1 to 4.
CN201510080527.4A 2015-02-12 2015-02-12 File downloading method and terminal Expired - Fee Related CN105991728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510080527.4A CN105991728B (en) 2015-02-12 2015-02-12 File downloading method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510080527.4A CN105991728B (en) 2015-02-12 2015-02-12 File downloading method and terminal

Publications (2)

Publication Number Publication Date
CN105991728A CN105991728A (en) 2016-10-05
CN105991728B true CN105991728B (en) 2020-03-03

Family

ID=57041497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510080527.4A Expired - Fee Related CN105991728B (en) 2015-02-12 2015-02-12 File downloading method and terminal

Country Status (1)

Country Link
CN (1) CN105991728B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039855B (en) * 2021-11-04 2024-05-14 中国通信建设第三工程局有限公司 Automatic network downloading speed adjusting system and method based on big data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101415258A (en) * 2007-10-18 2009-04-22 中兴通讯股份有限公司 Method for implementing download of mobile phone downloader
JP2009230251A (en) * 2008-03-19 2009-10-08 Mizuho Information & Research Institute Inc File transfer system, file transfer method, and file transfer program
CN101964974A (en) * 2010-10-13 2011-02-02 中兴通讯股份有限公司 Data downloading method and mobile terminal
CN102685164A (en) * 2011-03-16 2012-09-19 中国电信股份有限公司 Method and system for downloading and updating files under condition of limited storage space of terminal
CN103533032A (en) * 2013-09-26 2014-01-22 北京奇虎科技有限公司 Bandwidth adjusting device and method
CN103902575A (en) * 2012-12-27 2014-07-02 腾讯科技(深圳)有限公司 Pictorial information loading method and related device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101415258A (en) * 2007-10-18 2009-04-22 中兴通讯股份有限公司 Method for implementing download of mobile phone downloader
JP2009230251A (en) * 2008-03-19 2009-10-08 Mizuho Information & Research Institute Inc File transfer system, file transfer method, and file transfer program
CN101964974A (en) * 2010-10-13 2011-02-02 中兴通讯股份有限公司 Data downloading method and mobile terminal
CN102685164A (en) * 2011-03-16 2012-09-19 中国电信股份有限公司 Method and system for downloading and updating files under condition of limited storage space of terminal
CN103902575A (en) * 2012-12-27 2014-07-02 腾讯科技(深圳)有限公司 Pictorial information loading method and related device
CN103533032A (en) * 2013-09-26 2014-01-22 北京奇虎科技有限公司 Bandwidth adjusting device and method

Also Published As

Publication number Publication date
CN105991728A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
CN110083381B (en) Incremental upgrading method and device
CN107832100B (en) APK plug-in loading method and terminal thereof
WO2017028779A1 (en) Configuration method and apparatus for internet of things protocol conversion function, nonvolatile computer storage medium and electronic device
KR20180115628A (en) Management layer for multiple intelligent personal assistant services
CN108710515B (en) Application preloading method, device, storage medium and terminal
CN102761623B (en) Resource self-adaptive joins method for down loading, system, data storage server and communication system
CN103036597B (en) Method and device of sharing resources among devices in close range
WO2017166630A1 (en) Task priority correctingon method and device
US9621945B2 (en) Method and system for continuously playing media resource in device
CN112585981B (en) Method for content playback with continuity and electronic device thereof
US9307010B2 (en) Data upload method using shortcut
CN103412793A (en) Method, device and system for optimizing system resources
US20160029050A1 (en) Hybrid Stream Delivery
EP3651421A1 (en) Multimedia display method, apparatus, and device
CN105072146A (en) Music information sharing method and device
CN106411920A (en) Data sharing method and device
CN105868420A (en) Network resource loading mode configuration method and device
CN105988805A (en) Application program management method and mobile terminal
CN112138376A (en) Cloud game archiving method and device and electronic equipment
US10666707B2 (en) Nonconsecutive file downloading
CN108008925A (en) Application data sharing method, device, terminal and storage medium under span mode
US11706301B2 (en) Server node selection method and terminal device
US10291740B2 (en) Method and apparatus for determining application to be recommended
CN105991728B (en) File downloading method and terminal
KR101531284B1 (en) An apparatus for presenting cloud streaming services, a method thereof and a system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200303