[go: up one dir, main page]

CN105721604A - Data sending method and device based on downloading request of user - Google Patents

Data sending method and device based on downloading request of user Download PDF

Info

Publication number
CN105721604A
CN105721604A CN201610171895.4A CN201610171895A CN105721604A CN 105721604 A CN105721604 A CN 105721604A CN 201610171895 A CN201610171895 A CN 201610171895A CN 105721604 A CN105721604 A CN 105721604A
Authority
CN
China
Prior art keywords
user
data
data volume
download
downloading
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.)
Pending
Application number
CN201610171895.4A
Other languages
Chinese (zh)
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201610171895.4A priority Critical patent/CN105721604A/en
Publication of CN105721604A publication Critical patent/CN105721604A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

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

Abstract

本申请公开了基于用户下载请求的数据发送方法和装置。所述方法的一具体实施方式包括:接收用户的下载请求,其中,所述下载请求包括:待下载文件信息、所述用户的用户信息、下载起始时间;根据所述用户信息确定所述用户的下载限速;根据所述待下载文件信息确定不限速缓冲下载量;在每个发送周期发送数据给所述用户,其中,在已发送数据量达到所述不限速缓冲下载量之前,不限速发送数据给所述用户,在已发送数据量达到所述不限速缓冲下载量之后按照所述下载限速发送数据给所述用户,记录本发送周期实际发送数据量,并用已发送数据量加上所述本发送周期实际发送数据量的和更新已发送数据量。该实施方式实现了既不影响用户正常在线访问又能限制用户下载速度的数据发送。

The application discloses a data sending method and device based on user download request. A specific implementation of the method includes: receiving a user's download request, wherein the download request includes: information about the file to be downloaded, user information of the user, and download start time; determining the user's download time according to the user information download speed limit; determine the unlimited speed buffer download amount according to the file information to be downloaded; send data to the user in each sending cycle, wherein, before the amount of sent data reaches the unlimited speed buffer download amount, Send data to the user at an unlimited speed, send data to the user according to the download speed limit after the amount of sent data reaches the download speed of the unlimited speed buffer, record the amount of data actually sent in this sending cycle, and use the sent data The amount of data plus the amount of data actually sent in this sending cycle and the amount of data sent are updated. This embodiment implements data transmission that does not affect the user's normal online access and can limit the user's download speed.

Description

基于用户下载请求的数据发送方法和装置Data sending method and device based on user download request

技术领域 technical field

本申请涉及计算机技术领域,具体涉及互联网技术领域,尤其涉及数据发送方法和装置。 The present application relates to the field of computer technology, in particular to the field of Internet technology, especially to a method and device for sending data.

背景技术 Background technique

随着互联网的快速发展,越来越多的互联网用户选择在线欣赏视频或音乐。但大量用户的在线访问对网络带宽是个极大的挑战,网络带宽的成本占整个项目成本的比例也越来越大。 With the rapid development of the Internet, more and more Internet users choose to enjoy videos or music online. However, the online access of a large number of users is a great challenge to the network bandwidth, and the cost of network bandwidth accounts for an increasing proportion of the entire project cost.

现有技术通常采用限制用户的下载速度来降低网络带宽成本。但是考虑到网络状况的波动性,如果要给用户流畅的视频下载观看体验的话,就必须把用户的限速设置的比较高,但这样会造成网络带宽的成本偏高;如果把用户的限速设置的比较低的话,虽然网络带宽的成本降低了,但是用户访问速度不一致,造成用户无法正常在线欣赏视频或音乐。因此需要一种既不影响用户正常在线访问又能限制用户下载速度的数据发送方法。 In the prior art, the download speed of the user is usually limited to reduce the network bandwidth cost. However, considering the volatility of network conditions, if you want to give users a smooth video download and viewing experience, you must set the user's speed limit to be relatively high, but this will cause the cost of network bandwidth to be high; if you set the user's speed limit If the setting is relatively low, although the cost of network bandwidth is reduced, the user's access speed is inconsistent, causing users to be unable to enjoy videos or music online normally. Therefore, there is a need for a data sending method that does not affect the normal online access of the user and can limit the download speed of the user.

发明内容 Contents of the invention

本申请的目的在于提出一种改进的基于用户下载请求的数据发送方法和装置,来解决以上背景技术部分提到的技术问题。 The purpose of this application is to propose an improved data sending method and device based on user download request to solve the technical problems mentioned in the above background technology section.

第一方面,本申请提供了一种基于用户下载请求的数据发送方法,所述方法包括:接收用户的下载请求,其中,所述下载请求包括:待下载文件信息、所述用户的用户信息、下载起始时间;根据所述用户信息确定所述用户的下载限速;根据所述待下载文件信息确定不限速缓冲下载量;在每个发送周期发送数据给所述用户,其中,在已发送数据量达到所述不限速缓冲下载量之前,不限速发送数据给所述用户,在已发送数据量达到所述不限速缓冲下载量之后按照所述下载限速发送数据给所述用户,记录本发送周期实际发送数据量,并用已发送数据量加上所述本发送周期实际发送数据量的和更新已发送数据量。 In a first aspect, the present application provides a method for sending data based on a user download request, the method comprising: receiving the user's download request, wherein the download request includes: file information to be downloaded, user information of the user, download start time; determine the download speed limit of the user according to the user information; determine the unlimited speed buffer download amount according to the information of the file to be downloaded; send data to the user in each sending cycle, wherein, after Before the amount of sent data reaches the unlimited speed buffer download amount, send data to the user at an unlimited speed, and send data to the user according to the download speed limit after the amount of sent data reaches the unlimited speed buffer download amount The user records the amount of data actually sent in this sending cycle, and updates the amount of sent data by adding the amount of data sent plus the amount of data actually sent in this sending cycle.

在一些实施例中,所述用户的用户信息包括用户的级别信息;以及所述根据所述用户信息确定所述用户的下载限速,包括:根据所述用户的级别信息确定所述用户的下载限速。 In some embodiments, the user information of the user includes user level information; and determining the user's download speed limit according to the user information includes: determining the user's download speed limit according to the user level information speed limit.

在一些实施例中,所述待下载文件信息包括待下载文件的类型信息;以及所述根据所述待下载文件信息确定不限速缓冲下载量,包括:根据所述待下载文件的类型信息确定不限速缓冲下载量。 In some embodiments, the information of the file to be downloaded includes the type information of the file to be downloaded; and the determination of the download amount of unlimited speed buffering according to the information of the file to be downloaded includes: determining according to the type information of the file to be downloaded Unlimited buffered downloads.

在一些实施例中,所述在每个发送周期发送数据给所述用户,其中,在已发送数据量达到所述不限速缓冲下载量之前,不限速发送数据给所述用户,在已发送数据量达到所述不限速缓冲下载量之后按照所述下载限速发送数据给所述用户,记录本发送周期实际发送数据量,并用已发送数据量加上所述本发送周期实际发送数据量的和更新已发送数据量,包括:判断已发送数据量是否小于可下载数据量,其中,所述可下载数据量是通过采用公式一计算得到的: In some embodiments, the data is sent to the user in each sending cycle, wherein, before the amount of sent data reaches the buffer download amount of the unlimited speed, the data is sent to the user without speed limit, and after the Send data to the user according to the download speed limit after the amount of data sent reaches the unlimited buffer download amount, record the actual amount of data sent in this sending cycle, and use the amount of sent data plus the actual data sent in this sending cycle and updating the amount of sent data, including: judging whether the amount of sent data is less than the amount of downloadable data, wherein the amount of downloadable data is calculated by using formula one:

cdSize=nolmtSize+lmtVDld*(curTm–bgTm)(公式一) cdSize=nolmtSize+lmtVDld*(curTm–bgTm) (Formula 1)

其中,nolmtSize是所述不限速缓冲下载量,lmtVDld是所述下载限速,curTm是当前时间,bgTm是所述下载起始时间,cdSize是计算所得的可下载数据量;如果是,则本发送周期发送数据给所述用户;如果否,则本发送周期不发送数据给所述用户;记录本发送周期实际发送数据量;用已发送数据量加上所述本发送周期实际发送数据量的和更新已发送数据量。 Wherein, nolmtSize is the download amount of the unlimited speed buffer, lmtVDld is the download speed limit, curTm is the current time, bgTm is the download start time, and cdSize is the calculated amount of downloadable data; if yes, then this Send data to the user in the sending cycle; if not, do not send data to the user in this sending cycle; record the amount of data actually sent in this sending cycle; use the amount of data sent plus the amount of data actually sent in this sending cycle and update the amount of data sent.

在一些实施例中,所述本发送周期发送数据给所述用户,包括:本发送周期发送可发送数据量的数据给所述用户,其中,所述可发送数据量是通过采用公式二计算得到的: In some embodiments, sending data to the user in this sending cycle includes: sending data of a sendable data amount to the user in this sending cycle, wherein the sendable data amount is calculated by using formula 2 of:

csSize=cdSize–aSize(公式二) csSize=cdSize–aSize (Formula 2)

其中,cdSize是所述可下载数据量,aSize是已发送数据量,csSize是计算所得的可发送数据量。 Wherein, cdSize is the downloadable data volume, aSize is the sent data volume, and csSize is the calculated transmittable data volume.

在一些实施例中,所述本发送周期不发送数据给所述用户,包括:不再发送数据给所述用户直到需等待时长之后,其中,所述需等待时长是通过采用公式三计算得到的: In some embodiments, the sending cycle does not send data to the user, including: no longer sending data to the user until after the waiting time, wherein the waiting time is calculated by using formula three :

tWait=(aSize–cdSize)/lmtVDld(公式三) tWait=(aSize–cdSize)/lmtVDld (Formula 3)

其中,aSize是所述已发送数据量,cdSize是所述可下载数据量,lmtVDld是所述下载限速,tWait是计算所得的需等待时长。 Wherein, aSize is the amount of sent data, cdSize is the amount of downloadable data, lmtVDld is the download speed limit, and tWait is the calculated waiting time.

第二方面,本申请提供了一种基于用户下载请求的数据发送装置,所述装置包括:接收单元,配置用于接收用户的下载请求,其中,所述下载请求包括:待下载文件信息、所述用户的用户信息、下载起始时间;第一确定单元,配置用于根据所述用户信息确定所述用户的下载限速;第二确定单元,配置用于根据所述待下载文件信息确定不限速缓冲下载量;发送单元,配置用于在每个发送周期发送数据给所述用户,其中,在已发送数据量达到所述不限速缓冲下载量之前,不限速发送数据给所述用户,在已发送数据量达到所述不限速缓冲下载量之后按照所述下载限速发送数据给所述用户,记录本发送周期实际发送数据量,并用已发送数据量加上所述本发送周期实际发送数据量的和更新已发送数据量。 In a second aspect, the present application provides a data sending device based on a user download request, the device includes: a receiving unit configured to receive the user's download request, wherein the download request includes: file information to be downloaded, the The user information of the user and the download start time; the first determination unit is configured to determine the download speed limit of the user according to the user information; the second determination unit is configured to determine the download speed limit according to the information of the file to be downloaded Speed-limited buffer downloads; a sending unit configured to send data to the user in each sending cycle, wherein, before the amount of sent data reaches the unlimited-speed buffered downloads, send data to the user without speed-limiting The user sends data to the user according to the download speed limit after the amount of sent data reaches the download amount of the unlimited speed buffer, records the actual amount of data sent in this sending cycle, and adds the amount of sent data to the amount of the original sending The amount of data actually sent periodically and the amount of data sent are updated.

在一些实施例中,所述用户的用户信息包括用户的级别信息;以及所述第一确定单元进一步配置用于:根据所述用户的级别信息确定所述用户的下载限速。 In some embodiments, the user information of the user includes level information of the user; and the first determining unit is further configured to: determine the download speed limit of the user according to the level information of the user.

在一些实施例中,所述待下载文件信息包括待下载文件的类型信息;以及所述第二确定单元进一步配置用于:根据所述待下载文件的类型信息确定不限速缓冲下载量。 In some embodiments, the information of the file to be downloaded includes type information of the file to be downloaded; and the second determination unit is further configured to: determine the download amount of unlimited buffering according to the type information of the file to be downloaded.

在一些实施例中,所述发送单元包括:判断模块,配置用于判断已发送数据量是否小于可下载数据量,其中,所述可下载数据量是通过采用公式一计算得到的: In some embodiments, the sending unit includes: a judging module configured to judge whether the amount of data sent is less than the amount of downloadable data, wherein the amount of downloadable data is calculated by using formula one:

cdSize=nolmtSize+lmtVDld*(curTm–bgTm)(公式一) cdSize=nolmtSize+lmtVDld*(curTm–bgTm) (Formula 1)

其中,nolmtSize是所述不限速缓冲下载量,lmtVDld是所述下载限速,curTm是当前时间,bgTm是所述下载起始时间,cdSize是计算所得的可下载数据量;发送模块,配置用于如果已发送数据量小于可下载数据量,则本发送周期发送数据给所述用户;不发送模块,配置用于如果已发送数据量不小于可下载数据量,则本发送周期不发送数据给所述用户;记录模块,配置用于记录本发送周期实际发送数据量;更新模块,配置用于用已发送数据量加上所述本发送周期实际发送数据量的和更新已发送数据量。 Wherein, nolmtSize is the download amount of the unlimited speed buffer, lmtVDld is the download speed limit, curTm is the current time, bgTm is the download start time, and cdSize is the calculated downloadable data volume; the sending module is used for configuration If the amount of data sent is less than the amount of data that can be downloaded, then the data is sent to the user in this sending cycle; the non-sending module is configured for if the amount of data sent is not less than the amount of data that can be downloaded, then the data is not sent to the user in this sending cycle The user; a recording module configured to record the actual amount of data sent in this sending cycle; an update module configured to update the amount of sent data by adding the amount of sent data plus the amount of actual sent data in this sending cycle.

在一些实施例中,所述发送模块进一步配置用于:本发送周期发送可发送数据量的数据给所述用户,其中,所述可发送数据量是通过采用公式二计算得到的: In some embodiments, the sending module is further configured to: send data of a sendable data amount to the user in this sending cycle, wherein the sendable data amount is calculated by using Formula 2:

csSize=cdSize–aSize(公式二) csSize=cdSize–aSize (Formula 2)

其中,cdSize是所述可下载数据量,aSize是已发送数据量,csSize是计算所得的可发送数据量。 Wherein, cdSize is the downloadable data volume, aSize is the sent data volume, and csSize is the calculated transmittable data volume.

在一些实施例中,所述不发送模块进一步配置用于:不再发送数据给所述用户直到需等待时长之后,其中,所述需等待时长是采用公式三计算得到的: In some embodiments, the non-sending module is further configured to: no longer send data to the user until after the waiting time, wherein the waiting time is calculated using Formula 3:

tWait=(aSize–cdSize)/lmtVDld(公式三) tWait=(aSize–cdSize)/lmtVDld (Formula 3)

其中,aSize是所述已发送数据量,cdSize是所述可下载数据量,lmtVDld是所述下载限速,tWait是计算所得的需等待时长。 Wherein, aSize is the amount of sent data, cdSize is the amount of downloadable data, lmtVDld is the download speed limit, and tWait is the calculated waiting time.

本申请提供的基于用户下载请求的数据发送方法和装置,通过根据用户请求下载的文件信息确定不限速缓冲下载量,在已发送的数据量小于不限速缓冲下载量的时候不限速,在已发送的数据量大于等于不限速缓冲下载量的时候再进行限速,从而实现了基于用户下载请求的既不影响用户正常在线访问又能限制用户下载速度的数据发送。 The data transmission method and device based on the user download request provided by this application determines the unlimited speed buffer download amount according to the file information downloaded by the user request, and does not limit the speed when the amount of data sent is less than the unlimited speed buffer download amount. When the amount of data sent is greater than or equal to the download volume of the unlimited speed buffer, the speed limit is implemented, so as to realize the data sending based on the user's download request without affecting the user's normal online access and limiting the user's download speed.

附图说明 Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显: Other characteristics, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1是本申请可以应用于其中的示例性系统架构图; FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;

图2是根据本申请的基于用户下载请求的数据发送方法的一个实施例的流程图; Fig. 2 is the flow chart of an embodiment of the data sending method based on user's download request according to the present application;

图3a-3b是根据本申请的基于用户下载请求的数据发送方法的一个应用场景的示意图; 3a-3b are schematic diagrams of an application scenario of a data sending method based on a user download request according to the present application;

图4是根据本申请的基于用户下载请求的数据发送方法的又一个实施例的流程图; FIG. 4 is a flow chart of another embodiment of a method for sending data based on a user download request according to the present application;

图5是根据本申请的基于用户下载请求的数据发送装置的一个实施例的结构示意图; FIG. 5 is a schematic structural diagram of an embodiment of a data sending device based on a user download request according to the present application;

图6是适于用来实现本申请实施例的服务器的计算机系统的结构示意图。 FIG. 6 is a schematic structural diagram of a computer system suitable for implementing the server of the embodiment of the present application.

具体实施方式 detailed description

下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。 The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。 It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

图1示出了可以应用本申请的基于用户下载请求的数据发送方法或基于用户下载请求的数据发送装置的实施例的示例性系统架构100。 FIG. 1 shows an exemplary system architecture 100 to which embodiments of the method for sending data based on a user download request or the device for sending data based on a user download request of the present application can be applied.

如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。 As shown in FIG. 1 , a system architecture 100 may include terminal devices 101 , 102 , 103 , a network 104 and a server 105 . The network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the server 105 . Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种客户端应用,例如云存储类应用、在线视频类应用、在线音频类应用等。 Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages and the like. Various client applications, such as cloud storage applications, online video applications, online audio applications, etc., may be installed on the terminal devices 101, 102, and 103.

终端设备101、102、103可以是具有处理器和存储介质的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(MovingPictureExpertsGroupAudioLayerIII,动态影像专家压缩标准音频层面3)、MP4(MovingPictureExpertsGroupAudioLayerIV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。 Terminal devices 101, 102, 103 can be various electronic devices with processors and storage media, including but not limited to smartphones, tablet computers, e-book readers, MP3 players (MovingPictureExpertsGroupAudioLayerIII, Moving Picture Experts Compression Standard Audio Layer 3 ), MP4 (MovingPictureExpertsGroupAudioLayerIV, moving picture expert compression standard audio layer 4) player, laptop portable computer and desktop computer etc.

服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103上安装的云存储类应用提供内容支持的后台数据服务器。后台数据服务器可以对接收到的下载请求等数据进行分析等处理,并将处理结果(例如下载数据)反馈给终端设备。 The server 105 may be a server that provides various services, for example, a background data server that provides content support for cloud storage applications installed on the terminal devices 101 , 102 , and 103 . The background data server can analyze and process the received download request and other data, and feed back the processing result (for example, download data) to the terminal device.

需要说明的是,本申请实施例所提供的基于用户下载请求的数据发送方法一般由服务器105执行,相应地,基于用户下载请求的数据发送装置一般设置于服务器105中。 It should be noted that the data sending method based on the user download request provided in the embodiment of the present application is generally executed by the server 105 , and correspondingly, the data sending device based on the user download request is generally set in the server 105 .

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。 It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

继续参考图2,其示出了根据本申请的基于用户下载请求的数据发送方法的一个实施例的流程200。所述的基于用户下载请求的数据发送方法,包括以下步骤: Continue to refer to FIG. 2 , which shows a flow 200 of an embodiment of a data sending method based on a user download request according to the present application. The described data sending method based on user download request comprises the following steps:

步骤201,接收用户的下载请求。 Step 201, receiving a download request from a user.

在本实施例中,基于用户下载请求的数据发送方法运行于其上的电子设备(例如图1所示的服务器)可以通过有线连接方式或者无线连接方式从用户利用其进行请求下载的终端接收下载请求,其中,上述下载请求包括待下载文件信息、上述用户的用户信息、下载起始时间。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultrawideband)连接、以及其他现在已知或将来开发的无线连接方式。 In this embodiment, the electronic device (such as the server shown in FIG. 1 ) on which the data transmission method based on the user download request runs can receive the download from the terminal through which the user requests the download through a wired connection or a wireless connection. request, wherein the above-mentioned download request includes information about the file to be downloaded, user information of the above-mentioned user, and download start time. It should be noted that the above wireless connection methods may include but not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultrawideband) connection, and other wireless connection methods known or developed in the future.

通常,用户利用终端上安装的客户端应用来下载数据,这时,用户可以通过直接输入待下载文件的地址或者点击客户端应用中呈现的的地址链接来向数据服务器发起数据下载请求。 Usually, the user uses the client application installed on the terminal to download data. At this time, the user can directly input the address of the file to be downloaded or click the address link presented in the client application to initiate a data download request to the data server.

在本实施例中,上述待下载文件信息可以包括以下至少一项:待下载文件的地址信息,待下载文件的文件名信息。 In this embodiment, the information about the file to be downloaded may include at least one of the following: address information of the file to be downloaded, and file name information of the file to be downloaded.

在本实施例中,上述用户的用户信息可以包括用来识别或区分用户的用户标识符。 In this embodiment, the user information of the above-mentioned user may include a user identifier used to identify or distinguish the user.

在本实施例中,下载请求的下载起始时间可以用于后续步骤控制下载限速使用。 In this embodiment, the download start time of the download request can be used in subsequent steps to control the use of download speed limit.

步骤202,根据用户信息确定用户的下载限速。 Step 202, determine the user's download speed limit according to the user information.

在本实施例中,基于步骤201中得到的下载请求,上述电子设备(例如图1所示的服务器)可以首先获取上述下载请求所对应的用户信息;之后再根据上述用户信息确定用户的下载限速。 In this embodiment, based on the download request obtained in step 201, the above-mentioned electronic device (such as the server shown in FIG. 1 ) can first obtain the user information corresponding to the above-mentioned download request; then determine the user's download limit according to the above-mentioned user information. speed.

在本实施例的一些可选的实现方式中,上述用户的用户信息可以包括用户的级别信息,上述电子设备可以是根据上述用户的级别信息确定上述用户的下载限速。作为示例,对于一级用户,可以给该用户设置比较高的网速,例如1MB/s;对于二级用户,可以给用户设置比较中等的网速,例如500KB/s;对于普通用户,可以给用户设置比较低的网速,例如50KB/s。 In some optional implementation manners of this embodiment, the user information of the user may include level information of the user, and the electronic device may determine the download speed limit of the user according to the level information of the user. As an example, for a first-level user, you can set a relatively high network speed for the user, such as 1MB/s; for a secondary user, you can set a relatively medium network speed for the user, such as 500KB/s; The user sets a relatively low network speed, such as 50KB/s.

在本实施例的一些可选的实现方式中,上述用户的用户信息可以包括用户的地域信息,上述电子设备可以根据上述用户的地域信息确定上述用户的下载限速。作为示例,对于用户处于网络建设较好的地区,网速也会比较快,可以给该用户设置比较高的网速,例如1MB/s;对于用户处于网络建设较差的地区,网速也会比较慢,可以给用户设置比较中等的网速,例如500KB/s。 In some optional implementation manners of this embodiment, the user information of the user may include region information of the user, and the electronic device may determine the download speed limit of the user according to the region information of the user. As an example, for a user in an area with better network construction, the network speed will be relatively fast, you can set a relatively high network speed for the user, such as 1MB/s; for a user in an area with poor network construction, the network speed will also be Relatively slow, you can set a moderate network speed for users, such as 500KB/s.

