[go: up one dir, main page]

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

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

Info

Publication number
CN111526185A
CN111526185A CN202010277505.8A CN202010277505A CN111526185A CN 111526185 A CN111526185 A CN 111526185A CN 202010277505 A CN202010277505 A CN 202010277505A CN 111526185 A CN111526185 A CN 111526185A
Authority
CN
China
Prior art keywords
data
download
address information
server
client
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
CN202010277505.8A
Other languages
Chinese (zh)
Other versions
CN111526185B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

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 interfered in the prior art can be solved.

Description

数据下载方法、装置、系统及存储介质Data download method, device, system and storage medium

技术领域technical field

本申请实施例涉及互联网技术领域,尤其涉及一种数据下载方法、装置、系统及存储介质。The embodiments of the present application relate to the field of Internet technologies, and in particular, to a data downloading method, device, system, and storage medium.

背景技术Background technique

随着互联网技术的发展及普及,互联网已经深入到人们的日常工作生活中。用户可以通过互联网得到需要的数据(如信息、文件资源、视频资源等)。当前,可以采用云存储的方式,或者采用内容分发网络(Content Delivery Network,CDN)的方式存储数据。相应的,用户可以通过数据的存储地址下载或访问数据。然而,当云存储的机房设备故障,或者,存储数据的CDN单点设备故障时,用户的下载流程无法被干预,此时,用户仍然能下载数据,但是,该数据通常为不可用数据(即损坏数据),这样会使得用户无法得到需要的数据。With the development and popularization of Internet technology, the Internet has penetrated deeply into people's daily work and life. Users can obtain required data (such as information, file resources, video resources, etc.) through the Internet. Currently, data can be stored in a cloud storage manner or a content delivery network (Content Delivery Network, CDN) manner. Correspondingly, the user can download or access the data through the storage address of the data. However, when the equipment in the cloud storage room fails, or the CDN single-point device for storing data fails, the user's download process cannot be intervened. At this time, the user can still download the data, but the data is usually unavailable (ie corrupt data), which will make the user unable to obtain the required data.

发明内容SUMMARY OF THE INVENTION

本申请提供了一种数据下载方法、装置、系统及存储介质,以解决现有技术中由于用户的下载流程无法被干预,导致出现设备故障时用户无法得到需要的数据的技术问题。The present application provides a data download method, device, system and storage medium to solve the technical problem in the prior art that the user cannot obtain the required data when a device failure occurs because the user's download process cannot be interfered with.

第一方面,本申请实施例提供了一种数据下载方法,包括:In a first aspect, an embodiment of the present application provides a method for downloading data, including:

客户端根据当前下载重试次数设置相应的数据下载切换标识,并将所述数据下载切换标识发送至服务器端;The client sets the corresponding data download switching identification according to the current download retry times, and sends the data downloading switching identification to the server;

所述服务器端根据所述数据下载切换标识获取对应的下载地址信息;The server side obtains the corresponding download address information according to the data download switching identifier;

所述服务器端将所述下载地址信息返回到所述客户端,以使所述客户端根据所述下载地址信息进行数据下载。The server returns the download address information to the client, so that the client downloads data according to the download address information.

进一步的,所述服务器端根据所述数据下载切换标识获取对应的下载地址信息包括:Further, obtaining the corresponding download address information by the server according to the data download switching identifier includes:

所述服务器端根据域名配置信息确定所述数据下载切换标识对应的域名地址信息,所述域名配置信息记录有域名地址信息和数据下载切换标识的对应关系;The server determines the domain name address information corresponding to the data download switching identifier according to the domain name configuration information, and the domain name configuration information records the correspondence between the domain name address information and the data download switching identifier;

所述服务器端对所述域名地址信息进行组装以得到下载地址信息。The server assembles the domain name address information to obtain download address information.

进一步的,还包括:Further, it also includes:

所述服务器端根据域名地址信息的权重顺序定时更新所述域名配置信息。The server side regularly updates the domain name configuration information according to the weight sequence of the domain name address information.

进一步的,所述服务器端根据域名地址信息的权重顺序定时更新所述域名配置信息包括:Further, the server side regularly updating the domain name configuration information according to the weight sequence of the domain name address information includes:

所述服务器端定时获取域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息;和/或,The server periodically obtains the weight order of the domain name address information, and updates the domain name configuration information according to the weight order; and/or,

所述服务器端通过与域名地址信息对应的故障通知信息确定所述域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息;和/或,The server side determines the weight order of the domain name address information according to the fault notification information corresponding to the domain name address information, and updates the domain name configuration information according to the weight order; and/or,

所述服务器端通过客户端返回的下载失败信息确定对应域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息。The server determines the weight order 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 order.

进一步的,所述服务器端将所述下载地址信息返回到所述客户端之后,还包括:Further, after the server returns the download address information to the client, the method further includes:

所述客户端根据所述下载地址信息访问内容分发网络,以使所述内容分发网络根据所述下载地址信息向所述客户端返回数据。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.

进一步的,所述客户端根据所述下载地址信息访问内容分发网络,以使所述内容分发网络根据所述下载地址信息向所述客户端返回数据包括:Further, 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, including:

所述客户端根据所述下载地址信息访问内容分发网络;The client accesses the content distribution network according to the download address information;

所述内容分发网络确认自身缓存中是否存在与所述下载地址信息对应的数据;The content distribution network confirms whether there is data corresponding to the download address information in its own cache;

若存在对应的数据,则所述内容分发网络将所述数据返回至所述客户端;If there is corresponding data, the content distribution network returns the data to the client;

若不存在对应的数据,则所述内容分发网络回源到对应的源服务器端;If there is no corresponding data, the content distribution network returns the source to the corresponding source server;

所述源服务器端将所述数据返回至所述内容分发网络,以使所述内容分发网络将所述数据返回至所述客户端。The origin server returns the data to the content distribution network, so that the content distribution network returns the data to the client.

进一步的,所述源服务器端将所述数据返回至所述内容分发网络包括:Further, returning the data to the content distribution network by the source server includes:

所述源服务器端确认是否存在与所述下载地址信息对应的数据;The source server side confirms whether there is data corresponding to the download address information;

若存在对应的数据,则所述源服务器端将所述数据返回至所述内容分发网络;If there is corresponding data, the source server returns the data to the content distribution network;

若不存在对应的数据,则所述源服务器端通过镜像文件拉取对应的数据,并将所述数据返回至所述内容分发网络。If there is no corresponding data, the source server pulls the corresponding data through the mirror file, and returns the data to the content distribution network.

第二方面,本申请实施例还提供了一种数据下载装置,包括:In a second aspect, an embodiment of the present application also provides a data download device, including:

标识设置模块,配置于客户端,用于根据当前下载重试次数设置相应的数据下载切换标识,并将所述数据下载切换标识发送至服务器端;an identification setting module, configured on the client, for setting the corresponding data download switching identification according to the current download retry times, and sending the data downloading switching identification to the server;

地址获取模块,配置于服务器端,用于根据所述数据下载切换标识获取对应的下载地址信息;An address obtaining module, configured on the server side, is configured to obtain corresponding download address information according to the data download switching identifier;

地址返回模块,配置于服务器端,用于将所述下载地址信息返回到所述客户端,以使所述客户端根据所述下载地址信息进行数据下载。The address return module is configured on the server side, and is used for returning the download address information to the client, so that the client downloads data according to the download 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 the corresponding data download switching identification according to the current download retry times, and sending the data downloading switching identification to the server, and is also used for downloading data according to the download address information returned by the server;

所述服务器端用于根据所述数据下载切换标识获取对应的下载地址信息,将所述下载地址信息返回到所述客户端。The server side is configured to acquire corresponding download address information according to the data download switching identifier, and return the download address information to the client terminal.

第四方面,本申请实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如第一方面所述的数据下载方法。In a fourth aspect, an embodiment of the present application further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are used to execute the data downloading method according to the first aspect when executed by a computer processor.

上述数据下载方法、装置、系统及存储介质,通过客户端根据当前下载重试次数设置相应的数据下载切换标识,并发送至服务器端,之后,服务器端确定与数据下载切换标识对应的下载地址信息,并将下载地址信息反馈至客户端,以使客户端基于下载地址信息进行数据下载的技术手段,可以解决现有技术中由于用户的下载流程无法被干预,导致出现设备故障时用户无法得到需要的数据的技术问题。当设备出现故障(即下载失败)时,客户端可以更新数据下载切换标识,并反馈至服务器端,以通过服务器端获取新的下载地址信息,并进行下载,即通过数据下载切换标识更换下载地址信息,进而实现自动下载重试,使得用户可以得到需要的数据,增加了数据下载成功率,提升了用户的使用体验。In the above data download method, device, system and storage medium, a corresponding data download switching identifier is set by the client according to the current download retry times, and sent to the server, after which the server determines the download address information corresponding to the data download switching identifier , and feedback the download address information to the client, so that the client can download data based on the download address information, which can solve the problem in the prior art that the user cannot get the required data when the device fails because the user's download process cannot be interfered with. technical issues with the data. When the device fails (that is, the download fails), the client can update the data download switching ID and feed it back to the server, so as to obtain the new download address information through the server and download it, that is, change the download address through the data download switching ID. information, and then realize automatic download retry, so that users can obtain the required data, increase the success rate of data download, and improve the user experience.

附图说明Description of drawings

图1为本申请实施例一提供的一种数据下载方法的流程图;1 is a flowchart of a data downloading method provided in Embodiment 1 of the present application;

图2为本申请实施例二提供的一种数据下载方法的流程图;2 is a flowchart of a method for downloading data according to Embodiment 2 of the present application;

图3为本申请实施例二提供的一种数据流程框图;3 is a block diagram of a data flow provided by Embodiment 2 of the present application;

图4为本申请实施例三提供的一种数据下载装置的结构示意图;FIG. 4 is a schematic structural diagram of a data downloading apparatus according to Embodiment 3 of the present application;

图5为本申请实施例四提供的一种数据下载系统的结构示意图;FIG. 5 is a schematic structural diagram of a data downloading system according to Embodiment 4 of the present application;

图6为本申请实施例五提供的一种数据下载设备的结构示意图。FIG. 6 is a schematic structural diagram of a data downloading device according to Embodiment 5 of the present application.

具体实施方式Detailed ways

下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all the structures related to the present application.

实施例一Example 1

图1为本申请实施例一提供的一种数据下载方法的流程图。实施例中提供的数据下载方法可以由数据下载系统执行。其中,数据下载系统至少包括用户使用的客户端以及管理下载地址的服务器端,还可选包括存储数据的CDN。其中,客户端通过服务器端获取存储数据的地址,并通过地址下载对应的数据。此时,参考图1,该数据下载方法具体包括:FIG. 1 is a flowchart of a data downloading method provided in Embodiment 1 of the present application. The data downloading methods provided in the embodiments may be performed by a data downloading system. Wherein, the data download system includes at least a client used by the user, a server for managing the download address, and optionally a CDN for storing data. The client obtains 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:

步骤110、客户端根据当前下载重试次数设置相应的数据下载切换标识,并将数据下载切换标识发送至服务器端。Step 110: The client sets a corresponding data download switching identifier according to the current download retry times, and sends the data download switching identifier to the server.

典型的,客户端下载数据前,先生成数据下载切换标识,并将数据下载切换标识发送至服务器端。其中,客户端下载的数据的具体类型实施例不做限定。客户端下载数据也可以理解为客户端下载资源。Typically, before the client downloads data, a data download switching identifier is first generated, and the data download switching identifier is sent to the server. The specific type of the data downloaded by the client is not limited in the embodiment. Client download data can also be understood as client download resources.

进一步的,数据下载切换标识用于通知服务器端本次下载过程中客户端对数据的下载重试次数。可选的,数据下载切换标识根据下载重试次数设置。客户端每次下载失败(如下载损坏数据或无法下载数据等)后,会进行重新下载,对应的下载重试次数加1。举例而言,客户端在执行下载任务时,会生成数据下载切换标识。在本次下载任务中,首次下载时,下载重试次数为0,相应的,数据下载切换标识为0。之后,若客户端基于当前的下载地址信息下载失败,则会下载重试,即重新尝试下载。此时,下载重试次数为1,相应的,数据下载切换标识更新为1,以此类推。若客户端当前的下载重试次数为4,则对应的数据下载切换标识为4。Further, the data download switching identifier is used to notify the server of the number of retries for the client to download the data in the current downloading process. Optionally, the data download switching identifier is set according to the number of download retries. Each time the client fails to download (such as downloading corrupted data or unable to download data, etc.), it will re-download, and the corresponding download retry times are incremented by 1. For example, when the client performs a download task, it will generate a data download switch identifier. In this download task, when downloading for the first time, the number of download retries is 0, and correspondingly, the data download switching flag is 0. After that, if the client fails to download based on the current download address information, it will retry the download, that is, retry the download. 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 number of download retries of the client is 4, the corresponding data download switching identifier is 4.

可选的,数据下载切换标识可以放置在下载请求的请求头中,进而通过发送下载请求的方式,向服务器端发送数据下载切换标识。具体的,服务器端可以包含至少一个服务器。当服务器端包含多个服务器时,多个服务器可以执行不同的功能,例如,服务器端包含与客户端交互、存储下载地址的业务服务器,以及管理业务服务器端中存储的下载地址的云存储服务器。可以理解,当服务器端包含一个服务器时,一个服务器可以集成多个功能。进一步的,服务器端与客户端可以进行数据通信。其中,具体的数据通信手段实施例不作限定。Optionally, the data download switching identifier can be placed in the 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 multiple servers, the multiple servers can perform different functions. For example, the server side includes a service server that interacts with the client and stores download addresses, and a cloud storage server that manages the download addresses stored in the service server side. It can be understood that when the server side includes a server, a server can integrate multiple functions. Further, the server and the client can communicate with each other. The embodiments of the specific data communication means are not limited.

步骤120、服务器端根据数据下载切换标识获取对应的下载地址信息。Step 120: The server obtains the corresponding download address information according to the data download switching identifier.

具体的,服务器端预先存储有数据下载切换标识和下载地址信息的对应关系,此时,不同数据下载切换标识对应不同的下载地址信息。其中,下载地址信息包含数据存储在互联网中的地址,客户端通过下载地址信息可以得到存储数据的地址,例如,下载地址信息可以为IP地址。下载地址信息还可以包含数据的文件名。典型的,每项数据可以存储在不同的设备(如CDN的不同节点或不同的云存储)中,此时,每项数据可以有多个下载地址数据。进一步的,服务器端获取多个下载地址数据,并为每个下载地址数据分配一个数据下载切换标识。即服务器端存储有每项数据的数据下载切换标识和下载地址信息的对应关系。Specifically, the server side pre-stores the correspondence between the data download switch identifier and the download address information, and at this time, different data download switch identifiers correspond to different download address information. The download address information includes the address where the data is stored in the Internet, and the client can 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 filename of the data. Typically, each item of data may be stored in different devices (eg, different nodes of the CDN or different cloud storages), and at this time, each item of data may have multiple download address data. Further, the server side acquires multiple download address data, and assigns a data download switching identifier to each download address data. That is, the server side stores the corresponding relationship between the data download switching identifier and the download address information of each item of data.

当服务器端接收到下载请求时,获取请求头中的数据下载切换标识,并根据预先存储的对应关系确定对应的下载地址信息。举例而言,数据下载切换标识为2,说明客户端当前正在进行第二次下载重试,此前的两次下载(首次下载以及第一次下载重试)均失败,即前两次下载时的下载地址信息均无法正常下载数据,此时,可以获取与标识2对应的下载地址信息,可以理解,该下载地址信息在本次下载过程中还未被访问过。典型的,服务器端根据客户端发送数据下载切换标识的路径可以确定客户端需要下载的数据,进而获取该数据相应的数据下载切换标识和下载地址信息的对应关系。When the server side receives the download request, it acquires the data download switching identifier in the request header, and determines the corresponding download address information according to the pre-stored correspondence. For example, if the data download switch flag is 2, it means that the client is currently retrying the second download, and the previous two downloads (the first download and the first download retry) have failed, that is, the previous two downloads have failed. The download address information cannot download data normally. At this time, the download address information corresponding to the identifier 2 can be obtained. It can be understood that the download address information has not been accessed in this download process. Typically, the server can determine the data that the client needs to download according to the path of the data download switching identifier sent by the client, and then obtain the corresponding relationship between the data download switching identifier and the download address information corresponding to the data.

需要说明,数据下载切换标识除了通过下载重试次数表示,还可以同其他的方式表示,如通过字母标识,或者其他规则标识,但是,无论数据下载切换标识怎么变化,均可以体现不同的下载重试次数。并且服务器端均会为每个数据下载切换标识设定一个对应的下载地址信息。需说明,数据下载切换标识的具体生成规则可以由服务器端制定并与客户端沟通约定。It should be noted that, in addition to being represented by the number of download retries, the data download switching logo can also be expressed in other ways, such as letter logos or other rule logos. However, no matter how the data download switching logo changes, it can reflect different download cycles. number of trials. And the server side will set a corresponding download address information for each data download switching identifier. It should be noted that the specific generation rule of the data download switching identifier can be formulated by the server and communicated with the client.

步骤130、服务器端将下载地址信息返回到客户端,以使客户端根据下载地址信息进行数据下载。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 obtains 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, it can retry the download, that is, update the data download switching identifier, and send the data download switching identifier to the server, so that the server can feedback new information. download address information. It can be understood that after each download address information stored in the server is fed back to the client, if the client still fails to download successfully, it will continue to generate a data download switching identifier. After that, the server confirms that the data download switching identifier does not correspond. The download address information and notify the client, the client confirms that the data cannot be downloaded. At this point, the client can notify the user that the download failed.

上述,通过客户端根据当前下载重试次数设置相应的数据下载切换标识,并发送至服务器端,之后,服务器端确定与数据下载切换标识对应的下载地址信息,并将下载地址信息反馈至客户端,以使客户端基于下载地址信息进行数据下载的技术手段,可以解决现有技术中由于用户的下载流程无法被干预,导致出现设备故障时用户无法得到需要的数据的技术问题。当设备出现故障(即下载失败)时,客户端可以更新数据下载切换标识,并反馈至服务器端,以通过服务器端获取新的下载地址信息,并进行下载,即通过数据下载切换标识更换下载地址信息,进而实现自动下载重试,使得用户可以得到需要的数据,增加了数据下载成功率,提升了用户的使用体验。In the above, the corresponding data download switching identifier is set by the client according to the current download retry times, and sent to the server. After that, the server determines the download address information corresponding to the data download switching identifier, and feeds the download address information to the client. The technical means of enabling the client to download data based on the download address information can solve the technical problem in the prior art that the user cannot obtain the required data when the device fails because the user's download process cannot be interfered. When the device fails (that is, the download fails), the client can update the data download switching ID and feed it back to the server, so as to obtain the new download address information through the server and download it, that is, change the download address through the data download switching ID. information, and then realize automatic download retry, so that users can obtain the required data, increase the success rate of data download, and improve the user experience.

实施例二Embodiment 2

图2为本申请实施例二提供的一种数据下载方法的流程图。本实施例提供的数据下载方法是在上述实施例的基础上进行具体化。具体的,参考图2,本实施例提供的数据下载方法包括:FIG. 2 is a flowchart of a data downloading method according to Embodiment 2 of the present application. The data downloading method provided in this embodiment is embodied on the basis of the foregoing embodiment. Specifically, referring to FIG. 2 , the data downloading method provided in this embodiment includes:

步骤210、客户端根据当前下载重试次数设置相应的数据下载切换标识,并将数据下载切换标识发送至服务器端。Step 210: The client sets a corresponding data download switching identifier according to the current download retry times, and sends the data download switching identifier to the server.

步骤220、服务器端获取客户端发送的数据下载切换标识。Step 220: The server obtains the data download switching identifier sent by the client.

步骤230、服务器端根据域名配置信息确定数据下载切换标识对应的域名地址信息,域名配置信息记录有域名地址信息和数据下载切换标识的对应关系。Step 230: The server determines the domain name address information corresponding to the data download switching identifier according to the domain name configuration information, and the domain name configuration information records the correspondence between the domain name address information and the data download switching identifier.

其中,域名,又称网域,是由一串用点分隔的名字组成的因特网上某一设备或设备组的名称,用于在数据传输时对设备的定位标识。本实施例中,每个存储数据的设备均有对应的域名,并记为域名地址信息。进一步的,服务器端预先记录有存储数据的下载地址信息,并为每个下载地址信息配置对应的域名地址信息。之后,服务器端可以设置每个域名地址信息与数据下载切换标识的对应关系。实施例中,将域名地址信息与数据下载切换标识的对应关系记为域名配置信息。其中,对应关系的设置方式实施例不作限定。当服务器端接收到客户端发送的数据下载切换标识后,便可以根据域名配置信息获取对应的域名地址信息。Among them, a domain name, also known as a network domain, is the name of a device or device group on the Internet composed of a string of names separated by dots, and is used to locate and identify the device during data transmission. In this embodiment, each device storing data has a corresponding domain name, which is recorded as domain name address information. Further, the server side pre-records the download address information of the stored data, and configures corresponding domain name address information for each download address information. After that, the server side can set the 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 download switching identifier is recorded as the domain name configuration information. The embodiment of the setting manner of the corresponding relationship is not limited. After the server side receives the data download switching identifier sent by the client side, it can obtain the corresponding domain name address information according to the domain name configuration information.

步骤240、服务器端对域名地址信息进行组装以得到下载地址信息。Step 240: The server assembles the domain name address information to obtain the download address information.

具体的,当客户端基于域名地址信息访问对应的设备时,需要存储域名地址信息的服务器先对域名地址信息进行翻译得到下载地址信息,以使客户端可以通过下载地址信息进行访问。其中,翻译的过程实施例不做限定。例如,服务器端具备域名服务器(DomainName System,DNS)的功能,通过DNS可以对域名地址信息进行翻译。可以理解,翻译过程也可以理解为对域名地址信息的组装过程。需说明,在组装时,域名地址信息和数据的文件名一同被组装,得到下载地址信息。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 first translates the domain name address information to obtain the download address information, so that the client can access through the download address information. The embodiment of the translation process is not limited. For example, the server side has the function of a domain name server (Domain Name System, DNS), and the domain name address information can be translated through the DNS. It can be understood that the translation process can 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.

步骤250、服务器端将下载地址信息返回到客户端。Step 250: The server returns the download address information to the client.

步骤260、客户端根据下载地址信息访问内容分发网络,以使内容分发网络根据下载地址信息向客户端返回数据。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 stores data as an example for description, and the client can access the content distribution network according to the download address information. It can be understood that the related operations of the content distribution network mentioned in this embodiment all refer to the operations performed by the edge server accessed by the user. For example, when the client accesses the content distribution network, it means that the client accesses the corresponding edge server in the content distribution network. For another example, when the content distribution network returns data to the client according to the download address, it means that the edge server returns data to the client.

可选的,当服务器端反馈下载地址信息后,客户端先确定该下载地址信息是否可以被访问,若可以被访问,则通过该下载地址信息访问内容分发网络。否则,确定无法通过该下载地址信息下载数据,确定本次下载结束。Optionally, after the server feeds back the download address information, the client first determines whether the download address information can be accessed, and if it can be accessed, accesses the content distribution network through the download address information. Otherwise, it is determined that the data cannot be downloaded through the download address information, and it is determined that the download ends.

进一步的,当内容分发网络向客户端返回数据时,客户端接收数据,即对数据进行下载。此时,客户端需要确认是否下载成功,即数据是否正常,若是,则确认下载成功,否则,确定下载失败,进行下载重试,即更新下载重试次数,并返回执行步骤步骤210。Further, when the content distribution network returns data to the client, the client receives the data, that is, downloads the data. At this time, the client needs to confirm whether the download is successful, that is, whether the data is normal, if so, confirm that the download is successful, otherwise, determine that the download fails, retry the download, that is, update the number of download retries, and return to step 210.

进一步的,客户端根据下载地址信息访问内容分发网络时,存在内容分发网络的边缘服务器不存在相应数据或者边缘服务器异常的情况,如内容分发网络的边缘服务器内数据缓存到期,而服务器端还未获取到边缘服务器中数据缓存到期的消息,进而服务器端还保留对应的域名地址信息。此时,为了保证客户端可以得到需要的数据,设定本步骤具体包括步骤261-步骤264:Further, when the client accesses the content distribution network according to the download address information, the edge server of the content distribution network does not have corresponding data or the edge server is abnormal. For example, the data cache in the edge server of the content distribution network expires, and the server still The message that the data cache expires in the edge server is not obtained, and 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, it is set that this step specifically includes steps 261-264:

步骤261、客户端根据下载地址信息访问内容分发网络。Step 261: The client accesses the content distribution network according to the download address information.

步骤262、内容分发网络确认自身缓存中是否存在与下载地址信息对应的数据。若存在对应的数据,则执行步骤263。若不存在对应的数据,则执行步骤264。Step 262: The content distribution network confirms whether there is data corresponding to the download address information in its own cache. If there is corresponding data, step 263 is executed. If there is no corresponding data, step 264 is executed.

内容分发网络的边缘服务器确定自身运行正常后,在自身缓存中根据下载地址信息确定存储数据的缓存位置,并确定该缓存位置是否准确,即基于该缓存位置是否可以查找到准确的数据。若可以,则说明当前边缘服务器的自身缓存中存储有该数据,并执行步骤263。否则,说明当前边缘服务器的自身缓存中没有存储该数据,执行步骤264。可以理解,若边缘服务器运行异常,则可以提示客户端无法下载数据,以使客户端再次进行下载重试。After the edge server of the content distribution network determines that it is running normally, it determines the cache location of the stored data in its own cache according to the download address information, and determines whether the cache location is accurate, that is, whether accurate data can be found based on the cache location. If yes, it means that the data is stored in the current edge server's own cache, and step 263 is executed. Otherwise, it means that the data is not stored in the current edge server's own cache, and step 264 is executed. It can be understood that if the edge server runs abnormally, the client can be prompted that the data cannot be downloaded, so that the client can retry the download again.

步骤263、内容分发网络将数据返回至客户端。Step 263: The content distribution network returns the data to the client.

具体的,内容分发网络的边缘服务器获取缓存位置中的数据,并将该数据返回至客户端,以使客户端确认数据是否下载成功。Specifically, the edge server of the content distribution network obtains the data in the cache location, and returns the data to the client, so that the client can confirm whether the data is downloaded successfully.

步骤264、内容分发网络回源到对应的源服务器端。Step 264: The content distribution network returns the source to the corresponding source server.

典型的,内容分发网络在开通服务,即存储数据时,已经配置对应的回源地址,其中,回源地址可以理解为源服务器端的地址。源服务器端可以认为是存储该数据的源设备,如具有云存储功能的服务器等。进一步的,内容分发网络根据回源地址可以访问源服务器端,以使源服务器端将数据反馈至客户端。Typically, the content distribution network has been configured with a corresponding back-to-source address when the service is activated, that is, when data is stored, where the back-to-source address can be understood as the address of the source server. The source server side can be considered as the source device that stores the data, such as a server with cloud storage function. Further, the content distribution network can access the source server according to the back-to-source address, so that the source server feeds back data to the client.

具体的,内容分发网络不存在对应的数据时,根据预先配置的回源地址可进行回源,即根据回源地址查找到存储数据的源站(本实施例中为源服务器端)。一般而言,源服务器端存储的数据有更新时,会把数据推送到内容分发网络的边缘服务器中。此时,内容分发网络都是可以回源的,即当客户端基于下载地址信息访问边缘服务器时,如果边缘服务器没有缓存对应的数据,就会进行回源,即访问源服务器端以获取数据。可以理解,若客户端没有访问边缘服务器,那么,边缘服务器不会主动去源服务器端拿取数据。Specifically, when there is no corresponding data in the content distribution network, back-to-source can be performed according to the pre-configured back-to-source address, that is, the source site (in this embodiment, the source server side) that stores the data is found according to the back-to-source address. Generally speaking, when the data stored on the origin server is updated, the data will be pushed to the edge server of the content distribution network. At this time, the content distribution network can be back to the source, 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, it will go back to the source, that is, access the source server to obtain the data. It is understandable that if the client does not access the edge server, the edge server will not take the initiative to fetch data from the source server.

步骤265、源服务器端将数据返回至所述内容分发网络,以使所述内容分发网络将所述数据返回至客户端。Step 265: The origin server returns the data to the content distribution network, so that the content distribution network returns the data to the client.

其中,源服务器端可以通过访问自身存储器或者镜像文件拉取的方式获取数据,之后,将数据通过内容分发网络返回至客户端。此时,设定源服务器端将数据返回至所述内容分发网络包括步骤2651-步骤2653:Among them, the source server can obtain data by accessing its own storage or pulling the mirror file, and then returning the data to the client through the content distribution network. At this time, setting the source server to return data to the content distribution network includes steps 2651-2653:

步骤2651、源服务器端确认是否存在与下载地址信息对应的数据。若存在对应的数据,则执行步骤2652。若不存在对应的数据,则执行步骤2653。Step 2651: The source server confirms whether there is data corresponding to the download address information. If there is corresponding data, step 2652 is executed. If there is no corresponding data, step 2653 is executed.

可以理解,源服务器端中的数据会定时更新,此时,会存在源服务器端中没有存储该数据的情况。因此,源服务器端确定内容分发网络回源时,可以根根据内容分发网络回源的路径确定数据存储的位置,并进行查找,以确定自身是否还存储有该数据。若存储有该数据,则执行步骤2652,否则,执行步骤2653。It can be understood that the data in the source server will be updated regularly. At this time, there may be a situation where the data is not stored in the source server. Therefore, when the origin server determines that the content distribution network returns to the origin, it can determine the location of data storage according to the path back to the origin of the content distribution network, and perform a search to determine whether it still stores the data. If the data is stored, go to step 2652; otherwise, go to step 2653.

步骤2652、源服务器端将数据返回至内容分发网络。Step 2652: The origin server returns the data to the content distribution network.

具体的,源服务器端确定自身存储该数据后,将该数据返回至内容分发网络,即内容分发网络获取该数据,之后,客户端可以通过内容分发网络对数据进行下载。可以理解,内容分发网络获取数据具体为内容分发网络从源服务器端获取数据并存储至对应的边缘服务器中,之后,通过边缘服务器将数据返回至客户端。Specifically, after the source server determines that it stores the data, it returns the data to the content distribution network, that is, the content distribution network obtains the data, and then the client can download the data through the content distribution network. It can be understood that the acquisition of data by the content distribution network is specifically that the content distribution network acquires data from the source server and stores it in the corresponding edge server, and then returns the data to the client through the edge server.

步骤2653、源服务器端通过镜像文件拉取对应的数据,并将数据返回至内容分发网络。Step 2653: The source server pulls the corresponding data through the mirror file, and returns the data to the content distribution network.

典型的,源服务器端中没有存储该数据时,可以通过镜像文件的方式拉取数据。其中,镜像(Mirroring)是冗余的一种类型,本实施例中,一个服务器端的数据在另一个服务器端上存在一个完全相同的副本即为镜像。换言之,镜像是一种文件存储形式,可以把许多数据做成一个镜像文件。具体的,源服务器端中配置有其他服务器端中存储的数据。当源服务器端确认自身没有存储与下载地址信息对应的数据时,可以通过访问镜像文件的方式,拉取镜像文件中的数据,并反馈至内容分发网络,以使内容分发网络进行下载,之后,内容分发网络可以将数据返回至客户端。Typically, when the data is not stored in the source server, the data can be pulled by means of an image file. Among them, mirroring (Mirroring) is a type of redundancy. In this embodiment, data on one server side has an identical copy on another server side, that is, mirroring. In other words, mirroring is a form of file storage that can make a lot of data into a mirrored file. Specifically, the source server is configured with data stored in other servers. When the source server confirms that it does not store the data corresponding to the download address information, it can pull the data in the image file by accessing the image file, and feed it back to the content distribution network, so that the content distribution network can download it. The content delivery network can return data to the client.

上述,通过客户端根据当前的下载重试次数确定对应的数据下载切换标识,以使服务器端根据数据下载切换标识确定对应的域名地址信息,之后,服务器端对域名地址信息进行组装以得到下载地址信息并反馈至客户端,客户端根据下载地址信息访问对应的内容分发网络,以通过内容分发网络下载对应数据的技术手段,可以解决现有技术中由于用户的下载流程无法被干预,导致出现设备故障时用户无法得到需要的数据的技术问题。当出现设备故障(即下载失败)时,客户端可以更新数据下载切换标识,并反馈至服务器端,以通过服务器端获取新的下载地址信息,并进行下载,进而实现自动下载重试,使得用户可以得到需要的数据,增加了数据下载成功率。同时,当内容分发网络的缓存中没有该数据时,可以通过回源到源服务器端的方式,使得源服务器端获取自身存储的数据或者通过镜像文件的方式拉取数据,进而将数据返回至内容分发网络,以使客户端通过内容分发网络进行下载的技术手段,可以进一步提高数据下载成功率,提升用户的使用体验。Above, the client determines the corresponding data download switching identification according to the current download retry times, so that the server determines the corresponding domain name address information according to the data download switching identification, and then the server assembles the domain name address information to obtain the download address. The information is fed 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. The technical problem that the user cannot get the required data in the event of a failure. When there is a device failure (that is, the download fails), the client can update the data download switching identifier, and feed it back to the server, so as to obtain the new download address information through the server, and download it, and then realize automatic download retry, so that the user can The required data can be obtained, which increases the success rate of data download. At the same time, when there is no such data in the cache of the content distribution network, the source server can obtain the data stored by itself or pull the data through the mirror file by returning the source to the source server, and then return the data to the content distribution. The technical means of enabling the client to download through the content distribution network can further improve the success rate of data download and improve the user experience.

在上述实施例的基础上,服务器端可以实时更新域名配置信息,以保证域名配置信息的有效性。具体,设定本实施例的数据下载方法还包括:On the basis of the above embodiment, the server side can update the domain name configuration information in real time to ensure the validity of the domain name configuration information. Specifically, the data downloading method of this embodiment is set to further include:

步骤270、服务器端根据域名地址信息的权重顺序定时更新域名配置信息。Step 270: The server periodically updates the domain name configuration information according to the weight sequence of the domain name address information.

本实施例中,以域名地址信息的权重顺序作为更新域名配置信息的依据。不同域名地址信息对应不同的权重顺序,其中,权重顺序越靠前,域名地址信息在更新域名配置信息中的排序越靠前,对应的数据下载切换标识越小,被客户端越先访问,进而可以缩短客户端的下载重试次数。In this embodiment, the weight sequence 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 weighting order. The higher the weighting order is, the higher the ordering of the domain name address information in updating the domain name configuration information is, the smaller the corresponding data download switching identifier is, and the earlier it is accessed by the client. The number of download retries for the client can be shortened.

进一步的,权重顺序的确定方式实施例不做限定,其可以采用人工设定和/或服务器端自行设定的方式。此时,基于不同的权重顺序确定方式,设定本步骤具体包括下述至少一类方案:Further, the manner of determining the weight order is not limited in the embodiment, and the manner of manual setting and/or self-setting by the server side may be adopted. At this time, based on different weight order determination methods, it is set that this step specifically includes at least one of the following schemes:

方案一、服务器端定时获取域名地址信息的权重顺序,并根据权重顺序更新域名配置信息。Solution 1: The server periodically obtains the weight order of the domain name address information, and updates the domain name configuration information according to the weight order.

具体的,可以由服务器端的技术人员人工设置各域名地址信息的权重顺序,其中,可以设置相应的权限,只有满足该权限的技术人员才能够设置权重顺序。之后,根据权重顺序更新域名地址信息对应的数据下载切换标识,即得到更新的域名配置信息。Specifically, the weight order of each domain name address information can be manually set by the technical personnel on the server side, wherein the corresponding authority can be set, and only the technical personnel who satisfy the authority can set the weight order. After that, the data download switching identifier corresponding to the domain name address information is updated according to the weight sequence, that is, the updated domain name configuration information is obtained.

方案二、服务器端通过与域名地址信息对应的故障通知信息确定域名地址信息的权重顺序,并根据权重顺序更新域名配置信息。Scheme 2: The server determines the weight order 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 order.

示例性的,当存储数据的内容分发网络中边缘服务器、源服务器端或者其他存储该数据的设备等出现故障时,生成故障通知信息,并发送至服务器端。其中,故障通知信息中可以包含故障设备的身份信息等内容。之后,服务器端根据故障通知信息将故障设备对应的域名地址信息的权重顺序向后移,以使该权重顺序对应更大的数据下载切换标识。或者是,服务器端统计设定时间段内的故障通知信息,以根据各设备的故障次数更新权重顺序,将故障次数小的设备对应的域名地址信息的权重顺序靠前。之后,根据权重顺序更新域名地址信息对应的数据下载切换标识,即得到更新的域名配置信息。可以理解,故障次数最少可以为0Exemplarily, when an edge server, a source server, or other devices storing the data in the content distribution network that stores the data fails, failure notification information is generated and sent to the server. The fault notification information may include content such as identity information of the faulty device. Afterwards, the server side shifts the weight order of the domain name address information corresponding to the faulty device backward according to the fault notification information, so that the weight order corresponds to a larger data download switching identifier. Alternatively, the server side collects statistics on fault notification information within a set period of time, so as to update the weight order according to the number of faults of each device, and place the domain name address information corresponding to the device with a smaller number of faults in the front in the weight order. After that, the data download switching identifier corresponding to the domain name address information is updated according to the weight sequence, that is, the updated domain name configuration information is obtained. Understandably, the minimum number of failures can be 0

