CN108111561A - A kind of data download method and its equipment - Google Patents

A kind of data download method and its equipment Download PDF

Info

Publication number
CN108111561A
CN108111561A CN201611059732.3A CN201611059732A CN108111561A CN 108111561 A CN108111561 A CN 108111561A CN 201611059732 A CN201611059732 A CN 201611059732A CN 108111561 A CN108111561 A CN 108111561A
Authority
CN
China
Prior art keywords
url
data
application server
alternative
original
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.)
Granted
Application number
CN201611059732.3A
Other languages
Chinese (zh)
Other versions
CN108111561B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201611059732.3A priority Critical patent/CN108111561B/en
Publication of CN108111561A publication Critical patent/CN108111561A/en
Application granted granted Critical
Publication of CN108111561B publication Critical patent/CN108111561B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Abstract

The embodiment of the present invention discloses a kind of data download method and its equipment, and wherein method includes the following steps:The data download request of the data name of target data is carried to application server transmission, so that application server obtains the corresponding original URL of data name;The original URL that application server returns is obtained, and original URL is detected;When it is to be held as a hostage URL to detect original URL, the alternative download request of data name is carried to application server transmission, so that application server obtains the corresponding alternative URL of data name;The alternative URL that application server returns is obtained, and the first data volume of target data is obtained using alternative URL;When the error between the preset data amount of the first data volume and target data is less than or equal to predetermined threshold value, target data is downloaded using alternative URL in the application server.Using the present invention, it is ensured that the security that data are downloaded promotes the accuracy of data, and then ensures the efficiency that data are downloaded.

Description

A kind of data download method and its equipment
Technical field
The present invention relates to Internet technical field more particularly to a kind of data download method and its equipment.
Background technology
As Internet technology is constantly developed and perfect, the terminals such as mobile phone and tablet computer have become people's life In an indispensable part, people can not only be communicated using these terminals, can also carry out file transmission, take the photograph Picture plays game etc..
For in terminal data (such as:Terminal applies data, multi-medium data etc.), it can be based on internet slave phase It is obtained in the application server answered, application server is usually by the corresponding uniform resource locator (Uniform of data Resource Locator, URL) terminal is issued to, URL downloading datas from application server, however URL are based on by terminal It tends to by external network maliciously distort in transmission process, i.e. URL has the behavior being held as a hostage, and causes actual download Data be not be expected data, affect data download security, reduce the accuracy of data, and then affect number According to the efficiency of download.
The content of the invention
The embodiment of the present invention provides a kind of data download method and its equipment, it is ensured that the security that data are downloaded carries The accuracy of data is risen, and then ensures the efficiency that data are downloaded.
First aspect of the embodiment of the present invention provides a kind of data download method, it may include:
The data download request of the data name of target data is carried to application server transmission, so that the application takes The corresponding original URL of the device acquisition data name of being engaged in;
The original URL that the application server returns is obtained, and the original URL is detected;
When it is to be held as a hostage URL to detect the original URL, the data name is carried to application server transmission The alternative download request claimed, so that the application server obtains the corresponding alternative URL of the data name;
The alternative URL that the application server returns is obtained, and the target data is obtained using the alternative URL The first data volume;
When the error between the preset data amount of first data volume and the target data is less than or equal to predetermined threshold value When, the target data is downloaded in the application server using the alternative URL.
Second aspect of the embodiment of the present invention provides a kind of data and downloads equipment, it may include:
Request of data transmitting element, under the data for the data name that application server transmission carries target data Request is carried, so that the application server obtains the corresponding original URL of the data name;
Finger URL detection unit, for obtaining the original URL that the application server returns, and to described original URL is detected;
Alternate request transmitting element, for when detect the original URL for be held as a hostage URL when, to the application service Device sends the alternative download request for carrying the data name, so that the application server obtains the data name and corresponds to Alternative URL;
First data volume acquiring unit, for obtaining the alternative URL that the application server returns, and described in use Alternative URL obtains the first data volume of the target data;
Data download unit is small for working as the error between the preset data amount of first data volume and the target data When predetermined threshold value, the target data is downloaded in the application server using the alternative URL.
In embodiments of the present invention, it is standby by being asked to server when the original URL of target data is to be held as a hostage URL URL is selected, and Preliminary detection is carried out to the first data volume of the corresponding target datas of alternative URL, when the first data volume and present count When being less than or equal to predetermined threshold value according to the error between amount, target data is downloaded using alternative URL.By the way that in original URL, there are quilts Alternative URL in the case of abduction behavior is provided, and provides theoretical data volume as the basis for estimation whether being held as a hostage to URL, The security of data download is effectively guaranteed, improves the accuracy of data, and then ensure that the efficiency that data are downloaded.
Description of the drawings
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram of data download method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another data download method provided in an embodiment of the present invention;
Fig. 3 is the structure diagram that a kind of data provided in an embodiment of the present invention download equipment;
Fig. 4 is the structure diagram that another data provided in an embodiment of the present invention download equipment;
Fig. 5 is the structure diagram of finger URL detection unit provided in an embodiment of the present invention;
Fig. 6 is the structure diagram of the first data volume acquiring unit provided in an embodiment of the present invention;
Fig. 7 is the structure diagram that another data provided in an embodiment of the present invention download equipment.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment belongs to the scope of protection of the invention.
Data download method provided in an embodiment of the present invention can be applied to in terminal data (such as:Terminal applies Data, multi-medium data etc.) scene that is downloaded, such as:Data download equipment and carry target to application server transmission The data download request of the data name of data, so that the application server obtains the corresponding original unification of the data name Resource Locator URL, the data download equipment and obtain the original URL that the application server returns, and to the original Beginning, URL was detected, and when it is to be held as a hostage URL to detect the original URL, the data download equipment to the application service Device sends the alternative download request for carrying the data name, so that the application server obtains the data name and corresponds to Alternative URL, the data download equipment and obtain the alternative URL that the application server returns, and using described alternative URL obtains the first data volume of the target data, when between the preset data amount of first data volume and the target data Error when being less than or equal to predetermined threshold value, the data download equipment using the alternative URL in the application server Download scene of the target data etc..Alternative URL is provided in the case of by there is behavior of being held as a hostage in original URL, and is carried For theoretical data volume as the basis for estimation whether being held as a hostage to URL, the security of data download is effectively guaranteed, is promoted The accuracys of data, and then ensure that the efficiency that data are downloaded.
The present embodiments relate to data download equipment can include:Tablet computer, smart mobile phone, laptop, The terminal devices such as palm PC, personal computer and mobile internet device (MID);The application server can be to provide The URL and the background service equipment of storage data that data are downloaded;The target data can be terminal applies data, multimedia The terminal data that the needs such as data are downloaded from application server.
Below in conjunction with attached drawing 1 and attached drawing 2, it is situated between in detail to a kind of data download method provided in an embodiment of the present invention It continues.
Fig. 1 is referred to, for an embodiment of the present invention provides a kind of flow diagrams of data download method.As shown in Figure 1, The embodiment of the present invention the method may include following steps S101- steps S105.
S101 carries the data download request of the data name of target data to application server transmission;
Specifically, data download equipment can send the data for the data name for carrying target data to application server Download request, the application server obtains the corresponding original URL of the data name, and the original URL is sent to institute It states data and downloads equipment, the original URL is that the application server is downloaded for the acquiescence set by the target data URL。
S102 obtains the original URL that the application server returns, and the original URL is detected;
Specifically, the data, which download equipment, obtains the original URL that the application server returns, it can be right in advance The original URL is detected, such as:Using the original URL under the reality that application server obtains the target data The size of data of load, and the size of data of actual download and the error of gross data size are detected, if the error is more than default threshold During value, the data, which download equipment, can determine that the original URL there is a situation where to be distorted by external network malice, the data The original URL can be determined as the URL that is held as a hostage by downloading equipment.
S103 when it is to be held as a hostage URL to detect the original URL, is carried described to application server transmission The alternative download request of data name;
Specifically, when it is to be held as a hostage URL that the data, which download equipment to detect the original URL of target data, the number It can be to application server transmission for the alternative download request of the target data, the alternative download request according to equipment is downloaded Can carry the data name of the target data, it is described seized on both sides by the arms URL for represent the URL currently obtained (such as: Original URL) there is a situation where to be distorted by external network malice, the original URL is directed to the target for the application server The URL that acquiescence set by data is downloaded.The application server can obtain the corresponding alternative URL of the data name.
It should be noted that be less than when the error between the preset data amount of second data volume and the target data or During equal to predetermined threshold value, such as error is less than or equal to 1KB, and the data download equipment can be determined as effectively downloading original URL, the data download equipment may be employed the original URL and the target data downloaded in the application server.
S104 obtains the alternative URL that the application server returns, and obtains the mesh using the alternative URL Mark the first data volume of data;
Specifically, the data, which download equipment, obtains the alternative URL that the application server returns, and may be employed The alternative URL obtains the first data volume of the target data, that is, obtains the target data of the alternative URL instructions The size of data of actual download.
S105 is preset when the error between the preset data amount of first data volume and the target data is less than or equal to During threshold value, the target data is downloaded in the application server using the alternative URL;
Specifically, when the error between the preset data amount of first data volume and the target data is less than or equal in advance If during threshold value, such as error is less than or equal to 1KB, the data download equipment can determine the alternative URL, and there is no outer The situation that portion's network malice is distorted, the alternative URL as effectively downloaded, the data download equipment may be employed described alternative URL downloads the target data in the application server.
In embodiments of the present invention, it is standby by being asked to server when the original URL of target data is to be held as a hostage URL URL is selected, and Preliminary detection is carried out to the first data volume of the corresponding target datas of alternative URL, when the first data volume and present count When being less than or equal to predetermined threshold value according to the error between amount, target data is downloaded using alternative URL.By the way that in original URL, there are quilts Alternative URL in the case of abduction behavior is provided, and provides theoretical data volume as the basis for estimation whether being held as a hostage to URL, The security of data download is effectively guaranteed, improves the accuracy of data, and then ensure that the efficiency that data are downloaded.
Fig. 2 is referred to, is the flow diagram an embodiment of the present invention provides another data download method.Such as Fig. 2 institutes Show, the embodiment of the present invention the method may include following steps S201- steps S208.
S201 carries the data download request of the data name of target data to application server transmission;
Specifically, data download equipment can send the data for the data name for carrying target data to application server Download request, the application server obtains the corresponding original URL of the data name, and the original URL is sent to institute It states data and downloads equipment, the original URL is that the application server is downloaded for the acquiescence set by the target data URL。
Certainly, in order to ensure the rate of data download, the application server can be adjusted dynamically to the target data The original URL set, such as:The current geographic position information that equipment can be downloaded according to the data carries out original URL Configuration, optionally, the data download equipment can send the data name that carry target data to the application server Claim and the data download request of current geographic position information, the application server obtain the corresponding URL of the data name List, the application server determine original URL associated with the current geographic position information in the url list, Such as:The current geographic position information, which is designated as the data, to be downloaded equipment and is located at Shenzhen, then the application server can be with It is obtained in the url list and is sent to the data download equipment with the associated original URL in Shenzhen, the data download equipment It can be based on target data described in server acquisition requests of the original URL into the application server positioned at Shenzhen, to subtract The time delay of few data transmission;Similarly, the stability that can also be downloaded according to the history of URL carries out configuration of original URL etc., specifically Mode may refer to above-mentioned implementation procedure, herein without repeating.
S202 obtains the original URL that the application server returns, and obtains the mesh using the original URL Mark the second data volume of data;
Specifically, the data, which download equipment, obtains the original URL that the application server returns, and described in use Original URL obtains the second data volume of the target data, that is, obtains the reality of the target data of the original URL instructions The size of data of download, the data, which download equipment, can further obtain the pre- of second data volume and the target data If the error between data volume, i.e., the difference between described second data volume and the preset data amount, the preset data amount is The data download the gross data size that the target data is previously stored in equipment.
S203, when the error between the preset data amount of second data volume and the target data is more than predetermined threshold value When, the original URL is determined as the URL that is held as a hostage;
Specifically, when the error between the preset data amount of second data volume and the target data is more than predetermined threshold value When, such as error, more than 1KB, the data, which download equipment, can determine that the original URL is distorted in the presence of by external network malice Situation, the data, which download equipment, can determine the original URL as the URL that is held as a hostage.
S204 when it is to be held as a hostage URL to detect the original URL, is carried described to application server transmission The alternative download request of data name;
Specifically, when it is to be held as a hostage URL that data, which download equipment to detect the original URL of target data, under the data Alternative download request for the target data can be sent to application server by carrying equipment, and the alternative download request can be with Carry the data name of the target data, it is described seized on both sides by the arms URL for represent the URL currently obtained (such as:It is original URL) there is a situation where to be distorted by external network malice, further, the application server can obtain the data name Corresponding alternative url list, the alternative url list include at least one URL in addition to the original URL.
It should be noted that be less than when the error between the preset data amount of second data volume and the target data or During equal to predetermined threshold value, such as error is less than or equal to 1KB, and the data download equipment can be determined as effectively downloading original URL, the data download equipment may be employed the original URL and the target data downloaded in the application server.
S205 obtains the alternative url list that the application server returns;
S206 chooses current URL alternately URL according to putting in order at least one URL, and using described standby URL is selected to obtain the first data volume of the target data;
Specifically, the data, which download equipment, can obtain the alternative url list that the application server returns, the number Current URL alternately URL can be chosen according to equipment is downloaded according to putting in order at least one URL, it is possible to understand that It is that the data, which download equipment, to obtain a URL alternately successively according to putting in order at least one URL URL, and using the first data volume of the alternative URL acquisitions target data, the data download equipment can be further Obtain the error between the preset data amount of first data volume and the target data, i.e., described first data volume with it is described pre- If the difference between data volume, the preset data amount is downloaded in equipment for the data and is previously stored with the target data Gross data size.
S207 is preset when the error between the preset data amount of first data volume and the target data is less than or equal to During threshold value, the target data is downloaded in the application server using the alternative URL;
Specifically, when the error between the preset data amount of first data volume and the target data is less than or equal in advance If during threshold value, such as error is less than or equal to 1KB, the data download equipment can determine the alternative URL, and there is no outer The situation that portion's network malice is distorted, the alternative URL as effectively downloaded, the data download equipment may be employed described alternative URL downloads the target data in the application server.
S208, when the error between the preset data amount of first data volume and the target data is more than predetermined threshold value When, by next URL of the current URL alternately URL;
Specifically, when the error between the preset data amount of first data volume and the target data is more than predetermined threshold value When, such as error is more than 1KB, that is, represents that the current URL there is a situation where maliciously to be distorted by external network, for the URL that is held as a hostage, The data download equipment can be by next URL of the current URL alternately URL, i.e., according at least one URL Put in order and obtain next URL of the current URL alternately URL, the data are downloaded equipment and can be transferred to again Perform the step of the first data volume that the target data is obtained using the alternative URL in the step S206 of the embodiment of the present invention Suddenly, the error between the preset data amount of first data volume and the target data and is obtained again and is judged, until It detects at least one URL there are the error between first data volume and the preset data amount less than or equal to pre- If the alternative URL of threshold value, if there is no the mistakes between first data volume and the preset data amount at least one URL Difference is less than or equal to the alternative URL of predetermined threshold value, then it represents that at least one URL has what is distorted by external network malice Situation, the data, which download equipment, can export the prompt message that can not obtain the target data.
In embodiments of the present invention, it is standby by being asked to server when the original URL of target data is to be held as a hostage URL URL is selected, and Preliminary detection is carried out to the first data volume of the corresponding target datas of alternative URL, when the first data volume and present count When being less than or equal to predetermined threshold value according to the error between amount, target data is downloaded using alternative URL.By the way that in original URL, there are quilts Alternative URL in the case of abduction behavior is provided, and provides theoretical data volume as the basis for estimation whether being held as a hostage to URL, The security of data download is effectively guaranteed, improves the accuracy of data, and then ensure that the efficiency that data are downloaded;Pass through The modes such as stability are downloaded using geographical location information or history to adjust the original URL of target data into Mobile state, ensure that The rate that data are downloaded.
Below in conjunction with attached drawing 3- attached drawings 5, equipment is downloaded to data provided in an embodiment of the present invention and is described in detail.It needs It is noted that the data shown in attached drawing 3- attached drawings 5 download equipment, for performing the side of Fig. 1 of the present invention and embodiment illustrated in fig. 2 Method for convenience of description, illustrates only and does not disclose, refer to the relevant part of the embodiment of the present invention, particular technique details Fig. 1 of the present invention and embodiment shown in Fig. 2.
Fig. 3 is referred to, is that an embodiment of the present invention provides the structure diagrams that a kind of data download equipment.As shown in figure 3, The data of the embodiment of the present invention, which download equipment 1, to be included:Request of data transmitting element 11, finger URL detection unit 12, Alternate request transmitting element 13, the first data volume acquiring unit 14 and data download unit 15.
Request of data transmitting element 11, for carrying the data of the data name of target data to application server transmission Download request;
In the specific implementation, the request of data transmitting element 11 can be sent to application server carries target data The data download request of data name, the application server obtain the corresponding original URL of the data name, and by the original Beginning URL is sent to the data and downloads equipment, and the original URL is the application server for set by the target data Acquiescence download URL.
Finger URL detection unit 12, for obtaining the original URL that the application server returns, and to described original URL is detected;
In the specific implementation, the finger URL detection unit 12 obtains the original URL that the application server returns, it can To be detected in advance to the original URL, such as:The target data is obtained to application server using the original URL Actual download size of data, and the size of data of actual download and the error of gross data size are detected, if the error is big When predetermined threshold value, the finger URL detection unit 12 can determine that the original URL has what is distorted by external network malice Situation, the finger URL detection unit 12 can determine the original URL as the URL that is held as a hostage.
Alternate request transmitting element 13, for when it is to be held as a hostage URL to detect the original URL, being taken to the application Business device transmission carries the alternative download request of the data name;
In the specific implementation, when it is to be held as a hostage URL that data, which download equipment 1 to detect the original URL of target data, it is described standby The alternative download request for the target data can be sent to application server by selecting request transmitting unit 13, it is described it is alternative under The data name of the target data can be carried by carrying request, described to be seized on both sides by the arms URL for representing the URL currently obtained (such as:Original URL) there is a situation where to be distorted by external network malice, the original URL is directed to institute for the application server State the URL that the acquiescence set by target data is downloaded.It is corresponding alternative that the application server can obtain the data name URL。
It should be noted that be less than when the error between the preset data amount of second data volume and the target data or During equal to predetermined threshold value, such as error is less than or equal to 1KB, and the data, which download equipment 1, can be determined as the original effectively downloaded Beginning URL, the data download equipment 1 may be employed the original URL and the target data downloaded in the application server.
First data volume acquiring unit 14, for obtaining the alternative URL that the application server returns, and using institute State the first data volume that alternative URL obtains the target data;
In the specific implementation, the first data volume acquiring unit 14 obtains the described alternative of the application server return URL, and the first data volume that the alternative URL obtains the target data may be employed, that is, obtain the alternative URL instructions The size of data of the actual download of the target data.
Data download unit 15, for working as the error between the preset data amount of first data volume and the target data During less than or equal to predetermined threshold value, the target data is downloaded in the application server using the alternative URL;
In the specific implementation, when the error between the preset data amount of first data volume and the target data is less than or waits When predetermined threshold value, such as error is less than or equal to 1KB, and the data download unit 15 can determine that the alternative URL is not deposited In situation about being distorted by external network malice, the alternative URL as effectively downloaded, institute may be employed in the data download unit 15 It states alternative URL and the target data is downloaded in the application server.
In embodiments of the present invention, it is standby by being asked to server when the original URL of target data is to be held as a hostage URL URL is selected, and Preliminary detection is carried out to the first data volume of the corresponding target datas of alternative URL, when the first data volume and present count When being less than or equal to predetermined threshold value according to the error between amount, target data is downloaded using alternative URL.By the way that in original URL, there are quilts Alternative URL in the case of abduction behavior is provided, and provides theoretical data volume as the basis for estimation whether being held as a hostage to URL, The security of data download is effectively guaranteed, improves the accuracy of data, and then ensure that the efficiency that data are downloaded.
Fig. 4 is referred to, is that an embodiment of the present invention provides the structure diagrams that another data download equipment.Such as Fig. 4 institutes Show, the data of the embodiment of the present invention, which download equipment 1, to be included:Request of data transmitting element 11, finger URL detection unit 12nd, alternate request transmitting element 13, the first data volume acquiring unit 14, data download unit 15 and notification unit 16.
Request of data transmitting element 11, for carrying the data of the data name of target data to application server transmission Download request;
In the specific implementation, the request of data transmitting element 11 can be sent to application server carries target data The data download request of data name, the application server obtain the corresponding original URL of the data name, and by the original Beginning URL is sent to the data and downloads equipment 1, and the original URL is the application server for set by the target data The URL that the acquiescence put is downloaded.
Certainly, in order to ensure the rate of data download, the application server can be adjusted dynamically to the target data The original URL set, such as:The current geographic position information that equipment 1 can be downloaded according to the data carries out original URL Configuration, optionally, the request of data transmitting element 11 can to the application server send carry target data The data download request of data name and current geographic position information, the application server obtain the data name and correspond to Url list, the application server in the url list determine it is associated with the current geographic position information original URL, such as:The current geographic position information is designated as the data download equipment 1 and is located at Shenzhen, then the application server It can be obtained in the url list and be sent to the data with the associated original URL in Shenzhen and download equipment 1, under the data Carrying equipment 1 can be based on number of targets described in server acquisition requests of the original URL into the application server positioned at Shenzhen According to reduce the time delay of data transmission;Similarly, the stability that can also be downloaded according to the history of URL carries out the configuration of original URL Deng concrete mode may refer to above-mentioned implementation procedure, herein without repeating.
Finger URL detection unit 12, for obtaining the original URL that the application server returns, and to described original URL is detected;
In the specific implementation, the finger URL detection unit 12 obtains the original URL that the application server returns, it can To be detected in advance to the original URL, such as:The target data is obtained to application server using the original URL Actual download size of data, and the size of data of actual download and the error of gross data size are detected, if the error is big When predetermined threshold value, the finger URL detection unit 12 can determine that the original URL has what is distorted by external network malice Situation, the finger URL detection unit 12 can determine the original URL as the URL that is held as a hostage.
It is the structure diagram an embodiment of the present invention provides finger URL detection unit specifically, please also refer to Fig. 5. As described in Figure 5, the finger URL detection unit 12 can include:
Second data volume obtains subelement 121, for obtaining the original URL that the application server returns, and adopts The second data volume of the target data is obtained with the original URL;
In the specific implementation, second data volume, which obtains subelement 121, obtains the original that the application server returns Beginning URL, and using the second data volume of the original URL acquisitions target data, that is, obtain the institute that the original URL is indicated The size of data of the actual download of target data is stated, the second data volume acquisition subelement 121 can further obtain described Error between the preset data amount of second data volume and the target data, i.e., described second data volume and the preset data amount Between difference, the preset data amount downloads for the data and the theoretical value of the target data is previously stored in equipment 1 According to size.
Determination subelement 122, for working as the error between the preset data amount of second data volume and the target data During more than predetermined threshold value, the original URL is determined as the URL that is held as a hostage;
In the specific implementation, it is preset when the error between the preset data amount of second data volume and the target data is more than During threshold value, such as error is more than 1KB, and the determination subelement 122 can determine that the original URL exists by external network malice Situation about distorting, the determination subelement 122 can determine the original URL as the URL that is held as a hostage.
Alternate request transmitting element 13, for when it is to be held as a hostage URL to detect the original URL, being taken to the application Business device transmission carries the alternative download request of the data name;
In the specific implementation, when it is to be held as a hostage URL that the data, which download equipment 1 to detect the original URL of target data, institute The alternative download request for being directed to the target data can be sent to application server by stating alternate request transmitting element 13, described standby Select download request that can carry the data name of the target data, it is described to be seized on both sides by the arms URL for representing currently to have obtained URL (such as:Original URL) there is a situation where to be distorted by external network malice, further, the application server can obtain The corresponding alternative url list of the data name is taken, the alternative url list includes at least one in addition to the original URL URL。
It should be noted that be less than when the error between the preset data amount of second data volume and the target data or During equal to predetermined threshold value, such as error is less than or equal to 1KB, and the data, which download equipment 1, can be determined as the original effectively downloaded Beginning URL, the data download equipment 1 may be employed the original URL and the target data downloaded in the application server.
First data volume acquiring unit 14, for obtaining the alternative URL that the application server returns, and using institute State the first data volume that alternative URL obtains the target data;
In the specific implementation, the first data volume acquiring unit 14 obtains the described alternative of the application server return URL, and the first data volume that the alternative URL obtains the target data may be employed, that is, obtain the alternative URL instructions The size of data of the actual download of the target data.
It is the structural representation an embodiment of the present invention provides the first data volume acquiring unit specifically, please also refer to Fig. 6 Figure.As described in Figure 6, the first data volume acquiring unit 14 can include:
List obtains subelement 141, for obtaining the alternative url list that the application server returns;
First data volume obtains subelement 142, for choosing current URL according to putting in order at least one URL Alternately URL, and using the first data volume of the alternative URL acquisitions target data;
In the specific implementation, the list, which obtains subelement 141, can obtain the alternative URL column that the application server returns Table, first data volume, which obtains subelement 142, to choose current URL works according to putting in order at least one URL For alternative URL, it is to be understood that the data download equipment 1 can putting in order successively according at least one URL A URL alternately URL are obtained, and the first data volume of the target data is obtained using the alternative URL, described first Data volume acquisition subelement 142 can be obtained further between the preset data amount of first data volume and the target data Error, i.e., the difference between described first data volume and the preset data amount, the preset data amount are downloaded for the data The gross data size of the target data is previously stored in equipment 1.
Data download unit 15, for working as the error between the preset data amount of first data volume and the target data During less than or equal to predetermined threshold value, the target data is downloaded in the application server using the alternative URL;
In the specific implementation, when the error between the preset data amount of first data volume and the target data is less than or waits When predetermined threshold value, such as error is less than or equal to 1KB, and the data download unit 15 can determine that the alternative URL is not deposited In situation about being distorted by external network malice, the alternative URL as effectively downloaded, institute may be employed in the data download unit 15 It states alternative URL and the target data is downloaded in the application server.
Notification unit 16 is more than for working as the error between the preset data amount of first data volume and the target data During predetermined threshold value, by next URL of the current URL alternately URL, and notify the first data volume acquiring unit 14 It performs and the first data volume of the target data is obtained using the alternative URL, until detecting first data volume and institute The error stated between the preset data amount of target data is less than or equal to predetermined threshold value;
In the specific implementation, it is preset when the error between the preset data amount of first data volume and the target data is more than During threshold value, such as error is more than 1KB, that is, represents that the current URL there is a situation where to be distorted by external network malice, to be held as a hostage URL, the notification unit 16 can be by next URL of the current URL alternately URL, i.e., according to described at least one The putting in order of URL obtains next URL of the current URL, and alternately URL, the notification unit 16 can notify again The first data volume acquiring unit 14 is transferred to execution using the first data volume of the alternative URL acquisitions target data Step, and obtain the error between the preset data amount of first data volume and the target data again and judged, directly To be less than or equal to detecting at least one URL that there are the errors between first data volume and the preset data amount The alternative URL of predetermined threshold value, if being not present at least one URL between first data volume and the preset data amount Error is less than or equal to the alternative URL of predetermined threshold value, then it represents that at least one URL exists to be distorted by external network malice Situation, the data, which download equipment 1, can export the prompt message that can not obtain the target data.
In embodiments of the present invention, it is standby by being asked to server when the original URL of target data is to be held as a hostage URL URL is selected, and Preliminary detection is carried out to the first data volume of the corresponding target datas of alternative URL, when the first data volume and present count When being less than or equal to predetermined threshold value according to the error between amount, target data is downloaded using alternative URL.By the way that in original URL, there are quilts Alternative URL in the case of abduction behavior is provided, and provides theoretical data volume as the basis for estimation whether being held as a hostage to URL, The security of data download is effectively guaranteed, improves the accuracy of data, and then ensure that the efficiency that data are downloaded;Pass through The modes such as stability are downloaded using geographical location information or history to adjust the original URL of target data into Mobile state, ensure that The rate that data are downloaded.
Fig. 7 is referred to, is that an embodiment of the present invention provides the structure diagrams that another data downloads equipment.Such as Fig. 7 institutes Show, the data, which download equipment 1000, to be included:At least one processor 1001, such as CPU, at least one network interface 1004, user interface 1003, memory 1005, at least one communication bus 1002.Wherein, communication bus 1002 is used to implement this Connection communication between a little components.Wherein, user interface 1003 can include display screen (Display), keyboard (Keyboard), Optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 can optionally include Standard wireline interface and wireless interface (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory or non- Unstable memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 1005 is optionally gone back It can be at least one storage device for being located remotely from aforementioned processor 1001.It is situated between as shown in fig. 7, being stored as a kind of computer It can include operating system, network communication module, Subscriber Interface Module SIM and data in the memory 1005 of matter to download using journey Sequence.
In data shown in Fig. 7 download equipment 1000, user interface 1003 is mainly used for providing connecing for input to the user Mouthful, obtain data input by user;And processor 1001 can be used for the data stored in memory 1005 is called to download application Program, and specifically perform following operation:
The data download request of the data name of target data is carried to application server transmission, so that the application takes The corresponding original URL of the device acquisition data name of being engaged in;
The original URL that the application server returns is obtained, and the original URL is detected;
When it is to be held as a hostage URL to detect the original URL, the data name is carried to application server transmission The alternative download request claimed, so that the application server obtains the corresponding alternative URL of the data name;
The alternative URL that the application server returns is obtained, and the target data is obtained using the alternative URL The first data volume;
When the error between the preset data amount of first data volume and the target data is less than or equal to predetermined threshold value When, the target data is downloaded in the application server using the alternative URL.
In one embodiment, the processor 1001 is performing the described original of the acquisition application server return URL, and when being detected to the original URL, it is specific to perform following operation:
The data download request of the data name of target data is carried to application server transmission, so that the application takes The corresponding original URL of the device acquisition data name of being engaged in;
The original URL that the application server returns is obtained, and the target data is obtained using the original URL The second data volume;
When the error between the preset data amount of second data volume and the target data is more than predetermined threshold value, determine The original URL is the URL that is held as a hostage.
In one embodiment, the processor 1001 carries the data in execution to application server transmission The alternative download request of title is specific to perform during so that the application server obtaining the corresponding alternative URL of the data name It operates below:
The data that the data name and current geographic position information are carried to application server transmission are downloaded Request so that the application server obtains the corresponding url list of the data name, makes the application server described Original URL associated with the current geographic position information is determined in url list.
In one embodiment, the processor 1001 is performing the described alternative of the acquisition application server return URL, and when obtaining the first data volume of the target data using the alternative URL, it is specific to perform following operation:
The alternative url list that the application server returns is obtained, the alternative url list is included except the original URL Outer at least one URL;
Current URL alternately URL are chosen according to putting in order at least one URL, and use the alternative URL Obtain the first data volume of the target data.
In one embodiment, the processor 1001 also performs following operation:
When the error between the preset data amount of first data volume and the target data is more than predetermined threshold value, by institute State next URL alternately URL, and perform the first number that the target data is obtained using the alternative URL of current URL The step of according to amount, the error between detecting the preset data amount of first data volume and the target data is less than or waits In predetermined threshold value.
In embodiments of the present invention, it is standby by being asked to server when the original URL of target data is to be held as a hostage URL URL is selected, and Preliminary detection is carried out to the first data volume of the corresponding target datas of alternative URL, when the first data volume and present count When being less than or equal to predetermined threshold value according to the error between amount, target data is downloaded using alternative URL.By the way that in original URL, there are quilts Alternative URL in the case of abduction behavior is provided, and provides theoretical data volume as the basis for estimation whether being held as a hostage to URL, The security of data download is effectively guaranteed, improves the accuracy of data, and then ensure that the efficiency that data are downloaded;Pass through The modes such as stability are downloaded using geographical location information or history to adjust the original URL of target data into Mobile state, ensure that The rate that data are downloaded.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly It encloses, therefore equivalent variations made according to the claims of the present invention, it is still within the scope of the present invention.

Claims (10)

1. a kind of data download method, which is characterized in that including:
The data download request of the data name of target data is carried to application server transmission, so that the application server Obtain the corresponding original uniform resource position mark URL of the data name;
The original URL that the application server returns is obtained, and the original URL is detected;
When it is to be held as a hostage URL to detect the original URL, the data name is carried to application server transmission Alternative download request, so that the application server obtains the corresponding alternative URL of the data name;
It obtains the alternative URL that the application server returns, and the of the target data is obtained using the alternative URL One data volume;
When the error between the preset data amount of first data volume and the target data is less than or equal to predetermined threshold value, adopt The target data is downloaded in the application server with the alternative URL.
2. according to the method described in claim 1, it is characterized in that, described obtain the described original of the application server return URL, and the original URL is detected, including:
It obtains the original URL that the application server returns, and the of the target data is obtained using the original URL Two data volumes;
When the error between the preset data amount of second data volume and the target data is more than predetermined threshold value, determine described Original URL is the URL that is held as a hostage.
3. according to the method described in claim 2, it is characterized in that, described carry the number to application server transmission According to the alternative download request of title, so that the application server obtains the corresponding alternative URL of the data name, including:
The data name and the data download request of current geographic position information are carried to application server transmission, So that the application server obtains the corresponding url list of the data name, make the application server in the url list In determine original URL associated with the current geographic position information.
4. according to the method described in claim 1, it is characterized in that, described obtain the described alternative of the application server return URL, and the first data volume of the alternative URL acquisitions target data is used, including:
The alternative url list that the application server returns is obtained, the alternative url list is included in addition to the original URL At least one URL;
Current URL alternately URL are chosen according to putting in order at least one URL, and are obtained using the alternative URL First data volume of the target data.
5. it according to the method described in claim 4, it is characterized in that, further includes:
When the error between the preset data amount of first data volume and the target data is more than predetermined threshold value, described will work as Next URL of preceding URL alternately URL, and perform the first data volume that the target data is obtained using the alternative URL The step of, the error between detecting the preset data amount of first data volume and the target data is less than or equal to pre- If threshold value.
6. a kind of data download equipment, which is characterized in that including:
Request of data transmitting element, the data for carrying the data name of target data to application server transmission are downloaded please It asks, so that the application server obtains the corresponding original URL of the data name;
Finger URL detection unit, for obtaining the original URL that the application server returns, and to the original URL into Row detection;
Alternate request transmitting element, for when it is to be held as a hostage URL to detect the original URL, being sent out to the application server The alternative download request for carrying the data name is sent, so that the application server acquisition data name is corresponding standby Select URL;
First data volume acquiring unit, for obtaining the alternative URL that the application server returns, and using described alternative URL obtains the first data volume of the target data;
Data download unit, for work as the error between the preset data amount of first data volume and the target data be less than or During equal to predetermined threshold value, the target data is downloaded in the application server using the alternative URL.
7. equipment according to claim 6, which is characterized in that the finger URL detection unit includes:
Second data volume obtains subelement, for obtaining the original URL that the application server returns, and uses the original Beginning URL obtains the second data volume of the target data;
Determination subelement, for working as the error between the preset data amount of second data volume and the target data more than default During threshold value, the original URL is determined as the URL that is held as a hostage.
8. equipment according to claim 7, which is characterized in that the request of data transmitting element, which is specifically used for working as, to be detected The original URL is when being held as a hostage URL, and the data name and current geographic position are carried to application server transmission The data download request of confidence breath so that the application server obtains the corresponding url list of the data name, makes described answer Original URL associated with the current geographic position information is determined in the url list with server.
9. equipment according to claim 6, which is characterized in that the first data volume acquiring unit includes:
List obtains subelement, for obtaining the alternative url list that the application server returns, the alternative url list bag Include at least one URL in addition to the original URL;
First data volume obtains subelement, for choosing current URL alternately according to putting in order at least one URL URL, and using the first data volume of the alternative URL acquisitions target data.
10. equipment according to claim 9, which is characterized in that further include:
Notification unit is more than default threshold for working as the error between the preset data amount of first data volume and the target data During value, by next URL of the current URL alternately URL, and the first data volume acquiring unit is notified to perform use The alternative URL obtains the first data volume of the target data, until detecting first data volume and the number of targets According to preset data amount between error be less than or equal to predetermined threshold value.
CN201611059732.3A 2016-11-25 2016-11-25 Data downloading method and equipment thereof Active CN108111561B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611059732.3A CN108111561B (en) 2016-11-25 2016-11-25 Data downloading method and equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611059732.3A CN108111561B (en) 2016-11-25 2016-11-25 Data downloading method and equipment thereof

Publications (2)

Publication Number Publication Date
CN108111561A true CN108111561A (en) 2018-06-01
CN108111561B CN108111561B (en) 2021-03-02

Family

ID=62205425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611059732.3A Active CN108111561B (en) 2016-11-25 2016-11-25 Data downloading method and equipment thereof

Country Status (1)

Country Link
CN (1) CN108111561B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020206662A1 (en) * 2019-04-11 2020-10-15 深圳市欢太科技有限公司 Browser anti-hijacking method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8230499B1 (en) * 2008-05-29 2012-07-24 Symantec Corporation Detecting and blocking unauthorized downloads
CN102663060A (en) * 2012-03-30 2012-09-12 奇智软件(北京)有限公司 Method and device for identifying tampered webpage
CN102752326A (en) * 2011-04-19 2012-10-24 腾讯科技(深圳)有限公司 Method, client, server and system for processing data in file downloading
CN104079673A (en) * 2014-07-30 2014-10-01 北京奇虎科技有限公司 Method, device and system for preventing DNS hijack during application download
CN104239577A (en) * 2014-10-09 2014-12-24 北京奇虎科技有限公司 Method and device for detecting authenticity of webpage data
CN104283933A (en) * 2013-07-12 2015-01-14 腾讯科技(深圳)有限公司 Data downloading method, client-side and system
CN105227673A (en) * 2015-10-16 2016-01-06 北京奇虎科技有限公司 The data download method of anti-abduction, client, server and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8230499B1 (en) * 2008-05-29 2012-07-24 Symantec Corporation Detecting and blocking unauthorized downloads
CN102752326A (en) * 2011-04-19 2012-10-24 腾讯科技(深圳)有限公司 Method, client, server and system for processing data in file downloading
CN102663060A (en) * 2012-03-30 2012-09-12 奇智软件(北京)有限公司 Method and device for identifying tampered webpage
CN104283933A (en) * 2013-07-12 2015-01-14 腾讯科技(深圳)有限公司 Data downloading method, client-side and system
CN104079673A (en) * 2014-07-30 2014-10-01 北京奇虎科技有限公司 Method, device and system for preventing DNS hijack during application download
CN104239577A (en) * 2014-10-09 2014-12-24 北京奇虎科技有限公司 Method and device for detecting authenticity of webpage data
CN105227673A (en) * 2015-10-16 2016-01-06 北京奇虎科技有限公司 The data download method of anti-abduction, client, server and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020206662A1 (en) * 2019-04-11 2020-10-15 深圳市欢太科技有限公司 Browser anti-hijacking method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108111561B (en) 2021-03-02

Similar Documents

Publication Publication Date Title
EP3657358B1 (en) Method, device and system for persistent data processing, and readable storage medium
EP2575322A1 (en) Method, user equipment, server, and device for sharing information
US20140173269A1 (en) Event Sharing Protocol for Data Processing Devices
CN103942225A (en) Method and system for invoking resources of Hybrid App client and client
EP3259900B1 (en) Process for real-time data exchange between users on a phone call
CN106375860B (en) Video playing method, device, terminal and server
CN106203184B (en) A kind of keyboard output method and terminal
TW201005317A (en) Method, apparatus, and computer program product for location sharing
CN111654382B (en) Message processing method, device, computer equipment and computer readable storage medium
US9619159B2 (en) Storage management system
RU2608670C2 (en) Method, device and terminal for prompt of sns system application
CN103475937A (en) Method and device for creating shortcut at digital television terminal
CN108241515B (en) Application shortcut establishing method and terminal
CN108111561A (en) A kind of data download method and its equipment
KR102445530B1 (en) Method and apparatus for visualization of public welfare activities
CN107423139A (en) A kind of method and device shared
JP2019512984A (en) Method, apparatus and system for checking change of telephone number
CN106775815B (en) Application data migration method and device
EP2534586B1 (en) Managing a navigation history
CN104516774A (en) Operation method of remote application, terminal and server
CN107535013B (en) Service processing method and terminal
CN114281449A (en) Building visual display processing method and related equipment
CN114282760A (en) Workflow generation method and device combining dynamic form and dynamic flow
US11055422B2 (en) Method for sharing a digital image between a first user terminal and at least one second user terminal over a communications network
CN106162540A (en) Location-based information push method and device

Legal Events

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