在本实施例的一些可选的实现方式中,上述用户的用户信息还可以包括用户所使用的客户端应用的类型,上述电子设备可以根据上述用户所使用的客户端应用的类型确定上述用户的下载限速。作为示例,对于用户使用电脑版客户端应用发出的下载请求,可以给该用户设置比较高的网速,例如1MB/s;对于用户使用手机版或者平板电脑版客户端应用发出的下载请求,可以给用户设置比较中等的网速,例如500KB/s。 In some optional implementations of this embodiment, the user information of the above-mentioned user may also include the type of client application used by the user, and the above-mentioned electronic device may determine the above-mentioned user's Download speed limit. As an example, for a download request sent by a user using the client application of the computer version, a relatively high network speed can be set for the user, such as 1MB/s; for a download request sent by the user using the client application of the mobile phone or tablet version, you can set Set a moderate network speed for users, such as 500KB/s.

本领域技术人员可以理解的是,还可以采用上述可选实现方式的组合来确定上述用户的下载限速。 Those skilled in the art can understand that, a combination of the foregoing optional implementation manners may also be used to determine the download speed limit for the foregoing user.

步骤203,根据待下载文件信息确定不限速缓冲下载量。 Step 203, determine the unlimited speed buffer download amount according to the file information to be downloaded.

在本实施例中,基于步骤201中得到的下载请求,上述电子设备(例如图1所示的服务器)可以首先获取上述下载请求所对应的待下载文件信息;之后再根据上述待下载文件信息确定不限速缓冲下载量。 In this embodiment, based on the download request obtained in step 201, the above-mentioned electronic device (such as the server shown in FIG. 1 ) can first obtain the information of the file to be downloaded corresponding to the above-mentioned download request; Unlimited buffered downloads.

在本实施例的一些可选的实现方式中,上述待下载文件信息可以包括待下载文件的类型信息。上述电子设备可以根据待下载文件的类型信息确定不限速缓冲下载量。作为示例,对于视频类型的文件,可以设置不限速缓冲下载量为5兆字节;对于音频类型的文件,可以设置不限速缓冲下载量为2兆字节。 In some optional implementation manners of this embodiment, the information about the file to be downloaded may include type information of the file to be downloaded. The above-mentioned electronic device may determine the unlimited speed buffer download amount according to the type information of the file to be downloaded. As an example, for a video type file, the unlimited buffer download amount may be set to 5 megabytes; for an audio type file, the unlimited speed buffer download amount may be set to 2 megabytes.

在本实施例的一些可选的实现方式中,上述待下载文件信息还可以包括文件大小。上述电子设备可以根据待下载文件的文件大小确定不限速缓冲下载量。作为示例,对于文件大小在200兆字节以下的文件,可以设置不限速缓冲下载量为2兆字节;对于文件大小在200兆字节到500兆字节的文件,可以设置不限速缓冲下载量为5兆字节;对于文件大小大于500兆字节的文件,可以设置不限速缓冲下载量为10兆字节。 In some optional implementation manners of this embodiment, the information about the file to be downloaded may further include a file size. The above-mentioned electronic device can determine the unlimited speed buffer download amount according to the file size of the file to be downloaded. As an example, for files with a file size of less than 200 megabytes, you can set an unlimited buffer download size of 2 megabytes; for files with a file size between 200 megabytes and 500 megabytes, you can set unlimited speed The buffer download size is 5 megabytes; for files larger than 500 megabytes, you can set the unlimited buffer download size to 10 megabytes.

在本实施例的一些可选的实现方式中,上述待下载文件信息还可以包括文件修改日期。上述电子设备可以根据待下载文件的修改日期确定不限速缓冲下载量。作为示例,对于修改日期在2010年以后的待下载文件,可以设置不限速缓冲下载量为5兆字节;对于修改日期在2010年以前的待下载文件,可以设置不限速缓冲下载量为2兆字节。 In some optional implementation manners of this embodiment, the information about the file to be downloaded may further include a file modification date. The above-mentioned electronic device can determine the unlimited speed buffer download amount according to the modification date of the file to be downloaded. As an example, for a file to be downloaded with a modification date after 2010, you can set the unlimited speed buffer download size to 5 megabytes; for a file to be downloaded with a modification date before 2010, you can set an unlimited speed buffer download size to 2 megabytes.

本领域技术人员可以理解的是,还可以采用上述可选实现方式的组合来确定不限速缓冲下载量。 Those skilled in the art can understand that, a combination of the above optional implementation manners can also be used to determine the download amount of unlimited speed buffering.

步骤204,在每个发送周期发送数据给用户,记录本发送周期实际发送数据量,并用已发送数据量加上本发送周期实际发送数据量的和更新已发送数据量。 Step 204, send data to the user in each sending cycle, record the actual amount of data sent in this sending cycle, and update the amount of sent data with the sum of the amount of sent data plus the amount of actual data sent in this sending cycle.

在本实施例中,上述电子设备可以在每个发送周期发送数据给用户,其中,在已发送数据量达到上述步骤203确定的不限速缓冲下载量之前,不限速发送数据给用户,在已发送数据量达到上述步骤203确定的不限速缓冲下载量之后按照上述步骤202中确定的下载限速发送数据给用户。 In this embodiment, the above-mentioned electronic device can send data to the user in each sending cycle, wherein, before the amount of sent data reaches the unlimited-speed buffered download amount determined in step 203 above, the data is sent to the user without a speed limit. After the amount of sent data reaches the unlimited buffer download amount determined in step 203 above, the data is sent to the user according to the download speed limit determined in step 202 above.

在本实施例中,上述电子设备在每个发送周期都记录本发送周期实际发送数据量,并用已发送数据量加上本发送周期实际发送数据量的和更新已发送数据量。 In this embodiment, the above-mentioned electronic device records the actual amount of data sent in this sending cycle in each sending cycle, and updates the amount of sent data by adding the amount of sent data plus the amount of actual data sent in this sending cycle.

继续参见图3a-3b,图3a-3b是根据本实施例的基于用户下载请求的数据发送方法的应用场景的一个示意图。在图3a-3b的应用场景中,用户首先启用在线视频应用“XX视频”,接着发起一个关于“中国台湾地震”的视频播放请求(如图3a中图标301所示);之后,对上述在线视频应用“XX视频”提供内容支持的视频内容服务器获取上述视频播放请求,并从其预存储的视频数据中找到“中国台湾地震”的视频文件;然后,视频内容服务器先不限速发送与上述视频文件对应的不限速缓冲下载量的数据给用户,这样用户所使用的在线视频应用就可以马上利用不限速缓冲下载量的这部分数据线播放视频(如图3b中图标302所示),在用户一边观看的过程中,对上述在线视频应用“XX视频”提供内容支持的视频内容服务器再按照与该用户对应的下载限速逐步发送数据给用户,以供用户继续观看不限速缓冲下载量后面的视频内容。 Continuing to refer to FIG. 3a-3b, FIG. 3a-3b is a schematic diagram of an application scenario of the method for sending data based on a user download request according to this embodiment. In the application scenarios of Figures 3a-3b, the user first enables the online video application "XX Video", and then initiates a video playback request about "China Taiwan Earthquake" (as shown by icon 301 in Figure 3a); The video content server that provides content support for the video application "XX Video" obtains the above video playback request, and finds the video file of "Taiwan China Earthquake" from its pre-stored video data; The data corresponding to the unlimited speed buffered download of the video file is given to the user, so that the online video application used by the user can immediately use this part of the unlimited speed buffered download data line to play the video (as shown by the icon 302 in Figure 3b) , while the user is watching, the video content server that provides content support for the above-mentioned online video application "XX Video" will gradually send data to the user according to the download speed limit corresponding to the user, so that the user can continue to watch without speed limit buffering Video content behind downloads.

本申请的上述实施例提供的方法通过对用户下载的数据中前面的不限速缓冲下载量部分的数据不限速发送,而对超过不限速缓冲下载量部分的后面数据限速发送,实现了基于用户下载请求的既不影响用户正常在线访问又能限制用户下载速度的数据发送。 The method provided by the above-mentioned embodiments of the present application realizes that by sending the data of the front part of the data downloaded by the user without a speed limit and limiting the speed of the subsequent data exceeding the part of the download part of the unlimited speed buffer. Based on the user's download request, the data transmission can neither affect the user's normal online access nor limit the user's download speed.

进一步参考图4,其示出了基于用户下载请求的数据发送方法的又一个实施例的流程400。该基于用户下载请求的数据发送方法的流程400,包括以下步骤: Further refer to FIG. 4 , which shows a flow 400 of another embodiment of a method for sending data based on a user download request. The flow 400 of the data sending method based on the user download request includes the following steps:

步骤401,接收用户的下载请求。 Step 401, receiving a download request from a user.

在本实施例中,基于用户下载请求的数据发送方法运行于其上的电子设备(例如图1所示的服务器)可以通过有线连接方式或者无线连接方式从用户利用其进行请求下载的终端接收下载请求,其中,上述下载请求包括待下载文件信息、上述用户的用户信息、下载起始时间。 In this embodiment, the electronic device (such as the server shown in FIG. 1 ) on which the data transmission method based on the user download request runs can receive the download from the terminal through which the user requests the download through a wired connection or a wireless connection. request, wherein the above-mentioned download request includes information about the file to be downloaded, user information of the above-mentioned user, and download start time.

步骤402,根据用户信息确定用户的下载限速。 Step 402, determine the user's download speed limit according to the user information.

在本实施例中,基于步骤401中得到的下载请求,上述电子设备(例如图1所示的服务器)可以首先获取上述下载请求所对应的用户信息;之后再根据上述用户信息确定用户的下载限速。 In this embodiment, based on the download request obtained in step 401, the above-mentioned electronic device (such as the server shown in FIG. 1 ) may first obtain the user information corresponding to the above-mentioned download request; then determine the user's download limit according to the above-mentioned user information. speed.

步骤403,根据待下载文件信息确定不限速缓冲下载量。 Step 403, determine the unlimited speed buffer download amount according to the file information to be downloaded.

在本实施例中,基于步骤401中得到的下载请求,上述电子设备(例如图1所示的服务器)可以首先获取上述下载请求所对应的待下载文件信息;之后再根据上述待下载文件信息确定不限速缓冲下载量。 In this embodiment, based on the download request obtained in step 401, the above-mentioned electronic device (such as the server shown in FIG. 1 ) can first obtain the information of the file to be downloaded corresponding to the above-mentioned download request; Unlimited buffered downloads.

步骤404,在每个发送周期,判断已发送数据量是否小于可下载数据量。 Step 404, in each sending cycle, judge whether the amount of data sent is less than the amount of downloadable data.

在本实施例中,在每个发送周期,上述电子设备判断已发送数据量是否小于可下载数据量,如果已发送数据量小于可下载数据量,转到步骤405;如果已发送数据量不小于可下载数据量,转到步骤406。 In this embodiment, in each sending cycle, the electronic device judges whether the amount of data sent is less than the amount of downloadable data, and if the amount of data sent is less than the amount of downloadable data, go to step 405; if the amount of data sent is not less than downloadable data volume, go to step 406.

在本实施例中,可下载数据量可以是通过采用公式一计算得到的: In this embodiment, the amount of downloadable data can be calculated by using Formula 1:

cdSize=nolmtSize+lmtVDld*(curTm–bgTm)(公式一) cdSize=nolmtSize+lmtVDld*(curTm–bgTm) (Formula 1)

其中,nolmtSize是上述步骤403中确定的不限速缓冲下载量,lmtVDld是上述步骤402中确定的下载限速,curTm是当前时间,bgTm是上述步骤401中接收到的下载请求对应的下载起始时间,cdSize是计算所得的可下载数据量。 Wherein, nolmtSize is the unlimited speed buffer download amount determined in the above step 403, lmtVDld is the download speed limit determined in the above step 402, curTm is the current time, and bgTm is the download start corresponding to the download request received in the above step 401 time, cdSize is the calculated amount of downloadable data.

例如,对于从2016年1月6日8点0分0秒开始的下请求,确定的下载限速为1MB/s,确定的不限速缓冲下载量是5MB,当前时间是2016年1月6日8点0分1秒,则可下载数据量cdSize就是6MB,如果当前时间是2016年1月6日8点0分2秒,则可下载数据量cdSize就是7MB。 For example, for a download request starting at 8:00:00 on January 6, 2016, the determined download speed limit is 1MB/s, the determined unlimited buffer download volume is 5MB, and the current time is January 6, 2016 If the current time is 08:00:2 on January 6, 2016, the downloadable data cdSize is 7MB.

步骤405,本发送周期发送数据给用户。 Step 405, sending data to the user in this sending cycle.

在本实施例中,上述电子设备可以在本发送周期发送可发送数据量的数据给用户,其中,可发送数据量可以是通过采用公式二计算得到的: In this embodiment, the above-mentioned electronic device may send data of a sendable data amount to the user in this sending cycle, wherein the sendable data amount may be calculated by using Formula 2:

csSize=cdSize–aSize(公式二) csSize=cdSize–aSize (Formula 2)

其中,cdSize是步骤404中计算得到的可下载数据量,aSize是已发送数据量,csSize是计算所得的可发送数据量。 Wherein, cdSize is the downloadable data volume calculated in step 404, aSize is the transmitted data volume, and csSize is the calculated transmittable data volume.

步骤406,本发送周期不发送数据给用户。 In step 406, no data is sent to the user in this sending cycle.

在本实施例中,上述电子设备可以不再发送数据给用户,等待需等待时长之后,转到步骤404,其中,上述需等待时长是采用公式三计算得到的: In this embodiment, the above-mentioned electronic device may no longer send data to the user, and after waiting for the required waiting time, go to step 404, wherein the above-mentioned waiting time is calculated using Formula 3:

tWait=(aSize–cdSize)/lmtVDld(公式三) tWait=(aSize–cdSize)/lmtVDld (Formula 3)

其中,aSize是已发送数据量,cdSize是步骤404中计算得到的可下载数据量,lmtVDld是步骤402中确定的下载限速,tWait是计算所得的需等待时长。 Wherein, aSize is the amount of data sent, cdSize is the amount of downloadable data calculated in step 404, lmtVDld is the download speed limit determined in step 402, and tWait is the calculated waiting time.

步骤407,在每个发送周期,记录本发送周期实际发送数据量。 Step 407, in each sending cycle, record the amount of data actually sent in this sending cycle.

在本实施例中,上述电子设备可以记录本发送周期实际发送数据量,由于用户的接收速度不同,可能造成发送给用户的数据用户并没有在本发送周期都接收到,因此需要在每个发送周期记录本发送周期实际发送数据量。 In this embodiment, the above-mentioned electronic device can record the amount of data actually sent in this sending cycle. Due to the different receiving speeds of users, the user may not receive all the data sent to the user in this sending cycle. Periodically record the amount of data actually sent in this sending cycle.

步骤408,在每个发送周期,用已发送数据量加上本发送周期实际发送数据量的和更新已发送数据量。 Step 408, in each sending cycle, update the sent data amount with the sum of the sent data amount plus the actual sent data amount in this sending cycle.

在本实施例中,上述电子设备可以首先取得已发送数据量,然后取得步骤407中记录的本发送周期实际发送数据量,接着用已发送数据量加上本发送周期实际发送数据量的和更新已发送数据量。 In this embodiment, the above-mentioned electronic device can first obtain the amount of data sent, and then obtain the actual amount of data sent in this sending cycle recorded in step 407, and then use the sum of the amount of data sent plus the amount of data actually sent in this sending cycle to update The amount of data sent.