方案三、服务器端通过客户端返回的下载失败信息确定对应域名地址信息的权重顺序,并根据权重顺序更新域名配置信息。Solution 3: The server determines the weight order of the corresponding domain name address information through the download failure information returned by the client, and updates the domain name configuration information according to the weight order.

具体的,客户端根据下载地址信息下载失败后,会生成下载失败信息并返回至服务器端,或者是返回至对应的存储器(如大数据)中,之后,服务器端定时读取该存储器中的下载失败信息。其中,下载失败信息中至少包括下载地址信息。之后,服务器端可以根据下载失败信息中的下载地址信息确定对应的域名地址信息。进一步的,服务器端统计一定时间内下载失败的域名地址信息,进而根据各域名地址信息对应的下载失败次数更新权重顺序,即将下载失败次数少的域名地址信息的权重顺序靠前。之后,根据权重顺序更新域名地址信息对应的数据下载切换标识,即得到更新的域名配置信息。其中,下载失败次数最少可以为0。可以理解,统计下载失败次数时,可以基于多个客户端或服务器端对应的全部客户端反馈的下载失败信息,进而保证下载失败次数的准确性。Specifically, after the client fails to download according to the download address information, it will generate download failure information and return it to the server, or return it to the corresponding storage (such as big data), and then the server periodically reads the download in the storage. failure message. Wherein, the download failure information includes at least download address information. Afterwards, the server side may determine the corresponding domain name address information according to the download address information in the download failure information. Further, the server side counts the domain name address information that fails to download within a certain period of time, and then updates the weight order according to the number of download failures corresponding to each domain name address information. After that, the data download switching identifier corresponding to the domain name address information is updated according to the weight sequence, that is, the updated domain name configuration information is obtained. The number of download failures can be at least 0. It can be understood that when the number of download failures is counted, the download failure information fed back by all clients corresponding to multiple clients or servers can be used to ensure the accuracy of the number of download failures.

典型的,服务器端可以包含多个服务器,以减小各服务器的数据处理压力。例如,服务器端包含云存储服务器和业务服务器,其中,云存储服务器用于配置存储数据的下载地址信息,以及为下载地址信息配置对应的域名地址信息。业务服务器用于定时获取云存储服务器中域名地址信息,并更新域名配置信息,以及接收客户端发送的数据下载切换标识,以根据域名配置信息确定与数据下载切换标识对应的域名地址信息,之后,将域名地址信息组装成下载地址信息并反馈至客户端,以使客户端进行下载。Typically, the server side may include multiple servers to reduce the data processing pressure of each server. For example, the server side includes a cloud storage server and a service server, wherein the cloud storage server is used to configure the download address information of the stored data, and configure the corresponding domain name address information for the download address information. The service server is used to periodically obtain the domain name address information in the cloud storage server, update the domain name configuration information, and receive the data download switching identifier sent by the client, so as to determine the domain name address information corresponding to the data download switching identifier according to the domain name configuration information, and then, The domain name address information is assembled into download address information and fed back to the client, so that the client can download.

上述通过定时更新域名配置信息,可以保证域名配置信息的有效性,使得下载成功率高的下载地址信息优先被返回至客户端,减小客户端下载重试的次数。By regularly updating the domain name configuration information, the validity of the domain name configuration information can be ensured, so that the download address information with a high download success rate is preferentially returned to the client, thereby reducing the number of download retry attempts by the client.

下面对本实施例提供的数据下载方法进行示例性描述。本实施例中,执行数据下载方法的数据下载系统包括服务器端、客户端、内容分发网络以及源服务器端。其中,源服务器端可以认为是服务器端包含的一类服务器,源服务器端为云存储。同时,服务器端还包括云存储服务器和业务服务器。图3为本申请实施例二提供的一种数据流程框图,其为本示例的数据处理流程,参考图3:The data downloading method provided by this embodiment is exemplarily described below. In this embodiment, the data downloading system for executing the data downloading method includes a server end, a client end, a content distribution network, and a source server end. The source server side can be considered as a type of server included in the server side, and the source server side is cloud storage. At the same time, the server side also includes cloud storage server and business server. FIG. 3 is a block diagram of a data flow provided by Embodiment 2 of the present application, which is a data processing flow of this example, with reference to FIG. 3 :

具体的,Client(客户端)确定开始需要下载数据时,将downloadPollingNo(数据下载切换标识)设置为初始值0。之后,确定当前下载是否为下载重试,若不是下载重试,则将downloadPollingNo放置在下载请求的请求头中。若是下载重试,则将downloadPollingNo+1,并得到新的downloadPollingNo。之后,将downloadPollingNo放置在下载请求的请求头中。Client将下载请求发送至Business Server(业务服务器)中。之后,Business Server获取请求头中的downloadPollingNo,并基于域名配置信息确定downloadPollingNo对应的域名地址信息,之后,组装域名地址信息得到下载地址信息,向客户端返回下载地址信息。典型的,Cloud Storage Server(云存储服务器)可以配置下载地址信息对应的域名地址信息。Business Server可以定时同步Cloud Storage Server中的域名地址信息,并生成域名配置信息。Specifically, when the Client (client) determines that it starts to download data, it sets the downloadPollingNo (data download switching identifier) to an initial value of 0. After that, it is determined whether the current download is a download retry, and if it is not a download retry, downloadPollingNo is placed in the request header of the download request. If the download is retried, downloadPollingNo+1 will be added and a new downloadPollingNo will be obtained. After that, place downloadPollingNo in the request header of the download request. The client sends the download request to the Business Server (business server). After that, Business Server obtains downloadPollingNo in the request header, and determines the domain name address information corresponding to downloadPollingNo 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 (cloud storage server) can be configured with domain name address information corresponding to the download address information. The Business Server can periodically synchronize the domain name address information in the Cloud Storage Server and generate domain name configuration information.

Client确定是否可以访问该下载地址信息。若不能,则确定本次下载过程结束。若能,则通过下载地址信息下载数据。此时,Client通过下载地址信息访问CDN,以获取对应的数据。CDN确定自身缓存中是否存在对应的数据,若存在,则将数据返回至Client。之后,Client确定是否下载成功,若下载成功,则结束本次下载过程,若下载不成功,则下载重试,并返回执行判断当前下载是否为下载重试的步骤。The client determines whether the download address information can be accessed. If not, it is determined that the download process ends. If yes, download the data through the download address information. At this point, the client accesses the CDN through the download address information to obtain the corresponding data. The CDN determines whether the corresponding data exists in its own cache, and if so, returns the data to the Client. After that, the Client determines whether the download is successful. If the download is successful, the download process is ended. If the download is unsuccessful, the download is retried, and the process of judging whether the current download is a download retry is executed.

若CDN确定自身缓存中没有对应的数据,则回源至对应的Cloud Storage(源服务器端)拉取数据,之后,Cloud Storage确定自身是否存储有对应的数据。若存储有对应的数据,则将数据返回至CDN,并由CDN将数据返回至Client。之后,Client确定是否下载成功,若下载成功,则结束本次下载过程,若下载不成功,则下载重试,并返回执行判断当前下载是否为下载重试的步骤。If the CDN determines that there is no corresponding data in its own cache, it will go back to the corresponding Cloud Storage (origin server) to pull the data, and then Cloud Storage will determine whether it has stored the corresponding data. If the corresponding data is stored, the data is returned to the CDN, and the CDN returns the data to the Client. After that, the Client determines whether the download is successful. If the download is successful, the download process is ended. If the download is unsuccessful, the download is retried, and the process of judging whether the current download is a download retry is executed.

若Cloud Storage确定自身没有存储对应的数据,则通过镜像文件拉取数据,并返回至CDN,以由CDN将数据返回至Client。之后,Client确定是否下载成功,若下载成功,则结束本次下载过程,若下载不成功,则下载重试,并返回执行判断当前下载是否为下载重试的步骤。通过上述过程,可以提高数据下载成功率。If Cloud Storage determines that it does not store the corresponding data, it pulls the data through the image file and returns it to the CDN, so that the CDN can return the data to the Client. After that, the Client determines whether the download is successful. If the download is successful, the download process is ended. If the download is unsuccessful, the download is retried, and the process of judging whether the current download is a download retry is executed. Through the above process, the success rate of data download can be improved.

实施例三Embodiment 3

图4为本申请实施例三提供的一种数据下载装置的结构示意图。参考图4,本实施例提供的数据下载装置包括:标识设置模块301、地址获取模块302和地址返回模块303。FIG. 4 is a schematic structural diagram of a data downloading apparatus according to Embodiment 3 of the present application. Referring to FIG. 4 , the data downloading apparatus provided in this embodiment includes: an identification setting module 301 , an address obtaining module 302 and an address returning module 303 .

