CN111526185B - Data downloading method, device, system and storage medium - Google Patents

Data downloading method, device, system and storage medium Download PDF

Info

Publication number
CN111526185B
CN111526185B CN202010277505.8A CN202010277505A CN111526185B CN 111526185 B CN111526185 B CN 111526185B CN 202010277505 A CN202010277505 A CN 202010277505A CN 111526185 B CN111526185 B CN 111526185B
Authority
CN
China
Prior art keywords
data
downloading
address information
client
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010277505.8A
Other languages
Chinese (zh)
Other versions
CN111526185A (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.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN202010277505.8A priority Critical patent/CN111526185B/en
Publication of CN111526185A publication Critical patent/CN111526185A/en
Application granted granted Critical
Publication of CN111526185B publication Critical patent/CN111526185B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities

Abstract

The embodiment of the application discloses a data downloading method, a device, a system and a storage medium, which relate to the technical field of Internet and comprise the following steps: the client sets a corresponding data downloading switching identifier according to the current downloading retry number, and sends the data downloading switching identifier to the server; and the server returns the download address information to the client so that the client downloads data according to the download address information. By adopting the scheme, the technical problem that the user cannot obtain required data when a fault occurs because the downloading flow of the user cannot be intervened in the prior art can be solved.

Description

Data downloading method, device, system and storage medium
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to a data downloading method, device and system and a storage medium.
Background
With the development and popularization of internet technology, the internet has been deeply buried in the daily work and life of people. The user can obtain required data (such as information, file resources, video resources and the like) through the internet. Currently, data can be stored in a cloud storage manner or in a Content Delivery Network (CDN) manner. Accordingly, the user can download or access the data through the storage address of the data. However, when a machine room device for cloud storage fails or a CDN single point device for storing data fails, a downloading process of a user cannot be interfered, and at this time, the user can still download data, but the data is usually unavailable (i.e., damaged), so that the user cannot obtain the required data.
Disclosure of Invention
The application provides a data downloading method, device, system and storage medium, which aim to solve the technical problem that a user cannot obtain required data when equipment fails due to the fact that a downloading flow of the user cannot be interfered in the prior art.
In a first aspect, an embodiment of the present application provides a data downloading method, including:
the client sets a corresponding data downloading switching identifier according to the current downloading retry number, and sends the data downloading switching identifier to the server;
the server side acquires corresponding downloading address information according to the data downloading switching identification;
and the server returns the download address information to the client so that the client downloads data according to the download address information.
Further, the step of the server obtaining the corresponding download address information according to the data download switching identifier includes:
the server side determines domain name address information corresponding to the data downloading switching identifier according to domain name configuration information, wherein the domain name configuration information records the corresponding relation between the domain name address information and the data downloading switching identifier;
and the server side assembles the domain name address information to obtain downloading address information.
Further, the method also comprises the following steps:
and the server side updates the domain name configuration information at regular time according to the weight sequence of the domain name address information.
Further, the updating, by the server, the domain name configuration information at regular time according to the weight sequence of the domain name address information includes:
the server side regularly acquires the weight sequence of domain name address information and updates the domain name configuration information according to the weight sequence; and/or the presence of a gas in the atmosphere,
the server side determines the weight sequence of the domain name address information through fault notification information corresponding to the domain name address information, and updates the domain name configuration information according to the weight sequence; and/or the presence of a gas in the gas,
and the server side determines the weight sequence of the corresponding domain name address information through the download failure information returned by the client side, and updates the domain name configuration information according to the weight sequence.
Further, after the server returns the download address information to the client, the method further includes:
and the client accesses a content distribution network according to the download address information so that the content distribution network returns data to the client according to the download address information.
Further, the accessing, by the client, the content distribution network according to the download address information, so that the returning, by the content distribution network, data to the client according to the download address information includes:
the client accesses a content distribution network according to the download address information;
the content distribution network confirms whether data corresponding to the download address information exists in the cache of the content distribution network;
if the corresponding data exists, the content distribution network returns the data to the client;
if the corresponding data does not exist, the content distribution network returns the source to the corresponding source server;
and the source server side returns the data to the content distribution network so that the content distribution network returns the data to the client side.
Further, the returning the data to the content distribution network by the source server side includes:
the source server side confirms whether data corresponding to the downloading address information exist or not;
if the corresponding data exists, the source server returns the data to the content distribution network;
and if the corresponding data does not exist, the source server end pulls the corresponding data through the mirror image file and returns the data to the content distribution network.
In a second aspect, an embodiment of the present application further provides a data downloading apparatus, including:
the identifier setting module is configured at the client and used for setting a corresponding data downloading switching identifier according to the current downloading retry times and sending the data downloading switching identifier to the server;
the address acquisition module is configured at the server end and used for acquiring corresponding download address information according to the data download switching identifier;
and the address returning module is configured at the server side and used for returning the downloading address information to the client side so as to enable the client side to download data according to the downloading address information.
In a third aspect, an embodiment of the present application further provides a data downloading system, including a server and a client;
the client is used for setting a corresponding data downloading switching identifier according to the current downloading retry times, sending the data downloading switching identifier to the server and downloading data according to the downloading address information returned by the server;
the server is used for acquiring corresponding downloading address information according to the data downloading switching identification and returning the downloading address information to the client.
In a fourth aspect, embodiments of the present application further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for performing the data downloading method according to the first aspect.
According to the data downloading method, the device, the system and the storage medium, the client sets the corresponding data downloading switching identification according to the current downloading retry times and sends the corresponding data downloading switching identification to the server, and then the server determines the downloading address information corresponding to the data downloading switching identification and feeds the downloading address information back to the client, so that the client carries out data downloading based on the downloading address information. When the equipment fails (namely, downloading fails), the client can update the data downloading switching identifier and feed back the data downloading switching identifier to the server so as to acquire new downloading address information through the server and download the data, namely, the downloading address information is replaced by the data downloading switching identifier, so that automatic downloading retry is realized, a user can obtain required data, the success rate of data downloading is increased, and the use experience of the user is improved.
Drawings
Fig. 1 is a flowchart of a data downloading method according to an embodiment of the present application;
fig. 2 is a flowchart of a data downloading method according to a second embodiment of the present application;
fig. 3 is a block diagram of a data flow provided in the second embodiment of the present application;
fig. 4 is a schematic structural diagram of a data downloading device according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of a data downloading system according to a fourth embodiment of the present application;
fig. 6 is a schematic structural diagram of a data downloading device according to a fifth embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures associated with the present application are shown in the drawings, not all of them.
Example one
Fig. 1 is a flowchart of a data downloading method according to an embodiment of the present application. The data download method provided in the embodiments may be performed by a data download system. The data downloading system at least comprises a client used by a user and a server for managing downloading addresses, and optionally comprises a CDN for storing data. The client acquires the address of the stored data through the server and downloads the corresponding data through the address. At this time, referring to fig. 1, the data downloading method specifically includes:
and step 110, the client sets a corresponding data downloading switching identifier according to the current downloading retry number, and sends the data downloading switching identifier to the server.
Typically, before downloading data, the client generates a data downloading switching identifier, and sends the data downloading switching identifier to the server. The specific type of the data downloaded by the client is not limited. Client download data may also be understood as a client download resource.
Further, the data download switching identifier is used to notify the server of the number of retry download times of the client to the data in the current download process. Optionally, the data download switching identifier is set according to the number of download retries. After downloading failure (such as downloading damaged data or failing to download data) each time, the client downloads the data again, and the corresponding download retry number is increased by 1. For example, the client generates a data download switching identifier when executing the download task. In the present downloading task, the number of downloading retries is 0 when downloading for the first time, and correspondingly, the data downloading switching identifier is 0. Then, if the client fails to download based on the current download address information, the client retries the downloading, i.e. re-attempts the downloading. At this time, the number of download retries is 1, and accordingly, the data download switching flag is updated to 1, and so on. If the current download retry number of the client is 4, the corresponding data download switching identifier is 4.
Optionally, the data download switching identifier may be placed in a request header of the download request, and then the data download switching identifier is sent to the server by sending the download request. Specifically, the server side may include at least one server. When the server side includes a plurality of servers, the plurality of servers may perform different functions, for example, the server side includes a service server that interacts with the client side and stores the download addresses, and a cloud storage server that manages the download addresses stored in the service server side. It is understood that when the server side includes one server, one server may integrate a plurality of functions. Further, the server and the client can perform data communication. The specific embodiment of the data communication means is not limited thereto.
And step 120, the server side acquires corresponding download address information according to the data download switching identifier.
Specifically, the server stores the corresponding relationship between the data download switching identifier and the download address information in advance, and at this time, different data download switching identifiers correspond to different download address information. The download address information includes an address of the data stored in the internet, and the client may obtain the address of the stored data through the download address information, for example, the download address information may be an IP address. The download address information may also contain the file name of the data. Typically, each item of data may be stored in a different device (e.g., a different node of the CDN or a different cloud storage), and in this case, there may be multiple download address data for each item of data. Further, the server side obtains a plurality of download address data, and allocates a data download switching identifier for each download address data. That is, the server stores the corresponding relationship between the data download switching identifier and the download address information of each item of data.
When the server receives the download request, the data download switching identification in the request head is obtained, and the corresponding download address information is determined according to the corresponding relationship stored in advance. For example, the data download switching identifier is 2, which indicates that the client is currently performing the second download retry, and both previous downloads (the first download and the first download retry) fail, that is, the download address information during the previous two downloads cannot normally download data, at this time, the download address information corresponding to the identifier 2 may be obtained, and it can be understood that the download address information has not been accessed in the current download process. Typically, the server may determine the data that needs to be downloaded by the client according to the path of the data download switching identifier sent by the client, and further obtain the corresponding relationship between the data download switching identifier corresponding to the data and the download address information.
It should be noted that the data download switching flag may be represented by other means, such as an alphabetical flag or other rules, besides the number of download retries, but different download retries can be represented regardless of the change of the data download switching flag. And the server end sets a corresponding download address information for each data download switching identifier. It should be noted that, a specific generation rule of the data download switching identifier may be formulated by the server and communicated with the client for agreement.
And step 130, the server returns the download address information to the client so that the client downloads data according to the download address information.
Specifically, the server returns the obtained download address information to the client. The client acquires the download address information and accesses and downloads data based on the download address information. It can be understood that, at this time, if the client still fails to download based on the current download address information, the client may retry downloading, that is, update the data download switching identifier, and send the data download switching identifier to the server, so that the server feeds back new download address information. It can be understood that, after each piece of download address information stored in the server is fed back to the client, if the client still cannot download successfully, the server will continue to generate the data download switching identifier, and then the server confirms that the data download switching identifier does not have the corresponding download address information and notifies the client that the client confirms that the data cannot be downloaded. At this point, the client may notify the user of the download failure.
According to the technical means, the client sets the corresponding data downloading switching identifier according to the current downloading retry number and sends the corresponding data downloading switching identifier to the server, and then the server determines the downloading address information corresponding to the data downloading switching identifier and feeds the downloading address information back to the client, so that the client downloads data based on the downloading address information. When the equipment fails (namely, downloading fails), the client can update the data downloading switching identifier and feed back the data downloading switching identifier to the server so as to acquire new downloading address information through the server and download the data, namely, the downloading address information is replaced by the data downloading switching identifier, so that automatic downloading retry is realized, a user can obtain required data, the success rate of data downloading is increased, and the use experience of the user is improved.
Example two
Fig. 2 is a flowchart of a data downloading method according to a second embodiment of the present application. The data downloading method provided by the embodiment is embodied on the basis of the above embodiment. Specifically, referring to fig. 2, the data downloading method provided in this embodiment includes:
step 210, the client sets a corresponding data download switching identifier according to the current download retry number, and sends the data download switching identifier to the server.
Step 220, the server side obtains the data download switching identifier sent by the client side.
Step 230, the server determines domain name address information corresponding to the data download switching identifier according to the domain name configuration information, where the domain name configuration information records a corresponding relationship between the domain name address information and the data download switching identifier.
The domain name, also called a network domain, is a name of a certain device or a device group on the internet, which is composed of a string of names separated by points, and is used for locating and identifying the device during data transmission. In this embodiment, each device for storing data has a corresponding domain name, and is recorded as domain name address information. Further, the server pre-records download address information of the stored data, and configures corresponding domain name address information for each download address information. Then, the server may set a corresponding relationship between each domain name address information and the data download switching identifier. In the embodiment, the corresponding relationship between the domain name address information and the data downloading switching identifier is recorded as domain name configuration information. The embodiment of the setting manner of the corresponding relationship is not limited. And when the server side receives the data downloading switching identifier sent by the client side, the server side can acquire the corresponding domain name address information according to the domain name configuration information.
And step 240, assembling the domain name address information by the server side to obtain the download address information.
Specifically, when the client accesses the corresponding device based on the domain name address information, the server that needs to store the domain name address information translates the domain name address information to obtain the download address information, so that the client can access the device through the download address information. The process embodiment of translation is not limited. For example, the server side has a function of a Domain Name Server (DNS), and can translate Domain Name address information by DNS. It is to be understood that the translation process may also be understood as an assembly process of domain name address information. It should be noted that, during assembly, the domain name address information and the file name of the data are assembled together to obtain the download address information.
And step 250, the server returns the download address information to the client.
And step 260, the client accesses the content distribution network according to the download address information so that the content distribution network returns data to the client according to the download address information.
In the embodiment, the content distribution network storage data is taken as an example for expression, and the client can access the content distribution network according to the download address information. It is to be understood that the operations related to the content distribution network mentioned in the present embodiment all refer to operations performed by an edge server accessed by a user. If the client accesses the content distribution network, the client accesses a corresponding edge server in the content distribution network, and if the client returns data to the client according to the download address, the content distribution network returns data to the client by the edge server.
Optionally, after the server feeds back the download address information, the client determines whether the download address information can be accessed, and if the download address information can be accessed, the client accesses the content distribution network through the download address information. Otherwise, determining that the data can not be downloaded through the download address information, and determining that the downloading is finished.
Further, when the content distribution network returns data to the client, the client receives the data, i.e., downloads the data. At this time, the client needs to determine whether the downloading is successful, that is, whether the data is normal, if so, the downloading is successful, otherwise, the downloading is determined to be failed, the downloading retry is performed, that is, the number of the downloading retry times is updated, and the step 210 is executed.
Further, when the client accesses the content distribution network according to the download address information, the edge server of the content distribution network has no corresponding data or is abnormal, for example, the data cache in the edge server of the content distribution network expires, but the server does not acquire the information that the data cache in the edge server expires, and then the server also retains the corresponding domain name address information. At this time, in order to ensure that the client can obtain the required data, the setting of this step specifically includes steps 261 to 264:
and 261, the client accesses the content distribution network according to the downloading address information.
Step 262, the content delivery network confirms whether the data corresponding to the download address information exists in its own cache. If there is corresponding data, go to step 263. If there is no corresponding data, go to step 264.
After the edge server of the content distribution network determines that the edge server operates normally, the edge server determines the cache position of the stored data in the cache of the edge server according to the download address information, and determines whether the cache position is accurate, namely whether the accurate data can be found based on the cache position. If yes, it indicates that the data is currently stored in the local cache of the edge server, and step 263 is performed. Otherwise, it indicates that the data is not stored in the cache of the current edge server, and step 264 is executed. It can be understood that if the edge server runs abnormally, the client may be prompted that the data cannot be downloaded, so that the client performs a retry of downloading again.
Step 263, the content distribution network returns the data to the client.
Specifically, the edge server of the content distribution network obtains data in the cache location and returns the data to the client, so that the client confirms whether the data is downloaded successfully.
Step 264, the content distribution network returns the source to the corresponding source server.
Typically, when opening a service, i.e. storing data, a content distribution network already configures a corresponding source address, where the source address can be understood as an address of an origin server. The source server may be considered as a source device storing the data, such as a server with a cloud storage function. Furthermore, the content distribution network can access the source server according to the back-to-source address, so that the source server feeds data back to the client.
Specifically, when the content distribution network does not have corresponding data, the source return can be performed according to the pre-configured source return address, that is, the source station (in this embodiment, the source server side) storing the data is found according to the source return address. Generally, when the data stored at the source server side is updated, the data is pushed to an edge server of the content distribution network. At this time, the content distribution network is all available for returning, that is, when the client accesses the edge server based on the download address information, if the edge server does not cache the corresponding data, the content distribution network returns the source, that is, accesses the source server to obtain the data. It can be understood that if the client does not access the edge server, the edge server does not actively go to the source server to fetch the data.
Step 265, the source server returns the data to the content distribution network, so that the content distribution network returns the data to the client.
The source server side can acquire data by accessing a memory of the source server side or by pulling an image file, and then returns the data to the client side through the content distribution network. At this time, the step of setting the source server side to return the data to the content distribution network includes steps 2651 to 2653:
step 2651, the source server determines whether there is data corresponding to the download address information. If there is corresponding data, go to step 2652. If there is no corresponding data, go to step 2653.
It can be understood that the data in the source server end may be updated regularly, and at this time, there may be a case that the data is not stored in the source server end. Therefore, when the source server determines that the content distribution network returns to the source, the source server can determine the data storage position according to the path of the content distribution network returning to the source, and search the data storage position to determine whether the data is stored in the source server. If the data is stored, step 2652 is performed, otherwise, step 2653 is performed.
Step 2652, the source server returns the data to the content distribution network.
Specifically, after determining that the source server stores the data, the source server returns the data to the content distribution network, that is, the content distribution network obtains the data, and then the client may download the data through the content distribution network. It can be understood that the content distribution network obtains data, specifically, the content distribution network obtains data from the source server and stores the data in the corresponding edge server, and then returns the data to the client through the edge server.
Step 2653, the source server pulls the corresponding data through the mirror image file, and returns the data to the content distribution network.
Typically, when the data is not stored in the source server, the data may be pulled in a manner of an image file. In this embodiment, data of one server side has an identical copy on another server side, which is the mirror image. In other words, mirroring is a form of file storage, and many data can be made into one mirror file. Specifically, the source server is configured with data stored in other server. When the source server side confirms that the source server side does not store the data corresponding to the downloading address information, the data in the mirror image file can be pulled in a mode of accessing the mirror image file and fed back to the content distribution network so as to enable the content distribution network to download, and then the content distribution network can return the data to the client side.
The client determines the corresponding data download switching identifier according to the current download retry number, so that the server determines the corresponding domain name address information according to the data download switching identifier, then the server assembles the domain name address information to obtain the download address information and feeds the download address information back to the client, and the client accesses the corresponding content distribution network according to the download address information, so as to download the corresponding data through the content distribution network. When equipment failure (namely downloading failure) occurs, the client can update the data downloading switching identifier and feed back the data downloading switching identifier to the server so as to acquire new downloading address information through the server and download the new downloading address information, and further realize automatic downloading retry, so that a user can obtain required data, and the success rate of data downloading is increased. Meanwhile, when the cache of the content distribution network does not have the data, the source server can acquire the data stored by the source server or pull the data in a mirror image file mode through a mode of returning the data to the source server, and then return the data to the content distribution network, so that the client downloads the data through the content distribution network, the success rate of data downloading can be further improved, and the use experience of a user is improved.
On the basis of the embodiment, the server side can update the domain name configuration information in real time so as to ensure the validity of the domain name configuration information. Specifically, the method for downloading data according to the present embodiment further includes:
step 270, the server side updates the domain name configuration information regularly according to the weight sequence of the domain name address information.
In this embodiment, the weighting order of the domain name address information is used as the basis for updating the domain name configuration information. Different domain name address information corresponds to different weight sequences, wherein the more the weight sequence is, the more the domain name address information is ranked in the updated domain name configuration information, the smaller the corresponding data downloading switching identifier is, the more the client accesses the client, and the downloading retry times of the client can be further shortened.
Further, the embodiment of the determination method of the weight sequence is not limited, and a manual setting and/or a self-setting of the server side may be adopted. At this time, based on different weight order determination modes, the setting of the step specifically includes at least one of the following schemes:
according to the first scheme, the server side acquires the weight sequence of domain name address information at regular time, and updates domain name configuration information according to the weight sequence.
Specifically, a technician at the server end can manually set the weight sequence of each domain name address information, wherein a corresponding authority can be set, and only the technician who satisfies the authority can set the weight sequence. And then, updating the data downloading switching identifier corresponding to the domain name address information according to the weight sequence, namely obtaining the updated domain name configuration information.
And the server side determines the weight sequence of the domain name address information through the fault notification information corresponding to the domain name address information, and updates the domain name configuration information according to the weight sequence.
Illustratively, when an edge server, an origin server side or other devices storing data in a content distribution network storing the data have a failure, failure notification information is generated and sent to the server side. The failure notification information may include content such as identity information of the failed device. And then, the server moves the weight sequence of the domain name address information corresponding to the fault equipment backwards according to the fault notification information, so that the weight sequence corresponds to a larger data downloading switching identifier. Or the server side counts the fault notification information in a set time period, updates the weight sequence according to the fault frequency of each device, and advances the weight sequence of the domain name address information corresponding to the device with the smaller fault frequency. And then, updating the data downloading switching identifier corresponding to the domain name address information according to the weight sequence, namely obtaining the updated domain name configuration information. It is understood that the number of failures may be 0 at a minimum
And thirdly, the server side determines the weight sequence of the corresponding domain name address information through the download failure information returned by the client side, and updates the domain name configuration information according to the weight sequence.
Specifically, after the client fails to download according to the download address information, the client generates download failure information and returns the download failure information to the server, or returns the download failure information to a corresponding memory (such as big data), and then the server reads the download failure information in the memory at regular time. Wherein, the download failure information at least comprises download address information. And then, the server side can determine corresponding domain name address information according to the downloading address information in the downloading failure information. Furthermore, the server side counts the domain name address information which fails to be downloaded within a certain time, and then updates the weight sequence according to the download failure times corresponding to the domain name address information, namely, the weight sequence of the domain name address information with less download failure times is advanced. And then, updating the data downloading switching identifier corresponding to the domain name address information according to the weight sequence, namely obtaining the updated domain name configuration information. Wherein, the number of download failures can be 0 at least. It can be understood that, when the download failure times are counted, the accuracy of the download failure times can be further ensured based on the download failure information fed back by all the clients corresponding to the plurality of clients or the server.
Typically, the server side may contain a plurality of servers to reduce the data processing pressure of each server. For example, the server side includes a cloud storage server and a service server, where the cloud storage server is used to configure download address information of the stored data and configure corresponding domain name address information for the download address information. The service server is used for acquiring domain name address information in the cloud storage server at regular time, updating domain name configuration information, receiving a data downloading switching identifier sent by the client, determining the domain name address information corresponding to the data downloading switching identifier according to the domain name configuration information, assembling the domain name address information into downloading address information, and feeding the downloading address information back to the client so that the client can download the domain name address information.
By updating the domain name configuration information at regular time, the validity of the domain name configuration information can be ensured, so that the downloading address information with high downloading success rate is preferentially returned to the client, and the downloading retry times of the client are reduced.
The following describes an exemplary data downloading method provided in this embodiment. In this embodiment, a data downloading system for executing the data downloading method includes a server, a client, a content distribution network, and an origin server. The source server can be regarded as a type of server included in the server, and the source server is cloud storage. Meanwhile, the server side further comprises a cloud storage server and a service server. Fig. 3 is a data flow block diagram provided in the second embodiment of the present application, which is a data processing flow of the present example, and refer to fig. 3:
specifically, when the Client determines that data needs to be downloaded, the Client sets the downloadPolingNo (data download switching identifier) to an initial value of 0. And then, determining whether the current download is a download retry, and if not, placing the downloadPolingNo in the request header of the download request. If it is a download retry, downloadPollingNo +1 is added, and a new downloadPollingNo is obtained. Thereafter, the downloadPollingNo is placed in the request header of the download request. The Client sends a download request to a Business Server. And then, the Business Server acquires the downloadPolingNo in the request header, determines the domain name address information corresponding to the downloadPolingNo based on the domain name configuration information, then assembles the domain name address information to obtain the download address information, and returns the download address information to the client. Typically, the Cloud Storage Server may configure domain name address information corresponding to the download address information. The Business Server can synchronize the domain name address information in the Cloud Storage Server at regular time and generate the domain name configuration information.
The Client determines whether the download address information can be accessed. If not, determining that the downloading process is finished. If so, the data is downloaded by downloading the address information. At this time, the Client accesses the CDN by downloading the address information to acquire corresponding data. The CDN determines whether corresponding data exist in the cache of the CDN, and if the corresponding data exist, the data are returned to the Client. And then, the Client determines whether the downloading is successful, if the downloading is successful, the downloading process is ended, if the downloading is unsuccessful, the downloading is retried, and the step of judging whether the current downloading is the downloading retried is returned.
If the CDN determines that there is no corresponding data in its cache, the CDN returns a source to a corresponding Cloud Storage (source server) to pull data, and then the Cloud Storage determines whether it stores corresponding data. And if the corresponding data are stored, returning the data to the CDN, and returning the data to the Client by the CDN. And then, the Client determines whether the downloading is successful, if the downloading is successful, the downloading process is ended, if the downloading is unsuccessful, the downloading is retried, and the step of judging whether the current downloading is the downloading retried is returned.
If the Cloud Storage determines that the Cloud Storage does not store the corresponding data, the data is pulled through the mirror image file and returned to the CDN, so that the CDN returns the data to the Client. And then the Client determines whether the downloading is successful, if the downloading is successful, the downloading process is ended, if the downloading is unsuccessful, the downloading is retried, and the step of judging whether the current downloading is the downloading retried is returned. Through the above process, the success rate of data downloading can be improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a data downloading device according to a third embodiment of the present application. Referring to fig. 4, the data downloading apparatus provided in this embodiment includes: an identity setting module 301, an address acquisition module 302 and an address return module 303.
The identifier obtaining module 301 is configured at the client, and is configured to set a corresponding data download switching identifier according to the current download retry number, and send the data download switching identifier to the server; an address obtaining module 302, configured at the server end, and configured to obtain corresponding download address information according to the data download switching identifier; and an address returning module 303, configured at the server, and configured to return the download address information to the client, so that the client performs data download according to the download address information.
According to the technical means, the client sets the corresponding data downloading switching identification according to the current downloading retry times and sends the corresponding data downloading switching identification to the server, and then the server determines the downloading address information corresponding to the data downloading switching identification and feeds the downloading address information back to the client, so that the client downloads data based on the downloading address information. When the equipment fails (namely, the downloading fails), the client can update the data downloading switching identifier and feed back the data downloading switching identifier to the server so as to acquire new downloading address information through the server and download the data, namely, the downloading address information is replaced through the data downloading switching identifier, and further, automatic downloading retry is realized, so that a user can obtain required data, the data downloading success rate is increased, and the use experience of the user is improved.
On the basis of the above embodiment, the address obtaining module 302 includes: a domain name determining unit, configured to determine domain name address information corresponding to the data download switching identifier according to domain name configuration information, where the domain name configuration information records a correspondence between the domain name address information and the data download switching identifier; and the address assembling unit is used for assembling the domain name address information to obtain the download address information.
On the basis of the above embodiment, the method further comprises the following steps: and the information updating module is configured at the server end and used for regularly updating the domain name configuration information according to the weight sequence of the domain name address information.
On the basis of the above embodiment, the information updating module is specifically configured to obtain a weight sequence of domain name address information at regular time, and update the domain name configuration information according to the weight sequence; and/or determining the weight sequence of the domain name address information through fault notification information corresponding to the domain name address information, and updating the domain name configuration information according to the weight sequence; and/or determining the weight sequence of the corresponding domain name address information through the download failure information returned by the client, and updating the domain name configuration information according to the weight sequence.
On the basis of the above embodiment, the method further comprises the following steps: and the address access module is configured at the client and used for accessing the content distribution network according to the download address information so as to enable the content distribution network to return data to the client according to the download address information.
On the basis of the foregoing embodiment, the address access module is specifically configured to: accessing a content distribution network according to the download address information; correspondingly, the data downloading device further comprises: the cache confirmation module is configured in the content distribution network and used for confirming whether data corresponding to the download address information exists in the cache of the cache confirmation module; the data existence module is configured in the content distribution network and used for returning the data to the client if the corresponding data exists; the data searching module is configured in the content distribution network and used for returning the source to the corresponding source server side if the corresponding data does not exist; and the source data returning module is configured at the source server and used for returning the data to the content distribution network so that the content distribution network returns the data to the client.
On the basis of the foregoing embodiment, the source data return module includes: a data confirmation unit for confirming whether data corresponding to the download address information exists; a source data returning unit, configured to a source server, and configured to return the data to the content distribution network if there is corresponding data, so that the content distribution network returns the data to the client; and the mirror image pulling unit is used for pulling the corresponding data through a mirror image file if the corresponding data does not exist, and returning the data to the content distribution network so that the content distribution network returns the data to the client.
The data downloading device provided by this embodiment is included in a data downloading system, and can be used to execute the data downloading method provided by any of the above embodiments, and has corresponding functions and advantages.
It should be noted that, in the embodiment of the data downloading apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
Example four
Fig. 5 is a schematic structural diagram of a data downloading system according to a fourth embodiment of the present application. Referring to fig. 5, the data download system includes: a server side 41 and a client side 42. The server 41 may include a plurality of servers (not shown), and the number of the clients 42 is at least one, and one is taken as an example in fig. 5.
The client 42 is configured to set a corresponding data download switching identifier according to the current download retry number, send the data download switching identifier to the server 41, and perform data download according to the download address information returned by the server 41; the server 41 is configured to obtain corresponding download address information according to the data download switching identifier, and return the download address information to the client 42.
According to the technical means, the client sets the corresponding data downloading switching identification according to the current downloading retry times and sends the corresponding data downloading switching identification to the server, and then the server determines the downloading address information corresponding to the data downloading switching identification and feeds the downloading address information back to the client, so that the client downloads data based on the downloading address information. When the equipment fails (namely, downloading fails), the client can update the data downloading switching identifier and feed back the data downloading switching identifier to the server so as to acquire new downloading address information through the server and download the data, namely, the downloading address information is replaced by the data downloading switching identifier, so that automatic downloading retry is realized, a user can obtain required data, the success rate of data downloading is increased, and the use experience of the user is improved.
On the basis of the foregoing embodiment, when the server 41 executes to acquire the corresponding download address information according to the data download switching identifier, the method is specifically configured to: determining domain name address information corresponding to the data downloading switching identifier according to domain name configuration information, wherein the domain name configuration information records the corresponding relation between the domain name address information and the data downloading switching identifier; and assembling the domain name address information to obtain the downloading address information.
On the basis of the above embodiment, the server 41 is further configured to: and updating the domain name configuration information at regular time according to the weight sequence of the domain name address information.
On the basis of the foregoing embodiment, when the server 41 performs timing update of the domain name configuration information according to the weighting order of the domain name address information, the method is specifically configured to: the method comprises the steps of obtaining the weight sequence of domain name address information at regular time, and updating domain name configuration information according to the weight sequence; and/or determining the weight sequence of the domain name address information through fault notification information corresponding to the domain name address information, and updating the domain name configuration information according to the weight sequence; and/or determining a weight sequence of the corresponding domain name address information through the download failure information returned by the client 42, and updating the domain name configuration information according to the weight sequence.
On the basis of the above embodiment, the data downloading system further includes: a content distribution network 43; the client 42 is further configured to: accessing a content distribution network according to the download address information; the content distribution network 43 is configured to: and returning data to the client 42 according to the download address information.
On the basis of the above embodiment, the data downloading system further includes: an origin server side 44; when the content distribution network 43 executes data return to the client 42 according to the download address information, the method is specifically configured to: confirming whether data corresponding to the download address information exists in the cache of the client 42, and if the data corresponding to the download address information exists, returning the data to the client 42; if no corresponding data exists, the source returns to the corresponding source server 44. The origin server 44 is configured to return the data to the content distribution network 43, so that the content distribution network 43 returns the data to the client 42.
On the basis of the above embodiment, when the source server 44 returns the data to the content distribution network 43, it is specifically configured to: confirming whether data corresponding to the download address exists or not; if there is corresponding data, returning the data to the content distribution network 43; if no corresponding data exists, the corresponding data is pulled through the image file, and the data is returned to the content distribution network 43.
The data downloading system provided by the embodiment can be used for executing the data downloading method provided by any embodiment, and has corresponding functions and beneficial effects.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a data downloading device according to a fifth embodiment of the present application. The data downloading device may be any physical device in the data downloading system, such as a physical device in which the data downloading device is a client, a server in which the data downloading device is a server, or an edge server in a content distribution network. Specifically, as shown in fig. 6, the data downloading apparatus includes a processor 50, a memory 51, an input device 52, an output device 53, and a communication device 54; the number of the processors 50 in the data downloading device may be one or more, and one processor 50 is taken as an example in fig. 6; the processor 50, the memory 51, the input device 52, the output device 53 and the communication device 54 in the data downloading apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 6.
The memory 51, as a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules in the data downloading method in the embodiment of the present application (for example, the identification setting module 301, the address acquisition module 302, and the address return module 303 in the data downloading apparatus). The processor 50 executes software programs, instructions and modules stored in the memory 51, so as to execute various functional applications and data processing of the data downloading device, that is, to implement operations related to the data downloading device in the data downloading method provided by any of the above embodiments.
The memory 51 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the data download device, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to a data download device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 52 may be used to receive entered numeric or character information and to generate key signal inputs relating to user settings and function controls of the data download apparatus. The output device 53 may include a display screen, a speaker, and the like. The communication means 54 is used for data communication with other physical devices in the data download system.
The data downloading equipment is contained in a data downloading system, can be used for executing the data downloading method provided by any embodiment, and has corresponding functions and beneficial effects.
EXAMPLE six
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a data download method, the method including:
the client sets a corresponding data downloading switching identifier according to the current downloading retry times, and sends the data downloading switching identifier to the server;
the server side acquires corresponding downloading address information according to the data downloading switching identification;
and the server returns the download address information to the client so that the client downloads data according to the download address information.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also execute the relevant operations in the data downloading method provided in any embodiment of the present application.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application or portions contributing to the prior art may be embodied in the form of a software product, where the computer software product may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the data downloading method described in the embodiments of the present application. The storage medium of computer-executable instructions may be integrated within a device included in the data download system.
It is to be noted that the foregoing is only illustrative of the presently preferred embodiments and application of the principles of the present invention. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (9)

1. A method for downloading data, comprising:
the client sets a corresponding data downloading switching identifier according to the current downloading retry times, and sends the data downloading switching identifier to the server;
the server side acquires corresponding downloading address information according to the data downloading switching identifier, wherein the server side determines domain name address information corresponding to the data downloading switching identifier according to domain name configuration information, and the domain name configuration information records the corresponding relation between the domain name address information and the data downloading switching identifier; the server side assembles the domain name address information to obtain download address information;
and the server returns the download address information to the client so that the client downloads data according to the download address information.
2. The data downloading method of claim 1, further comprising:
and the server side updates the domain name configuration information at regular time according to the weight sequence of the domain name address information.
3. The data downloading method according to claim 2, wherein the server side periodically updates the domain name configuration information according to the weighting order of the domain name address information comprises:
the server side acquires the weight sequence of the domain name address information at regular time and updates the domain name configuration information according to the weight sequence; and/or the presence of a gas in the gas,
the server side determines the weight sequence of the domain name address information through fault notification information corresponding to the domain name address information, and updates the domain name configuration information according to the weight sequence; and/or the presence of a gas in the atmosphere,
and the server determines the weight sequence of the corresponding domain name address information according to the download failure information returned by the client, and updates the domain name configuration information according to the weight sequence.
4. The data downloading method of claim 1, wherein after the server returns the download address information to the client, the method further comprises:
and the client accesses a content distribution network according to the download address information so that the content distribution network returns data to the client according to the download address information.
5. The data downloading method of claim 4, wherein the client accessing a content distribution network according to the download address information, so that the content distribution network returns data to the client according to the download address information comprises:
the client accesses a content distribution network according to the download address information;
the content distribution network confirms whether data corresponding to the downloading address information exists in the cache of the content distribution network;
if the corresponding data exist, the content distribution network returns the data to the client;
if the corresponding data does not exist, the content distribution network returns the source to the corresponding source server;
and the source server side returns the data to the content distribution network so that the content distribution network returns the data to the client side.
6. The data downloading method of claim 5, wherein the returning of the data to the content distribution network by the source server comprises:
the source server side confirms whether data corresponding to the downloading address information exist or not;
if the corresponding data exist, the source server side returns the data to the content distribution network;
and if the corresponding data does not exist, the source server end pulls the corresponding data through the mirror image file and returns the data to the content distribution network.
7. A data download apparatus, comprising:
the identifier setting module is configured at the client and used for setting a corresponding data downloading switching identifier according to the current downloading retry times and sending the data downloading switching identifier to the server;
the address acquisition module is configured at the server end and used for acquiring corresponding downloading address information according to the data downloading switching identifier, wherein the address acquisition module comprises the server end and is used for determining domain name address information corresponding to the data downloading switching identifier according to domain name configuration information, and the domain name configuration information records the corresponding relation between the domain name address information and the data downloading switching identifier; the server side assembles the domain name address information to obtain download address information;
and the address returning module is configured at the server side and used for returning the downloading address information to the client side so as to enable the client side to download data according to the downloading address information.
8. A data downloading system is characterized by comprising a server side and a client side;
the client is used for setting a corresponding data downloading switching identifier according to the current downloading retry times, sending the data downloading switching identifier to the server and downloading data according to the downloading address information returned by the server;
the server side is used for acquiring corresponding downloading address information according to the data downloading switching identification and returning the downloading address information to the client side.
9. A storage medium containing computer-executable instructions for performing the data download method of any of claims 1-6 when executed by a computer processor.
CN202010277505.8A 2020-04-10 2020-04-10 Data downloading method, device, system and storage medium Active CN111526185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010277505.8A CN111526185B (en) 2020-04-10 2020-04-10 Data downloading method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010277505.8A CN111526185B (en) 2020-04-10 2020-04-10 Data downloading method, device, system and storage medium

Publications (2)

Publication Number Publication Date
CN111526185A CN111526185A (en) 2020-08-11
CN111526185B true CN111526185B (en) 2022-11-25

Family

ID=71902050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010277505.8A Active CN111526185B (en) 2020-04-10 2020-04-10 Data downloading method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN111526185B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770119B (en) * 2020-09-03 2020-11-27 云盾智慧安全科技有限公司 Website resource acquisition method, system, device and computer storage medium
CN112583948A (en) * 2020-11-23 2021-03-30 北京三快在线科技有限公司 Domain name loading method and device, electronic equipment and storage medium
CN114401185A (en) * 2021-12-31 2022-04-26 宝宝巴士股份有限公司 Method for automatically switching download addresses

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103370903A (en) * 2010-11-17 2013-10-23 阿尔卡特朗讯 Method and system for client recovery strategy in a redundant server configuration
CN109547261A (en) * 2018-12-12 2019-03-29 平安科技(深圳)有限公司 Service line switching method, device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320487B (en) * 2014-11-11 2018-03-20 网宿科技股份有限公司 The HTTP scheduling system and method for content distributing network
CN110839049B (en) * 2018-08-15 2022-07-08 阿里巴巴集团控股有限公司 Data scheduling method and system based on domain name system
CN109474668B (en) * 2018-10-16 2022-03-04 平安科技(深圳)有限公司 CDN service switching method and device, computer equipment and storage medium
CN109769040A (en) * 2018-12-14 2019-05-17 平安普惠企业管理有限公司 Content delivery network service switching method, device, equipment and storage medium
CN110138808B (en) * 2019-06-27 2021-04-13 苏宁消费金融有限公司 Anti-hijack downloading method and system based on CDN

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103370903A (en) * 2010-11-17 2013-10-23 阿尔卡特朗讯 Method and system for client recovery strategy in a redundant server configuration
CN109547261A (en) * 2018-12-12 2019-03-29 平安科技(深圳)有限公司 Service line switching method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111526185A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN111526185B (en) Data downloading method, device, system and storage medium
CN107465767B (en) Data synchronization method and system
US20220094761A1 (en) Server Invocation Method and Proxy Server
CN110351283B (en) Data transmission method, device, equipment and storage medium
CN110519409B (en) Domain name dynamic configuration method, device, equipment and storage medium
CN113347037B (en) Data center access method and device
CN111327647A (en) Method and device for providing service to outside by container and electronic equipment
CN110602171A (en) Interaction method and device
CN109344202B (en) Data synchronization method and management node
CN107682271B (en) Method and device for generating routing line
CN114143730B (en) Signaling processing method, communication system, electronic device, and storage medium
CN110798358A (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN107608722B (en) Application program downloading method and device
CN113596187B (en) Domain name configuration management system
CN106375132B (en) Cloud server system and management method thereof
CN111736944A (en) Docker container positioning method and device based on Kubernetes
CN112367415B (en) Generation method and device of attribute information, electronic equipment and computer readable medium
CN111104376B (en) Resource file query method and device
CN110933184B (en) Resource publishing platform and resource publishing method
CN113900728A (en) Method, system, electronic device and storage medium for synchronous configuration
CN111857761A (en) Method and equipment for upgrading container cluster service application program
CN113037797A (en) Data processing method and device
CN110855785B (en) Data processing method and device
CN111147618B (en) Communication method, communication device, electronic equipment and storage medium
CN115134618B (en) Live stream life cycle information processing method and device and computing equipment

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