从图4中可以看出,与图2对应的实施例相比,本实施例中的基于用户下载请求的数据发送方法的流程400突出了在每个发送周期,判断已发送数据量是否小于可下载数据量的步骤404,发送可发送数据量的数据给用户的步骤405和不再发送数据给用户直到需等待时长的步骤406。由此,本实施例描述的方案可以更有效的控制数据发送的速度,从而更有效的实现基于用户下载请求的既不影响用户正常在线访问又能限制用户下载速度的数据发送。 As can be seen from FIG. 4, compared with the embodiment corresponding to FIG. 2, the process 400 of the data sending method based on user download request in this embodiment highlights that in each sending cycle, it is judged whether the amount of data sent is less than the available data. Step 404 of downloading the amount of data, step 405 of sending the data of the amount that can be sent to the user, and step 406 of not sending data to the user until the waiting time is required. Therefore, the solution described in this embodiment can more effectively control the speed of data transmission, so as to more effectively implement data transmission based on the user's download request without affecting the user's normal online access and limiting the user's download speed.

进一步参考图5,作为对上述各图所示方法的实现,本申请提供了一种基于用户下载请求的数据发送装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。 With further reference to Figure 5, as an implementation of the methods shown in the above figures, this application provides an embodiment of a data sending device based on user download requests, which corresponds to the method embodiment shown in Figure 2 , the device can be specifically applied to various electronic devices.

如图5所示,本实施例所述的基于用户下载请求的数据发送装置500包括:接收单元501,配置用于接收用户的下载请求,所述下载请求包括:待下载文件信息、所述用户的用户信息、下载起始时间;第一确定单元502,配置用于根据所述用户信息确定所述用户的下载限速;第二确定单元503,配置用于根据所述待下载文件信息确定不限速缓冲下载量;发送单元504,配置用于在每个发送周期发送数据给用户,其中,在已发送数据量达到所述不限速缓冲下载量之前,不限速发送数据给用户,在已发送数据量达到所述不限速缓冲下载量之后按照所述下载限速发送数据给用户,记录本发送周期实际发送数据量,并用已发送数据量加上所述本发送周期实际发送数据量的和更新已发送数据量。 As shown in FIG. 5 , the data sending device 500 based on a user download request described in this embodiment includes: a receiving unit 501 configured to receive a user download request, the download request including: file information to be downloaded, the user user information, download start time; the first determining unit 502 is configured to determine the download speed limit of the user according to the user information; the second determining unit 503 is configured to determine whether to download the file according to the information of the file to be downloaded Speed-limited buffered download volume; the sending unit 504 is configured to send data to the user in each sending cycle, wherein, before the amount of sent data reaches the unlimited-speed buffered download volume, the data is sent to the user without speed limit. After the amount of sent data reaches the unlimited speed buffer download amount, send data to the user according to the download speed limit, record the actual amount of data sent in this sending cycle, and use the amount of sent data plus the actual amount of data sent in this sending cycle and update the amount of data sent.

在本实施例中,基于用户下载请求的数据发送装置500的接收单元501可以通过有线连接方式或者无线连接方式从用户利用其进行请求下载的终端接收下载请求,其中,上述下载请求包括待下载文件信息、上述用户的用户信息、下载起始时间。 In this embodiment, the receiving unit 501 of the data sending device 500 based on the user's download request can receive the download request from the terminal through which the user requests the download through a wired connection or a wireless connection, wherein the above-mentioned download request includes the file to be downloaded information, the user information of the above user, and the download start time.

在本实施例中,基于接收单元501得到的下载请求,上述第一确定单元502可以首先获取上述下载请求所对应的用户信息;之后再根据上述用户信息确定用户的下载限速。 In this embodiment, based on the download request obtained by the receiving unit 501, the first determining unit 502 may first obtain user information corresponding to the download request; and then determine the user's download speed limit according to the user information.

在本实施例中,基于接收单元501得到的下载请求,上述第二确定单元503可以首先获取上述下载请求所对应的待下载文件信息;之后再根据上述待下载文件信息确定不限速缓冲下载量。 In this embodiment, based on the download request obtained by the receiving unit 501, the second determining unit 503 may first obtain the information of the file to be downloaded corresponding to the download request; and then determine the unlimited speed buffer download amount according to the information of the file to be downloaded .

在本实施例中,发送单元504可以在每个发送周期发送数据给用户,其中,在已发送数据量达到上述第二确定单元503确定的不限速缓冲下载量之前,不限速发送数据给用户,在已发送数据量达到上述第二确定单元503确定的不限速缓冲下载量之后按照上述第一确定单元502中确定的下载限速发送数据给用户。 In this embodiment, the sending unit 504 can send data to the user in each sending cycle, wherein, before the amount of sent data reaches the unlimited speed buffer download amount determined by the second determining unit 503, the data is sent to the user at an unlimited speed. The user sends data to the user according to the download speed limit determined in the first determination unit 502 after the amount of sent data reaches the unlimited buffer download amount determined by the second determination unit 503 .

在本实施例中,发送单元504在每个发送周期都记录本发送周期实际发送数据量,并用已发送数据量加上本发送周期实际发送数据量的和更新已发送数据量。 In this embodiment, the sending unit 504 records the actual amount of data sent in this sending cycle in each sending cycle, and uses the sum of the amount of sent data plus the amount of actual data sent in this sending cycle to update the amount of sent data.

在本实施例中,基于用户下载请求的数据发送装置500中:接收单元501、第一确定单元502、第二确定单元503和发送单元504的具体处理可参看图2对应实施例中步骤201、步骤202、步骤203和步骤204的实现方式的相关描述,在此不再赘述。 In this embodiment, in the data sending device 500 based on the user download request: the specific processing of the receiving unit 501, the first determining unit 502, the second determining unit 503, and the sending unit 504 can refer to steps 201, 201 in the corresponding embodiment of FIG. Relevant descriptions of the implementation manners of step 202, step 203, and step 204 will not be repeated here.

在本实施例的一些可选的实现方式中,用户的用户信息可以包括用户的级别信息,基于用户下载请求的数据发送装置500的第一确定单元502可以根据用户的级别信息确定用户的下载限速。具体处理可参看图2对应实施例中步骤202的实现方式的相关描述,在此不再赘述。 In some optional implementations of this embodiment, the user information of the user may include user level information, and the first determining unit 502 of the data sending device 500 based on the user download request may determine the user's download limit according to the user level information. speed. For specific processing, refer to the relevant description of the implementation manner of step 202 in the embodiment corresponding to FIG. 2 , which will not be repeated here.

在本实施例的一些可选的实现方式中,待下载文件信息可以包括待下载文件的类型信息,基于用户下载请求的数据发送装置500的第二确定单元503可以根据待下载文件的类型信息确定不限速缓冲下载量。具体处理可参看图2对应实施例中步骤203的实现方式的相关描述,在此不再赘述。 In some optional implementations of this embodiment, the information about the file to be downloaded may include the type information of the file to be downloaded, and the second determination unit 503 of the data sending device 500 based on the download request of the user may determine according to the type information of the file to be downloaded Unlimited buffered downloads. For specific processing, refer to the relevant description of the implementation manner of step 203 in the embodiment corresponding to FIG. 2 , which will not be repeated here.

在本实施例的一些可选的实现方式中,基于用户下载请求的数据发送装置500的发送单元504可以包括:判断模块(图中未示出),配置用于判断已发送数据量是否小于可下载数据量;发送模块(图中未示出),配置用于如果已发送数据量小于可下载数据量,则本发送周期发送数据给上述用户;不发送模块(图中未示出),配置用于如果已发送数据量不小于可下载数据量,则本发送周期不发送数据给上述用户;记录模块(图中未示出),配置用于记录本发送周期实际发送数据量;更新模块(图中未示出),配置用于用已发送数据量加上上述本发送周期实际发送数据量的和更新已发送数据量。其中,判断模块、发送模块、不发送模块、记录模块和更新模块的具体处理可参考图4实施例中步骤404、步骤405、步骤406、步骤407和步骤408的实现方式的相关描述,在此不再赘述。 In some optional implementations of this embodiment, the sending unit 504 of the data sending device 500 based on the user's download request may include: a judging module (not shown in the figure), configured to judge whether the amount of data sent is less than the available Download data volume; sending module (not shown in the figure), configured for if the amount of data sent is less than the downloadable data volume, then send data to the above-mentioned user in this sending cycle; not sending module (not shown in the figure), configure For if the amount of data sent is not less than the amount of downloadable data, then this sending cycle does not send data to the above-mentioned user; the recording module (not shown in the figure) is configured to record the actual amount of data sent in this sending cycle; the update module ( not shown in the figure), configured to update the sent data amount with the sum of the sent data amount plus the above-mentioned actual sent data amount in this sending cycle. Wherein, the specific processing of the judging module, the sending module, the non-sending module, the recording module and the updating module can refer to the relevant description of the implementation of steps 404, 405, 406, 407 and 408 in the embodiment of Figure 4, here No longer.