其中,标识获取模块301,配置于客户端,用于根据当前下载重试次数设置相应的数据下载切换标识,并将所述数据下载切换标识发送至服务器端;地址获取模块302,配置于服务器端,用于根据所述数据下载切换标识获取对应的下载地址信息;地址返回模块303,配置于服务器端,用于将所述下载地址信息返回到所述客户端,以使所述客户端根据所述下载地址信息进行数据下载。Wherein, the identification acquisition module 301 is configured on the client side, and is used to set the corresponding data download switching identification according to the current download retry times, and send the data download switching identification to the server side; the address acquisition module 302 is configured at the server side , used to obtain the corresponding download address information according to the data download switching identifier; the address return module 303, configured on the server side, is used to return the download address information to the client, so that the client can Download the data according to the download address information.

上述,通过客户端根据当前下载重试次数设置相应的数据下载切换标识,并发送至服务器端,之后,服务器端确定与数据下载切换标识对应的下载地址信息,并将下载地址信息反馈至客户端,以使客户端基于下载地址信息进行数据下载的技术手段,可以解决现有技术中由于用户的下载流程无法被干预,导致出现设备故障时用户无法得到需要的数据的技术问题。当设备出现故障(即下载失败)时,客户端可以更新数据下载切换标识,并反馈至服务器端,以通过服务器端获取新的下载地址信息,并进行下载,即通过数据下载切换标识更换下载地址信息,进而实现自动下载重试,使得用户可以得到需要的数据,增加了数据下载成功率,提升了用户的使用体验。In the above, the corresponding data download switching identifier is set by the client according to the current download retry times, and sent to the server. After that, the server determines the download address information corresponding to the data download switching identifier, and feeds the download address information to the client. The technical means of enabling the client to download data based on the download address information can solve the technical problem in the prior art that the user cannot obtain the required data when the device fails because the user's download process cannot be interfered. When the device fails (that is, the download fails), the client can update the data download switching ID and feed it back to the server, so as to obtain the new download address information through the server and download it, that is, change the download address through the data download switching ID. information, and then realize automatic download retry, so that users can obtain the required data, increase the success rate of data download, and improve the user experience.

在上述实施例的基础上,所述地址获取模块302包括:域名确定单元,用于根据域名配置信息确定所述数据下载切换标识对应的域名地址信息,所述域名配置信息记录有域名地址信息和数据下载切换标识的对应关系;地址组装单元,用于对所述域名地址信息进行组装以得到下载地址信息。On the basis of the above embodiment, the address obtaining module 302 includes: a domain name determining unit, configured to determine the 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 the domain name address information and The corresponding relationship between the data download switching identifiers; and the address assembling unit, configured to assemble the domain name address information to obtain the download address information.

在上述实施例的基础上,还包括:信息更新模块,配置于服务器端,用于根据域名地址信息的权重顺序定时更新所述域名配置信息。On the basis of the above embodiment, the method further includes: an information updating module, configured on the server side, 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 the weight order of the domain name address information at regular intervals, and update the domain name configuration information according to the weight order; and/or, through the failure notification information corresponding to the domain name address information Determine the weight order of the domain name address information, and update the domain name configuration information according to the weight order; and/or determine the weight order of the corresponding domain name address information through the download failure information returned by the client, and update the domain name address information according to the weight order Update the domain name configuration information.

在上述实施例的基础上,还包括:地址访问模块,配置于客户端,用于根据所述下载地址信息访问内容分发网络,以使所述内容分发网络根据所述下载地址信息向所述客户端返回数据。On the basis of the above-mentioned embodiment, the method further includes: an address access module, configured on the client, and configured to access the content distribution network according to the download address information, so that the content distribution network can send the information to the client according to the download address information. end returns data.

在上述实施例的基础上,所述地址访问模块具体用于:根据所述下载地址信息访问内容分发网络;相应的,所述数据下载装置还包括:缓存确认模块,配置于内容分发网络,用于确认自身缓存中是否存在与所述下载地址信息对应的数据;数据存在模块,配置于内容分发网络,用于若存在对应的数据,则将所述数据返回至所述客户端;数据查找模块,配置于内容分发网络,用于若不存在对应的数据,则回源到对应的源服务器端;源端数据返回模块,配置于源服务器端,用于将所述数据返回至所述内容分发网络,以使所述内容分发网络将所述数据返回至所述客户端。On the basis of the above embodiment, the address access module is specifically configured to: access the content distribution network according to the download address information; correspondingly, the data download device further includes: a cache confirmation module configured on the content distribution network and used for for confirming whether there is data corresponding to the download address information in its own cache; a data presence module, configured in the content distribution network, is used to return the data to the client if there is corresponding data; a data search module , configured on the content distribution network, and used to return the source to the corresponding source server if there is no corresponding data; the source data return module, configured on the source server, is used to return the data to the content distribution network so that the content distribution network returns the data to the client.

在上述实施例的基础上,所述源端数据返回模块包括:数据确认单元,用于确认是否存在与所述下载地址信息对应的数据;源数据返回单元,配置于源服务器端,用于若存在对应的数据,则将所述数据返回至所述内容分发网络,以使所述内容分发网络将所述数据返回至所述客户端;镜像拉取单元,用于若不存在对应的数据,则通过镜像文件拉取对应的数据,并将所述数据返回至所述内容分发网络,以使所述内容分发网络将所述数据返回至所述客户端。On the basis of the above embodiment, the source data return module includes: a data confirmation unit for confirming whether there is data corresponding to the download address information; a source data return unit, configured on the source server side, used for if If there is corresponding data, return the data to the content distribution network, so that the content distribution network returns the data to the client; the mirror pulling unit is used for, if there is no corresponding data, Then, the corresponding data is pulled through the mirror file, and the data is returned to the content distribution network, so that the content distribution network returns the data to the client.

本实施例提供的数据下载装置包含在数据下载系统中,可以用于执行上述任意实施例提供的数据下载方法,具备相应的功能和有益效果。The data downloading apparatus provided in this embodiment is included in the data downloading system, and can be used to execute the data downloading method provided by any of the above-mentioned embodiments, and has corresponding functions and beneficial effects.

值得注意的是,上述数据下载装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。It is worth noting that, in the above-mentioned embodiments of the data downloading apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; The specific names of the functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.

实施例四Embodiment 4

图5为本申请实施例四提供的一种数据下载系统的结构示意图。参考图5,该数据下载系统包括:服务器端41和客户端42。其中,服务器端41可以包含多个服务器(图未视),客户端42数量为至少一个,图5中以一个为例。FIG. 5 is a schematic structural diagram of a data downloading system according to Embodiment 4 of the present application. Referring to FIG. 5 , the data downloading system includes: a server end 41 and a client end 42 . The server side 41 may include multiple servers (not shown in the figure), and the number of clients 42 is at least one, and one is taken as an example in FIG. 5 .

客户端42用于根据当前下载重试次数设置相应的数据下载切换标识,并将所述数据下载切换标识发送至服务器端41,还用于根据所述服务器端41返回的下载地址信息进行数据下载;服务器端41用于根据所述数据下载切换标识获取对应的下载地址信息,将所述下载地址信息返回到所述客户端42。The client 42 is used to set the corresponding data download switching identification according to the current download retry times, and send the data download switching identification to the server 41, and is also used to download data according to the download address information returned by the server 41. ; The server side 41 is used to obtain the corresponding download address information according to the data download switching identifier, and return the download address information to the client terminal 42 .

上述,通过客户端根据当前下载重试次数设置相应的数据下载切换标识,并发送至服务器端,之后,服务器端确定与数据下载切换标识对应的下载地址信息,并将下载地址信息反馈至客户端,以使客户端基于下载地址信息进行数据下载的技术手段,可以解决现有技术中由于用户的下载流程无法被干预,导致出现设备故障时用户无法得到需要的数据的技术问题。当设备出现故障(即下载失败)时,客户端可以更新数据下载切换标识,并反馈至服务器端,以通过服务器端获取新的下载地址信息,并进行下载,即通过数据下载切换标识更换下载地址信息,进而实现自动下载重试,使得用户可以得到需要的数据,增加了数据下载成功率,提升了用户的使用体验。In the above, the corresponding data download switching identifier is set by the client according to the current download retry times, and sent to the server. After that, the server determines the download address information corresponding to the data download switching identifier, and feeds the download address information to the client. The technical means of enabling the client to download data based on the download address information can solve the technical problem in the prior art that the user cannot obtain the required data when the device fails because the user's download process cannot be interfered. When the device fails (that is, the download fails), the client can update the data download switching ID and feed it back to the server, so as to obtain the new download address information through the server and download it, that is, change the download address through the data download switching ID. information, and then realize automatic download retry, so that users can obtain the required data, increase the success rate of data download, and improve the user experience.

在上述实施例的基础上,服务器端41执行根据所述数据下载切换标识获取对应的下载地址信息时,具体用于:根据域名配置信息确定所述数据下载切换标识对应的域名地址信息,所述域名配置信息记录有域名地址信息和数据下载切换标识的对应关系;对所述域名地址信息进行组装以得到下载地址信息。On the basis of the above embodiment, when the server side 41 executes the acquisition of the corresponding download address information according to the data download switching identifier, it is specifically used for: determining the domain name address information corresponding to the data download switching identifier according to the domain name configuration information, and the The domain name configuration information records the correspondence between the domain name address information and the data download switching identifier; the domain name address information is assembled to obtain the download address information.

在上述实施例的基础上,服务器端41还用于:根据域名地址信息的权重顺序定时更新所述域名配置信息。On the basis of the above embodiment, the server end 41 is further configured to: regularly update the domain name configuration information according to the weight sequence of the domain name address information.

