CN110740174A - File downloading speed limiting method and device and electronic equipment - Google Patents

File downloading speed limiting method and device and electronic equipment Download PDF

Info

Publication number
CN110740174A
CN110740174A CN201910941669.3A CN201910941669A CN110740174A CN 110740174 A CN110740174 A CN 110740174A CN 201910941669 A CN201910941669 A CN 201910941669A CN 110740174 A CN110740174 A CN 110740174A
Authority
CN
China
Prior art keywords
file
speed
limiting
speed limit
code rate
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
CN201910941669.3A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910941669.3A priority Critical patent/CN110740174A/en
Publication of CN110740174A publication Critical patent/CN110740174A/en
Pending legal-status Critical Current

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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling

Abstract

The file downloading speed limiting method comprises the steps of obtaining the code rate of a file, setting speed limiting information of the file, determining whether to execute speed limiting operation on the file according to peak time and/or bandwidth resources of a network, and executing speed limiting operation on the file according to the speed limiting information of the file when the speed limiting operation is determined to be executed.

Description

File downloading speed limiting method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of communication, in particular to a method and a device for limiting the speed of downloading files and electronic equipment.
Background
With the development of network science and technology, massive video and audio resources are uploaded to a shared network to be streamed and spread, or are provided for clients to look up and download through application software, video and audio downloading integrates rich elements such as images, characters and sounds, and user experience is good, shows that different videos and audios have different code rates, and the video and audio downloading can be smoothly downloaded only by slightly larger than the corresponding code rate bandwidth in most of the existing application scenes.
Currently, when a user downloads video and audio files in real time through a client, the video and audio files are generally downloaded at full speed, or the speed is limited according to empirical values, or undifferentiated speed limits are set only in a peak period, wherein the full-speed download causes resource waste, and the undifferentiated speed limit causes partial pause.
All video requests are treated equally, so that each user requesting the video cannot be guaranteed to obtain smooth video playing experience; in addition, for video files with smaller code rates, the higher the allocated bandwidth flow is, the more serious the waste of the bandwidth flow is, and the lower the utilization rate of the network is.
Therefore, how to limit the speed of different video and audio files and different video and audio in different time periods, especially in the peak period, becomes a key problem.
Disclosure of Invention
In view of this, the disclosed embodiments provide file download speed limiting methods, apparatuses, and electronic devices to at least partially solve the problems in the prior art.
, there are provided file download speed limiting methods, which include:
acquiring the code rate of the file;
setting speed limit information of the file, wherein the speed limit information indicates a speed limit value when speed limit operation is performed on the file, and the speed limit value is related to the code rate of the file;
determining whether to execute the speed limit operation on the file according to the peak time and/or bandwidth resource of the network; and
and when the speed limit operation is determined to be executed, executing the speed limit operation on the file according to the speed limit information of the file.
According to specific implementation manners of the embodiment of the present disclosure, the file includes an audio file and a video file, and the obtaining the bitrate of the file includes:
code rate for reading the file from the file's system resource locator, header, or metadata file, or
And calculating the code rate of the file according to the size and the playing time of the file.
According to specific implementation manners of the embodiment of the present disclosure, the audio file and the video file are variable bitrate coding files, and the setting of the speed limit information of the files includes:
and respectively setting speed limit information aiming at the parts with different code rates of the variable code rate coding file.
According to specific implementation manners of the embodiment of the present disclosure, the setting the speed limit information of the file further includes:
and setting the maximum speed of the file downloading according to the code rate of the file, wherein the maximum speed of the file downloading indicates the maximum output rate set for the file by the server.
According to specific implementation manners of the embodiment of the present disclosure, the setting of the speed limit information of the file includes:
setting speed limit information according to the code rate of the file; and
and generating the speed limit value in a system resource locator or a custom header of the file according to the speed limit information.
According to specific implementation manners of the embodiment of the present disclosure, the setting a speed limit value according to the code rate of the file includes:
and taking the preset proportion of the code rate of the file as the speed limit value.
According to specific implementation manners of the embodiment of the present disclosure, the determining whether to perform the speed-limiting operation on the file according to the peak time of the network includes:
and determining whether the current downloading time reaches a preset downloading speed-limiting time point or is positioned in a preset downloading speed-limiting time interval, and executing the speed-limiting operation when the current downloading time reaches the preset downloading speed-limiting time point or is positioned in the preset downloading speed-limiting time interval.
According to specific implementation manners of the embodiment of the present disclosure, the determining whether to perform the speed-limiting operation on the file according to the peak time of the network includes:
ranking the peak times; and is
And when the current downloading time reaches the peak time, executing speed limit operation corresponding to the grading of the peak time, wherein the speed limit operation of different degrees is executed on the peak time of different grades.
According to specific implementation manners of the embodiment of the present disclosure, determining whether to execute the speed-limiting operation on the file according to a bandwidth resource of a network includes:
determining a current bandwidth resource availability, wherein the bandwidth resource availability indicates a ratio of available bandwidth to total download bandwidth; and
and when the bandwidth resource availability reaches a preset threshold value, executing the speed limit operation.
According to specific implementation manners of the embodiment of the present disclosure, the determining whether to execute the speed-limiting operation on the file according to the bandwidth resource of the network includes
Ranking the bandwidth resource availability; and is
And executing speed limit operation corresponding to the grading of the bandwidth resource availability, wherein the speed limit operation of different degrees is executed on the bandwidth resource availability of different grades.
In a second aspect, there is provided an file download speed limiting device, the device comprising:
a code rate obtaining module configured to obtain a code rate of the file;
a speed limit information setting module configured to set speed limit information of the file, wherein the speed limit information indicates a speed limit value when speed limit operation is performed on the file, and the speed limit value is related to a code rate of the file;
a determining module configured to determine whether to perform the speed-limiting operation on the file according to a peak time and/or bandwidth resource of a network; and
and the execution module is configured to execute speed limit operation on the file according to the speed limit information of the file when the determination module determines to execute the speed limit operation.
According to specific implementation manners of the embodiment of the present disclosure, the file download speed limiting device is included in the client or the server.
In a third aspect, an embodiment of the present disclosure further provides electronic devices, where the electronic device includes:
at least processors, and
a memory communicatively coupled to the at least processors, wherein,
the memory stores instructions executable by the at least processors, the instructions being executable by the at least processors to enable the at least processors to perform the file download speed limiting method of any of the aforementioned or implementations of .
In a fourth aspect, the disclosed embodiments also provide non-transitory computer-readable storage media storing computer instructions for causing a computer to execute the file download speed limiting method in any implementation manner of the aforementioned aspect or aspect.
In a fifth aspect, the disclosed embodiments also provide computer program products comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the file download speed limiting method of any of the aspects or implementations of the aspect.
The file downloading speed limiting method in the embodiment of the disclosure comprises the following steps: acquiring the code rate of the file; setting speed limit information of the file, wherein the speed limit information indicates a speed limit value when speed limit operation is performed on the file, and the speed limit value is related to the code rate of the file; determining whether to execute the speed limit operation on the file according to the peak time and/or bandwidth resource of the network; and when the speed limiting operation is determined to be executed, executing the speed limiting operation on the file according to the speed limiting information of the file. According to the scheme disclosed by the invention, the bandwidth resource can be saved, the blockage can not be caused, and the cost can be reduced according to the charging characteristics.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a speed-limiting method for downloading files according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart illustrating setting of file speed limit information according to an embodiment of the present disclosure;
FIG. 3 is a flowchart for determining whether to perform a speed-limiting operation on a file according to a peak time of a network according to an embodiment of the present disclosure;
fig. 4 is a flowchart for determining whether to perform the speed-limiting operation on a file according to bandwidth resources of a network according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an file download speed limiting device according to an embodiment of the disclosure;
fig. 6 is a schematic diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The present disclosure may be embodied or carried out in other specific forms, such as for example only , without departing from the spirit of the disclosure.
Based on the present disclosure, it should be apparent to those skilled in the art that aspects described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, the type, quantity and ratio of the components in actual implementation can be random changes, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The file download speed limiting method provided by the embodiment can be executed by computing device which can be implemented as software or as a combination of software and hardware, and the computing device can be integrally arranged in a server, a client device and the like.
In addition, in the embodiment of the present disclosure, a video file and an audio file (hereinafter, simply referred to as a video-audio file) are described as examples of files that need to be downloaded, but it should be understood that the files are not limited to the video-audio file, but may include other types of files.
The interface flow limitation is to limit the flow of the interface, including concurrent flow and total flow within time, so as to prevent the system pressure from being too large, ensure that resources requested by the user are kept uniform and shield malicious requests, therefore, all requests in the actual application scene are treated equally, as long as the interface flow does not exceed the upper limit, the requests of the user are not limited, and flow is excessive, all subsequent requests can be directly rejected.
Referring to fig. 1, an embodiment of the present disclosure provides file download speed limiting methods, where the file download speed limiting method includes:
s100: and acquiring the code rate of the file.
When downloading video and audio files on the network by using a Streaming transport technology (HTTP Live Streaming, HLS), an HLS client first sends a request for video and audio to a video and audio server, receives a configuration file in m3u8 format sent by the video and audio server, and then selects a corresponding file to download, so that the client can play the video and audio.
The server obtains times of code rate of video and audio corresponding to each received video and audio request, the video and audio request generally includes video and audio identifiers of the requested video and audio, such as video and audio names, video and audio addresses, and according to the video and audio identifiers, related information of the video and audio, such as code rate, format, size, and the like, can be obtained.
For a video/audio file with a constant code rate, the code rate can be calculated according to the following formula:
rate (video file size × 8)/time, where the unit of rate is kbps, the unit of video file size is KB, and the unit of time is s.
Specifically, for a ts, mp4 and other format video file, a corresponding metadata file exists, and the file contains information of url, header, file size and the like.
It should be understood that the bitrate of retrieving the file is not limited to the above implementations, and any existing and future-developed implementations are possible as long as they can retrieve the bitrate of the file.
In addition, it should also be understood that, in the case where the file download rate limiting method is performed in the server, the bitrate of the obtained file does not need to be transmitted to the client.
S200: and setting speed limit information of the file, wherein the speed limit information indicates a speed limit value when speed limit operation is performed on the file, and the speed limit value is related to the code rate of the file.
During the downloading process of the file, the downloading speed may need to be limited due to the limitations of the memory size of the client, the network resources and the bearing capacity of the system.
In the embodiment of the disclosure, the speed limit information based on the code rate of the video and audio file is set. Specifically, the speed limit information is set for each video-audio file, and the set speed limit information indicates a speed limit value when the speed limit operation is performed at the time of downloading the file.
In the present exemplary embodiment, the speed limit value corresponds to a code rate of the file, and specifically, for example, 20% of the code rate may be used as the speed limit value.
For example, if the video rate of the video to be downloaded is 5MB/S in the video and audio request received by the server, the output rate for downloading the video and audio can be set to be 4MB/S (20% of the speed limit) in the case of executing the speed limit.
In the embodiment of the disclosure, for each video request, the output flow of the server is limited according to the code rate of the video, so that it is ensured that the maximum download rate that can be achieved when different videos are downloaded does not exceed the upper limit of the output rate set according to the code rate, and thus the basically same speed limit degree can be implemented for files with different code rates, and the problem that the video and audio files with higher code rates are severely jammed under the condition of speed limit according to an empirical value or the unified standard is not caused.
S300: and determining whether to execute the speed limit operation on the file according to the peak time and/or bandwidth resource of the network.
For the network for downloading the video and audio files, the number of clients accessed during the peak period from 8 o 'clock to 10 o' clock is increased, the network load is increased, and the resources capable of being provided for downloading the video and audio files are limited.
In another aspect , when a large amount of bandwidth resources consuming clients are accessed in a network, the output rate of a server providing video and audio files may be lower than the bitrate without changing the bandwidth resources.
Therefore, there is a need for speed-limiting operations during peak hours and/or in the event of insufficient bandwidth resources.
S400: and when the speed limit operation is determined to be executed, executing the speed limit operation on the file according to the speed limit information of the file.
When it is determined that the speed limit needs to be executed according to the determination condition of step S300, the speed limit operation is executed for downloading the video and audio file.
For example, in the case where the bit rate of the video/audio file is 5MB/S, in the case where the speed limit operation is performed, the output rate of the corresponding server is limited to 4 MB/S.
According to the file downloading speed-limiting scheme disclosed by the invention, not only can bandwidth resources be saved, but also the blockage can not be caused, and the cost can be reduced according to the charging characteristics.
According to specific implementation manners of the embodiment of the present disclosure, the audio file and the video file are variable bitrate coding files, and speed limit information is set for portions of the variable bitrate coding files with different bitrate.
In the HTTP adaptive video streaming technology, video sources can be encoded into multiple videos with different video bit rates by an encoder and stored on a server, and meanwhile, each bit rate video is divided into different segments (parts), each segment represents fixed-time video playing.
In other words, the speed limit information can be set for each part, thus the output flow of the server can be dynamically adjusted according to the part to be downloaded when downloading is carried out, thereby realizing the speed limit caused by for the variable code rate coding file.
According to specific implementation manners of the embodiment of the present disclosure, the maximum speed of downloading the video and audio file is further set according to the code rate of the video and audio file.
For example, the upper limit of the output rate of the server (the downloading speed of the video and audio files) can be set to be N times of the code rate, wherein N is greater than or equal to 1.
The size of N may be set according to an upper limit of the total output traffic that can be provided by the server. If the total output traffic upper bound of the server is insufficient, N may be set to 1; if the total output traffic upper limit of the server is large, the value of N may also be increased accordingly.
And aiming at each video request, limiting the output flow of the server according to the code rate of the video, so that the maximum download rate which can be reached when different videos are downloaded can not exceed the upper limit of the output rate set according to the code rate. Therefore, each user requesting the video is guaranteed to obtain smooth video playing experience, and the video file with the smaller code rate is not allocated with too high bandwidth flow, so that the bandwidth flow of the server is greatly saved, and the utilization rate of the network is improved.
Referring to fig. 2, according to specific implementation manners of the embodiment of the present disclosure, the setting of the speed limit information of the file includes:
s201: and setting speed limit information according to the code rate of the file.
And S202, generating a speed limit value in a resource locator or a custom header of the system of the file according to the speed limit information.
For the set speed limit information, the speed limit information can be written into the system resource locator or the custom header of the video and audio file, so that the server can execute speed limit operation under the condition that the condition is met according to the speed limit information written into the system resource locator or the custom header of the file.
The role of the custom header (header) is to send header information to the client. The specific content can be set by self according to the environment. For example, the custom header may contain server information, date, length of audio-visual content, and the like. The speed limit value generates speed limit information of a threshold value, speed limit information of a speed limit factor and other speed limit information in a custom header of the file. The header is described in detail, for example, inhttps://www.cnblogs.com/fengzheng126/archive/2012/04/ 21/2461475.htmlThe entire contents of which are hereby incorporated by reference.
Referring to fig. 3, according to specific implementation manners of the embodiment of the present disclosure, for determining whether to perform a speed limit operation on the file according to a peak time of a network, the method includes:
s301: the peak time of the network is determined.
In the disclosed embodiments, the peak time of the network may be determined in a directly defined manner. For example, a value of [ 0: 00,8: 00] as off-peak hours, and [ 20: 00, 24: 00) as the peak time.
Alternatively, the network peak model may be derived by simulation of historical network peak times. As described in chinese invention patent application No. CN201810793285.7, it can be assumed that the arrival of a user's request for video and audio follows a poisson distribution and the duration follows an exponential distribution, with an average of 1 hour, and the [ 0: 00,8: 00] (rest time), [ 8: 00, 20: 00] (office hours) and [ 20: 00, 24: 00) (subsequent times) as typical off-peak, mid-peak and peak times, respectively.
S302: and determining whether the current downloading time reaches a preset downloading speed-limiting time point or time interval, and executing the speed-limiting operation if the current downloading time reaches the preset downloading speed-limiting time point or time interval.
After the network peak time is determined, the speed limit operation can be performed as long as the peak time point is reached. In the case where the network peak is determined by simulation, the peak time obtained by simulation based on the history data may be changed, and in this case, the speed limit operation may be performed at the peak time obtained by simulation.
Referring to fig. 4, according to specific implementation manners of the embodiment of the present disclosure, it may also be determined whether to perform the speed-limiting operation on the file according to the bandwidth resource of the network.
S401, receiving a downloading request sent by a client.
The download network of the disclosed embodiments consists of a server and at least clients connected to the server, when any client needs to download a file, a download request will be sent to the server.
S402, distributing idle tokens for the downloading request and checking the current available bandwidth.
The server is provided with a download pool and a preset number of tokens, the download pool comprises download threads corresponding to the number of the tokens in the server, and the download threads can be started through the tokens to download the files required by the client into the download pool.
The server will check if there are free tokens after receiving the download request, if so, the server will allocate free tokens to the download request, meanwhile, the server will detect the usage status of the bandwidth in the download pool, including the current available bandwidth and the preset total download bandwidth.
S403: and if the ratio of the available bandwidth to the total download bandwidth (bandwidth resource availability) is less than a preset ratio threshold, setting the download speed of the token as the speed-limiting bandwidth or executing speed-limiting operation on the file.
The server compares the available bandwidth with the total download bandwidth, if the ratio of the available bandwidth to the total download bandwidth is smaller than a preset ratio threshold, for example, 20%, the server determines that the available bandwidth is insufficient, and sets the download speed of the token to a rate-limiting bandwidth (for example, N times of a code rate) or performs a rate-limiting operation, and if the ratio of the available bandwidth to the total download bandwidth is not smaller than the preset ratio threshold, the download speed of the token is not limited.
According to specific implementation manners of the embodiment of the disclosure, for the determined peak time and the bandwidth resource utilization rate of the network, a grade can be further set, and the degree of the speed-limiting operation can be determined according to the set grade.
For example, for off-peak hours, mid-peak hours, and peak hours, 10% of the rate-limited code rate and 20% of the rate-limited code rate may be performed, respectively. For the bandwidth resource utilization rate of the network, when the ratio is greater than 30%, the speed is not limited, when the ratio is 10% -30%, the speed limit code rate is 10%, and when the ratio is less than 10% of the speed limit code rate, the speed limit code rate is 20%.
That is, the peak times may be classified, and when the current download time reaches the peak time, a speed limit operation corresponding to the classification of the peak time is performed, and speed limit operations of different degrees are performed on the peak times of different classifications.
Further, the bandwidth resource availability may be ranked; and executing speed-limiting operations corresponding to the grades of the bandwidth resource availability, wherein the speed-limiting operations of different degrees are executed on the bandwidth resource availability of different grades.
Corresponding to the above method embodiment, referring to fig. 5, the embodiment of the present disclosure further provides file download speed limiting devices 500, including:
a code rate obtaining module 501 configured to obtain a code rate of the file;
a speed limit information setting module 502 configured to set speed limit information of the file, wherein the speed limit information indicates a speed limit value when speed limit operation is performed on the file, and the speed limit value is related to a code rate of the file;
a determining module 503 configured to determine whether to perform the speed limiting operation on the file according to a peak time and/or bandwidth resource of a network; and
an executing module 504 configured to execute a speed limiting operation on the file according to the speed limiting information of the file when the determining module determines to execute the speed limiting operation.
The apparatus shown in fig. 5 may correspondingly execute the content in the above method embodiment, and details of the part not described in detail in this embodiment refer to the content described in the above method embodiment, which is not described again here.
Referring to fig. 6, the disclosed embodiment also provides kinds of electronic devices 60, including:
at least processors, and,
a memory communicatively coupled to the at least processors, wherein,
the memory stores instructions executable by the at least processors, the instructions being executable by the at least processors to enable the at least processors to perform the file download speed limiting method of the above method embodiments.
The disclosed embodiment also provides non-transitory computer readable storage media, which stores computer instructions for causing the computer to execute the file download speed limiting method in the aforementioned method embodiment.
The disclosed embodiments also provide computer program products comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the file download speed limiting method in the aforementioned method embodiments.
Referring now to fig. 6, a schematic diagram of an electronic device 60 suitable for implementing embodiments of the present disclosure is shown, which may include, but is not limited to, mobile clients such as mobile phones, notebook computers, digital broadcasters, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia downloaders), in-vehicle clients (e.g., in-vehicle navigation clients), etc., and fixed clients such as digital TVs, desktop computers, etc. the electronic device shown in fig. 6 is only a example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 6, the electronic device 60 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While the figure illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
Embodiments of the present disclosure include, for example, computer program products comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart in such embodiments, the computer program may be downloaded and installed from a network through the communication means 609, or installed from the storage means 608, or the ROM 602.
More specific examples of a computer readable storage medium may include, but are not limited to, an electrical connection having or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries or more programs, and when the or more programs are executed by the electronic device, the electronic device is enabled to acquire at least two internet protocol addresses, send a node evaluation request including the at least two internet protocol addresses to a node evaluation device, wherein the node evaluation device selects and returns an internet protocol address from the at least two internet protocol addresses, and receive the internet protocol address returned by the node evaluation device, wherein the acquired internet protocol address indicates an edge node in a content distribution network.
Alternatively, the computer readable medium carries or more programs which, when executed by the electronic device, cause the electronic device to receive a node evaluation request comprising at least two IP addresses, select an IP address from the at least two IP addresses, and return the selected IP address, wherein the received IP address indicates an edge node in a content distribution network.
Computer program code for carrying out operations of the present disclosure may be written in or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or a combination thereof, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages.
It should also be noted that in some alternative implementations, the functions noted in the blocks 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 the blocks may sometimes be executed in the reverse order, depending upon the functionality involved, it being noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, may be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The name of the unit does not in some cases form a limitation of the unit itself, for example, the th acquiring unit may also be described as a "unit acquiring at least two internet protocol addresses".
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (14)

