The application is a divisional application with application date of 2014, 1, and 2, application number of 201410002083.8, and invention name of 'data downloading method, device and terminal'.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of a method for downloading data by a browser according to an embodiment of the present invention is shown, where the method for downloading data by a browser may include:
step 101, acquiring webpage content of a target webpage;
wherein the web page content comprises at least one multimedia link;
step 102, extracting an un-triggered multimedia link from at least one multimedia link of webpage content;
and 103, downloading the multimedia data corresponding to the multimedia link which is not triggered.
In summary, in the data downloading method provided in this embodiment, the web page content of the target web page is obtained, the multimedia link that is not triggered is extracted from at least one multimedia link of the web page content, and the multimedia data corresponding to the multimedia link that is not triggered is downloaded; the problem that when the terminal is disconnected in the prior art, the terminal cannot continuously play video data corresponding to the video link which is not triggered to be opened in the webpage is solved; the effect that even if the terminal is disconnected, the terminal can still continue to play the multimedia data corresponding to the multimedia link which is not triggered to be opened because the terminal downloads the multimedia data corresponding to the multimedia link which is not triggered to be opened is achieved.
Referring to fig. 2, a flowchart of a method for downloading data by a browser according to another embodiment of the present invention is shown, where the method for downloading data includes:
step 201, acquiring webpage content of a target webpage;
the browser can open the target webpage and acquire the webpage content of the target webpage. Wherein the web page content includes at least one multimedia link, and when actually implemented, the multimedia link may be an audio link, a video link, or both.
Step 202, extracting an un-triggered multimedia link from at least one multimedia link of the webpage content;
after the browser acquires the webpage content of the target webpage, the browser can extract the multimedia link which is not triggered from at least one multimedia link of the webpage content. Specifically, the target web page may include at least one of a text link, an audio link, and a video link, so that after the browser acquires the web page content, the browser may retrieve all links in the web page content, detect whether the retrieved links are multimedia links, and when the detection result is a multimedia link, continue to detect whether the multimedia link has been triggered, thereby extracting a multimedia link that has not been triggered.
The browser can judge whether a link is a multimedia link according to the representation form of the link, for example, an audio link can usually include mp3, mp4 or wav, so that the browser can detect whether the link contains mp3, mp4 or wav, and determine that the link is an audio link when the detection result is that the link contains the audio link; the video link may generally include flv, video, or audio, so the browser may detect whether the link includes flv, video, or audio, and determine that the link is a video link when the detection result indicates that the link includes flv, video, or audio.
In addition, the multimedia link which is not triggered refers to the link which is currently in the state to be opened in the webpage content, and the multimedia link which is triggered refers to the link which is currently in the state to be opened in the webpage content. For example, referring to fig. 2B, when the user views the 3 rd episode of the tv series 'XX' through the browser, the video links corresponding to the videos of the 3 rd episode in the web page content are triggered video links, and the video links corresponding to the videos of the 1 st episode, the 2 nd episode, and the 4 th episode to the 13 th episode are non-triggered video links.
Step 203, acquiring the network state of the terminal;
for the execution of the subsequent steps, the browser may acquire the network status of the terminal. The network state of the terminal may include a network type used by the terminal, a current network signal strength of the terminal, or both.
The network type of the terminal may include a WIFI (Wireless Fidelity) network or a GPRS (General Packet Radio Service) network. For example, when a user uses a mobile phone to surf the internet in a WIFI environment, the browser may acquire that the network type of the terminal is a WIFI network; when a user surfs the internet by using the mobile phone GPRS, the browser can acquire that the network type of the terminal is the GPRS network. In practical implementation, because the user can open the GPRS flow package and the user does not need to pay extra charges in the package, when the network type of the terminal is the GPRS network, the browser can also obtain the remaining flow of the flow package, that is, the network state can also include the remaining flow in the flow package; in addition, the embodiment is only an example that the network state includes the above contents, and other contents may also be included in actual implementation, which is not limited in the embodiment.
Step 204, detecting whether the network state meets a preset condition;
after the browser acquires the network state of the terminal, the browser can detect whether the network state meets a predetermined condition. Wherein the predetermined condition comprises at least one of the following conditions:
using a wireless fidelity (WIFI) network;
when the terminal uses the WIFI network, the internet surfing speed of the terminal is generally high, and the user does not need to pay for the terminal to use the network continuously, so that the browser can detect whether the network currently used by the terminal is the WIFI network or not for executing subsequent steps.
The remaining flow in the flow package is greater than a first threshold;
when the terminal uses the GPRS to surf the internet, when the flow is sufficient, that is, the residual flow is large, the user can use the terminal without worrying about the condition that extra payment is needed after the flow is used up, so when the browser obtains the terminal currently uses the GPRS network and obtains the residual flow in the flow package, the browser can also detect whether the residual flow in the GPRS flow package is larger than a first threshold value or not, and when the detection result is larger than the first threshold value, the network state is determined to meet the preset condition.
The network signal strength is above a second threshold.
When the network signal is stronger, the speed of surfing the internet by the terminal is faster, and the user experience is better, so that when the browser acquires the network signal intensity of the terminal, the browser can also detect whether the network signal intensity of the terminal is higher than a second threshold, and when the detection result is higher than the second threshold, the network state is determined to meet the preset condition.
It should be noted that, if the browser is a browser in a terminal that generally uses a WIFI network and a wired broadband network, such as a laptop computer and a desktop computer, the browser may directly perform step 205, which is not described herein again.
Step 205, if the detection result is that the predetermined condition is met, downloading the multimedia data corresponding to the multimedia link which is not triggered;
if the detection result of the browser is that the preset condition is met, the browser can download the multimedia data corresponding to the multimedia link which is not triggered. Specifically, the browser may virtually open a webpage corresponding to the multimedia link in the background, and download the multimedia data in the webpage.
In practical implementation, when there may be two or more than two un-triggered multimedia links extracted by the browser, in order to enable the user to select a multimedia link required by the user from the two or more than two multimedia links and further download multimedia data required by the user, the browser may further perform the following steps before downloading the multimedia data corresponding to the un-triggered multimedia link:
first, two or more multimedia links that are not triggered are displayed;
when the browser extracts two or more multimedia links that are not triggered, the browser can display the two or more multimedia links that are not triggered. Specifically, when the browser displays two or more multimedia links that are not triggered, the terminal may simultaneously display the theme name and the video file of the multimedia link, specifically refer to fig. 2C, which is not described herein again in this embodiment.
Second, receiving a selection signal for selecting at least one non-triggered multimedia link from two or more non-triggered multimedia links;
after the browser displays two or more multimedia links which are not triggered, the user can select the multimedia link corresponding to the multimedia data which the user needs to download from the displayed multimedia links, and the corresponding browser can receive a selection signal for selecting at least one multimedia link which is not triggered from the two or more multimedia links which are not triggered.
After the browser receives the selection signal, the step of downloading the multimedia data corresponding to the multimedia link that is not triggered by the browser may include: and downloading the multimedia data corresponding to the multimedia link which is selected by the selection signal and is not triggered. For example, if the browser receives a selection signal for selecting the video links from set 4 to set 13, the browser will download the contents from set 4 to set 13.
Certainly, in actual implementation, even if the browser extracts two or more multimedia links which are not triggered, the browser can download multimedia data corresponding to all the extracted multimedia links; for example, if the target web page is a web page playing episode 3 of the tv series 'XX', the browser may download the contents of episode 1, episode 2, and episodes 4 to 13 in the target web page.
It should be noted that, in some scenarios, the user may continue to request to play the multimedia data in the multimedia link that is not triggered in the target web page; for example, if the target web page is a web page that plays a certain episode of a television episode, the user is likely to continue to request viewing of the episode after viewing; in some scenarios, the user may not need to continue to request the multimedia data to be played; for example, when the browser opens the home page of the video website, the home page may include a plurality of video links, and at this time, the user does not necessarily request to play the video corresponding to the video link in the home page, and may possibly enter another page after performing a search in the home page. Therefore, in order to reduce the burden of the browser and avoid the situation that the browser is useless for the user after consuming a large amount of resources to download the multimedia data, the browser can be provided with a function option for the user to select whether to start the pre-downloading, so that when the user needs the browser to download the multimedia data corresponding to the multimedia link which is not triggered in the target webpage, the user starts the pre-downloading function in the setting item in advance. For example, when a user watches a certain episode of a tv series, the user may start a pre-downloaded function in a setting item in order to acquire the content of the following episode. Certainly, in actual implementation, the browser may download the multimedia data corresponding to the multimedia link that is not triggered in all pages by default, which is not limited in this embodiment.
Step 206, receiving a trigger signal for triggering the multimedia link which is not triggered;
when the user wants to access the multimedia data corresponding to the multimedia link which is not triggered in the target webpage, the user can apply a trigger signal for triggering the multimedia link which is not triggered, and accordingly, the browser can receive the trigger signal for triggering the multimedia link which is not triggered.
Step 207, playing the multimedia data corresponding to the multimedia link triggered by the downloaded trigger signal.
Since the browser has downloaded the multimedia data corresponding to the multimedia link that is not triggered, after the browser receives the trigger signal, the browser can directly play the downloaded multimedia data.
In an application scenario of this embodiment, when the browser receives the trigger signal and the terminal where the browser is located is still connected to the network, since the browser has downloaded the multimedia data corresponding to the multimedia link, the browser can directly read the locally stored multimedia data without going to the server for obtaining the multimedia data, which avoids the problem that the browser needs to buffer when the browser goes to the server again to request the multimedia data, accelerates the speed of playing the multimedia data corresponding to the newly opened multimedia link by the browser, and improves user experience.
In another application scenario of this embodiment, when the browser receives the trigger signal and the terminal where the browser is located has disconnected from the network, for example, when the user has left the coverage area of the WIFI with the mobile phone, the browser has downloaded the multimedia data corresponding to the multimedia link, so that the browser can still continue to play the multimedia data at this time, the problem that the browser cannot continue to play the multimedia data corresponding to the multimedia link when the terminal disconnects from the network is avoided, and user experience is improved.
In summary, in the data downloading method provided in this embodiment, the web page content of the target web page is obtained, the multimedia link that is not triggered is extracted from at least one multimedia link of the web page content, and the multimedia data corresponding to the multimedia link that is not triggered is downloaded; the problem that when the terminal is disconnected in the prior art, the terminal cannot continuously play video data corresponding to the video link which is not triggered to be opened in the webpage is solved; the effect that even if the terminal is disconnected, the terminal can still continue to play the multimedia data corresponding to the multimedia link which is not triggered to be opened because the terminal downloads the multimedia data corresponding to the multimedia link which is not triggered to be opened is achieved.
In the embodiment, when the network state of the terminal meets a certain condition, the multimedia data corresponding to the multimedia link which is not triggered to be opened in the target webpage is downloaded to the local, so that the effect that the browser can still play the multimedia data corresponding to the multimedia link which is not triggered to be opened when the terminal is disconnected is achieved.
Referring to fig. 3, a flowchart of a method for downloading data by a browser according to a further embodiment of the present invention is shown, where the method for downloading data by a browser may include:
step 301, acquiring webpage content of a target webpage;
the browser can open the target webpage and acquire the webpage content of the target webpage. Wherein the web page content includes at least one multimedia link, and when actually implemented, the multimedia link may be an audio link, a video link, or both.
Step 302, extracting an un-triggered multimedia link from at least one multimedia link of the webpage content;
after the browser acquires the webpage content of the target webpage, the browser can extract the multimedia link which is not triggered from at least one multimedia link of the webpage content.
Step 303, acquiring a network state of the terminal;
for the execution of the subsequent steps, the browser may acquire the network status of the terminal. The network state of the terminal may include a network type used by the terminal, a current network signal strength of the terminal, or both.
Step 304, detecting whether the network state meets a preset condition;
after the browser acquires the network state of the terminal, the browser can detect whether the network state meets a predetermined condition. Wherein the predetermined condition comprises at least one of the following conditions:
using a wireless fidelity (WIFI) network;
the remaining flow in the flow package is greater than a first threshold;
the network signal strength is above a second threshold.
It should be noted that steps 301 to 304 are similar to steps 201 to 204 in the above embodiment, and please refer to the above embodiment for details of the technology, which is not described herein again.
Step 305, if the detection result is that the predetermined condition is met, calculating the association degree between the multimedia link which is not triggered and the multimedia link which is triggered in the webpage content;
since there may be a certain association relationship between multiple multimedia links of the target web page, for example, in a page playing a certain episode of a tv series, video links of other episodes of the tv series may be included in the page, for the execution of the subsequent steps, when the detection result of the browser is that a predetermined condition is met, the browser may calculate the association degree between the multimedia link that is not triggered and the multimedia link that is triggered in the web page content.
Specifically, the browser may calculate the association degree between the multimedia link that is not triggered and the multimedia link that is triggered in the web page content according to the association relationship between the feature information of the multimedia link that is not triggered and the feature information of the multimedia link that is triggered. Wherein the characteristic information may comprise a name of the multimedia link, a link address of the multimedia link, or a combination of both.
When the feature information comprises the names of the multimedia links, the browser can analyze the names of the multimedia links and calculate the relation between the names of the multimedia links which are not triggered and the names of the multimedia links which are triggered; for example, when the browser plays '3 rd episode' of a television series 'XX', the browser may calculate that the association degree of each non-triggered multimedia link with the multimedia link is 4 th episode, 2 nd episode, 5 th episode, 1 st episode, and 6 th episode … 13 from high to low, and since the user generally accesses each episode in sequence, the browser may discard the 2 nd episode and the 1 st episode before the 3 rd episode, and further obtain that the association degree of each non-triggered multimedia link with the triggered multimedia link is 4 th episode and 5 th episode … from high to low. In practical implementation, the browser may set a score criterion, and further use the score to represent the association degree, for example, the closer the association relationship, the higher the score is, and vice versa, the lower the score is, which is not limited in this embodiment.
When the feature information includes the link address of the multimedia link, the browser may calculate the degree of association between the link address of the multimedia link that has not been triggered and the link address of the multimedia link that has been triggered. For example, when the target page contains video links of multiple episodes of the same television series, the link addresses of the video links of the episodes generally change regularly with the increase of the number of the episodes, so the browser can calculate the relevance of the triggered multimedia links of the multimedia links which are not triggered by calculating the relevance of the link addresses of the multimedia links which are not triggered and the link addresses of the multimedia links which are triggered.
It should be noted that, in actual implementation, the browser may also calculate the association degree between the multimedia link that has not been triggered and the multimedia link that has been triggered through other parameters, and this embodiment is only an example of calculating by using the above features, and the specific calculation method is not limited thereto.
Step 306, detecting whether the calculated association degree reaches a third threshold value;
after the browser calculates the association degree of the multimedia link that has not been triggered and the multimedia link that has been triggered, the browser may detect whether the calculated association degree reaches a third threshold.
Step 307, if the detection result reaches the third threshold, executing a step of downloading the multimedia data corresponding to the multimedia link that is not triggered;
if the detection result of the browser reaches the third threshold, it indicates that the multimedia link that is not triggered is relatively related to the triggered multimedia link, and the probability that the user later requests to play the multimedia data corresponding to the multimedia link is higher, so the browser can perform the step of downloading the multimedia data corresponding to the multimedia link that is not triggered. The specific downloading method for the browser to download the multimedia data corresponding to the multimedia link that is not triggered is similar to the above embodiment, and for details, reference is made to the above embodiment, which is not described herein again.
In addition, when the multimedia link extracted by the browser and not triggered is two or more than two, the step of downloading the multimedia data corresponding to the multimedia link not triggered by the browser may include:
firstly, sorting two or more than two multimedia links which are not triggered according to the sequence of the relevance degree of the two or more than two multimedia links which are not triggered and the multimedia links which are triggered in the webpage content from high to low;
since the multimedia links with higher association degrees with the triggered multimedia links among the respective multimedia links that are not triggered are more likely to be requested to be played later, for the execution of the subsequent steps, the browser may order the two or more multimedia links that are not triggered in the order of the calculated association degrees of the two or more multimedia links that are not triggered and the triggered multimedia links in the web page content from high to low.
And secondly, sequentially downloading the multimedia data corresponding to two or more multimedia links according to the sequence.
After the browser executes the sorting, the browser may sequentially download the multimedia data corresponding to two or more multimedia links according to the sorting. For example, the browser will download the content of the series 'XX' in sequence from episode 4, episode 5, …, episode 13.
Step 308, receiving a trigger signal for triggering the multimedia link which is not triggered;
when the user wants to access the multimedia data corresponding to the multimedia link which is not triggered in the target webpage, the user can apply a trigger signal for triggering the multimedia link which is not triggered, and accordingly, the browser can receive the trigger signal for triggering the multimedia link which is not triggered.
Step 309, playing the multimedia data corresponding to the multimedia link triggered by the downloaded trigger signal.
Since the browser has downloaded the multimedia data corresponding to the multimedia link that is not triggered, after the browser receives the trigger signal, the browser can directly play the downloaded multimedia data.
It should be noted that steps 308 to 309 are similar to steps 206 to 207 in the above embodiment, and please refer to the above embodiment for details of the technology, which is not described herein again.
In summary, in the data downloading method provided in this embodiment, the web page content of the target web page is obtained, the multimedia link that is not triggered is extracted from at least one multimedia link of the web page content, and the multimedia data corresponding to the multimedia link that is not triggered is downloaded; the problem that when the terminal is disconnected in the prior art, the terminal cannot continuously play video data corresponding to the video link which is not triggered to be opened in the webpage is solved; the effect that even if the terminal is disconnected, the terminal can still continue to play the multimedia data corresponding to the multimedia link which is not triggered to be opened because the terminal downloads the multimedia data corresponding to the multimedia link which is not triggered to be opened is achieved.
In the embodiment, the association degree between the multimedia link which is not triggered and the multimedia link which is triggered in the webpage content is calculated, and then the corresponding multimedia data is downloaded only when the association degree meets a certain condition, so that the problems that when the browser downloads the multimedia data corresponding to all the multimedia links which are not triggered in the target webpage, the browser has high processing complexity and the terminal has large storage space when storing the downloaded multimedia data are solved. Meanwhile, when the multimedia links which are not triggered are connected with two or more than two multimedia links, the browser can download the multimedia data corresponding to each multimedia link from high to low according to the relevance degree of the triggered multimedia links, so that the downloaded multimedia data more meets the use requirements of users, and the user experience effect is improved.
Referring to fig. 4, a block diagram of a data downloading apparatus according to an embodiment of the present invention is shown, where the data downloading apparatus may be implemented as all or part of a terminal through software, hardware, or a combination of the two, and the data downloading apparatus may include: a content acquisition module 410, a link extraction module 420 and a data download module 430;
a content obtaining module 410, configured to obtain web page content of a target web page, where the web page content includes at least one multimedia link;
a link extracting module 420, configured to extract an un-triggered multimedia link from at least one multimedia link of the web content acquired by the information content acquiring module 410;
a data downloading module 430, configured to download the multimedia data corresponding to the multimedia link that is not triggered and extracted by the link extracting module 420.
In summary, the data downloading apparatus provided in this embodiment extracts the multimedia link that is not triggered from at least one multimedia link of the web page content by acquiring the web page content of the target web page, and downloads the multimedia data corresponding to the multimedia link that is not triggered; the problem that when the terminal is disconnected in the prior art, the terminal cannot continuously play video data corresponding to the video link which is not triggered to be opened in the webpage is solved; the effect that even if the terminal is disconnected, the terminal can still continue to play the multimedia data corresponding to the multimedia link which is not triggered to be opened because the terminal downloads the multimedia data corresponding to the multimedia link which is not triggered to be opened is achieved.
Referring to fig. 5A, a block diagram of a data downloading apparatus according to another embodiment of the present invention is shown, where the data downloading apparatus may be implemented as all or part of a terminal through software, hardware or a combination of the two, and the data downloading apparatus may include: a content acquisition module 510, a link extraction module 520, and a data download module 530;
a content obtaining module 510, configured to obtain web page content of a target web page, where the web page content includes at least one multimedia link;
a link extracting module 520, configured to extract an un-triggered multimedia link from at least one multimedia link of the web content acquired by the information content acquiring module 510;
a data downloading module 530, configured to download the multimedia data corresponding to the multimedia link that is not triggered and extracted by the link extracting module 520.
In a first possible implementation manner of this embodiment, the apparatus further includes:
a state obtaining module 540, configured to obtain a network state of the terminal;
a status detection module 550, configured to detect whether the network status acquired by the status acquisition module 540 meets a predetermined condition;
the data downloading module 530 is further configured to, when the detection result of the state detecting module 550 is that the predetermined condition is met, execute the step of downloading the multimedia data corresponding to the multimedia link that is not triggered;
wherein the predetermined condition comprises at least one of the following conditions:
using a wireless fidelity (WIFI) network;
the remaining flow in the flow package is greater than a first threshold;
the network signal strength is above a second threshold.
Referring to fig. 5B, in a second possible implementation manner of the embodiment, the apparatus further includes:
a link display module 560, configured to display two or more non-triggered multimedia links when two or more non-triggered multimedia links are connected;
a first receiving module 570, configured to receive a selection signal for selecting at least one un-triggered multimedia link from the two or more un-triggered multimedia links;
the data downloading module 530 is further configured to download the multimedia data corresponding to the multimedia link that is not triggered and selected by the selection signal received by the first receiving module 570.
Referring to fig. 5C, in a third possible implementation manner of the embodiment, the apparatus further includes:
an association degree calculating module 580, configured to calculate an association degree between the multimedia link that is not triggered and the multimedia link that is triggered in the web page content;
a correlation detection module 590, configured to detect whether the correlation calculated by the correlation calculation module 580 reaches a third threshold;
the data downloading module 530 is further configured to execute the step of downloading the multimedia data corresponding to the multimedia link that is not triggered when the detection result of the association degree detecting module 590 reaches the third threshold.
In a fourth possible implementation manner of this embodiment, the data downloading module 530 includes:
a link sorting unit 531, configured to, when two or more multimedia links that are not triggered are connected, sort the two or more multimedia links that are not triggered according to the calculated association degrees between the two or more multimedia links that are not triggered and the multimedia links that are triggered in the web content from high to low;
a data downloading unit 532, configured to sequentially download the multimedia data corresponding to the two or more multimedia links according to the sequence obtained by the link sequencing unit 531.
Referring to fig. 5D, in a fifth possible implementation manner of the embodiment, the apparatus further includes:
a second receiving module 600, configured to receive a trigger signal for triggering the un-triggered multimedia link;
a data playing module 610, configured to play multimedia data corresponding to the multimedia link triggered by the trigger signal received by the second receiving module 600.
In summary, the data downloading apparatus provided in this embodiment extracts the multimedia link that is not triggered from at least one multimedia link of the web page content by acquiring the web page content of the target web page, and downloads the multimedia data corresponding to the multimedia link that is not triggered; the problem that when the terminal is disconnected in the prior art, the terminal cannot continuously play video data corresponding to the video link which is not triggered to be opened in the webpage is solved; the effect that even if the terminal is disconnected, the terminal can still continue to play the multimedia data corresponding to the multimedia link which is not triggered to be opened because the terminal downloads the multimedia data corresponding to the multimedia link which is not triggered to be opened is achieved.
It should be noted that: in the data downloading device provided in the above embodiment, when downloading data, only the division of the above functional modules is taken as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the data downloading device and the method embodiment of the data downloading method provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment and will not be described herein again.
Referring to fig. 6, a schematic diagram of an embodiment of a method for downloading data by a browser according to an embodiment of the present invention is shown. The present embodiment is illustrated with the multimedia link being a video link. The method for downloading data by the browser comprises the following steps:
step 601, starting a function of automatically pre-downloading an automatic video link in an opened webpage according to the setting operation of a user;
the browser provides the function of automatically pre-downloading automatic video links in the opened webpage. The browser may then operate to turn the function on or off according to the user's settings. In this embodiment, the function is started as an example for illustration.
Step 602, opening a webpage including a video link;
the browser may open a web page including a video link according to a user's operation. For example, the browser jumps to open a webpage including a video link according to the click operation of the user in the current page; for another example, the browser opens a web page including a video link according to a URL (Uniform Resource Locator) entered by the user in the address bar.
Step 603, judging whether the current terminal is a mobile terminal;
the browser judges whether the current terminal is a mobile terminal, and if the judgment result is that the current terminal is the mobile terminal, the step 604 is entered; if the determination result is that the mobile terminal is not the desktop terminal, the process proceeds to step 606.
Step 604, determining whether the current network environment is in a WIFI (wireless fidelity) network;
if the judgment result is that the current terminal is the mobile terminal, the browser judges whether the current network environment is in a WIFI network, and if the judgment result is that the current network environment is the WIFI network, the step 606 is carried out; if the determination result is that the network is not a WIFI network, step 605 is entered.
Step 605, not performing silent downloading, and waiting for the next access to the WIFI network;
and if the judgment result is that the browser is not the WIFI network but the mobile communication network, the browser does not perform silent downloading and waits for accessing the WIFI network next time.
Step 606, traversing all video links in the opened webpage;
and if the current terminal is a desktop terminal or the current terminal is a mobile terminal and the current network environment is a WIFI network, the browser traverses all video links in the opened webpage.
For example, the opened web page includes 20 video links corresponding to 20 episodes of a series a.
Step 607, downloading the videos corresponding to all the video links in the web page in a silent manner/downloading the videos corresponding to a part of the video links in the web page in a silent manner according to the selection operation of the user.
The browser can directly and silently download the videos corresponding to all the video links in the webpage; the browser can also be used for silently downloading the video corresponding to a part of video links in the webpage according to the selection operation of the user. In the latter implementation, the browser may provide a display interface including all video links and titles corresponding to each video link, and then download the video corresponding to the selected video link according to the selection operation of the user.
Step 608, after the downloading is completed, the downloaded video in the webpage is opened offline according to the operation of the user.
After the downloading is finished, the browser can open the downloaded video in the webpage in an off-line mode according to the operation of the user. For example, the browser may open the downloaded video in the web page offline according to the operation of the user when the terminal cannot connect to the network, or the currently connected network has a poor signal, or the currently connected network is a mobile communication network.
In summary, in the data downloading method provided in this embodiment, the browser obtains the video links in the opened web page, and downloads all or part of the video files corresponding to the video links; the problem that when the terminal is disconnected in the prior art, the terminal cannot continuously play video data corresponding to the video link which is not triggered to be opened in the webpage is solved; the effect that even if the terminal is disconnected, the terminal can still continue to play the video file corresponding to the video link which is not triggered to be opened because the terminal downloads the video file corresponding to the video link which is not triggered to be opened; and the terminal is in the mobile communication network, but the terminal downloads the video file corresponding to the video link which is not triggered to open, so that the terminal can directly play the video file corresponding to the video link which is not triggered to open without using the mobile communication network to acquire the effect of the streaming media.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.