在上述实施例的基础上,服务器端41执行根据域名地址信息的权重顺序定时更新所述域名配置信息时,具体用于:定时获取域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息;和/或,通过与域名地址信息对应的故障通知信息确定所述域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息;和/或,通过客户端42返回的下载失败信息确定对应域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息。On the basis of the above embodiment, when the server 41 executes to update the domain name configuration information periodically according to the weight order of the domain name address information, it is specifically configured to: obtain the weight order of the domain name address information regularly, and update the domain name address information according to the weight order. Domain name configuration information; and/or, determine the weight order of the domain name address information through fault notification information corresponding to the domain name address information, and update the domain name configuration information according to the weight order; and/or, return through the client 42 The weight sequence of the corresponding domain name address information is determined from the download failure information, and the domain name configuration information is updated according to the weight sequence.

在上述实施例的基础上,所述数据下载系统还包括:内容分发网络43;所述客户端42还用于:根据所述下载地址信息访问内容分发网络;所述内容分发网络43用于:根据所述下载地址信息向所述客户端42返回数据。On the basis of the above embodiment, the data download system further includes: a content distribution network 43; the client 42 is further configured to: access the content distribution network according to the download address information; the content distribution network 43 is configured to: Return data to the client 42 according to the download address information.

在上述实施例的基础上,所述数据下载系统还包括:源服务器端44;所述述内容分发网络43执行根据所述下载地址信息向所述客户端42返回数据时,具体用于:确认自身缓存中是否存在与所述下载地址信息对应的数据,若存在对应的数据,则将所述数据返回至所述客户端42;若不存在对应的数据,则回源到对应的源服务器端44。所述源服务器端44用于将所述数据返回至所述内容分发网络43,以使所述内容分发网络43将所述数据返回至所述客户端42。On the basis of the above embodiment, the data download system further includes: a source server 44; when the content distribution network 43 returns data to the client 42 according to the download address information, it is specifically used for: confirming Whether there is data corresponding to the download address information in its own cache, if there is corresponding data, the data will be returned to the client 42; if there is no corresponding data, it will be returned 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 .

在上述实施例的基础上,源服务器端44在执行将所述数据返回至所述内容分发网络43时,具体用于:确认是否存在与所述下载地址对应的数据;若存在对应的数据,则将所述数据返回至所述内容分发网络43;若不存在对应的数据,则通过镜像文件拉取对应的数据,并将所述数据返回至所述内容分发网络43。On the basis of the above embodiment, when the source server 44 returns the data to the content distribution network 43, it is specifically used to: confirm whether there is data corresponding to the download address; if there is corresponding data, The data is returned to the content distribution network 43 ; if there is no corresponding data, the corresponding data is pulled through the mirror file, and the data is returned to the content distribution network 43 .

本实施例提供的数据下载系统可以用于执行上述任意实施例提供的数据下载方法,具备相应的功能和有益效果。The data downloading system provided in this embodiment can be used to execute the data downloading method provided by any of the foregoing embodiments, and has corresponding functions and beneficial effects.

实施例五Embodiment 5

图6为本申请实施例五提供的一种数据下载设备的结构示意图。该数据下载设备可以是数据下载系统中的任意物理设备,如数据下载设备为客户端的物理设备,再如,数据下载设备为服务器端的服务器,还如,数据下载设备为内容分发网络中的边缘服务器。具体的,如图6所示,该数据下载设备包括处理器50、存储器51、输入装置52、输出装置53以及通信装置54;该数据下载设备中处理器50的数量可以是一个或多个,图6中以一个处理器50为例;该数据下载设备中的处理器50、存储器51、输入装置52、输出装置53以及通信装置54可以通过总线或其他方式连接,图6中以通过总线连接为例。FIG. 6 is a schematic structural diagram of a data downloading device according to Embodiment 5 of the present application. The data download device may be any physical device in the data download system, for example, the data download device is a client-side physical device, another example, the data download device is a server-side server, or the data download device is an edge server in a content distribution network . Specifically, as shown in FIG. 6 , the data download device includes a processor 50, a memory 51, an input device 52, an output device 53 and a communication device 54; the number of processors 50 in the data download device may be one or more, In FIG. 6, a processor 50 is taken as an example; the processor 50, the memory 51, the input device 52, the output device 53 and the communication device 54 in the data downloading device can be connected by a bus or in other ways. For example.

存储器51作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的数据下载方法中的程序指令/模块(例如,数据下载装置中的标识设置模块301、地址获取模块302和地址返回模块303)。处理器50通过运行存储在存储器51中的软件程序、指令以及模块,从而执行数据下载设备的各种功能应用以及数据处理,即实现上述任意实施例提供的数据下载方法中与数据下载设备有关的操作。As a computer-readable storage medium, the memory 51 can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules in the data downloading method in the embodiments of the present application (for example, the identification settings in the data downloading apparatus). module 301, address acquisition module 302 and address return module 303). The processor 50 executes various functional applications and data processing of the data download device by running the software programs, instructions, and modules stored in the memory 51, that is, implements the data download methods provided in any of the above embodiments related to the data download device. operate.

存储器51可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据数据下载设备的使用所创建的数据等。此外,存储器51可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器51可进一步包括相对于处理器50远程设置的存储器,这些远程存储器可以通过网络连接至数据下载设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program 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 the use of the data download device, and the like. In addition, 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 instances, memory 51 may further include memory located remotely relative to processor 50, and these remote memories may be connected to the data download device through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

输入装置52可用于接收输入的数字或字符信息,以及产生与数据下载设备的用户设置以及功能控制有关的键信号输入。输出装置53可包括显示屏、扬声器等设备。通信装置54用于与数据下载系统中的其他设物理设备进行数据通信。The input device 52 may be used to receive input numerical or character information, and to generate key signal input related to user settings and function control of the data downloading device. The output device 53 may include a display screen, a speaker, and the like. The communication device 54 is used for data communication with other physical devices in the data downloading system.

上述数据下载设备包含在数据下载系统中,可以用于执行任意实施例提供的数据下载方法,具备相应的功能和有益效果。The above data download device is included in the data download system, can be used to execute the data download method provided by any embodiment, and has corresponding functions and beneficial effects.

实施例六Embodiment 6

本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种数据下载方法,该方法包括:Embodiments of the present application further provide a storage medium containing computer-executable instructions, where the computer-executable instructions are used to execute a data downloading method when executed by a computer processor, and the method includes:

客户端根据当前下载重试次数设置相应的数据下载切换标识,并将所述数据下载切换标识发送至服务器端;The client sets the corresponding data download switching identification according to the current download retry times, and sends the data downloading switching identification to the server;

所述服务器端根据所述数据下载切换标识获取对应的下载地址信息;The server side obtains the corresponding download address information according to the data download switching identifier;

所述服务器端将所述下载地址信息返回到所述客户端,以使所述客户端根据所述下载地址信息进行数据下载。The server returns the download address information to the client, so that the client downloads data according to the download address information.

当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本申请任意实施例所提供的数据下载方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided by the embodiments of the present application, the computer-executable instructions thereof are not limited to the above-mentioned method operations, and can also execute the data downloading methods provided in any embodiment of the present application. related operations.