下面参考图6,其示出了适于用来实现本申请实施例的服务器的计算机系统600的结构示意图。 Referring now to FIG. 6 , it shows a schematic structural diagram of a computer system 600 suitable for implementing the server of the embodiment of the present application.

如图6所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM603中,还存储有系统600操作所需的各种程序和数据。CPU601、ROM602以及RAM603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。 As shown in FIG. 6 , a computer system 600 includes a central processing unit (CPU) 601 that can be programmed according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage section 608 into a random-access memory (RAM) 603 Instead, various appropriate actions and processes are performed. In RAM603, various programs and data required for the operation of the system 600 are also stored. The CPU 601 , ROM 602 , and RAM 603 are connected to each other via a bus 604 . An input/output (I/O) interface 605 is also connected to the bus 604 .

以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。 The following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 608 including a hard disk, etc. and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc. is mounted on the drive 610 as necessary so that a computer program read therefrom is installed into the storage section 608 as necessary.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。在该计算机程序被中央处理单元(CPU)601执行时,执行本申请的方法中限定的上述功能。 In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer program including program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 609 and/or installed from removable media 611 . When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the method of the present application are performed.

附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,所述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。 The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logic devices for implementing the specified Executable instructions for a function. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.

描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括接收单元、第一确定单元、第二确定单元和发送单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,接收单元还可以被描述为“接收用户的下载请求的单元”。 The units involved in the embodiments described in the present application may be implemented by means of software or by means of hardware. The described units may also be set in a processor. For example, it may be described as: a processor includes a receiving unit, a first determining unit, a second determining unit, and a sending unit. Wherein, the names of these units do not constitute a limitation on the unit itself in some cases, for example, the receiving unit may also be described as "a unit that receives a user's download request".

作为另一方面,本申请还提供了一种非易失性计算机存储介质,该非易失性计算机存储介质可以是上述实施例中所述装置中所包含的非易失性计算机存储介质;也可以是单独存在,未装配入终端中的非易失性计算机存储介质。上述非易失性计算机存储介质存储有一个或者多个程序,当上述一个或者多个程序被一个设备执行时,使得上述设备:接收用户的下载请求,上述下载请求包括:待下载文件信息、上述用户的用户信息、下载起始时间;根据上述用户信息确定上述用户的下载限速;根据上述待下载文件信息确定不限速缓冲下载量;在每个发送周期发送数据给上述用户,其中,在已发送数据量达到上述不限速缓冲下载量之前,不限速发送数据给上述用户,在已发送数据量达到上述不限速缓冲下载量之后按照上述下载限速发送数据给上述用户,记录本发送周期实际发送数据量,并用已发送数据量加上上述本发送周期实际发送数据量的和更新已发送数据量。 As another aspect, the present application also provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium contained in the device described in the above embodiments; It may be a non-volatile computer storage medium that exists independently and is not assembled into the terminal. The above-mentioned non-volatile computer storage medium stores one or more programs, and when the above-mentioned one or more programs are executed by a device, the above-mentioned device: receives a user's download request, and the above-mentioned download request includes: file information to be downloaded, the above-mentioned The user's user information and download start time; determine the download speed limit of the above-mentioned user according to the above-mentioned user information; determine the unlimited speed buffer download amount according to the above-mentioned file information to be downloaded; send data to the above-mentioned user in each sending cycle, among them, in Before the amount of sent data reaches the above-mentioned unlimited-speed buffered download volume, send data to the above-mentioned users at an unlimited speed. The amount of data actually sent in the sending cycle, and the amount of data sent is updated by the sum of the amount of data sent plus the amount of data actually sent in this sending cycle.

以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。 The above description is only a preferred embodiment of the present application and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but should also cover the technical solution formed by the above-mentioned technical features without departing from the inventive concept. Other technical solutions formed by any combination of or equivalent features thereof. For example, a technical solution formed by replacing the above-mentioned features with technical features with similar functions disclosed in (but not limited to) this application.

Claims (12)

1. the data transmission method for uplink downloading request based on user, it is characterised in that described method includes:
Receiving the download request of user, wherein, described download request includes: file to be downloaded information, the user profile of described user, download initial time;
The downloading speed limiting of described user is determined according to described user profile;
Not speed limit buffering download is determined according to described file to be downloaded information;
Described user is sent data in each transmission cycle, wherein, send data volume reach described in speed limit buffering download before, speed limit does not send data to described user, described in sending data volume and reaching not speed limit buffering download after send data to described user according to described downloading speed limiting, minute book sends cycle actual transmission data volume, and data volume is actual that send data volume plus described transmission cycle and renewal has sent data volume with sending.
2. the data transmission method for uplink downloading request based on user according to claim 1, it is characterised in that the user profile of described user includes the class information of user;And
The described downloading speed limiting determining described user according to described user profile, including:
Class information according to described user determines the downloading speed limiting of described user.
3. the data transmission method for uplink downloading request based on user according to claim 1, it is characterised in that described file to be downloaded information includes the type information of file to be downloaded;And
Described according to described file to be downloaded information determine not speed limit buffering download, including:
Type information according to described file to be downloaded determines not speed limit buffering download.
4. the data transmission method for uplink according to the request of downloading based on user one of claim 1-3 Suo Shu, it is characterized in that, described send data to described user in each transmission cycle, wherein, send data volume reach described in speed limit buffering download before, speed limit does not send data to described user, described in sending data volume and reaching not speed limit buffering download after send data to described user according to described downloading speed limiting, minute book sends cycle actual transmission data volume, and it is actual that send data volume plus described transmission cycle and update and sent data volume with sending data volume, including:
Judging whether to have sent data volume less than downloading data volume, wherein, described data volume of downloading is by adopting formula one calculated:
CdSize=nolmtSize+lmtVDld* (curTm bgTm) (formula one)
Wherein, nolmtSize is described not speed limit buffering download, and lmtVDld is described downloading speed limiting, and curTm is current time, and bgTm is described download initial time, and cdSize is the data volume downloaded calculating gained;
If it is, this transmission cycle sends data to described user;
If it is not, then this transmission cycle does not send data to described user;
Minute book sends cycle actual transmission data volume;
Actual that send data volume plus described transmission cycle and update and sent data volume with sending data volume.
5. the data transmission method for uplink downloading request based on user according to claim 4, it is characterised in that described transmission cycle sends data to described user, including:
This transmission cycle sends the data that can send data volume to described user, and wherein, the described data volume that sends is by adopting formula two calculated:
CsSize=cdSize aSize (formula two)
Wherein, cdSize is described data volume of downloading, and aSize has sent data volume, and csSize is the sent data volume calculating gained.
6. the data transmission method for uplink downloading request based on user according to claim 4, it is characterised in that described transmission cycle does not send data to described user, including:
No longer send data to described user until need to wait for duration, wherein, described in need to wait for duration be by adopting formula three calculated:
TWait=(aSize cdSize)/lmtVDld (formula three)
Wherein, aSize described has sent data volume, and cdSize is described data volume of downloading, and lmtVDld is described downloading speed limiting, tWait be calculate gained need to wait for duration.
7. the data sending device downloading request based on user, it is characterised in that described device includes:
Receiving unit, configuration is for receiving the download request of user, and wherein, described download request includes: file to be downloaded information, the user profile of described user, download initial time;
First determines unit, and configuration for determining the downloading speed limiting of described user according to described user profile;
Second determines unit, and configuration is for determining not speed limit buffering download according to described file to be downloaded information;
Transmitting element, configuration is for sending data to described user in each transmission cycle, wherein, send data volume reach described in speed limit buffering download before, speed limit does not send data to described user, not sending data to described user according to described downloading speed limiting after speed limit buffering download described in sending data volume and reaching, minute book sends cycle actual transmission data volume, and data volume is actual that send data volume plus described transmission cycle and renewal has sent data volume with sending.
8. the data sending device downloading request based on user according to claim 7, it is characterised in that the user profile of described user includes the class information of user;And
Described first determine unit configure further for:
Class information according to described user determines the downloading speed limiting of described user.
9. the data sending device downloading request based on user according to claim 7, it is characterised in that described file to be downloaded information includes the type information of file to be downloaded;And
Described second determine unit configure further for:
Type information according to described file to be downloaded determines not speed limit buffering download.
10. the data sending device according to the request of downloading based on user one of claim 7-9 Suo Shu, it is characterised in that described transmitting element includes:
Judge module, configuration is for judging whether to have sent data volume less than downloading data volume, and wherein, described data volume of downloading is by adopting formula one calculated:
CdSize=nolmtSize+lmtVDld* (curTm bgTm) (formula one)
Wherein, nolmtSize is described not speed limit buffering download, and lmtVDld is described downloading speed limiting, and curTm is current time, and bgTm is described download initial time, and cdSize is the data volume downloaded calculating gained;
Sending module, if configuration is for sending data volume less than downloading data volume, then this transmission cycle sends data to described user;
Not sending module, if configuration is not less than can download data volume for having sent data volume, then this transmission cycle does not send data to described user;
Logging modle, configuration sends cycle actual transmission data volume for minute book;
More new module, configuration is for actual that send data volume plus described transmission cycle and update and sent data volume with having sent data volume.
11. the data sending device downloading request based on user according to claim 10, it is characterised in that described sending module configures further and is used for:
This transmission cycle sends the data that can send data volume to described user, and wherein, the described data volume that sends is by adopting formula two calculated:
CsSize=cdSize aSize (formula two)
Wherein, cdSize is described data volume of downloading, and aSize has sent data volume, and csSize is the sent data volume calculating gained.
12. the data sending device downloading request based on user according to claim 10, it is characterised in that described not sending module configures further and is used for:
No longer send data to described user until need to wait for duration, wherein, described in need to wait for duration be adopt formula three calculated:
TWait=(aSize cdSize)/lmtVDld (formula three)
Wherein, aSize described has sent data volume, and cdSize is described data volume of downloading, and lmtVDld is described downloading speed limiting, tWait be calculate gained need to wait for duration.
CN201610171895.4A 2016-03-24 2016-03-24 Data sending method and device based on downloading request of user Pending CN105721604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610171895.4A CN105721604A (en) 2016-03-24 2016-03-24 Data sending method and device based on downloading request of user

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610171895.4A CN105721604A (en) 2016-03-24 2016-03-24 Data sending method and device based on downloading request of user