1, file downloading speed-limiting method, characterized in that, the file downloading speed-limiting method includes:
acquiring the code rate of the file;
setting speed limit information of the file, wherein the speed limit information indicates a speed limit value when speed limit operation is performed on the file, and the speed limit value is related to the code rate of the file;
determining whether to execute the speed limit operation on the file according to the peak time and/or bandwidth resource of the network; and
and when the speed limit operation is determined to be executed, executing the speed limit operation on the file according to the speed limit information of the file.
2. The method for limiting the speed of file download according to claim 1, wherein the file comprises an audio file and a video file, and the obtaining the bitrate of the file comprises:
code rate for reading the file from the file's system resource locator, header, or metadata file, or
And calculating the code rate of the file according to the size and the playing time of the file.
3. The method for limiting the speed of file download according to claim 2, wherein the audio file and the video file are variable bitrate coding files, and the setting of the speed limit information of the files comprises:
and respectively setting speed limit information aiming at the parts with different code rates of the variable code rate coding file.
4. The method for limiting the speed of file download according to claim 1, wherein the setting of the speed-limiting information of the file further comprises:
and setting the maximum speed of the file downloading according to the code rate of the file, wherein the maximum speed of the file downloading indicates the maximum output rate set for the file by the server.
5. The method for limiting the speed of file download according to claim 1, wherein the setting of the speed-limiting information of the file comprises:
setting speed limit information according to the code rate of the file; and
and generating the speed limit value in a system resource locator or a custom header of the file according to the speed limit information.
6. The method for limiting the speed of file downloading according to claim 5, wherein the setting the speed limit value according to the code rate of the file comprises:
and taking the preset proportion of the code rate of the file as the speed limit value.
7. The method for limiting the speed of file download according to claim 1, wherein the determining whether to perform the speed-limiting operation on the file according to the peak time of the network comprises:
and determining whether the current downloading time reaches a preset downloading speed-limiting time point or is positioned in a preset downloading speed-limiting time interval, and executing the speed-limiting operation when the current downloading time reaches the preset downloading speed-limiting time point or is positioned in the preset downloading speed-limiting time interval.
8. The method for limiting the speed of file download according to claim 7, wherein the determining whether to perform the speed-limiting operation on the file according to the peak time of the network comprises:
ranking the peak times; and is
And when the current downloading time reaches the peak time, executing speed limit operation corresponding to the grading of the peak time, wherein the speed limit operation of different degrees is executed on the peak time of different grades.
9. The method for limiting the speed of file download according to claim 1, wherein the determining whether to perform the speed-limiting operation on the file according to the bandwidth resource of the network comprises:
determining a current bandwidth resource availability, wherein the bandwidth resource availability indicates a ratio of available bandwidth to total download bandwidth; and
and when the bandwidth resource availability reaches a preset threshold value, executing the speed limit operation.
10. The method for limiting the speed of file download according to claim 9, wherein the determining whether to perform the speed-limiting operation on the file according to the bandwidth resource of the network comprises
Ranking the bandwidth resource availability; and is
And executing speed limit operation corresponding to the grading of the bandwidth resource availability, wherein the speed limit operation of different degrees is executed on the bandwidth resource availability of different grades.
11, kinds of file download speed limiting device, characterized in that, the device includes:
a code rate obtaining module configured to obtain a code rate of the file;
a speed limit information setting module configured to set speed limit information of the file, wherein the speed limit information indicates a speed limit value when speed limit operation is performed on the file, and the speed limit value is related to a code rate of the file;
a determining module configured to determine whether to perform the speed-limiting operation on the file according to a peak time and/or bandwidth resource of a network; and
and the execution module is configured to execute speed limit operation on the file according to the speed limit information of the file when the determination module determines to execute the speed limit operation.
12. The device for limiting the speed of file download according to claim 11, wherein the device for limiting the speed of file download is included in a client or a server.
An electronic device of the type 13, , comprising:
at least processors, and,
a memory communicatively coupled to the at least processors, wherein,
the memory stores instructions executable by the at least processors to cause the at least processors to perform the file download speed limiting method of any of the preceding claims 1-10 .
14, non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the file download speed limiting method of any of the preceding claims 1-10, wherein the file download speed limiting method is as set forth in any of the preceding claims .
CN201910941669.3A 2019-09-30 2019-09-30 File downloading speed limiting method and device and electronic equipment Pending CN110740174A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910941669.3A CN110740174A (en) 2019-09-30 2019-09-30 File downloading speed limiting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910941669.3A CN110740174A (en) 2019-09-30 2019-09-30 File downloading speed limiting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110740174A true CN110740174A (en) 2020-01-31