通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本申请可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(RandomAccess Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述的数据下载方法。计算机可执行指令的存储介质可以集成在数据下载系统包含的设备内。From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and necessary general-purpose hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation manner . Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in a computer-readable storage medium, such as a floppy disk of a computer , read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (FLASH), hard disk or CD, etc., including several instructions to make a computer device (which can be a personal computer, A server, or a network device, etc.) executes the data downloading methods described in the various embodiments of the present application. The storage medium of computer-executable instructions may be integrated within the device included in the data download system.

注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present application and applied technical principles. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present application. The scope is determined by the scope of the appended claims.

Claims (10)

1.一种数据下载方法,其特征在于,包括:1. a data downloading method, is characterized in that, comprises: 客户端根据当前下载重试次数设置相应的数据下载切换标识,并将所述数据下载切换标识发送至服务器端;The client sets the corresponding data download switching identification according to the current download retry times, and sends the data downloading switching identification to the server; 所述服务器端根据所述数据下载切换标识获取对应的下载地址信息;The server side obtains the corresponding download address information according to the data download switching identifier; 所述服务器端将所述下载地址信息返回到所述客户端,以使所述客户端根据所述下载地址信息进行数据下载。The server returns the download address information to the client, so that the client downloads data according to the download address information. 2.根据权利要求1所述的数据下载方法,其特征在于,所述服务器端根据所述数据下载切换标识获取对应的下载地址信息包括:2. The data download method according to claim 1, wherein the acquisition of the corresponding download address information by the server according to the data download handover identifier comprises: 所述服务器端根据域名配置信息确定所述数据下载切换标识对应的域名地址信息,所述域名配置信息记录有域名地址信息和数据下载切换标识的对应关系;The server determines the domain name address information corresponding to the data download switching identifier according to the domain name configuration information, and the domain name configuration information records the correspondence between the domain name address information and the data download switching identifier; 所述服务器端对所述域名地址信息进行组装以得到下载地址信息。The server assembles the domain name address information to obtain download address information. 3.根据权利要求2所述的数据下载方法,其特征在于,还包括:3. data downloading method according to claim 2, is characterized in that, also comprises: 所述服务器端根据域名地址信息的权重顺序定时更新所述域名配置信息。The server side regularly updates the domain name configuration information according to the weight sequence of the domain name address information. 4.根据权利要求3所述的数据下载方法,其特征在于,所述服务器端根据域名地址信息的权重顺序定时更新所述域名配置信息包括:4. The data download method according to claim 3, wherein the server side regularly updating the domain name configuration information according to the weight sequence of the domain name address information comprises: 所述服务器端定时获取域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息;和/或,The server periodically obtains the weight order of the domain name address information, and updates the domain name configuration information according to the weight order; and/or, 所述服务器端通过与域名地址信息对应的故障通知信息确定所述域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息;和/或,The server side determines the weight order of the domain name address information according to the fault notification information corresponding to the domain name address information, and updates the domain name configuration information according to the weight order; and/or, 所述服务器端通过客户端返回的下载失败信息确定对应域名地址信息的权重顺序,并根据所述权重顺序更新所述域名配置信息。The server determines the weight order 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 order. 5.根据权利要求1所述的数据下载方法,其特征在于,所述服务器端将所述下载地址信息返回到所述客户端之后,还包括:5. The data download method according to claim 1, wherein after the server returns the download address information to the client, the method further comprises: 所述客户端根据所述下载地址信息访问内容分发网络,以使所述内容分发网络根据所述下载地址信息向所述客户端返回数据。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. 6.根据权利要求5所述的数据下载方法,其特征在于,所述客户端根据所述下载地址信息访问内容分发网络,以使所述内容分发网络根据所述下载地址信息向所述客户端返回数据包括:6 . The data download method according to claim 5 , wherein the client accesses a content distribution network according to the download address information, so that the content distribution network sends the data to the client according to the download address information. 7 . The returned data includes: 所述客户端根据所述下载地址信息访问内容分发网络;The client accesses the content distribution network according to the download address information; 所述内容分发网络确认自身缓存中是否存在与所述下载地址信息对应的数据;The content distribution network confirms whether there is data corresponding to the download address information in its own cache; 若存在对应的数据,则所述内容分发网络将所述数据返回至所述客户端;If there is corresponding data, the content distribution network returns the data to the client; 若不存在对应的数据,则所述内容分发网络回源到对应的源服务器端;If there is no corresponding data, the content distribution network returns the source to the corresponding source server; 所述源服务器端将所述数据返回至所述内容分发网络,以使所述内容分发网络将所述数据返回至所述客户端。The origin server returns the data to the content distribution network, so that the content distribution network returns the data to the client. 7.根据权利要求6所述的数据下载方法,其特征在于,所述源服务器端将所述数据返回至所述内容分发网络包括:7. The data downloading method according to claim 6, wherein, returning the data to the content distribution network by the source server comprises: 所述源服务器端确认是否存在与所述下载地址信息对应的数据;The source server side confirms whether there is data corresponding to the download address information; 若存在对应的数据,则所述源服务器端将所述数据返回至所述内容分发网络;If there is corresponding data, the source server returns the data to the content distribution network; 若不存在对应的数据,则所述源服务器端通过镜像文件拉取对应的数据,并将所述数据返回至所述内容分发网络。If there is no corresponding data, the source server pulls the corresponding data through the mirror file, and returns the data to the content distribution network. 8.一种数据下载装置,其特征在于,包括:8. A device for downloading data, comprising: 标识设置模块,配置于客户端,用于根据当前下载重试次数设置相应的数据下载切换标识,并将所述数据下载切换标识发送至服务器端;an identification setting module, configured on the client, for setting the corresponding data download switching identification according to the current download retry times, and sending the data downloading switching identification to the server; 地址获取模块,配置于服务器端,用于根据所述数据下载切换标识获取对应的下载地址信息;An address obtaining module, configured on the server side, is configured to obtain corresponding download address information according to the data download switching identifier; 地址返回模块,配置于服务器端,用于将所述下载地址信息返回到所述客户端,以使所述客户端根据所述下载地址信息进行数据下载。The address return module is configured on the server side, and is used for returning the download address information to the client, so that the client downloads data according to the download address information. 9.一种数据下载系统,其特征在于,包括服务器端和客户端;9. A system for downloading data, comprising a server and a client; 所述客户端用于根据当前下载重试次数设置相应的数据下载切换标识,并将所述数据下载切换标识发送至服务器端,还用于根据所述服务器端返回的下载地址信息进行数据下载;The client is used for setting the corresponding data download switching identification according to the current download retry times, and sending the data downloading switching identification to the server, and is also used for downloading data according to the download address information returned by the server; 所述服务器端用于根据所述数据下载切换标识获取对应的下载地址信息,将所述下载地址信息返回到所述客户端。The server side is configured to acquire corresponding download address information according to the data download switching identifier, and return the download address information to the client terminal. 10.一种包含计算机可执行指令的存储介质,其特征在于,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-7中任一所述的数据下载方法。10. A storage medium containing computer-executable instructions, wherein the computer-executable instructions are used to execute the data downloading method according to any one of claims 1-7 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 true CN111526185A (en) 2020-08-11
CN111526185B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770119A (en) * 2020-09-03 2020-10-13 云盾智慧安全科技有限公司 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
CN113660323A (en) * 2021-08-05 2021-11-16 百度在线网络技术(北京)有限公司 Method, apparatus, and computer-readable storage medium for communication between devices
CN114401185A (en) * 2021-12-31 2022-04-26 宝宝巴士股份有限公司 Method for automatically switching download addresses
CN117194481A (en) * 2023-09-07 2023-12-08 中国银行股份有限公司 Data acquisition methods, devices, electronic equipment and storage media

Citations (7)

* 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
CN104320487A (en) * 2014-11-11 2015-01-28 网宿科技股份有限公司 HTTP dispatching system and method for content delivery network
CN109474668A (en) * 2018-10-16 2019-03-15 平安科技(深圳)有限公司 CDN service switching method, device, computer equipment and storage medium
CN109547261A (en) * 2018-12-12 2019-03-29 平安科技(深圳)有限公司 Service line switching method, device, electronic equipment and storage medium
CN109769040A (en) * 2018-12-14 2019-05-17 平安普惠企业管理有限公司 Content delivery network service switching method, device, equipment and storage medium
CN110138808A (en) * 2019-06-27 2019-08-16 苏宁消费金融有限公司 Anti-hijacking method for down loading and system based on CDN
CN110839049A (en) * 2018-08-15 2020-02-25 阿里巴巴集团控股有限公司 Data scheduling method and system based on domain name system

Patent Citations (7)

* 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
CN104320487A (en) * 2014-11-11 2015-01-28 网宿科技股份有限公司 HTTP dispatching system and method for content delivery network
CN110839049A (en) * 2018-08-15 2020-02-25 阿里巴巴集团控股有限公司 Data scheduling method and system based on domain name system
CN109474668A (en) * 2018-10-16 2019-03-15 平安科技(深圳)有限公司 CDN service switching method, device, computer equipment and storage medium
CN109547261A (en) * 2018-12-12 2019-03-29 平安科技(深圳)有限公司 Service line switching method, device, electronic equipment and storage medium
CN109769040A (en) * 2018-12-14 2019-05-17 平安普惠企业管理有限公司 Content delivery network service switching method, device, equipment and storage medium
CN110138808A (en) * 2019-06-27 2019-08-16 苏宁消费金融有限公司 Anti-hijacking method for down loading and system based on CDN

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770119A (en) * 2020-09-03 2020-10-13 云盾智慧安全科技有限公司 Website resource acquisition method, system, device and computer storage medium
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
CN113660323A (en) * 2021-08-05 2021-11-16 百度在线网络技术(北京)有限公司 Method, apparatus, and computer-readable storage medium for communication between devices
CN114401185A (en) * 2021-12-31 2022-04-26 宝宝巴士股份有限公司 Method for automatically switching download addresses
CN117194481A (en) * 2023-09-07 2023-12-08 中国银行股份有限公司 Data acquisition methods, devices, electronic equipment and storage media

Also Published As

Publication number Publication date
CN111526185B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN111526185A (en) Data downloading method, device, system and storage medium
US8156219B2 (en) System and method of health monitoring and fault monitoring in a network system
US9009267B2 (en) Method and system for purging content from a content delivery network
CN103856569B (en) A kind of method and apparatus of synchronous domain name system asset information
US7725766B2 (en) System for synchronizing replicas of a database
CN104717314B (en) A kind of IP management method and system, client, server
US8406123B2 (en) Sip presence server failover
US20090201799A1 (en) High-Availability Network Systems
US6992985B1 (en) Method and system for auto discovery of IP-based network elements
JP2004280738A (en) Proxy responder
US10469311B2 (en) Handling network failures in networks with redundant servers
CN115103008B (en) Service request forwarding system
CN107707689A (en) A kind of DHCP message processing method, Dynamic Host Configuration Protocol server and gateway device
CN112671554A (en) Node fault processing method and related device
CN115842863A (en) Cache node scheduling method, device and equipment, and medium
CN112039718A (en) Upgrade status detection method, server, device and storage medium
US8645570B2 (en) System and method for the issuance of an emergency text alert in response to the redirection of a website
WO2014032553A1 (en) Network resource management method and device, client and system
CN113949631A (en) Disaster recovery method, system and electronic device for client
CN102577249B (en) Connected instance groups for dynamically addressed hosts
CN110300140B (en) Method for updating content in cloud distribution network, refreshing client and network node
US20230146880A1 (en) Management system and management method
CN114697201A (en) Data processing method and device based on application client side proxy request
CN109510864B (en) A kind of forwarding method, transmission method and related device of cache request
CN115701067A (en) Method, device and system for switching edge nodes of user side

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