Publications (1)

Publication Number Publication Date
CN105721604A true CN105721604A (en) 2016-06-29

Family

ID=56159173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610171895.4A Pending CN105721604A (en) 2016-03-24 2016-03-24 Data sending method and device based on downloading request of user

Country Status (1)

Country Link
CN (1) CN105721604A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032759A (en) * 2018-08-01 2018-12-18 郑州云海信息技术有限公司 A kind of control method and device of virtualization system
CN115022717A (en) * 2022-05-31 2022-09-06 北京字跳网络技术有限公司 A data download method, device, computer equipment and storage medium
CN115065862A (en) * 2022-06-07 2022-09-16 北京达佳互联信息技术有限公司 Video data acquisition method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070192812A1 (en) * 2006-02-10 2007-08-16 John Pickens Method and system for streaming digital video content to a client in a digital video network
CN102111422A (en) * 2009-12-25 2011-06-29 中兴通讯股份有限公司 Method for estimating download time and device-side
CN102571894A (en) * 2010-12-07 2012-07-11 中国电信股份有限公司 Transmission control method and player of online streaming media
CN102790925A (en) * 2011-05-20 2012-11-21 深圳市快播科技有限公司 Method and VOD (Video On Demand) terminal for playing online streaming media
CN103686448A (en) * 2013-12-25 2014-03-26 乐视网信息技术(北京)股份有限公司 Video transcoding download speed limiting method and system
WO2015089772A1 (en) * 2013-12-18 2015-06-25 华为技术有限公司 Video acceleration method, client and network element

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070192812A1 (en) * 2006-02-10 2007-08-16 John Pickens Method and system for streaming digital video content to a client in a digital video network
CN102111422A (en) * 2009-12-25 2011-06-29 中兴通讯股份有限公司 Method for estimating download time and device-side
CN102571894A (en) * 2010-12-07 2012-07-11 中国电信股份有限公司 Transmission control method and player of online streaming media
CN102790925A (en) * 2011-05-20 2012-11-21 深圳市快播科技有限公司 Method and VOD (Video On Demand) terminal for playing online streaming media
WO2015089772A1 (en) * 2013-12-18 2015-06-25 华为技术有限公司 Video acceleration method, client and network element
CN103686448A (en) * 2013-12-25 2014-03-26 乐视网信息技术(北京)股份有限公司 Video transcoding download speed limiting method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032759A (en) * 2018-08-01 2018-12-18 郑州云海信息技术有限公司 A kind of control method and device of virtualization system
CN115022717A (en) * 2022-05-31 2022-09-06 北京字跳网络技术有限公司 A data download method, device, computer equipment and storage medium
CN115022717B (en) * 2022-05-31 2023-11-07 北京字跳网络技术有限公司 A data downloading method, device, computer equipment and storage medium
CN115065862A (en) * 2022-06-07 2022-09-16 北京达佳互联信息技术有限公司 Video data acquisition method, device, equipment and medium
CN115065862B (en) * 2022-06-07 2024-01-19 北京达佳互联信息技术有限公司 Video data acquisition method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US20210006404A1 (en) Systems and methods for accessing and controlling media stored remotely
US11082490B2 (en) Method and apparatus for execution of applications in a cloud system
CN110113407B (en) Applet state synchronization method, device and computer storage medium
WO2020233142A1 (en) Multimedia file playback method and apparatus, electronic device, and storage medium
TW201636870A (en) Continuing an application session on a different device
BR112013004857B1 (en) Computer- and system-implemented method of controlling, using a mobile device, presentation of media content performed by a media client, and computer-implemented method of presenting media content from a media client on a display device
WO2018107719A1 (en) Data sharing method, apparatus, terminal device and server
CN114363686B (en) Multimedia content publishing methods, devices, equipment and media
CN107408262A (en) Method, system and medium for presenting media content advertised on a second screen device using a primary device
WO2017139619A1 (en) Social keyboard
CN108337556A (en) Method and apparatus for playing audio/video file
US10073688B2 (en) Method and apparatus for executing application
CN109582274B (en) Volume adjusting method and device, electronic equipment and computer readable storage medium
CN105721604A (en) Data sending method and device based on downloading request of user
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN114817698A (en) Information push method and device, information display method and device, equipment and medium
WO2020186927A1 (en) Data sharing method, apparatus and device, and medium
CN104065513B (en) A kind of intelligent router management method and related user terminal
CN112291602B (en) Video playing method, electronic equipment and storage medium
CN115905756A (en) Information display method, device, equipment and medium
AU2014233547B2 (en) Systems and methods for accessing and controlling media stored remotely
CN111368223B (en) Page display method and device
CN112149019A (en) Method, apparatus, electronic device, and computer-readable medium for displaying information
WO2016127888A1 (en) Method and device for downloading multimedia file
CN112468829B (en) Cached video sharing method, electronic device, and computer-readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160629