Family

ID=69268454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910941669.3A Pending CN110740174A (en) 2019-09-30 2019-09-30 File downloading speed limiting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110740174A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038186A (en) * 2021-02-07 2021-06-25 杭州又拍云科技有限公司 Method and configuration for flexible speed limit by automatically analyzing video code rate in content distribution network
CN115022717A (en) * 2022-05-31 2022-09-06 北京字跳网络技术有限公司 Data downloading method and device, computer equipment and storage medium
CN117061503A (en) * 2023-10-11 2023-11-14 腾讯科技(深圳)有限公司 Image file management method, device, computer readable medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128680A1 (en) * 1996-05-28 2003-07-10 Odenwalder Joseph P. Receiver method and apparatus with complex pilot filter
CN107592344A (en) * 2017-08-28 2018-01-16 腾讯科技(深圳)有限公司 Data transmission method, device, storage medium and computer equipment
CN107635144A (en) * 2017-10-25 2018-01-26 暴风集团股份有限公司 Server output stream amount method for limiting speed, device, server and DNS systems
CN107908730A (en) * 2017-11-14 2018-04-13 网宿科技股份有限公司 A kind of method and apparatus of downloading data
CN108271085A (en) * 2016-12-30 2018-07-10 中兴通讯股份有限公司 A kind of sending method and device of HTTP real time flow mediums HLS files
CN109218847A (en) * 2017-06-30 2019-01-15 中兴通讯股份有限公司 A kind of download control method, device and multimedia terminal
CN110022364A (en) * 2019-04-04 2019-07-16 北京北信源信息安全技术有限公司 A kind of document down loading method and server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128680A1 (en) * 1996-05-28 2003-07-10 Odenwalder Joseph P. Receiver method and apparatus with complex pilot filter
CN108271085A (en) * 2016-12-30 2018-07-10 中兴通讯股份有限公司 A kind of sending method and device of HTTP real time flow mediums HLS files
CN109218847A (en) * 2017-06-30 2019-01-15 中兴通讯股份有限公司 A kind of download control method, device and multimedia terminal
CN107592344A (en) * 2017-08-28 2018-01-16 腾讯科技(深圳)有限公司 Data transmission method, device, storage medium and computer equipment
CN107635144A (en) * 2017-10-25 2018-01-26 暴风集团股份有限公司 Server output stream amount method for limiting speed, device, server and DNS systems
CN107908730A (en) * 2017-11-14 2018-04-13 网宿科技股份有限公司 A kind of method and apparatus of downloading data
CN110022364A (en) * 2019-04-04 2019-07-16 北京北信源信息安全技术有限公司 A kind of document down loading method and server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴桦: "《《新一代互联网流媒体服务及路由关键技术》》", 30 November 2017 *
陈旭辉: "《HTTP 动态自适应流技术中码率选择算法研究综述》", 《软件导刊》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038186A (en) * 2021-02-07 2021-06-25 杭州又拍云科技有限公司 Method and configuration for flexible speed limit by automatically analyzing video code rate in content distribution network
CN115022717A (en) * 2022-05-31 2022-09-06 北京字跳网络技术有限公司 Data downloading method and device, computer equipment and storage medium
CN115022717B (en) * 2022-05-31 2023-11-07 北京字跳网络技术有限公司 Data downloading method, device, computer equipment and storage medium
CN117061503A (en) * 2023-10-11 2023-11-14 腾讯科技(深圳)有限公司 Image file management method, device, computer readable medium and electronic equipment
CN117061503B (en) * 2023-10-11 2024-01-26 腾讯科技(深圳)有限公司 Image file management method, device, computer readable medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN110636339B (en) Scheduling method and device based on code rate and electronic equipment
US9712854B2 (en) Cost-aware cloud-based content delivery
US8239564B2 (en) Dynamic throttling based on network conditions
CN110740174A (en) File downloading speed limiting method and device and electronic equipment
JP2020173778A (en) Method, apparatus, electronic facility, computer readable medium, and computer program for allocating resource
US20100325155A1 (en) Systems and Methods for Providing Access to Various Files Across a Network
US9065752B2 (en) Dynamic service class upgrades in data networks
CN112135169B (en) Media content loading method, device, equipment and medium
EP3047650A2 (en) Streaming media
CN104219286A (en) Method and device for processing stream media, client, CDN (content delivery network) node server and terminal
CN110008050B (en) Method and device for processing information
JP2018110387A (en) Method and system for bandwidth measurement and adaptive data transmission based on buffer in real time live environment
EP2335406A1 (en) Degrading a video
US11374843B2 (en) Method for measuring network speed, computing device, and computer-program product
CN110933140A (en) CDN storage allocation method, system and electronic equipment
CN106657182B (en) Cloud file processing method and device
CN110636367A (en) Video loading method and device, terminal equipment and medium
CN112433920A (en) Buried point data reporting method, device, equipment and medium
CN114466018A (en) Scheduling method and device for content distribution network, storage medium and electronic equipment
CN104202305A (en) Transcoding processing method and device, server
TWI602431B (en) Method and device for transmitting information
CN114125551B (en) Video generation method, device, electronic equipment and computer readable medium
US20200322411A1 (en) Bandwidth usage reduction employing media treading with reductive edging
CN115103023B (en) Video caching method, device, equipment and storage medium
CN110309344B (en) Data resource acquisition method and device

Legal Events

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

Application publication date: 20200131

RJ01 Rejection of invention patent application after publication