CN104244083B - A kind of method for down loading and electronic equipment of Online Video - Google Patents

A kind of method for down loading and electronic equipment of Online Video Download PDF

Info

Publication number
CN104244083B
CN104244083B CN201410525057.3A CN201410525057A CN104244083B CN 104244083 B CN104244083 B CN 104244083B CN 201410525057 A CN201410525057 A CN 201410525057A CN 104244083 B CN104244083 B CN 104244083B
Authority
CN
China
Prior art keywords
multimedia file
data volume
preset threshold
download
downloaded
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.)
Active
Application number
CN201410525057.3A
Other languages
Chinese (zh)
Other versions
CN104244083A (en
Inventor
郭伟松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201410525057.3A priority Critical patent/CN104244083B/en
Publication of CN104244083A publication Critical patent/CN104244083A/en
Application granted granted Critical
Publication of CN104244083B publication Critical patent/CN104244083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses the method for down loading and electronic equipment of a kind of multimedia file.The method is applied to electronic equipment, which comprises obtains the corresponding multiple server address of the multimedia file;One server address is corresponding with a server;Test the speed of download of multiple servers;The server for selecting speed of download most fast downloads the multimedia file.It, can be during playing multimedia file online using the method for down loading and electronic equipment of multimedia file of the invention, there is the case where Caton in reduction, improves the online fluency for playing multimedia file.

Description

A kind of method for down loading and electronic equipment of Online Video
Technical field
The present invention relates to the communications fields, more particularly to the method for down loading and electronic equipment of a kind of Online Video.
Background technique
With the development of portable electronic device, mobile device has become used mainstream work when user's online gradually Tool.On the other hand, as the screen of portable electronic device is gradually increased, more and more users begin to use the electronics such as mobile phone Equipment watches Online Video.
In the prior art, when using portable electronic device viewing Online Video, it is necessary first to which determining downloading, this is online Then the server of video downloads the Online Video from the server.In the same period, request above and below the server When the terminal of load video resource is excessive, it is limited to the performance of the server, smooth downloading can not be just provided for each terminal Journey.The terminal that video resource is downloaded from the server just will appear Caton during playing Online Video.
Summary of the invention
The object of the present invention is to provide a kind of method for down loading of Online Video and electronic equipments, can be from multiple servers It selects the faster server of speed of download to carry out the downloading of Online Video, reduces during playing Online Video, block The case where pausing improves the fluency for playing Online Video.
To achieve the above object, the present invention provides following schemes:
A kind of method for down loading of multimedia file, the method are applied to electronic equipment, which comprises
Obtain the corresponding multiple server address of the multimedia file;One server address and a server It is corresponding;
Test the speed of download of multiple servers;
The server for selecting speed of download most fast downloads the multimedia file.
Optionally, the speed of download of the multiple servers of test, specifically includes:
For each server in multiple servers, the multiple slices for randomly selecting the multimedia file are carried out down It carries;
Determine speed of download when downloading the multiple slice.
Optionally, before the multiple slices for randomly selecting the multimedia file are downloaded, further includes:
From each server, downloading slice catalogue;It include to constitute the multimedia file in the slice catalogue The address information of each slice;
Judge whether the slice catalogue downloads success, obtains the first judging result;
When first judging result indicates that the slice catalogue is downloaded successfully, just executes and randomly select the multimedia The step of multiple slices of file are downloaded.
Optionally, after the most fast server downloading multimedia file of the selection speed of download, further includes:
Obtain the data volume of the multimedia file cached in the electronic equipment;
Determine the corresponding numberical range of the data volume;
When the data volume is in the first default value range, the multimedia file is downloaded in the first pattern;
When the data volume is in the second default value range, the multimedia file is downloaded in a second mode.
Optionally, described when the data volume is in the first default value range, more matchmakers are downloaded in the first pattern Body file, specifically includes:
When the data volume is less than or equal to the first preset threshold and is greater than the second preset threshold, downloaded using single thread Mode downloads the multimedia file;
It is described to download the multimedia file in a second mode when the data volume is in the second default value range, It specifically includes:
When the data volume is less than or equal to second preset threshold and is greater than third predetermined threshold value, using multithreading Downloading mode downloads the multimedia file;
Wherein, first preset threshold is greater than second preset threshold, and second preset threshold is greater than described the Three preset thresholds.
Optionally, described when the data volume is in the first default value range, more matchmakers are downloaded in the first pattern Body file, specifically includes:
When the data volume is less than or equal to third predetermined threshold value and is greater than four preset thresholds, the first code rate is selected The multimedia file is downloaded;The third predetermined threshold value is greater than the 4th preset threshold;
It is described to download the multimedia file in a second mode when the data volume is in the second default value range, It specifically includes:
When the data volume is less than or equal to four preset threshold, the multimedia file of the second code rate is selected It is downloaded;
First code rate is greater than second code rate.
Optionally, described when the data volume is in the first default value range, more matchmakers are downloaded in the first pattern Body file;When the data volume is in the second default value range, the multimedia file is downloaded in a second mode, it is specific to wrap It includes:
When the data volume is less than or equal to the first preset threshold and is greater than the second preset threshold, downloaded using single thread Mode downloads the multimedia file;
When the data volume is less than or equal to second preset threshold and is greater than third predetermined threshold value, using multithreading Downloading mode downloads the multimedia file;
When the data volume is less than or equal to the third predetermined threshold value and is greater than four preset thresholds, first yard is selected The multimedia file of rate is downloaded;
When the data volume is less than or equal to four preset threshold, the multimedia file of the second code rate is selected It is downloaded;
Wherein, first preset threshold is greater than second preset threshold, and second preset threshold is greater than described the Three preset thresholds, the third predetermined threshold value are greater than the 4th preset threshold, and first code rate is greater than second code rate.
Optionally, further includes:
When the data volume is greater than first preset threshold, stop downloading the multimedia file;
Wherein, first preset threshold is the data cached maximum value of setting.
A kind of electronic equipment, the electronic equipment include:
Server address acquiring unit, for obtaining the corresponding multiple server address of the multimedia file;One institute It is corresponding with a server to state server address;
Speed of download test cell, for testing the speed of download of multiple servers;
Server selecting unit, the server for selecting speed of download most fast download the multimedia file.
Optionally, the speed of download test cell, specifically includes:
Slice chooses subelement, for randomly selecting the multimedia text for each server in multiple servers Multiple slices of part are downloaded;
Speed of download determines subelement, for determining speed of download when downloading the multiple slice.
Optionally, further includes:
Subelements under catalogue are sliced, for being downloaded it in the multiple slices for randomly selecting the multimedia file Before, from each server, downloading slice catalogue;It include to constitute each of multimedia file to cut in the slice catalogue The address information of piece;
First judgment sub-unit obtains the first judging result for judging whether the slice catalogue downloads success;
The slice chooses subelement, is also used to indicate that the slice catalogue is downloaded successfully when first judging result When, it just executes and randomly selects the step of multiple slices of the multimedia file are downloaded.
Optionally, further includes:
Data volume acquiring unit, for after the most fast server of selection speed of download downloads the multimedia file, Obtain the data volume of the multimedia file cached in the electronic equipment;
Numberical range determination unit, for determining the corresponding numberical range of the data volume;
First mode download unit, for when the data volume is in the first default value range, in the first pattern under Carry the multimedia file;
Second mode download unit, for when the data volume is in the second default value range, in a second mode under Carry the multimedia file.
Optionally, the first mode download unit, specifically includes:
First lower subelements, for when the data volume is less than or equal to the first preset threshold and is greater than the second default threshold When value, the multimedia file is downloaded using single thread downloading mode;
The second mode download unit, specifically includes:
Second lower subelements, it is less than or equal to second preset threshold and pre- greater than third for working as the data volume If when threshold value, downloading the multimedia file using multithreading downloading mode;
Wherein, first preset threshold is greater than second preset threshold, and second preset threshold is greater than described the Three preset thresholds.
Optionally, the first mode download unit, specifically includes:
Subelements under third, for when the data volume is less than or equal to third predetermined threshold value and is greater than the 4th default threshold When value, the multimedia file of the first code rate is selected to be downloaded;The third predetermined threshold value is greater than the 4th default threshold Value;
The second mode download unit, specifically includes:
4th lower subelements, for selecting second when the data volume is less than or equal to four preset threshold The multimedia file of code rate is downloaded;
First code rate is greater than second code rate.
Optionally, the first mode download unit, specifically includes:
First lower subelements, for when the data volume is less than or equal to the first preset threshold and is greater than the second default threshold When value, the multimedia file is downloaded using single thread downloading mode;
Second lower subelements, it is less than or equal to second preset threshold and pre- greater than third for working as the data volume If when threshold value, downloading the multimedia file using multithreading downloading mode;
The second mode download unit, specifically includes:
Subelements under third, for when the data volume is less than or equal to the third predetermined threshold value and is greater than the 4th in advance If when threshold value, the multimedia file of the first code rate is selected to be downloaded;
4th lower subelements, for selecting second when the data volume is less than or equal to four preset threshold The multimedia file of code rate is downloaded;
Wherein, first preset threshold is greater than second preset threshold, and second preset threshold is greater than described the Three preset thresholds, the third predetermined threshold value are greater than the 4th preset threshold, and first code rate is greater than second code rate.
Optionally, further includes:
Stop subelement, for stopping downloading the multimedia when the data volume is greater than first preset threshold File;
Wherein, first preset threshold is the data cached maximum value of setting.
The specific embodiment provided according to the present invention, the invention discloses following technical effects:
The method for down loading and electronic equipment of multimedia file of the invention, by before downloading the multimedia file, Test the speed of download of multiple servers;The server for selecting speed of download most fast downloads the multimedia file;It can be from more It selects the faster server of speed of download to carry out the downloading of multimedia file in a server, is playing multimedia file online In the process, it reduces and the case where Caton occurs, improve the online fluency for playing multimedia file.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is the flow chart of the method for down loading embodiment 1 of multimedia file of the invention;
Fig. 2 is the flow chart of the method for down loading embodiment 2 of multimedia file of the invention;
Fig. 3 is the flow chart of the method for down loading embodiment 3 of multimedia file of the invention;
Fig. 4 is the flow chart of the method for down loading embodiment 4 of multimedia file of the invention;
Fig. 5 is the flow chart of the method for down loading embodiment 5 of multimedia file of the invention;
Fig. 6 is the flow chart of the method for down loading embodiment 6 of multimedia file of the invention;
Fig. 7 is the structure chart of electronic equipment embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
The method for down loading of multimedia file of the invention is applied to electronic equipment.It is mechanical, electrical that the electronic equipment can be hand Brain, tablet computer etc..
Fig. 1 is the flow chart of the method for down loading embodiment 1 of multimedia file of the invention.As shown in Figure 1, this method can be with Include:
Step 101: obtaining the corresponding multiple server address of the multimedia file;One server address and one A server is corresponding;
In the present embodiment, the multimedia file is the multimedia text for needing just play out by download online Part.It is described more in broadcasting that the multimedia file can store the terminal for needing to play the multimedia file on the server When media file, it can be played from multimedia file described in download online on the server in downloading.
The multimedia file, can be audio file, be also possible to video file.The multimedia file of same content, It can be respectively stored on multiple servers.Each server can have server address corresponding with itself.Terminal can To select any one server in multiple servers, the multimedia file is downloaded.
Step 102: testing the speed of download of multiple servers;
Different servers, due to loading condition difference, server position is different at a distance from terminal, and server is certainly The difference of body performance causes for some terminal, and the speed for downloading the multimedia file from different servers is Different.
Under normal conditions, load is smaller, and position is closer at a distance from terminal, the higher server of performance, is terminal Speed of download when providing multimedia file is also faster.But since above- mentioned information are less susceptible to directly obtain, so, Ke Yi Before downloading the multimedia file, tested for being stored with the speed of download of server of the multimedia file.
Step 103: the most fast server of selection speed of download downloads the multimedia file.
According to test result, the most fast server of speed of download can be determined, so as to select speed of download most fast Server downloads the multimedia file.
In conclusion in the present embodiment, by testing the downloading of multiple servers before downloading the multimedia file Speed;The server for selecting speed of download most fast downloads the multimedia file;Downloading speed can be selected from multiple servers The downloading that faster server carries out multimedia file is spent, during playing multimedia file online, Caton occurs in reduction The case where, improve the online fluency for playing multimedia file.
Fig. 2 is the flow chart of the method for down loading embodiment 2 of multimedia file of the invention.As shown in Fig. 2, this method can be with Include:
Step 201: obtaining the corresponding multiple server address of the multimedia file;One server address and one A server is corresponding;
Step 202: from each server, downloading slice catalogue;It include to constitute more matchmakers in the slice catalogue The address information of each slice of body file;
Slice refers to the segment for being divided into multimedia file.Due to a complete multimedia file, usually have compared with Therefore one multimedia file for the ease of transmission, can be divided into the lesser segment of multiple data volumes by big data volume, The multimedia file is transmitted as unit of segment.
In the server for being stored with multimedia file, it is also stored with slice catalogue.The slice catalogue is for recording structure At the address information of each slice of the multimedia file.
That is, each slice for constituting the multimedia file can be downloaded according to the slice catalogue.
Step 203: judging whether the slice catalogue downloads success, obtain the first judging result;
The data volume of the slice catalogue is lesser, therefore, can first judge whether is slice catalogue on each server It can successfully download, if downloaded successfully, the speed of download of the slice of the re-test multimedia file described for composition;Under if Carry failure, then it represents that the downloading of corresponding server is ill-conditioned, is not suitable for downloading the multimedia from the corresponding server File.
Step 204: when first judging result indicates that the slice catalogue is downloaded successfully, randomly selecting more matchmakers Multiple slices of body file are downloaded;
In order in a relatively short period of time, obtain the speed of download of each server as early as possible, can for each server, The multiple slices for randomly selecting the multimedia file are downloaded, without downloading all slices.
Step 205: determining speed of download when downloading the multiple slice.
For each server, in multiple slices that downloading randomly selects, available the multiple slice of downloading When speed of download.
Step 206: the most fast server of selection speed of download downloads the multimedia file.
Since multiple slices randomly select, for the speed of the speed of download of the multiple slice, and from clothes It is corresponding that the speed of the speed of download of the complete multimedia file is downloaded on business device.When downloading the multiple slice, under Fastest server is carried, when generally also downloading the complete multimedia file, the most fast server of speed of download.It can The multimedia file is downloaded with the server for selecting speed of download most fast.
In conclusion in the present embodiment, by the way that from each server, downloading is sliced catalogue;When under the slice catalogue When carrying successfully, the multiple slices for randomly selecting the multimedia file are downloaded;Under when the multiple slice of determining downloading Carry speed;The server for selecting speed of download most fast downloads the multimedia file;It can be by being carried out down for low volume data Speed of download when load determines and downloads fastest server when downloading the complete multimedia file, and it is more to improve test The efficiency of the speed of download of a server.
It should be noted that if the address letter for constituting each slice of the multimedia file can be directly obtained Breath, the multiple slices that can also directly randomly select the multimedia file are downloaded;When determining the multiple slice of downloading Speed of download;Without again by being downloaded the download to judge server for the slice catalogue.
Fig. 3 is the flow chart of the method for down loading embodiment 3 of multimedia file of the invention.As shown in figure 3, this method can be with Include:
Step 301: obtaining the corresponding multiple server address of the multimedia file;One server address and one A server is corresponding;
Step 302: testing the speed of download of multiple servers;
Step 303: the most fast server of selection speed of download downloads the multimedia file.
Step 304: obtaining the data volume of the multimedia file cached in the electronic equipment;
During downloading the multimedia file, can be stored in the caching of the electronic equipment downloading obtain and And the data of the not yet played multimedia file.
In this step, in the available caching in the electronic equipment and not yet played multimedia text The data volume of the data of part.
Step 305: determining the corresponding numberical range of the data volume;
The numberical range can be according to being that demand is set.The numberical range can be between two endpoint values Interval range indicates.For example, 0 to 20MB can be set as a numerical value when the caching one of the electronic equipment shares 100MB Range, 20MB to 100MB are another numberical range.When the data volume be 0 between 20MB when, just corresponding one number According to range;When the data volume is 20MB to 100MB, another described data area is just corresponded to.
Step 306: when the data volume is in the first default value range, downloading the multimedia text in the first pattern Part;
The first default value range can be the numberical range for indicating that the data volume of caching is more, at this point, can To download the multimedia file using the slower first mode of speed of download, multimedia file described in terminal downloads is mitigated with this When born caused by server.
Step 307: when the data volume is in the second default value range, downloading the multimedia text in a second mode Part.
The second default value range can be the numberical range for indicating that the data volume of caching is less, at this point, can To download the multimedia file using the faster second mode of speed of download, ensure that the data volume in caching can be supported with this The smooth playing of the multimedia file.
In conclusion in the present embodiment, by the data for obtaining the multimedia file cached in the electronic equipment Amount;Determine the corresponding numberical range of the data volume;When the data volume is in the first default value range, in the first pattern Download the multimedia file;When the data volume is in the second default value range, more matchmakers are downloaded in a second mode Body file;Can the electronic equipment according to downloading process caching the multimedia data volume number, automatically select Suitable downloading mode, to reach balanced between download efficiency and the load of server.
Fig. 4 is the flow chart of the method for down loading embodiment 4 of multimedia file of the invention.As shown in figure 4, this method can be with Include:
Step 401: obtaining the corresponding multiple server address of the multimedia file;One server address and one A server is corresponding;
Step 402: testing the speed of download of multiple servers;
Step 403: the most fast server of selection speed of download downloads the multimedia file.
Step 404: obtaining the data volume of the multimedia file cached in the electronic equipment;
Step 405: when the data volume is less than or equal to the first preset threshold and is greater than the second preset threshold, using list Thread downloading mode downloads the multimedia file;
Step 406: when institute's data volume is less than or equal to second preset threshold and is greater than third predetermined threshold value, using Multithreading downloading mode downloads the multimedia file;
Wherein, first preset threshold is greater than second preset threshold, and second preset threshold is greater than described the Three preset thresholds.
In the present embodiment, second preset threshold can be a biggish threshold value.When the data volume is less than or waits In first preset threshold and be greater than second preset threshold when, indicate in the caching of the electronic equipment about described The data volume of multimedia file is more, can continue to play certain time according to currently playing speed, for the speed of downloading data Degree require be not it is very high, the multimedia file can be downloaded using single thread downloading mode.Due to single thread downloading mode The speed of download upper limit is lower, therefore, the load for providing the server of the multimedia file can be made smaller.
When institute's data volume is less than or equal to second preset threshold and is greater than third predetermined threshold value, due to described second Preset threshold is less than first preset threshold, so at this time about the multimedia file in the caching of the electronic equipment Data volume is less, if continuing to play according to currently playing speed, in fact it could happen that therefore Caton is needed at this time using downloading speed It spends faster downloading mode and downloads the multimedia file.So in the present embodiment, when institute's data volume is less than or equal to described the Two preset thresholds and when being greater than third predetermined threshold value, download the multimedia file using multithreading downloading mode.
Specifically, thread can be understood as the channel of downloading, a thread is exactly the download channel of a file, multithreading Multiple download channels are namely opened simultaneously.If by multiple threads simultaneously connect with server, can be obtained by compared with The high download bandwidth upper limit.
In conclusion in the present embodiment, by when the data volume is less than or equal to the first preset threshold and is greater than second When preset threshold, the multimedia file is downloaded using single thread downloading mode;When institute's data volume is less than or equal to described second Preset threshold and when being greater than third predetermined threshold value, downloads the multimedia file using multithreading downloading mode;It may be implemented to work as Data volume in the caching of the electronic equipment is by changeable few, when being reduced to less than or being equal to second preset threshold, by list Thread downloading mode is switched to multithreading downloading mode, so as to improve the speed of download for the multimedia file, to make It obtains and smooth is kept for the playing process of the multimedia file.
Fig. 5 is the flow chart of the method for down loading embodiment 5 of multimedia file of the invention.As shown in figure 5, this method can be with Include:
Step 501: obtaining the corresponding multiple server address of the multimedia file;One server address and one A server is corresponding;
Step 502: testing the speed of download of multiple servers;
Step 503: the most fast server of selection speed of download downloads the multimedia file.
Step 504: obtaining the data volume of the multimedia file cached in the electronic equipment;
Step 505: when the data volume is less than or equal to third predetermined threshold value and is greater than four preset thresholds, selection the The multimedia file of one code rate is downloaded;The third predetermined threshold value is greater than the 4th preset threshold;
Step 506: when the data volume is less than or equal to four preset threshold, selecting the described more of the second code rate Media file is downloaded;
First code rate is greater than second code rate.
For the same multimedia content, which can have the multimedia text of different code rates Part.For example, the content can have the versions such as super clear, high definition, SD for a Motion picture video content, respectively correspond Different code rates.Wherein, the multimedia file of super clear version can be that code rate is highest, and the multimedia file of SD version can be with It is that code rate is minimum, the code rate of the multimedia file of high definition version falls between.Also, the higher multimedia text of code rate Part, it is desirable that speed of download it is also higher, the lower multimedia file of code rate, it is desirable that speed of download it is relatively low.
In the present embodiment, when the data volume is less than or equal to third predetermined threshold value and is greater than four preset thresholds, The multimedia file of the first code rate is selected to be downloaded;The third predetermined threshold value is greater than the 4th preset threshold;When When the data volume is less than or equal to four preset threshold, the multimedia file of the second code rate is selected to be downloaded; First code rate is greater than second code rate;The data volume in the caching when the electronic equipment may be implemented by changeable few, When being reduced to less than or being equal to four preset threshold, the multimedia file by downloading the first code rate is switched to downloading the The multimedia file of two code rates, so as to improve the speed of download for the multimedia file, so that for described The playing process of multimedia file keeps smooth.
Fig. 6 is the flow chart of the method for down loading embodiment 6 of multimedia file of the invention.As shown in fig. 6, this method can be with Include:
Step 601: obtaining the corresponding multiple server address of the multimedia file;One server address and one A server is corresponding;
Step 602: testing the speed of download of multiple servers;
Step 603: the most fast server of selection speed of download downloads the multimedia file.
Step 604: obtaining the data volume of the multimedia file cached in the electronic equipment;
Step 605: when the data volume is less than or equal to the first preset threshold and is greater than the second preset threshold, using list Thread downloading mode downloads the multimedia file;
Step 606: when the data volume is less than or equal to second preset threshold and is greater than third predetermined threshold value, adopting The multimedia file is downloaded with multithreading downloading mode;
Step 607: when the data volume is less than or equal to the third predetermined threshold value and is greater than four preset thresholds, choosing The multimedia file for selecting the first code rate is downloaded;
Step 608: when the data volume is less than or equal to four preset threshold, selecting the described more of the second code rate Media file is downloaded.
Wherein, first preset threshold is greater than second preset threshold, and second preset threshold is greater than described the Three preset thresholds, the third predetermined threshold value are greater than the 4th preset threshold, and first code rate is greater than second code rate.
In conclusion in the present embodiment, for numberical range and the corresponding downloading mode of data volume, carry out more in detail Thin setting has refined the mode that corresponding downloading mode is selected according to the data volume in caching.Data in the caching Measure it is more and be greater than the second preset threshold when, can using single thread mode download;When the data volume in the caching gradually subtracts When less and being greater than the third predetermined threshold value, it can be downloaded using multithread mode;When the data volume in the caching is further When reducing and being greater than four preset threshold, the multimedia file that can choose the first code rate is downloaded;When described When data volume in caching is reduced to less than four preset threshold, code rate is selected to be less than the second code rate of first code rate The multimedia file be downloaded, may be implemented to pass through three kinds or more of side when the data volume in caching is persistently reduced Formula reduces speed of download required when downloading the multimedia file, step by step to ensure broadcasting for the multimedia file It lets off journey and keeps smooth.
It should also be noted that, when the data volume is greater than first preset threshold, can stop in the present embodiment Download the multimedia file;Wherein, first preset threshold can be the data cached maximum value of setting.
Because the capacity of the caching of the electronic equipment is limited, when the data volume is greater than the data cached of setting Maximum value indicates that the data in the caching play longer time according to current play mode enough, it is possible to Stop downloading the multimedia file.Stop downloading the multimedia file, on the one hand can mitigate the burden for server, On the other hand the caching of the electronic equipment can also be made not to be fully occupied, can remaining part of cache space be supplied to Other application programs use.
The invention also discloses a kind of electronic equipment.The electronic equipment can be mobile phone, computer, tablet computer etc..
Fig. 7 is the structure chart of electronic equipment embodiment of the invention.As shown in fig. 7, the electronic equipment may include:
Server address acquiring unit 701, for obtaining the corresponding multiple server address of the multimedia file;One The server address is corresponding with a server;
In the present embodiment, the multimedia file is the multimedia text for needing just play out by download online Part.It is described more in broadcasting that the multimedia file can store the terminal for needing to play the multimedia file on the server When media file, it can be played from multimedia file described in download online on the server in downloading.
The multimedia file, can be audio file, be also possible to video file.The multimedia file of same content, It can be respectively stored on multiple servers.Each server can have server address corresponding with itself.Terminal can To select any one server in multiple servers, the multimedia file is downloaded.
Speed of download test cell 702, for testing the speed of download of multiple servers;
Different servers, due to loading condition difference, server position is different at a distance from terminal, and server is certainly The difference of body performance causes for some terminal, and the speed for downloading the multimedia file from different servers is Different.
Under normal conditions, load is smaller, and position is closer at a distance from terminal, the higher server of performance, is terminal Speed of download when providing multimedia file is also faster.But since above- mentioned information are less susceptible to directly obtain, so, Ke Yi Before downloading the multimedia file, tested for being stored with the speed of download of server of the multimedia file.
Server selecting unit 703, the server for selecting speed of download most fast download the multimedia file.
According to test result, the most fast server of speed of download can be determined, so as to select speed of download most fast Server downloads the multimedia file.
In conclusion in the present embodiment, by testing the downloading of multiple servers before downloading the multimedia file Speed;The server for selecting speed of download most fast downloads the multimedia file;Downloading speed can be selected from multiple servers The downloading that faster server carries out multimedia file is spent, during playing multimedia file online, Caton occurs in reduction The case where, improve the online fluency for playing multimedia file.
In practical application, the speed of download test cell 702 be can specifically include:
Slice chooses subelement, for randomly selecting the multimedia text for each server in multiple servers Multiple slices of part are downloaded;
Speed of download determines subelement, for determining speed of download when downloading the multiple slice.
In practical application, can also include:
Subelements under catalogue are sliced, for being downloaded it in the multiple slices for randomly selecting the multimedia file Before, from each server, downloading slice catalogue;It include to constitute each of multimedia file to cut in the slice catalogue The address information of piece;
First judgment sub-unit obtains the first judging result for judging whether the slice catalogue downloads success;
The slice chooses subelement, is also used to indicate that the slice catalogue is downloaded successfully when first judging result When, it just executes and randomly selects the step of multiple slices of the multimedia file are downloaded.
In practical application, can also include:
Data volume acquiring unit, for after the most fast server of selection speed of download downloads the multimedia file, Obtain the data volume of the multimedia file cached in the electronic equipment;
Numberical range determination unit, for determining the corresponding numberical range of the data volume;
First mode download unit, for when the data volume is in the first default value range, in the first pattern under Carry the multimedia file;
Second mode download unit, for when the data volume is in the second default value range, in a second mode under Carry the multimedia file.
In practical application, the first mode download unit be can specifically include:
First lower subelements, for when the data volume is less than or equal to the first preset threshold and is greater than the second default threshold When value, the multimedia file is downloaded using single thread downloading mode;
The second mode download unit, can specifically include:
Second lower subelements, it is less than or equal to second preset threshold and pre- greater than third for working as the data volume If when threshold value, downloading the multimedia file using multithreading downloading mode;
Wherein, first preset threshold is greater than second preset threshold, and second preset threshold is greater than described the Three preset thresholds.
In practical application, the first mode download unit be can specifically include:
Subelements under third, for when the data volume is less than or equal to third predetermined threshold value and is greater than the 4th default threshold When value, the multimedia file of the first code rate is selected to be downloaded;The third predetermined threshold value is greater than the 4th default threshold Value;
The second mode download unit, can specifically include:
4th lower subelements, for selecting second when the data volume is less than or equal to four preset threshold The multimedia file of code rate is downloaded;
First code rate is greater than second code rate.
In practical application, the first mode download unit be can specifically include:
First lower subelements, for when the data volume is less than or equal to the first preset threshold and is greater than the second default threshold When value, the multimedia file is downloaded using single thread downloading mode;
Second lower subelements, it is less than or equal to second preset threshold and pre- greater than third for working as the data volume If when threshold value, downloading the multimedia file using multithreading downloading mode;
The second mode download unit, can specifically include:
Subelements under third, for when the data volume is less than or equal to the third predetermined threshold value and is greater than the 4th in advance If when threshold value, the multimedia file of the first code rate is selected to be downloaded;
4th lower subelements, for selecting second when the data volume is less than or equal to four preset threshold The multimedia file of code rate is downloaded;
Wherein, first preset threshold is greater than second preset threshold, and second preset threshold is greater than described the Three preset thresholds, the third predetermined threshold value are greater than the 4th preset threshold, and first code rate is greater than second code rate.
In practical application, can also include:
Stop subelement, for stopping downloading the multimedia when the data volume is greater than first preset threshold File;
Wherein, first preset threshold is the data cached maximum value of setting.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by Software adds the mode of required hardware platform to realize, naturally it is also possible to all implemented by hardware, but in many cases before Person is more preferably embodiment.Based on this understanding, technical solution of the present invention contributes to background technique whole or Person part can be embodied in the form of software products, which can store in storage medium, such as ROM/RAM, magnetic disk, CD etc., including some instructions are used so that a computer equipment (can be personal computer, service Device or the network equipment etc.) execute method described in certain parts of each embodiment of the present invention or embodiment.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For electronics disclosed in embodiment For equipment, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method portion It defends oneself bright.
Used herein a specific example illustrates the principle and implementation of the invention, and above embodiments are said It is bright to be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, foundation Thought of the invention, there will be changes in the specific implementation manner and application range.In conclusion the content of the present specification is not It is interpreted as limitation of the present invention.

Claims (14)

1. a kind of method for down loading of multimedia file, which is characterized in that the method is applied to electronic equipment, the method packet It includes:
Obtain the corresponding multiple server address of the multimedia file;One server address is opposite with a server It answers;
Test the speed of download of multiple servers;
The server for selecting a speed of download most fast downloads the multimedia file;
The speed of download of the multiple servers of test, specifically includes:
For each server in multiple servers, the multiple slices for randomly selecting the multimedia file are downloaded;
Determine speed of download when downloading the multiple slice.
2. the method according to claim 1, wherein the multiple slices for randomly selecting the multimedia file Before being downloaded, further includes:
From each server, downloading slice catalogue;It include each of the composition multimedia file in the slice catalogue The address information of slice;
Judge whether the slice catalogue downloads success, obtains the first judging result;
When first judging result indicates that the slice catalogue is downloaded successfully, just executes and randomly select the multimedia file Multiple slices the step of being downloaded.
3. the method according to claim 1, wherein the server downloading that one speed of download of the selection is most fast After the multimedia file, further includes:
Obtain the data volume of the multimedia file cached in the electronic equipment;
Determine the corresponding numberical range of the data volume;
When the data volume is in the first default value range, the multimedia file is downloaded in the first pattern;
When the data volume is in the second default value range, the multimedia file is downloaded in a second mode.
4. according to the method described in claim 3, it is characterized in that, described when the data volume is in the first default value range When, the multimedia file is downloaded in the first pattern, is specifically included:
When the data volume is less than or equal to the first preset threshold and is greater than the second preset threshold, using single thread downloading mode Download the multimedia file;
It is described when the data volume is in the second default value range, download the multimedia file in a second mode, specifically Include:
When the data volume is less than or equal to second preset threshold and is greater than third predetermined threshold value, downloaded using multithreading Mode downloads the multimedia file;
Wherein, first preset threshold is greater than second preset threshold, and it is pre- that second preset threshold is greater than the third If threshold value.
5. according to the method described in claim 3, it is characterized in that, described when the data volume is in the first default value range When, the multimedia file is downloaded in the first pattern, is specifically included:
When the data volume is less than or equal to third predetermined threshold value and is greater than four preset thresholds, the described of the first code rate is selected Multimedia file is downloaded;The third predetermined threshold value is greater than the 4th preset threshold;
It is described when the data volume is in the second default value range, download the multimedia file in a second mode, specifically Include:
When the data volume is less than or equal to four preset threshold, the multimedia file of the second code rate is selected to carry out Downloading;
First code rate is greater than second code rate.
6. according to the method described in claim 3, it is characterized in that, described when the data volume is in the first default value range When, the multimedia file is downloaded in the first pattern;When the data volume is in the second default value range, in a second mode The multimedia file is downloaded, is specifically included:
When the data volume is less than or equal to the first preset threshold and is greater than the second preset threshold, using single thread downloading mode Download the multimedia file;
When the data volume is less than or equal to second preset threshold and is greater than third predetermined threshold value, downloaded using multithreading Mode downloads the multimedia file;
When the data volume is less than or equal to the third predetermined threshold value and is greater than four preset thresholds, the first code rate is selected The multimedia file is downloaded;
When the data volume is less than or equal to four preset threshold, the multimedia file of the second code rate is selected to carry out Downloading;
Wherein, first preset threshold is greater than second preset threshold, and it is pre- that second preset threshold is greater than the third If threshold value, the third predetermined threshold value is greater than the 4th preset threshold, and first code rate is greater than second code rate.
7. according to the method described in claim 6, it is characterized by further comprising:
When the data volume is greater than first preset threshold, stop downloading the multimedia file;
Wherein, first preset threshold is the data cached maximum value of setting.
8. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Server address acquiring unit, for obtaining the corresponding multiple server address of multimedia file;One server Address is corresponding with a server;
Speed of download test cell, for testing the speed of download of multiple servers;
Server selecting unit, the server for selecting a speed of download most fast download the multimedia file;
The speed of download test cell, specifically includes:
Slice chooses subelement, for randomly selecting the multimedia file for each server in multiple servers Multiple slices are downloaded;
Speed of download determines subelement, for determining speed of download when downloading the multiple slice.
9. electronic equipment according to claim 8, which is characterized in that further include:
Subelements under catalogue are sliced, for before being downloaded in the multiple slices for randomly selecting the multimedia file, from In each server, downloading slice catalogue;It include each slice for constituting the multimedia file in the slice catalogue Address information;
First judgment sub-unit obtains the first judging result for judging whether the slice catalogue downloads success;
The slice chooses subelement, is also used to when first judging result indicates that the slice catalogue is downloaded successfully, The step of multiple slices that execution randomly selects the multimedia file are downloaded.
10. electronic equipment according to claim 8, which is characterized in that further include:
Data volume acquiring unit, for after selecting the most fast server of a speed of download to download the multimedia file, Obtain the data volume of the multimedia file cached in the electronic equipment;
Numberical range determination unit, for determining the corresponding numberical range of the data volume;
First mode download unit, for downloading institute in the first pattern when the data volume is in the first default value range State multimedia file;
Second mode download unit, for downloading institute in a second mode when the data volume is in the second default value range State multimedia file.
11. electronic equipment according to claim 10, which is characterized in that the first mode download unit specifically includes:
First lower subelements, for when the data volume is less than or equal to the first preset threshold and is greater than the second preset threshold When, the multimedia file is downloaded using single thread downloading mode;
The second mode download unit, specifically includes:
Second lower subelements, for presetting threshold when the data volume is less than or equal to second preset threshold and is greater than third When value, the multimedia file is downloaded using multithreading downloading mode;
Wherein, first preset threshold is greater than second preset threshold, and it is pre- that second preset threshold is greater than the third If threshold value.
12. electronic equipment according to claim 10, which is characterized in that the first mode download unit specifically includes:
Subelements under third, for when the data volume is less than or equal to third predetermined threshold value and is greater than the 4th preset threshold When, select the multimedia file of the first code rate to be downloaded;The third predetermined threshold value is greater than the 4th preset threshold;
The second mode download unit, specifically includes:
4th lower subelements, for selecting the second code rate when the data volume is less than or equal to four preset threshold The multimedia file be downloaded;
First code rate is greater than second code rate.
13. electronic equipment according to claim 10, which is characterized in that the first mode download unit specifically includes:
First lower subelements, for when the data volume is less than or equal to the first preset threshold and is greater than the second preset threshold When, the multimedia file is downloaded using single thread downloading mode;
Second lower subelements, for presetting threshold when the data volume is less than or equal to second preset threshold and is greater than third When value, the multimedia file is downloaded using multithreading downloading mode;
The second mode download unit, specifically includes:
Subelements under third, for when the data volume is less than or equal to the third predetermined threshold value and is greater than the 4th default threshold When value, the multimedia file of the first code rate is selected to be downloaded;
4th lower subelements, for selecting the second code rate when the data volume is less than or equal to four preset threshold The multimedia file be downloaded;
Wherein, first preset threshold is greater than second preset threshold, and it is pre- that second preset threshold is greater than the third If threshold value, the third predetermined threshold value is greater than the 4th preset threshold, and first code rate is greater than second code rate.
14. electronic equipment according to claim 13, which is characterized in that further include:
Stop subelement, for stopping downloading the multimedia file when the data volume is greater than first preset threshold;
Wherein, first preset threshold is the data cached maximum value of setting.
CN201410525057.3A 2014-10-08 2014-10-08 A kind of method for down loading and electronic equipment of Online Video Active CN104244083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410525057.3A CN104244083B (en) 2014-10-08 2014-10-08 A kind of method for down loading and electronic equipment of Online Video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410525057.3A CN104244083B (en) 2014-10-08 2014-10-08 A kind of method for down loading and electronic equipment of Online Video

Publications (2)

Publication Number Publication Date
CN104244083A CN104244083A (en) 2014-12-24
CN104244083B true CN104244083B (en) 2019-07-26

Family

ID=52231289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410525057.3A Active CN104244083B (en) 2014-10-08 2014-10-08 A kind of method for down loading and electronic equipment of Online Video

Country Status (1)

Country Link
CN (1) CN104244083B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702592B (en) * 2015-01-08 2018-09-11 三星电子(中国)研发中心 Stream media downloading method and device
CN105095485B (en) * 2015-08-17 2018-12-14 联想(北京)有限公司 Play the method and electronic equipment of online audio file
CN106776597B (en) * 2015-11-19 2020-07-03 阿里巴巴集团控股有限公司 Structured data downloading method and device
CN105847396A (en) * 2016-04-25 2016-08-10 乐视控股(北京)有限公司 Data transmission method and device
CN106331755B (en) * 2016-08-17 2019-10-08 广州酷狗计算机科技有限公司 The method and apparatus for handling Media Stream Caton
CN106488265A (en) * 2016-10-12 2017-03-08 广州酷狗计算机科技有限公司 A kind of method and apparatus sending Media Stream
CN108600368B (en) * 2018-04-25 2021-10-08 海信视像科技股份有限公司 HLS network video downloading optimization method and device
CN110247985B (en) * 2019-06-28 2022-06-03 北京奇艺世纪科技有限公司 Resource downloading method and device, electronic equipment and medium
CN110300170A (en) * 2019-06-28 2019-10-01 杭州复杂美科技有限公司 Block chain distributed storage method for down loading, equipment and storage medium
CN110430092B (en) * 2019-07-15 2021-03-16 杭州复杂美科技有限公司 Download detection method, service node screening method, device and storage medium
CN110881136B (en) * 2019-11-14 2021-11-02 腾讯科技(深圳)有限公司 Video frame rate control method and device, computer equipment and storage medium
CN111787105B (en) * 2020-07-01 2023-07-07 深圳市有方科技股份有限公司 File transmission method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852229A (en) * 2005-10-20 2006-10-25 华为技术有限公司 Real-time flow-medium transmission method and system
CN101431720A (en) * 2007-11-09 2009-05-13 华为技术有限公司 Streaming media transmission method and equipment
CN101742238A (en) * 2008-11-26 2010-06-16 深圳市彪骐数码科技有限公司 Streaming media on-demand method and device combining RTS with P2P
CN103685547A (en) * 2013-12-24 2014-03-26 乐视网信息技术(北京)股份有限公司 Download server dispatching method, download server dispatching system and terminal device
CN103702171A (en) * 2013-12-12 2014-04-02 乐视网信息技术(北京)股份有限公司 Method for downloading video stream and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050240958A1 (en) * 2004-04-21 2005-10-27 Moviecrazy, Inc. Method and apparatus for on-demand multimedia rental and sales services
US7779193B2 (en) * 2007-08-03 2010-08-17 Intel Corporation Method and apparatus for external data transfer in a personal storage device
CN103685366B (en) * 2012-09-10 2018-10-19 腾讯科技(深圳)有限公司 Improve the method, apparatus and system of file downloading speed

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852229A (en) * 2005-10-20 2006-10-25 华为技术有限公司 Real-time flow-medium transmission method and system
CN101431720A (en) * 2007-11-09 2009-05-13 华为技术有限公司 Streaming media transmission method and equipment
CN101742238A (en) * 2008-11-26 2010-06-16 深圳市彪骐数码科技有限公司 Streaming media on-demand method and device combining RTS with P2P
CN103702171A (en) * 2013-12-12 2014-04-02 乐视网信息技术(北京)股份有限公司 Method for downloading video stream and electronic equipment
CN103685547A (en) * 2013-12-24 2014-03-26 乐视网信息技术(北京)股份有限公司 Download server dispatching method, download server dispatching system and terminal device

Also Published As

Publication number Publication date
CN104244083A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN104244083B (en) A kind of method for down loading and electronic equipment of Online Video
KR101503121B1 (en) Streaming data downloading method and computer readable recording medium thereof
CN104965659B (en) A kind of preloading method and device of page info
Liu et al. A comparative study of android and iOS for accessing internet streaming services
CN104918120B (en) A kind of playback progress adjusting method and electronic equipment
CN107181803B (en) Method and device for playing video
CN105657523A (en) Video preloading method and device
CN103945430B (en) A kind of mobile terminal style recommends method and device
CN103414959B (en) A kind of method and apparatus for accelerating Internet video broadcasting speed
US7627579B2 (en) Managing portal response times
CN110247985A (en) A kind of resource downloading method, device, electronic equipment and medium
CN107807830A (en) Medical software update method and server based on cluster
CN105847979A (en) Method and device of downloading and providing video files
CN105872758A (en) Intelligent television channel operation and play method and corresponding device
EP3324356A1 (en) System and method for processing of a service subscription using a telecommunications operator
US10298974B2 (en) Method and device for presenting content data from network
CN104468735B (en) The management method and device of load equalizer based on graphic user interface
US20110167345A1 (en) Method and apparatus for selective media download and playback
CN103365977A (en) Storage processing method and device for data on nonvolatile storage medium
US20150280979A1 (en) Application configuring
CN106331789B (en) Carousel program control method for playing back and equipment
CN111031117B (en) Multimedia file downloading method and related device
CA2786098A1 (en) System and method for remote presentation provision
CA2882758A1 (en) Providing an and audio and/or video component for computer-based learning
CN106921886B (en) Multimedia data playing method and device of terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant