[go: up one dir, main page]

CN111026416A - Data updating method, system, device, electronic equipment and computer storage medium - Google Patents

Data updating method, system, device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN111026416A
CN111026416A CN201910878239.1A CN201910878239A CN111026416A CN 111026416 A CN111026416 A CN 111026416A CN 201910878239 A CN201910878239 A CN 201910878239A CN 111026416 A CN111026416 A CN 111026416A
Authority
CN
China
Prior art keywords
update
target application
data
target
gateway
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.)
Pending
Application number
CN201910878239.1A
Other languages
Chinese (zh)
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.)
Lazas Network Technology Shanghai Co Ltd
Original Assignee
Lazas Network Technology Shanghai 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 Lazas Network Technology Shanghai Co Ltd filed Critical Lazas Network Technology Shanghai Co Ltd
Priority to CN201910878239.1A priority Critical patent/CN111026416A/en
Priority to PCT/CN2020/076892 priority patent/WO2021051747A1/en
Publication of CN111026416A publication Critical patent/CN111026416A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/134Distributed indices
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本公开实施例公开了一种数据更新方法、系统、装置、电子设备及计算机存储介质,所述数据更新方法包括将目标应用的更新数据上传至内容分发服务器;获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。该技术方案缓解了服务器接收更新信息请求的压力,同时避免了客户端轮询主动请求更新数据方式中所产生的资源浪费的问题。

Figure 201910878239

Embodiments of the present disclosure disclose a data update method, system, device, electronic device, and computer storage medium. The data update method includes uploading update data of a target application to a content distribution server; obtaining the update data in the content Update information on the distribution server, wherein the update information includes information that can obtain a first storage address and a first update timestamp of the update data on the content distribution server; Update information request, and return the update information. The technical solution relieves the pressure of the server receiving the update information request, and at the same time avoids the problem of resource waste caused by the client polling and actively requesting update data.

Figure 201910878239

Description

数据更新方法、系统、装置、电子设备及计算机存储介质Data update method, system, device, electronic device and computer storage medium

技术领域technical field

本公开涉及计算机应用技术领域,具体涉及一种数据更新方法、系统、装置、电子设备及计算机存储介质。The present disclosure relates to the technical field of computer applications, and in particular, to a data update method, system, device, electronic device, and computer storage medium.

背景技术Background technique

随着互联网技术的发展,用户对客户端应用(APP)功能的丰富化和多样化提出了更高的需求,服务器端技术开发人员需要不断改进应用的功能,形成应用的更新数据,并生成新的应用版本,从而使用户在客户端进行应用更新。现有技术中,客户端获取应用更新数据一般采用两种方式:服务器主动推送更新数据或者客户端轮询主动请求更新数据。服务器主动推送更新数据,即服务器与客户端建立长链接,当服务器端有应用的更新数据时,会主动将应用的更新数据推送给目标客户端。客户端轮询主动请求更新数据,即客户端可以自行控制请求时间周期,向服务器请求最新的应用更新数据。With the development of Internet technology, users have put forward higher requirements for the enrichment and diversification of client application (APP) functions. Server-side technology developers need to continuously improve the functions of applications, form updated data of applications, and generate new , so that users can update the application on the client side. In the prior art, there are generally two ways for the client to obtain the application update data: the server actively pushes the update data or the client polls and actively requests the update data. The server actively pushes the update data, that is, the server establishes a long link with the client. When the server has updated data of the application, it will actively push the updated data of the application to the target client. The client polls actively to request update data, that is, the client can control the request time period and request the latest application update data from the server.

发明内容SUMMARY OF THE INVENTION

为了解决相关技术中的问题,本公开实施例提供一种数据更新方法、系统、装置、电子设备及计算机存储介质。In order to solve the problems in the related art, embodiments of the present disclosure provide a data update method, system, apparatus, electronic device, and computer storage medium.

第一方面,本公开实施例中提供了一种数据更新方法。In a first aspect, an embodiment of the present disclosure provides a data update method.

具体地,所述数据更新方法,包括:Specifically, the data update method includes:

将目标应用的更新数据上传至内容分发服务器;Upload the update data of the target application to the content distribution server;

获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;Acquiring update information of the update data on the content distribution server, wherein the update information includes information that can obtain a first storage address and a first update timestamp of the update data on the content distribution server;

响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。The update information is returned in response to the update information request by the gateway for the target application.

结合第一方面,本公开在第一方面的第一种实现方式中,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。With reference to the first aspect, in a first implementation manner of the first aspect of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp .

结合第一方面,本公开在第一方面的第二种实现方式中,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。With reference to the first aspect, in a second implementation manner of the first aspect of the present disclosure, the update information includes a second storage address and a second update timestamp of the index file corresponding to the target application on the content distribution server ; the index file includes the service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

结合第一方面的第二种实现方式,本公开在第一方面的第三种实现方式中,获取所述更新数据在所述内容分发服务器上的更新信息,包括:With reference to the second implementation manner of the first aspect, in the third implementation manner of the first aspect of the present disclosure, acquiring the update information of the update data on the content distribution server includes:

获取所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳;acquiring the first storage address and the first update timestamp of the update data on the content distribution server;

根据所述第一存储地址和所述第一更新时间戳更新所述索引文件;Update the index file according to the first storage address and the first update timestamp;

将所述索引文件上传至所述内容分发服务器;uploading the index file to the content distribution server;

获取所述第二存储地址和所述第二更新时间戳。Obtain the second storage address and the second update timestamp.

结合第一方面的第三种实现方式,本公开在第一方面的第四种实现方式中,所述根据所述第一存储地址和所述第一更新时间戳更新所述索引文件,包括:With reference to the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect of the present disclosure, the updating of the index file according to the first storage address and the first update timestamp includes:

将所述索引文件中所述目标业务的所述业务标识所关联的所述更新地址和所述更新时间戳更新为所述第一存储地址和所述第一更新时间戳。The update address and the update timestamp associated with the service identifier of the target service in the index file are updated to the first storage address and the first update timestamp.

结合第一方面的第二种实现方式,本公开在第一方面的第五种实现方式中,所述目标业务包括配置中心业务、离线包业务和补丁业务。With reference to the second implementation manner of the first aspect, in a fifth implementation manner of the first aspect of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

第二方面,本公开实施例中提供了一种数据更新方法。In a second aspect, an embodiment of the present disclosure provides a data update method.

具体地,所述数据更新方法,包括:Specifically, the data update method includes:

接收目标应用发送的请求,其中,所述请求包括所述目标应用的应用标识;receiving a request sent by a target application, wherein the request includes an application identifier of the target application;

将所述目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。Carrying the update information of the target application in the response data and returning it to the client, where the update information includes a first storage address and a first update timestamp on the content distribution server that can obtain the update data of the target application Information.

结合第二方面,本公开在第二方面的第一种实现方式中,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。With reference to the second aspect, in a first implementation manner of the second aspect, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp .

结合第二方面,本公开在第二方面的第二种实现方式中,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。With reference to the second aspect, in a second implementation manner of the second aspect of the present disclosure, the update information includes a second storage address and a second update timestamp of the index file corresponding to the target application on the content distribution server ; the index file includes the service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

结合第二方面,本公开在第二方面的第三种实现方式中,所述将所述目标应用的更新信息携带在响应数据中返回给客户端,包括:With reference to the second aspect, in a third implementation manner of the second aspect of the present disclosure, the carrying the update information of the target application in the response data and returning it to the client includes:

根据所述应用标识确定本地是否存储有所述目标应用的更新信息;Determine whether the update information of the target application is stored locally according to the application identifier;

在本地存储有所述目标应用的更新信息时,将所述目标应用的更新信息携带在所述响应数据中返回给客户端。When the update information of the target application is stored locally, the update information of the target application is carried in the response data and returned to the client.

结合第二方面,本公开在第二方面的第四种实现方式中,所述接收目标应用发送的请求之后,还包括:With reference to the second aspect, in a fourth implementation manner of the second aspect, after receiving the request sent by the target application, the present disclosure further includes:

获取所述请求中携带的所述目标应用的所述应用标识;obtaining the application identifier of the target application carried in the request;

在本地应用列表中未存储所述应用标识时,将所述应用标识加入所述本地应用列表。When the application identifier is not stored in the local application list, the application identifier is added to the local application list.

结合第二方面的第四种实现方式,本公开在第二方面的第五种实现方式中,还包括:In conjunction with the fourth implementation manner of the second aspect, in the fifth implementation manner of the second aspect, the present disclosure further includes:

周期性地向服务器发送所述目标应用的更新信息请求;Periodically sending an update information request of the target application to the server;

接收所述服务器返回的所述目标应用的所述更新信息。The update information of the target application returned by the server is received.

结合第二方面的第二种实现方式,本公开在第二方面的第六种实现方式中,所述目标业务包括配置中心业务、离线包业务和补丁业务。With reference to the second implementation manner of the second aspect, in a sixth implementation manner of the second aspect of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

第三方面,本公开实施例中提供了一种数据更新方法。In a third aspect, an embodiment of the present disclosure provides a data update method.

具体地,所述数据更新方法,包括:Specifically, the data update method includes:

向网关发送携带有目标应用的应用标识的请求;Send a request carrying the application identifier of the target application to the gateway;

接收所述网关返回的响应数据;receiving the response data returned by the gateway;

获取所述网关添加在所述响应数据中的更新信息,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;acquiring the update information added by the gateway to the response data, wherein the update information includes information that can acquire the first storage address and the first update timestamp of the update data of the target application on the content distribution server;

根据所述更新信息确定是否更新所述目标应用。Whether to update the target application is determined according to the update information.

结合第三方面,本公开在第三方面的第一种实现方式中,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。With reference to the third aspect, in a first implementation manner of the third aspect of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp .

结合第三方面,本公开在第三方面的第二种实现方式中,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。With reference to the third aspect, in a second implementation manner of the third aspect of the present disclosure, the update information includes a second storage address and a second update timestamp of the index file corresponding to the target application on the content distribution server ; the index file includes the service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

结合第三方面,本公开在第三方面的第三种实现方式中,所述向网关发送携带有目标应用的应用标识的请求,包括:With reference to the third aspect, in a third implementation manner of the third aspect of the present disclosure, the sending a request carrying the application identifier of the target application to the gateway includes:

拦截所述目标应用向服务器发送的所述请求;Intercepting the request sent by the target application to the server;

将所述目标应用的应用标识携带在所述请求中发送至所述服务器的网关。The application identifier of the target application is carried in the request and sent to the gateway of the server.

结合第三方面的第一种实现方式,本公开在第三方面的第四种实现方式中,所述根据所述更新信息确定是否更新所述目标应用,包括:With reference to the first implementation manner of the third aspect, in a fourth implementation manner of the third aspect of the present disclosure, the determining whether to update the target application according to the update information includes:

在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,记录所述目标应用有更新数据。When the first update time stamp is later than the third local update time stamp of the target application, it is recorded that the target application has update data.

结合第三方面的第一种实现方式,本公开在第三方面的第五种实现方式中,所述根据所述更新信息确定是否更新所述目标应用,包括:With reference to the first implementation manner of the third aspect, in a fifth implementation manner of the third aspect of the present disclosure, the determining whether to update the target application according to the update information includes:

在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,从所述第一存储地址下载所述目标应用的更新数据;When the first update time stamp is later than the local third update time stamp of the target application, downloading the update data of the target application from the first storage address;

根据所述目标应用的更新数据更新所述目标应用。The target application is updated according to the update data of the target application.

结合第三方面的第二种实现方式,本公开在第三方面的第六种实现方式中,所述根据所述更新信息确定是否更新所述目标应用,包括:With reference to the second implementation manner of the third aspect, in a sixth implementation manner of the third aspect of the present disclosure, the determining whether to update the target application according to the update information includes:

在所述第二更新时间戳晚于本地索引文件的第四更新时间戳时,从所述第二存储地址下载所述索引文件;When the second update time stamp is later than the fourth update time stamp of the local index file, downloading the index file from the second storage address;

根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用。Whether to update the target application is determined according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file.

结合第三方面的第六种实现方式,本公开在第三方面的第七种实现方式中,所述根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括:With reference to the sixth implementation manner of the third aspect, in the seventh implementation manner of the third aspect of the present disclosure, the determination is based on the first update timestamp corresponding to the service identifier of the at least one target service in the index file. Whether to update the target application, including:

在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,记录所述目标业务有更新数据。When the first update time stamp is later than the locally stored fifth update time stamp corresponding to the at least one target service, record that the target service has update data.

结合第三方面的第六种实现方式,本公开在第三方面的第八种实现方式中,所述根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括:With reference to the sixth implementation manner of the third aspect, in the eighth implementation manner of the third aspect of the present disclosure, the determination is based on the first update timestamp corresponding to the service identifier of the at least one target service in the index file. Whether to update the target application, including:

在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,从所述第一存储地址下载所述目标业务的更新数据;When the first update time stamp is later than the locally stored fifth update time stamp corresponding to the at least one target service, downloading the update data of the target service from the first storage address;

根据所述目标业务的更新数据更新所述目标业务。The target service is updated according to the update data of the target service.

结合第三方面的第二种实现方式,本公开在第三方面的第九种实现方式中,所述目标业务包括配置中心业务、离线包业务和补丁业务。With reference to the second implementation manner of the third aspect, in a ninth implementation manner of the third aspect of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

第四方面,本公开实施例中提供了一种数据更新方法。In a fourth aspect, an embodiment of the present disclosure provides a data update method.

具体地,所述数据更新方法,包括:Specifically, the data update method includes:

服务器将目标应用的更新数据上传至内容分发服务器,并获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;The server uploads the update data of the target application to the content distribution server, and obtains the update information of the update data on the content distribution server, wherein the update information includes that the update data can be obtained on the content distribution server information of the first storage address and the first update timestamp;

所述服务器响应于网关针对所述目标应用的更新信息请求,向所述网关返回所述更新信息;The server returns the update information to the gateway in response to the update information request of the gateway for the target application;

所述网关接收所述目标应用发送的请求,并将所述目标应用的所述更新信息携带在响应数据中返回给客户端,其中,所述请求包括所述目标应用的应用标识;The gateway receives the request sent by the target application, and returns the update information of the target application in response data to the client, wherein the request includes the application identifier of the target application;

所述客户端获取所述网关添加在所述响应数据中的所述更新信息,并根据所述更新信息确定是否更新所述目标应用。The client acquires the update information added by the gateway in the response data, and determines whether to update the target application according to the update information.

结合第四方面,本公开在第四方面的第一种实现方式中,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。With reference to the fourth aspect, in a first implementation manner of the fourth aspect of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp .

结合第四方面,本公开在第四方面的第二种实现方式中,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。With reference to the fourth aspect, in a second implementation manner of the fourth aspect of the present disclosure, the update information includes a second storage address and a second update timestamp of the index file corresponding to the target application on the content distribution server ; the index file includes the service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

结合第四方面的第二种实现方式,本公开在第四方面的第三种实现方式中,所述获取所述更新数据在所述内容分发服务器上的更新信息,包括:With reference to the second implementation manner of the fourth aspect, in a third implementation manner of the fourth aspect of the present disclosure, the acquiring the update information of the update data on the content distribution server includes:

所述服务器获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳;obtaining, by the server, a first storage address and a first update timestamp of the update data on the content distribution server;

所述服务器根据所述第一存储地址和第一更新时间戳更新所述索引文件;The server updates the index file according to the first storage address and the first update timestamp;

所述服务器将所述索引文件上传至所述内容分发服务器;The server uploads the index file to the content distribution server;

所述服务器获取所述第二存储地址和所述第二更新时间戳。The server obtains the second storage address and the second update timestamp.

结合第四方面的第三种实现方式,本公开在第四方面的第四种实现方式中,所述服务器根据所述第一存储地址和第一更新时间戳更新所述索引文件,包括:With reference to the third implementation manner of the fourth aspect, in a fourth implementation manner of the fourth aspect of the present disclosure, the server updates the index file according to the first storage address and the first update timestamp, including:

所述服务器将所述索引文件中所述目标业务的所述业务标识所关联的所述更新地址和所述更新时间戳更新为所述第一存储地址和所述第一更新时间戳。The server updates the update address and the update timestamp associated with the service identifier of the target service in the index file to the first storage address and the first update timestamp.

结合第四方面,本公开在第四方面的第五种实现方式中,所述网关接收所述目标应用发送的请求,并将所述目标应用的所述更新信息携带在响应数据中返回给客户端,包括:With reference to the fourth aspect, in a fifth implementation manner of the fourth aspect of the present disclosure, the gateway receives the request sent by the target application, and carries the update information of the target application in response data and returns it to the client end, including:

所述网关获取所述请求中携带的所述目标应用的所述应用标识;obtaining, by the gateway, the application identifier of the target application carried in the request;

在本地应用列表中未存储所述应用标识时,所述网关将所述应用标识加入所述本地应用列表;When the application identifier is not stored in the local application list, the gateway adds the application identifier to the local application list;

所述网关根据所述应用标识确定本地是否存储有所述目标应用的更新信息;The gateway determines whether the update information of the target application is stored locally according to the application identifier;

在本地存储有所述目标应用的更新信息时,所述网关将所述目标应用的更新信息携带在所述响应数据中返回给客户端。When the update information of the target application is stored locally, the gateway carries the update information of the target application in the response data and returns it to the client.

结合第四方面,本公开在第四方面的第六种实现方式中,还包括:In conjunction with the fourth aspect, in a sixth implementation manner of the fourth aspect, the present disclosure further includes:

所述网关周期性地向所述服务器发送所述目标应用的所述更新信息请求;The gateway periodically sends the update information request of the target application to the server;

所述网关接收所述服务器返回的所述目标应用的所述更新信息。The gateway receives the update information of the target application returned by the server.

结合第四方面,本公开在第四方面的第七种实现方式中,还包括:In conjunction with the fourth aspect, in a seventh implementation manner of the fourth aspect, the present disclosure further includes:

所述客户端向所述网关发送携带有所述目标应用的所述应用标识的所述请求;sending, by the client, the request carrying the application identifier of the target application to the gateway;

所述客户端接收所述网关返回的所述响应数据。The client receives the response data returned by the gateway.

结合第四方面的第七种实现方式,本公开在第四方面的第八种实现方式中,所述客户端向所述网关发送携带有所述目标应用的所述应用标识的所述请求,包括:With reference to the seventh implementation manner of the fourth aspect, in the eighth implementation manner of the fourth aspect of the present disclosure, the client sends the request carrying the application identifier of the target application to the gateway, include:

所述客户端拦截所述目标应用向所述服务器发送的所述请求;The client intercepts the request sent by the target application to the server;

所述客户端将所述目标应用的所述应用标识携带在所述请求中发送至所述服务器的所述网关。The client sends the request to the gateway of the server by carrying the application identifier of the target application in the request.

结合第四方面的第一种实现方式,本公开在第四方面的第九种实现方式中,所述客户端根据所述更新信息确定是否更新所述目标应用,包括:With reference to the first implementation manner of the fourth aspect, in a ninth implementation manner of the fourth aspect, the client determines whether to update the target application according to the update information, including:

在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,所述客户端记录所述目标应用有更新数据。When the first update timestamp is later than the local third update timestamp of the target application, the client records that the target application has updated data.

结合第四方面的第一种实现方式,本公开在第四方面的第十种实现方式中,所述客户端根据所述更新信息确定是否更新所述目标应用,包括:With reference to the first implementation manner of the fourth aspect, in a tenth implementation manner of the fourth aspect, the client determines whether to update the target application according to the update information, including:

在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,所述客户端从所述第一存储地址下载所述目标应用的更新数据;When the first update timestamp is later than the local third update timestamp of the target application, the client downloads the update data of the target application from the first storage address;

所述客户端根据所述目标应用的更新数据更新所述目标应用。The client updates the target application according to the update data of the target application.

结合第四方面的第二种实现方式,本公开在第四方面的第十一种实现方式中,所述客户端根据所述更新信息确定是否更新所述目标应用,包括:With reference to the second implementation manner of the fourth aspect, in an eleventh implementation manner of the fourth aspect, the client determines whether to update the target application according to the update information, including:

在所述第二更新时间戳晚于本地索引文件的第四更新时间戳时,所述客户端从所述第二存储地址下载所述索引文件;When the second update time stamp is later than the fourth update time stamp of the local index file, the client downloads the index file from the second storage address;

所述客户端根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用。The client determines whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file.

结合第四方面的第十一种实现方式,本公开在第四方面的第十二种实现方式中,所述客户端根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括:With reference to the eleventh implementation manner of the fourth aspect, in the twelfth implementation manner of the fourth aspect of the present disclosure, the client is based on the first The update timestamp determines whether to update the target application, including:

在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,所述客户端记录所述目标业务有更新数据。When the first update timestamp is later than the locally stored fifth update timestamp corresponding to the at least one target service, the client records that the target service has updated data.

结合第四方面的第十一种实现方式,本公开在第四方面的第十三种实现方式中,所述客户端根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括:With reference to the eleventh implementation manner of the fourth aspect, in the thirteenth implementation manner of the fourth aspect of the present disclosure, the client is based on the first The update timestamp determines whether to update the target application, including:

在所述第一时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,所述客户端从所述第一存储地址下载所述目标业务的更新数据;When the first timestamp is later than the locally stored fifth update timestamp corresponding to the at least one target service, the client downloads the update data of the target service from the first storage address;

所述客户端根据所述目标业务的更新数据更新所述目标业务。The client updates the target service according to the update data of the target service.

结合第四方面的第二种实现方式,本公开在第四方面的第十四种实现方式中,所述目标业务包括配置中心业务、离线包业务和补丁业务。With reference to the second implementation manner of the fourth aspect, in a fourteenth implementation manner of the fourth aspect of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

第五方面,本公开实施例中提供了一种数据更新系统。In a fifth aspect, an embodiment of the present disclosure provides a data update system.

具体地,所述数据更新系统,包括:服务器、网关和客户端,其中,Specifically, the data update system includes: a server, a gateway and a client, wherein,

所述服务器,用于将目标应用的更新数据上传至内容分发服务器,获取所述更新数据在所述内容分发服务器上的更新信息,并响应于网关针对所述目标应用的更新信息请求,向所述网关返回所述更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;The server is configured to upload the update data of the target application to the content distribution server, obtain the update information of the update data on the content distribution server, and in response to the update information request for the target application by the gateway, send the update information to the content distribution server. the gateway returns the update information, wherein the update information includes information that can obtain the first storage address and the first update timestamp of the update data on the content distribution server;

所述网关,用于接收所述目标应用发送的请求,将所述目标应用的所述更新信息携带在响应数据中返回给客户端,其中,所述请求包括所述目标应用的应用标识;the gateway, configured to receive a request sent by the target application, and carry the update information of the target application in response data and return it to the client, where the request includes the application identifier of the target application;

所述客户端,用于向所述网关发送携带有所述目标应用的所述应用标识的所述请求,接收所述网关返回的所述响应数据,获取所述网关添加在所述响应数据中的更新信息,根据所述更新信息确定是否更新所述目标应用。The client is configured to send the request carrying the application identifier of the target application to the gateway, receive the response data returned by the gateway, obtain the gateway and add it to the response data update information, and determine whether to update the target application according to the update information.

结合第五方面,本公开在第五方面的第一种实现方式中,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。With reference to the fifth aspect, in a first implementation manner of the fifth aspect, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp .

结合第五方面,本公开在第五方面的第二种实现方式中,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。With reference to the fifth aspect, in a second implementation manner of the fifth aspect of the present disclosure, the update information includes a second storage address and a second update timestamp of the index file corresponding to the target application on the content distribution server ; the index file includes the service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

结合第五方面的第二种实现方式,本公开在第五方面的第三种实现方式中,所述服务器用于获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳,根据所述第一存储地址和第一更新时间戳更新所述索引文件,将所述索引文件上传至所述内容分发服务器,获取所述第二存储地址和所述第二更新时间戳。With reference to the second implementation manner of the fifth aspect, in a third implementation manner of the fifth aspect, the server is configured to acquire the first storage address and the first storage address of the update data on the content distribution server. Update the timestamp, update the index file according to the first storage address and the first update timestamp, upload the index file to the content distribution server, and obtain the second storage address and the second update time stamp.

结合第五方面的第三种实现方式,本公开在第五方面的第四种实现方式中,所述服务器用于将所述索引文件中所述目标业务的所述业务标识所关联的所述更新地址和所述更新时间戳更新为所述第一存储地址和所述第一更新时间戳。With reference to the third implementation manner of the fifth aspect, in a fourth implementation manner of the fifth aspect, the server is configured to associate the service identifier of the target service in the index file with the The update address and the update timestamp are updated to the first storage address and the first update timestamp.

结合第五方面,本公开在第五方面的第五种实现方式中,所述网关用于获取所述请求中携带的所述目标应用的所述应用标识,在本地应用列表中未存储所述应用标识时,将所述应用标识加入所述本地应用列表,根据所述应用标识确定本地是否存储有所述目标应用的更新信息,在本地存储有所述目标应用的更新信息时,将所述目标应用的更新信息携带在所述响应数据中返回给客户端。With reference to the fifth aspect, in a fifth implementation manner of the fifth aspect of the present disclosure, the gateway is configured to obtain the application identifier of the target application carried in the request, and the application identifier is not stored in the local application list When applying an identifier, add the application identifier to the local application list, determine whether the update information of the target application is locally stored according to the application identifier, and when the update information of the target application is stored locally, add the update information of the target application to the local application list. The update information of the target application is carried in the response data and returned to the client.

结合第五方面,本公开在第五方面的第六种实现方式中,所述网关用于周期性地向所述服务器发送所述目标应用的所述更新信息请求,并接收所述服务器返回的所述目标应用的所述更新信息。With reference to the fifth aspect, in a sixth implementation manner of the fifth aspect, the gateway is configured to periodically send the update information request of the target application to the server, and receive the information returned by the server. the update information of the target application.

结合第五方面,本公开在第五方面的第七种实现方式中,所述客户端用于向所述网关发送携带有所述目标应用的所述应用标识的所述请求,并接收所述网关返回的所述响应数据。With reference to the fifth aspect, in a seventh implementation manner of the fifth aspect, the client is configured to send the request carrying the application identifier of the target application to the gateway, and receive the request The response data returned by the gateway.

结合第五方面的第七种实现方式,本公开在第五方面的第八种实现方式中,所述客户端用于拦截所述目标应用向所述服务器发送的所述请求,并将所述目标应用的所述应用标识携带在所述请求中发送至所述服务器的所述网关。With reference to the seventh implementation manner of the fifth aspect, in the eighth implementation manner of the fifth aspect, the client is configured to intercept the request sent by the target application to the server, and send the request to the server. The application identifier of the target application is carried in the request and sent to the gateway of the server.

结合第五方面的第一种实现方式,本公开在第五方面的第九种实现方式中,所述客户端用于在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,记录所述目标应用有更新数据。With reference to the first implementation manner of the fifth aspect, in a ninth implementation manner of the fifth aspect, the client is configured to: When the timestamp is updated, it is recorded that the target application has updated data.

结合第五方面的第一种实现方式,本公开在第五方面的第十种实现方式中,所述客户端用于在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,从所述第一存储地址下载所述目标应用的更新数据,根据所述目标应用的更新数据更新所述目标应用。With reference to the first implementation manner of the fifth aspect, in a tenth implementation manner of the fifth aspect, the client is configured to, when the first update timestamp is later than the local third update timestamp of the target application When the time stamp is updated, the update data of the target application is downloaded from the first storage address, and the target application is updated according to the update data of the target application.

结合第五方面的第二种实现方式,本公开在第五方面的第十一种实现方式中,所述客户端在所述第二更新时间戳晚于本地索引文件的第四更新时间戳时,从所述第二存储地址下载所述索引文件,根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用。With reference to the second implementation manner of the fifth aspect, in an eleventh implementation manner of the fifth aspect of the present disclosure, when the second update timestamp of the client is later than the fourth update timestamp of the local index file , downloading the index file from the second storage address, and determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file.

结合第五方面的第十一种实现方式,本公开在第五方面的第十二种实现方式中,所述客户端在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,记录所述目标业务有更新数据。With reference to the eleventh implementation manner of the fifth aspect, in the twelfth implementation manner of the fifth aspect of the present disclosure, the first update timestamp of the client is later than the locally stored at least one target service When the corresponding fifth update time stamp is used, it is recorded that the target service has update data.

结合第五方面的第十一种实现方式,本公开在第五方面的第十三种实现方式中,所述客户端在所述第一时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,从所述第一存储地址下载所述目标业务的更新数据,根据所述目标业务的更新数据更新所述目标业务。With reference to the eleventh implementation manner of the fifth aspect, in the thirteenth implementation manner of the fifth aspect of the present disclosure, the first time stamp of the client is later than the locally stored corresponding to the at least one target service. When the fifth update time stamp is set, the update data of the target service is downloaded from the first storage address, and the target service is updated according to the update data of the target service.

结合第五方面的第二种实现方式,本公开在第五方面的第十四种实现方式中,所述目标业务包括配置中心业务、离线包业务和补丁业务。With reference to the second implementation manner of the fifth aspect, in the fourteenth implementation manner of the fifth aspect of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

第六方面,本公开实施例中提供了一种数据更新装置。In a sixth aspect, an embodiment of the present disclosure provides a data update apparatus.

具体地,所述数据更新装置,包括:Specifically, the data update device includes:

上传模块,被配置为将目标应用的更新数据上传至内容分发服务器;an uploading module, configured to upload the update data of the target application to the content distribution server;

第一获取模块,被配置为获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;A first obtaining module is configured to obtain update information of the update data on the content distribution server, wherein the update information includes a first storage address that can obtain the update data on the content distribution server and information of the first update timestamp;

第一返回模块,被配置为响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。The first returning module is configured to return the update information in response to the update information request of the gateway for the target application.

结合第六方面,本公开在第六方面的第一种实现方式中,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。With reference to the sixth aspect, in a first implementation manner of the sixth aspect, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp .

结合第六方面,本公开在第六方面的第二种实现方式中,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。With reference to the sixth aspect, in a second implementation manner of the sixth aspect of the present disclosure, the update information includes a second storage address and a second update timestamp of the index file corresponding to the target application on the content distribution server ; the index file includes the service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

结合第六方面的第二种实现方式,本公开在第六方面的第三种实现方式中,获取所述更新数据在所述内容分发服务器上的更新信息,包括:With reference to the second implementation manner of the sixth aspect, in the third implementation manner of the sixth aspect of the present disclosure, acquiring the update information of the update data on the content distribution server includes:

获取所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳;acquiring the first storage address and the first update timestamp of the update data on the content distribution server;

根据所述第一存储地址和所述第一更新时间戳更新所述索引文件;Update the index file according to the first storage address and the first update timestamp;

将所述索引文件上传至所述内容分发服务器;uploading the index file to the content distribution server;

获取所述第二存储地址和所述第二更新时间戳。Obtain the second storage address and the second update timestamp.

结合第六方面的第三种实现方式,本公开在第六方面的第四种实现方式中,所述根据所述第一存储地址和所述第一更新时间戳更新所述索引文件,包括:With reference to the third implementation manner of the sixth aspect, in a fourth implementation manner of the sixth aspect of the present disclosure, the updating of the index file according to the first storage address and the first update timestamp includes:

将所述索引文件中所述目标业务的所述业务标识所关联的所述更新地址和所述更新时间戳更新为所述第一存储地址和所述第一更新时间戳。The update address and the update timestamp associated with the service identifier of the target service in the index file are updated to the first storage address and the first update timestamp.

结合第六方面的第二种实现方式,本公开在第六方面的第三种实现方式中,所述目标业务包括配置中心业务、离线包业务和补丁业务。With reference to the second implementation manner of the sixth aspect, in a third implementation manner of the sixth aspect of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

第七方面,本公开实施例中提供了一种数据更新装置。In a seventh aspect, an embodiment of the present disclosure provides a data update apparatus.

具体地,所述数据更新装置,包括:Specifically, the data update device includes:

第一接收模块,被配置为接收目标应用发送的请求,其中,所述请求包括所述目标应用的应用标识;a first receiving module, configured to receive a request sent by a target application, wherein the request includes an application identifier of the target application;

第二返回模块,被配置为将所述目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。The second return module is configured to carry the update information of the target application in the response data and return it to the client, wherein the update information includes the first information on the content distribution server that can obtain the update data of the target application. Store address and first update timestamp information.

结合第七方面,本公开在第七方面的第一种实现方式中,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。With reference to the seventh aspect, in a first implementation manner of the seventh aspect of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp .

结合第七方面,本公开在第七方面的第二种实现方式中,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。With reference to the seventh aspect, in a second implementation manner of the seventh aspect of the present disclosure, the update information includes a second storage address and a second update timestamp of the index file corresponding to the target application on the content distribution server ; the index file includes the service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

结合第七方面,本公开在第七方面的第三种实现方式中,所述将所述目标应用的更新信息携带在响应数据中返回给客户端,包括:With reference to the seventh aspect, in a third implementation manner of the seventh aspect of the present disclosure, the carrying the update information of the target application in the response data and returning it to the client includes:

根据所述应用标识确定本地是否存储有所述目标应用的更新信息;Determine whether the update information of the target application is stored locally according to the application identifier;

在本地存储有所述目标应用的更新信息时,将所述目标应用的更新信息携带在所述响应数据中返回给客户端。When the update information of the target application is stored locally, the update information of the target application is carried in the response data and returned to the client.

结合第七方面,本公开在第七方面的第四种实现方式中,还包括:In conjunction with the seventh aspect, in a fourth implementation manner of the seventh aspect, the present disclosure further includes:

第二获取模块,被配置为获取所述请求中携带的所述目标应用的所述应用标识;a second obtaining module, configured to obtain the application identifier of the target application carried in the request;

加入模块,被配置为在本地应用列表中未存储所述应用标识时,将所述应用标识加入所述本地应用列表。The adding module is configured to add the application identifier to the local application list when the application identifier is not stored in the local application list.

结合第七方面的第四种实现方式,本公开在第七方面的第五种实现方式中,还包括:In conjunction with the fourth implementation manner of the seventh aspect, in the fifth implementation manner of the seventh aspect, the present disclosure further includes:

第一发送模块,被配置为周期性地向服务器发送所述目标应用的更新信息请求;a first sending module, configured to periodically send an update information request of the target application to the server;

第二接收模块,被配置为接收所述服务器返回的所述目标应用的所述更新信息。The second receiving module is configured to receive the update information of the target application returned by the server.

结合第七方面的第二种实现方式,本公开在第七方面的第六种实现方式中,所述目标业务包括配置中心业务、离线包业务和补丁业务。With reference to the second implementation manner of the seventh aspect, in the sixth implementation manner of the seventh aspect of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

第八方面,本公开实施例中提供了一种数据更新装置。In an eighth aspect, an embodiment of the present disclosure provides a data update apparatus.

具体地,所述数据更新装置,包括:Specifically, the data update device includes:

第二发送模块,被配置为向网关发送携带有目标应用的应用标识的请求;a second sending module, configured to send a request carrying the application identifier of the target application to the gateway;

第三接收模块,被配置为接收所述网关返回的响应数据;a third receiving module, configured to receive the response data returned by the gateway;

第三获取模块,被配置为获取所述网关添加在所述响应数据中的更新信息,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;The third acquiring module is configured to acquire update information added by the gateway to the response data, wherein the update information includes a first storage address on the content distribution server that can acquire the update data of the target application and information of the first update timestamp;

确定模块,被配置为根据所述更新信息确定是否更新所述目标应用。The determining module is configured to determine whether to update the target application according to the update information.

结合第八方面,本公开在第八方面的第一种实现方式中,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。With reference to the eighth aspect, in a first implementation manner of the eighth aspect, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp .

结合第八方面,本公开在第八方面的第二种实现方式中,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。With reference to the eighth aspect, in a second implementation manner of the eighth aspect of the present disclosure, the update information includes a second storage address and a second update timestamp of the index file corresponding to the target application on the content distribution server ; the index file includes the service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

结合第八方面,本公开在第八方面的第三种实现方式中,所述向网关发送携带有目标应用的应用标识的请求,包括:With reference to the eighth aspect, in a third implementation manner of the eighth aspect of the present disclosure, the sending a request carrying the application identifier of the target application to the gateway includes:

拦截所述目标应用向服务器发送的所述请求;Intercepting the request sent by the target application to the server;

将所述目标应用的应用标识携带在所述请求中发送至所述服务器的网关。The application identifier of the target application is carried in the request and sent to the gateway of the server.

结合第八方面的第一种实现方式,本公开在第八方面的第四种实现方式中,所述根据所述更新信息确定是否更新所述目标应用,包括:With reference to the first implementation manner of the eighth aspect, in a fourth implementation manner of the eighth aspect of the present disclosure, the determining whether to update the target application according to the update information includes:

在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,记录所述目标应用有更新数据。When the first update time stamp is later than the third local update time stamp of the target application, it is recorded that the target application has update data.

结合第八方面的第一种实现方式,本公开在第八方面的第五种实现方式中,所述根据所述更新信息确定是否更新所述目标应用,包括:With reference to the first implementation manner of the eighth aspect, in a fifth implementation manner of the eighth aspect of the present disclosure, the determining whether to update the target application according to the update information includes:

在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,从所述第一存储地址下载所述目标应用的更新数据;When the first update time stamp is later than the local third update time stamp of the target application, downloading the update data of the target application from the first storage address;

根据所述目标应用的更新数据更新所述目标应用。The target application is updated according to the update data of the target application.

结合第八方面的第二种实现方式,本公开在第八方面的第六种实现方式中,所述根据所述更新信息确定是否更新所述目标应用,包括:With reference to the second implementation manner of the eighth aspect, in a sixth implementation manner of the eighth aspect of the present disclosure, the determining whether to update the target application according to the update information includes:

在所述第二更新时间戳晚于本地索引文件的第四更新时间戳时,从所述第二存储地址下载所述索引文件;When the second update time stamp is later than the fourth update time stamp of the local index file, downloading the index file from the second storage address;

根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用。Whether to update the target application is determined according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file.

结合第八方面的第六种实现方式,本公开在第八方面的第七种实现方式中,所述根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括:With reference to the sixth implementation manner of the eighth aspect, in the seventh implementation manner of the eighth aspect of the present disclosure, the determination is based on the first update timestamp corresponding to the service identifier of the at least one target service in the index file. Whether to update the target application, including:

在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,记录所述目标业务有更新数据。When the first update time stamp is later than the locally stored fifth update time stamp corresponding to the at least one target service, record that the target service has update data.

结合第八方面的第六种实现方式,本公开在第八方面的第八种实现方式中,所述根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括:With reference to the sixth implementation manner of the eighth aspect, in the eighth implementation manner of the eighth aspect of the present disclosure, the determination is based on the first update timestamp corresponding to the service identifier of the at least one target service in the index file. Whether to update the target application, including:

在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,从所述第一存储地址下载所述目标业务的更新数据;When the first update time stamp is later than the locally stored fifth update time stamp corresponding to the at least one target service, downloading the update data of the target service from the first storage address;

根据所述目标业务的更新数据更新所述目标业务。The target service is updated according to the update data of the target service.

结合第八方面的第二种实现方式,本公开在第八方面的第九种实现方式中,所述目标业务包括配置中心业务、离线包业务和补丁业务。With reference to the second implementation manner of the eighth aspect, in a ninth implementation manner of the eighth aspect of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

第九方面,本公开实施例提供了一种电子设备,包括存储器和处理器,其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现以下方法步骤:In a ninth aspect, embodiments of the present disclosure provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are processed by the The controller executes to implement the following method steps:

将目标应用的更新数据上传至内容分发服务器;Upload the update data of the target application to the content distribution server;

获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;Acquiring update information of the update data on the content distribution server, wherein the update information includes information that can obtain a first storage address and a first update timestamp of the update data on the content distribution server;

响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。The update information is returned in response to the update information request by the gateway for the target application.

第十方面,本公开实施例提供了一种电子设备,包括存储器和处理器,其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现以下方法步骤:In a tenth aspect, embodiments of the present disclosure provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are processed by the The controller executes to implement the following method steps:

接收目标应用发送的请求,其中,所述请求包括所述目标应用的应用标识;receiving a request sent by a target application, wherein the request includes an application identifier of the target application;

将所述目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。Carrying the update information of the target application in the response data and returning it to the client, where the update information includes a first storage address and a first update timestamp on the content distribution server that can obtain the update data of the target application Information.

第十一方面,本公开实施例提供了一种电子设备,包括存储器和处理器,其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现以下方法步骤:In an eleventh aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are The processor executes to implement the following method steps:

向网关发送携带有目标应用的应用标识的请求;Send a request carrying the application identifier of the target application to the gateway;

接收所述网关返回的响应数据;receiving the response data returned by the gateway;

获取所述网关添加在所述响应数据中的更新信息,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;acquiring the update information added by the gateway to the response data, wherein the update information includes information that can acquire the first storage address and the first update timestamp of the update data of the target application on the content distribution server;

根据所述更新信息确定是否更新所述目标应用。Whether to update the target application is determined according to the update information.

第十二方面,本公开实施例中提供了一种可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现如第一方面、第一方面的第一种实现方式至第五种实现方式任一项所述的方法。In a twelfth aspect, an embodiment of the present disclosure provides a readable storage medium on which computer instructions are stored, and when the computer instructions are executed by a processor, implement the first aspect, the first implementation manner of the first aspect to The fifth implements the method described in any one of the implementation manners.

第十三方面,本公开实施例中提供了一种可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现如第二方面、第二方面的第一种实现方式至第六种实现方式任一项所述的方法。In a thirteenth aspect, an embodiment of the present disclosure provides a readable storage medium on which computer instructions are stored, and when the computer instructions are executed by a processor, implement the second aspect, the first implementation manner of the second aspect to The method described in any one of the sixth implementation manners.

第十四方面,本公开实施例中提供了一种可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现如第一方面、第一方面的第一种实现方式至第九种实现方式任一项所述的方法。In a fourteenth aspect, an embodiment of the present disclosure provides a readable storage medium on which computer instructions are stored, and when the computer instructions are executed by a processor, implement the first aspect, the first implementation manner of the first aspect to The method described in any one of the ninth implementation manners.

第十五方面,本公开实施例中提供了一种可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现如第一方面、第一方面的第一种实现方式至第十四种实现方式任一项所述的方法。In a fifteenth aspect, an embodiment of the present disclosure provides a readable storage medium on which computer instructions are stored, and when the computer instructions are executed by a processor, implement the first aspect, the first implementation manner of the first aspect to The method described in any one of the fourteenth implementation manners.

根据本公开实施例提供的技术方案,将目标应用的更新数据上传至内容分发服务器,并获取更新数据在内容分发服务器上的更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息,然后响应于网关针对目标应用的更新信息请求,返回更新信息,从而缓解了服务器接收更新信息请求的压力,同时避免了客户端轮询主动请求更新数据方式中所产生的资源浪费的问题。According to the technical solutions provided by the embodiments of the present disclosure, the update data of the target application is uploaded to the content distribution server, and the update information of the update data on the content distribution server is obtained, wherein the update information includes the ability to obtain the update data on the content distribution server. The information of the first storage address and the first update timestamp, and then the update information is returned in response to the update information request of the target application by the gateway, thereby relieving the pressure of the server to receive the update information request, and avoiding the client polling actively requesting the update. The problem of waste of resources in the data mode.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

结合附图,通过以下非限制性实施方式的详细描述,本公开的其它特征、目的和优点将变得更加明显。在附图中:Other features, objects and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the attached image:

图1示出根据本公开实施例的数据更新方法的流程图;1 shows a flowchart of a data update method according to an embodiment of the present disclosure;

图2示出根据本公开实施例的获取所述更新数据在所述内容分发服务器上的更新信息的流程图;2 shows a flowchart of acquiring update information of the update data on the content distribution server according to an embodiment of the present disclosure;

图3示出根据本公开实施例的数据更新方法的流程图;3 shows a flowchart of a data update method according to an embodiment of the present disclosure;

图4示出根据本公开实施例的数据更新方法的流程图;4 shows a flowchart of a data update method according to an embodiment of the present disclosure;

图5示出根据本公开实施例的将所述目标应用的更新信息携带在响应数据中返回给客户端的流程图;5 shows a flowchart of carrying the update information of the target application in response data and returning it to the client according to an embodiment of the present disclosure;

图6示出根据本公开实施例的数据更新方法的流程图;6 shows a flowchart of a data update method according to an embodiment of the present disclosure;

图7示出根据本公开实施例的数据更新方法的流程图;FIG. 7 shows a flowchart of a data update method according to an embodiment of the present disclosure;

图8示出根据本公开实施例的向网关发送携带有目标应用的应用标识的请求的流程图;8 shows a flowchart of sending a request carrying an application identifier of a target application to a gateway according to an embodiment of the present disclosure;

图9示出根据本公开实施例的根据所述更新信息确定是否更新所述目标应用的流程图;FIG. 9 shows a flowchart of determining whether to update the target application according to the update information according to an embodiment of the present disclosure;

图10示出根据本公开实施例的根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用的流程图;10 shows a flowchart of determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file according to an embodiment of the present disclosure;

图11示出根据本公开实施例的数据更新方法的流程图;11 shows a flowchart of a data update method according to an embodiment of the present disclosure;

图12示出根据本公开实施例的获取所述更新数据在所述内容分发服务器上的更新信息的流程图;FIG. 12 shows a flowchart of acquiring update information of the update data on the content distribution server according to an embodiment of the present disclosure;

图13示出根据本公开实施例的所述网关接收所述目标应用发送的请求,并将所述目标应用的所述更新信息携带在响应数据中返回给客户端的流程图;13 shows a flowchart of the gateway receiving the request sent by the target application and returning the update information of the target application to the client in response data according to an embodiment of the present disclosure;

图14示出根据本公开实施例的数据更新方法的流程图;14 shows a flowchart of a data update method according to an embodiment of the present disclosure;

图15示出根据本公开实施例的数据更新方法的流程图;15 shows a flowchart of a data update method according to an embodiment of the present disclosure;

图16示出根据本公开实施例的所述客户端向所述网关发送携带有所述目标应用的所述应用标识的所述请求的流程图;16 shows a flowchart of the client sending the request carrying the application identifier of the target application to the gateway according to an embodiment of the present disclosure;

图17示出根据本公开实施例的所述客户端根据所述更新信息确定是否更新所述目标应用的流程图;FIG. 17 shows a flowchart of the client determining whether to update the target application according to the update information according to an embodiment of the present disclosure;

图18示出根据本公开实施例的所述客户端根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用的流程图;18 shows a flowchart of the client determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file according to an embodiment of the present disclosure;

图19示出根据本公开的实施例的数据更新系统1900的结构示意图;FIG. 19 shows a schematic structural diagram of a data update system 1900 according to an embodiment of the present disclosure;

图20示出根据本公开的实施例的数据更新装置2000的结构框图;FIG. 20 shows a structural block diagram of a data update apparatus 2000 according to an embodiment of the present disclosure;

图21示出根据本公开的实施例的数据更新装置2100的结构框图;FIG. 21 shows a structural block diagram of a data update apparatus 2100 according to an embodiment of the present disclosure;

图22示出根据本公开的实施例的数据更新装置2200的结构框图;FIG. 22 shows a structural block diagram of a data update apparatus 2200 according to an embodiment of the present disclosure;

图23示出根据本公开的实施例的电子设备2300的结构框图;FIG. 23 shows a structural block diagram of an electronic device 2300 according to an embodiment of the present disclosure;

图24示出适于用来实现根据本公开实施例的数据更新方法的计算机系统的结构示意图。FIG. 24 shows a schematic structural diagram of a computer system suitable for implementing the data update method according to an embodiment of the present disclosure.

具体实施方式Detailed ways

下文中,将参考附图详细描述本公开的示例性实施例,以使本领域技术人员可容易地实现它们。此外,为了清楚起见,在附图中省略了与描述示例性实施例无关的部分。Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Also, for the sake of clarity, parts unrelated to describing the exemplary embodiments are omitted from the drawings.

在本公开中,应理解,诸如“包括”或“具有”等的术语旨在指示本说明书中所公开的特征、数字、步骤、行为、部件、部分或其组合的存在,并且不欲排除一个或多个其他特征、数字、步骤、行为、部件、部分或其组合存在或被添加的可能性。In the present disclosure, it should be understood that terms such as "comprising" or "having" are intended to indicate the presence of features, numbers, steps, acts, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude a or multiple other features, numbers, steps, acts, components, parts, or combinations thereof may exist or be added.

另外还需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。In addition, it should be noted that the embodiments of the present disclosure and the features of the embodiments may be combined with each other under the condition of no conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

服务器主动推送更新数据方式中,由于服务器与客户端的网络有时会出现不稳定的情况,导致服务器与客户端之间的长链接不稳定,因此,需要不断重试链接,从而重新建立服务器与客户端的长链接。同时,随着客户端数量的增大,会使服务器推送更新数据的目标客户端增多,导致服务器推送更新数据的到达率、覆盖率和覆盖时间出现不可控的情况,因此,会耗费较多的资源。In the way that the server actively pushes the updated data, because the network between the server and the client sometimes becomes unstable, the long link between the server and the client is unstable. Therefore, it is necessary to constantly retry the link to re-establish the connection between the server and the client. long link. At the same time, with the increase of the number of clients, the number of target clients for the server to push the update data will increase, resulting in the uncontrollable situation of the arrival rate, coverage rate and coverage time of the update data pushed by the server. resource.

客户端轮询主动请求更新数据方式中,用户会通过缩短请求时间周期来获取服务器快速的响应,导致客户端对服务器的请求快速增多,随着客户端的数量越来越多,服务器的压力会越来越大,同时还需要大量的数据库等资源的支撑,因此,会形成资源的浪费。In the method of client polling and actively requesting update data, the user will shorten the request time period to obtain a fast response from the server, resulting in a rapid increase in the client's request to the server. As the number of clients increases, the pressure on the server will increase. It also needs the support of a large number of databases and other resources at the same time, so it will cause a waste of resources.

图1示出根据本公开实施例的数据更新方法的流程图,所述数据更新方法在服务器端执行。如图1所示,所述数据更新方法包括以下步骤S101-S103:FIG. 1 shows a flowchart of a data update method according to an embodiment of the present disclosure, and the data update method is executed on the server side. As shown in Figure 1, the data update method includes the following steps S101-S103:

在步骤S101中,将目标应用的更新数据上传至内容分发服务器;In step S101, the update data of the target application is uploaded to the content distribution server;

在步骤S102中,获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;In step S102, the update information of the update data on the content distribution server is obtained, wherein the update information includes a first storage address and a first update address that can obtain the update data on the content distribution server timestamp information;

在步骤S103中,响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。In step S103, in response to the update information request of the gateway for the target application, the update information is returned.

根据本公开的实施例,客户端中安装具备不同功能的应用(APP),其中,应用可以是安装在客户端上的软件,例如通信应用、游戏应用、娱乐应用、社交应用或实用生活应用等,在本公开中不做具体限定。为了缓解服务器的压力,提高数据请求的响应速度和命中率,当技术开发人员对目标应用进行更新后,可以通过服务器将目标应用的更新数据上传至内容分发服务器(Content Delivery Network,CDN),其中,目标应用是指数据发生了更新的一个或多个应用,更新数据是指目标应用中发生了变化的数据。需要说明的是,本公开实施例中的服务器为目标应用的服务器,不同的目标应用可以对应不同的服务器。According to an embodiment of the present disclosure, an application (APP) with different functions is installed in the client, wherein the application may be software installed on the client, such as a communication application, a game application, an entertainment application, a social application, or a practical life application, etc. , which is not specifically limited in the present disclosure. In order to relieve the pressure on the server and improve the response speed and hit rate of data requests, after the technical developer updates the target application, the updated data of the target application can be uploaded to the content distribution server (Content Delivery Network, CDN) through the server. , the target application refers to one or more applications whose data has been updated, and the updated data refers to the changed data in the target application. It should be noted that the server in the embodiment of the present disclosure is the server of the target application, and different target applications may correspond to different servers.

根据本公开的实施例,当目标应用的数量为两个或两个以上时,为了区分不同目标应用对应的更新数据,可以同时将目标应用的应用标识以及对应的更新数据上传至CDN,其中,应用标识用于标识不同的目标应用的不同版本,应用标识可以包括应用唯一标识(appKey)和应用发布版本号(appVersion)。同时,可以将目标应用的应用标识以及对应的更新数据组装成Key-Value的数据结构存储在服务器本地非关系型数据库(比如Redis)中,其中,Key对应于应用标识,Value对应于更新数据。According to an embodiment of the present disclosure, when the number of target applications is two or more, in order to distinguish the update data corresponding to different target applications, the application identifier of the target application and the corresponding update data can be uploaded to the CDN at the same time, wherein, The application identifier is used to identify different versions of different target applications, and the application identifier may include an application unique identifier (appKey) and an application release version number (appVersion). At the same time, the application identifier of the target application and the corresponding update data can be assembled into a key-value data structure and stored in the server's local non-relational database (such as Redis), where the key corresponds to the application identifier and the value corresponds to the update data.

根据本公开的实施例,目标应用的更新数据上传至CDN之后,可以进一步获取更新数据在内容分发服务器上的更新信息,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息,其中,通过访问第一存储地址就可以获取更新数据,第一更新时间戳对应于更新数据上传至CDN上的时间戳。本公开对第一存储地址采用的表示形式以及第一更新时间戳的获取方法不做具体限定。为了标识不同目标应用的更新数据对应的更新信息,可以将目标应用的应用标识和更新信息进行关联存储。According to the embodiment of the present disclosure, after the update data of the target application is uploaded to the CDN, the update information of the update data on the content distribution server can be further obtained, and the update information includes the first storage address and the first storage address of the content distribution server that can obtain the update data on the content distribution server. Once the information of the time stamp is updated, the update data can be obtained by accessing the first storage address, and the first update time stamp corresponds to the time stamp when the update data is uploaded to the CDN. The present disclosure does not specifically limit the representation form adopted by the first storage address and the method for obtaining the first update timestamp. In order to identify the update information corresponding to the update data of different target applications, the application identifier of the target application and the update information may be stored in association.

如上文所述,为了避免服务器主动推送更新数据或者客户端轮询主动请求更新数据两种方式出现的上述技术问题,根据本公开的实施例,可以设置网关周期性地向服务器发出目标应用的更新信息请求,本公开对更新信息请求的周期不做具体限定,例如,可以为1S。由于网关的数量远小于客户端的数量,从而缓解了服务器接收更新信息请求的压力。服务器响应于网关针对目标应用的更新信息请求,返回该目标应用最近一次的更新信息。为了标识不同目标应用对应的更新信息请求,更新信息请求可以携带目标应用的应用标识,服务器响应于网关针对目标应用的更新信息请求,并根据应用标识确定当前更新信息请求对应的目标应用,并将该目标应用的更新信息返回给网关。As described above, in order to avoid the above-mentioned technical problems that occur in two ways: the server actively pushes the update data or the client polls and actively requests the update data, according to the embodiments of the present disclosure, the gateway can be set to periodically send the update of the target application to the server For the information request, the present disclosure does not specifically limit the period of the update information request, for example, it may be 1S. Since the number of gateways is much smaller than the number of clients, the pressure on the server to receive updated information requests is relieved. In response to the update information request for the target application by the gateway, the server returns the latest update information of the target application. In order to identify the update information requests corresponding to different target applications, the update information request can carry the application identifier of the target application. The server responds to the update information request of the gateway for the target application, and determines the target application corresponding to the current update information request according to the application identifier, and sends The update information of the target application is returned to the gateway.

需要说明的是,本公开实施例中提到的网关是服务器端的网关,也即服务器与外界进行通信的网关。客户端上的目标应用向目标应用的服务器端的网络请求均可以通过该网关进入该服务器端。It should be noted that the gateway mentioned in the embodiments of the present disclosure is a server-side gateway, that is, a gateway through which the server communicates with the outside world. All network requests from the target application on the client to the server side of the target application can enter the server side through the gateway.

根据本公开实施例提供的技术方案,将目标应用的更新数据上传至内容分发服务器,并获取更新数据在内容分发服务器上的更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息,然后响应于网关针对目标应用的更新信息请求,返回更新信息,从而缓解了服务器接收更新信息请求的压力,同时避免了客户端轮询主动请求更新数据方式中所产生的资源浪费的问题。According to the technical solutions provided by the embodiments of the present disclosure, the update data of the target application is uploaded to the content distribution server, and the update information of the update data on the content distribution server is obtained, wherein the update information includes the ability to obtain the update data on the content distribution server. The information of the first storage address and the first update timestamp, and then the update information is returned in response to the update information request of the target application by the gateway, thereby relieving the pressure of the server to receive the update information request, and avoiding the client polling actively requesting the update. The problem of waste of resources in the data mode.

根据本公开的一实施例,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。该实施例中,网关可以从服务器返回的更新信息中直接获取第一存储地址和第一更新时间戳。并且通过第一更新时间戳可以确定目标应用的更新数据在CDN上的更新时间,访问第一存储地址可以从CDN上获取目标应用的更新数据。可以理解,虽然本公开以第一存储地址采用统一资源定位符(Uniform ResourceLocator,URL)的表示形式,第一更新时间戳通过获取毫秒的方式进行举例说明,但本公开不限于此。例如,服务器将目标应用APP1的更新数据上传至CDN,并获取APP1在CDN上的第一存储地址(https://xxx.xx/a/1json.json)和第一更新时间戳(1564114914423),通过访问第一存储地址https://xxx.xx/a/1json.json就可以获取更新数据,并获取更新数据上传至CDN上的时间戳为1564114914423。According to an embodiment of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp. In this embodiment, the gateway may directly acquire the first storage address and the first update timestamp from the update information returned by the server. And the update time of the update data of the target application on the CDN can be determined by the first update timestamp, and the update data of the target application can be obtained from the CDN by accessing the first storage address. It can be understood that although the present disclosure uses the first storage address in the form of a Uniform Resource Locator (URL) and the first update timestamp is exemplified by obtaining milliseconds, the present disclosure is not limited thereto. For example, the server uploads the update data of the target application APP1 to the CDN, and obtains the first storage address (https://xxx.xx/a/1json.json) and the first update timestamp (1564114914423) of APP1 on the CDN, The update data can be obtained by accessing the first storage address https://xxx.xx/a/1json.json, and the timestamp of the update data uploaded to the CDN is 1564114914423.

根据本公开的另一实施例,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。According to another embodiment of the present disclosure, the update information includes a second storage address and a second update timestamp of an index file corresponding to the target application on the content distribution server; the index file includes the target application The service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

根据本公开的实施例,目标业务可以包括但不限于配置中心业务、离线包业务和补丁业务。目标应用的一个或多个目标业务发生变化后,开发人员可以以目标业务的更新数据的形式打包该更新后的一个或多个目标业务,下面将以目标业务为补丁业务或者离线包业务进行举例说明,但本公开并不限于此,例如,客户端在获得该补丁业务或者离线包业务的更新数据之后,可以在本地客户端对目标应用进行更新。若只有一个目标业务,即该目标应用只有一个目标业务发生了变化,则目标应用的更新数据包括这一个目标业务的更新数据;若有两个或两个以上目标业务时,即该目标应用有两个或两个以上的目标业务发生了变化,则目标应用的更新数据可以包括一个目标业务的更新数据,也可以包括部分目标业务的更新数据,也可以包括所有目标业务的更新数据。According to an embodiment of the present disclosure, the target service may include, but is not limited to, a configuration center service, an offline package service, and a patch service. After one or more target services of the target application have changed, the developer can package the updated one or more target services in the form of updated data of the target service. The following will take the target service as a patch service or an offline package service as an example. However, the present disclosure is not limited thereto. For example, after obtaining the update data of the patch service or the offline package service, the client may update the target application at the local client. If there is only one target service, that is, only one target service of the target application has changed, the update data of the target application includes the update data of this target service; if there are two or more target services, that is, the target application has When two or more target services have changed, the update data of the target application may include the update data of one target service, some target services, or all the target services.

根据本公开的实施例,由于目标应用的更新数据可以包括目标应用的一个或多个目标业务的更新数据,为了区分不同目标业务的更新数据,可以建立索引文件存储不同目标业务的更新信息,其中,索引文件可以包括目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,其中,业务标识用于标识不同的目标业务,更新地址对应于该目标业务在CDN上的最新更新地址,且通过访问更新地址就可以获取该目标业务的更新数据,更新时间戳对应于该目标业务的更新数据上传至CDN上的时间戳。本公开将以目标应用有两个目标业务的对应数据发生改变,且业务标识采用业务名称的形式进行举例说明,但本公开不限于此。例如,目标应用APP2有两个目标业务,分别为配置中心业务(crystal_config)和离线包业务(speedboat_offline_deploy),其中,APP2的appKey为25230564,appVersion为7.20.4,配置中心业务的更新地址为https://xxx.xx/b/1json.json,更新时间戳为1563405958296,离线包业务的更新地址为https://xxx.xx/b/2json.json,更新时间戳为1564039123355,则APP2的索引文件可以表示为:According to the embodiment of the present disclosure, since the update data of the target application may include the update data of one or more target services of the target application, in order to distinguish the update data of different target services, an index file may be established to store the update information of different target services, wherein , the index file may include the service identifier, update address and update timestamp of at least one target service of the target application, wherein the service identifier is used to identify different target services, and the update address corresponds to the latest update address of the target service on the CDN, And by accessing the update address, the update data of the target service can be obtained, and the update time stamp corresponds to the time stamp when the update data of the target service is uploaded to the CDN. The present disclosure will take an example in which the corresponding data of the target application has two target services changed, and the service identifier is in the form of a service name, but the present disclosure is not limited thereto. For example, the target application APP2 has two target services, namely the configuration center service (crystal_config) and the offline package service (speedboat_offline_deploy). Among them, the appKey of APP2 is 25230564, the appVersion is 7.20.4, and the update address of the configuration center service is https: //xxx.xx/b/1json.json, the update timestamp is 1563405958296, the update address of the offline package service is https://xxx.xx/b/2json.json, and the update timestamp is 1564039123355, then the index file of APP2 It can be expressed as:

Figure BDA0002205050240000211
Figure BDA0002205050240000211

根据本公开的上述实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳,网关在接收到该更新信息之后,可以通过访问第二存储地址获取索引文件,还可以通过第二更新时间戳确定索引文件的最新更新时间。在通过第二存储地址获取索引文件之后,还可以从索引文件中获取目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,例如,服务器最新上传至CDN的更新数据包括目标应用的目标业务A的更新数据时,可以通过索引文件获取目标业务A的更新数据在CDN上的第一存储地址以及第一更新时间戳。本公开对第二存储地址采用的表示形式以及第二更新时间戳的获取方法不做具体限定。According to the above embodiments of the present disclosure, the update information includes the second storage address and the second update timestamp of the index file corresponding to the target application on the content distribution server. After receiving the update information, the gateway can access the second storage address by accessing the second storage address. The index file is obtained, and the latest update time of the index file can also be determined by using the second update timestamp. After the index file is obtained through the second storage address, the service identifier, update address and update timestamp of at least one target service of the target application can also be obtained from the index file. For example, the update data newly uploaded by the server to the CDN includes the target application's When updating the data of the target service A, the first storage address and the first update time stamp of the updated data of the target service A on the CDN can be obtained through the index file. The present disclosure does not specifically limit the representation form adopted by the second storage address and the method for obtaining the second update timestamp.

图2示出根据本公开实施例的获取所述更新数据在所述内容分发服务器上的更新信息的流程图。如图2所示,所述步骤S102,即获取所述更新数据在所述内容分发服务器上的更新信息,包括以下步骤S201-S204:FIG. 2 shows a flowchart of acquiring update information of the update data on the content distribution server according to an embodiment of the present disclosure. As shown in FIG. 2, the step S102, namely acquiring the update information of the update data on the content distribution server, includes the following steps S201-S204:

在步骤S201中,获取所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳;In step S201, the first storage address and the first update timestamp of the update data on the content distribution server are obtained;

在步骤S202中,根据所述第一存储地址和所述第一更新时间戳更新所述索引文件;In step S202, the index file is updated according to the first storage address and the first update timestamp;

在步骤S203中,将所述索引文件上传至所述内容分发服务器;In step S203, uploading the index file to the content distribution server;

在步骤S204中,获取所述第二存储地址和所述第二更新时间戳。In step S204, the second storage address and the second update timestamp are acquired.

根据本公开的实施例,在目标应用的某个或多个目标业务被更新之后,服务器将其更新数据上传至CDN,并从CDN获得其上传地址也即第一存储地址和上传时间戳也即第一更新时间戳,由于目标应用的更新数据包括目标应用的至少一个目标业务的更新数据,因此,获取了更新数据在内容分发服务器上的第一存储地址和第一更新时间戳,并将该第一存储地址和第一更新时间戳与更新数据中的一个或多个目标业务的业务标识分别关联存储在索引文件中,如果索引文件中已经关联存储了一个或多个目标业务的业务标识对应的条目时,则可以利用当前的第一存储地址和第一更新时间戳更新条目,即更新当前的索引文件。According to the embodiments of the present disclosure, after one or more target services of the target application are updated, the server uploads the updated data to the CDN, and obtains its upload address, that is, the first storage address and the upload time stamp, that is, from the CDN. The first update timestamp. Since the update data of the target application includes the update data of at least one target service of the target application, the first storage address and the first update timestamp of the update data on the content distribution server are obtained, and the The first storage address and the first update time stamp are stored in the index file in association with the service identifiers of one or more target services in the update data, respectively. When the entry is stored, the entry can be updated by using the current first storage address and the first update timestamp, that is, the current index file is updated.

根据本公开的实施例,为了缓解服务器的压力,可以将该索引文件上传至CDN,并获取索引文件在CDN上的第二存储地址和第二更新时间戳,其中,第二更新时间戳对应于索引文件上传至CDN上的最新时间戳。通过访问第二存储地址就可以获取索引文件,进而可以从索引文件获取目标应用对应的一个或多个目标业务的更新信息,比如,与业务标识关联存储的第一存储地址和第一更新时间戳。当网关周期性地向服务器发出目标应用的更新信息请求时,服务器可以将索引文件在CDN上的第二存储地址和第二更新时间戳返回给网关。According to the embodiment of the present disclosure, in order to relieve the pressure on the server, the index file can be uploaded to the CDN, and the second storage address and the second update timestamp of the index file on the CDN can be obtained, where the second update timestamp corresponds to The latest timestamp when the index file was uploaded to the CDN. The index file can be obtained by accessing the second storage address, and then the update information of one or more target services corresponding to the target application can be obtained from the index file, for example, the first storage address and the first update timestamp stored in association with the service identifier . When the gateway periodically sends an update information request of the target application to the server, the server may return the second storage address of the index file on the CDN and the second update timestamp to the gateway.

根据本公开的实施例,所述步骤S202,即根据所述第一存储地址和所述第一更新时间戳更新所述索引文件,还可被实施为:将所述索引文件中所述目标业务的所述业务标识所关联的所述更新地址和所述更新时间戳更新为所述第一存储地址和所述第一更新时间戳。According to an embodiment of the present disclosure, the step S202, that is, updating the index file according to the first storage address and the first update time stamp, may also be implemented as: changing the target service in the index file The update address and the update timestamp associated with the service identifier are updated to the first storage address and the first update timestamp.

在本实施例中,索引文件中可以包括多个目标业务标识关联的更新信息,在其中一个或多个目标业务发生了更新时,可以根据上传至CDN的更新数据的第一存储地址和第一更新时间戳更新该索引文件中一个或多个目标业务的业务标识对应的更新信息。首先根据业务标识确定目标业务,然后将目标业务的更新地址更新为第一存储地址,并把更新时间戳更新为第一更新时间戳,从而完成索引文件的更新。例如,原有的索引文件为:In this embodiment, the index file may include update information associated with multiple target service identifiers, and when one or more of the target services are updated, the index file may be updated according to the first storage address of the update data uploaded to the CDN and the first The update timestamp updates the update information corresponding to the service identifiers of one or more target services in the index file. First determine the target service according to the service identifier, then update the update address of the target service to the first storage address, and update the update time stamp to the first update time stamp, thereby completing the update of the index file. For example, the original index file is:

Figure BDA0002205050240000221
Figure BDA0002205050240000221

假设只有配置中心业务的业务文件发生改变,且第一存储地址为https://xxx.xx/b/3json.json,第一更新时间戳为1564014914423,则将配置中心业务的更新地址https://xxx.xx/b/1json.json更新为第一存储地址https://xxx.xx/b/3json.json,更新时间戳1563405958296更新为第一更新时间戳1564014914423,从而获取更新后的索引文件为:Assuming that only the business file of the configuration center service has changed, and the first storage address is https://xxx.xx/b/3json.json, and the first update timestamp is 1564014914423, the update address of the configuration center service will be https:/ /xxx.xx/b/1json.json is updated to the first storage address https://xxx.xx/b/3json.json, and the update timestamp 1563405958296 is updated to the first update timestamp 1564014914423, thereby obtaining the updated index file for:

Figure BDA0002205050240000231
Figure BDA0002205050240000231

图3示出根据本公开实施例的数据更新方法的流程图,所述数据更新方法在网关端执行。如图3所示,所述数据更新方法包括以下步骤S301-S302:FIG. 3 shows a flowchart of a data update method according to an embodiment of the present disclosure, and the data update method is executed on the gateway side. As shown in Figure 3, the data update method includes the following steps S301-S302:

在步骤S301中,接收目标应用发送的请求,其中,所述请求包括所述目标应用的应用标识;In step S301, a request sent by a target application is received, wherein the request includes an application identifier of the target application;

在步骤S302中,将所述目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。In step S302, the update information of the target application is carried in the response data and returned to the client, wherein the update information includes a first storage address on the content distribution server that can obtain the update data of the target application and Information about the first update timestamp.

根据本公开的实施例,客户端上的目标应用发给目标应用的服务器端的请求,会先到达服务器端的网关,其中,目标应用可以是安装在客户端的任意一个能够进行网络通信的应用。为了确定目标应用是否存在更新信息,本公开实施例中,目标应用可以不用直接向服务器发送更新信息请求,而是由专门开发的软件开发工具包(Software DevelopmentKit,SDK)通过拦截目标应用发送给服务器的任意请求,并在该请求中添加目标应用的应用标识,从而获取目标应用是否存在更新信息,其中,应用标识用于标识不同的目标应用以及同一目标应用的不同版本,应用标识可以包括应用唯一标识(appKey)和应用发布版本号(appVersion)。由于请求包括包头和正文,可以将目标应用的应用标识携带在请求的包头中发送给服务器。According to the embodiment of the present disclosure, the request sent by the target application on the client to the server of the target application will first reach the gateway of the server, where the target application may be any application installed on the client capable of network communication. In order to determine whether the target application has update information, in the embodiment of the present disclosure, the target application may not directly send the update information request to the server, but a specially developed software development kit (Software Development Kit, SDK) sends the request to the server by intercepting the target application. and add the application identifier of the target application in the request, so as to obtain whether the target application has update information, wherein the application identifier is used to identify different target applications and different versions of the same target application, and the application identifier can include the unique application Identification (appKey) and application release version number (appVersion). Since the request includes a header and a body, the application identifier of the target application can be carried in the header of the request and sent to the server.

根据本公开的实施例,当网关接收到目标应用发送的请求数据之后,可以从该请求(例如包头)中获取携带的应用标识,进而将该应用标识与网关本地所存储的应用标识进行比较。如果本地存储有该应用标识对应的更新信息,则在该请求数据的响应数据中携带更新信息后返回给客户端。由于响应数据包括包头和正文,可以将目标应用的更新信息携带在响应数据的包头中返回给客户端。According to an embodiment of the present disclosure, after the gateway receives the request data sent by the target application, it can obtain the carried application identifier from the request (eg, packet header), and then compare the application identifier with the application identifier stored locally by the gateway. If the update information corresponding to the application identifier is stored locally, the update information is carried in the response data of the request data and returned to the client. Since the response data includes a header and a body, the update information of the target application can be carried in the header of the response data and returned to the client.

根据本公开实施例提供的技术方案,接收目标应用发送的携带有目标应用的应用标识的请求,并将目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。避免了客户端轮询主动请求更新数据方式中所产生的资源浪费问题,且网关直接在响应数据中携带着存储在网关本地的目标应用的更新信息并返回给客户端,提高了更新数据的响应速度,从而使多个客户端同时实现“秒级”更新,同时,将客户端向服务器发送请求转化为网关周期性向服务器发起请求,缓解了服务器接收更新信息请求的压力。According to the technical solutions provided by the embodiments of the present disclosure, a request sent by a target application that carries an application identifier of the target application is received, and update information of the target application is carried in response data and returned to the client, where the update information includes the ability to Obtain the information of the first storage address and the first update timestamp of the update data of the target application on the content distribution server. The problem of resource waste caused by the client polling and actively requesting update data is avoided, and the gateway directly carries the update information of the target application stored locally in the gateway in the response data and returns it to the client, improving the response of the update data. Speed, so that multiple clients can achieve "second-level" updates at the same time. At the same time, the client sends requests to the server into periodic requests from the gateway to the server, which relieves the pressure on the server to receive update information requests.

根据本公开的一实施例,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。该实施例中,网关可以从服务器返回的更新信息中直接获取第一存储地址和第一更新时间戳。并且通过第一更新时间戳可以确定目标应用的更新数据在CDN上的更新时间,访问第一存储地址可以从CDN上获取目标应用的更新数据。可以理解,虽然本公开以第一存储地址采用统一资源定位符(Uniform ResourceLocator,URL)的表示形式,第一更新时间戳通过获取毫秒的方式进行举例说明,但本公开不限于此。例如,服务器将目标应用APP1的更新数据上传至CDN,并获取APP1在CDN上的第一存储地址(https://xxx.xx/a/1json.json)和第一更新时间戳(1564114914423),通过访问第一存储地址https://xxx.xx/a/1json.json就可以获取更新数据,并获取更新数据上传至CDN上的时间戳为1564114914423。According to an embodiment of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp. In this embodiment, the gateway may directly acquire the first storage address and the first update timestamp from the update information returned by the server. And the update time of the update data of the target application on the CDN can be determined by the first update timestamp, and the update data of the target application can be obtained from the CDN by accessing the first storage address. It can be understood that although the present disclosure uses the first storage address in the form of a Uniform Resource Locator (URL) and the first update timestamp is exemplified by obtaining milliseconds, the present disclosure is not limited thereto. For example, the server uploads the update data of the target application APP1 to the CDN, and obtains the first storage address (https://xxx.xx/a/1json.json) and the first update timestamp (1564114914423) of APP1 on the CDN, The update data can be obtained by accessing the first storage address https://xxx.xx/a/1json.json, and the timestamp of the update data uploaded to the CDN is 1564114914423.

根据本公开的另一实施例,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。According to another embodiment of the present disclosure, the update information includes a second storage address and a second update timestamp of an index file corresponding to the target application on the content distribution server; the index file includes the target application The service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

根据本公开的实施例,目标业务可以包括但不限于配置中心业务、离线包业务和补丁业务。目标应用的一个或多个目标业务发生变化后,开发人员可以以目标业务的更新数据的形式打包该更新后的一个或多个目标业务,下面将以目标业务为补丁业务或者离线包业务进行举例说明,但本公开并不限于此,例如,客户端在获得该补丁业务或者离线包业务的更新数据之后,可以在本地客户端对目标应用进行更新。若只有一个目标业务,即该目标应用只有一个目标业务发生了变化,则目标应用的更新数据包括这一个目标业务的更新数据;若有两个或两个以上目标业务时,即该目标应用有两个或两个以上的目标业务发生了变化,则目标应用的更新数据可以包括一个目标业务的更新数据,也可以包括部分目标业务的更新数据,也可以包括所有目标业务的更新数据。According to an embodiment of the present disclosure, the target service may include, but is not limited to, a configuration center service, an offline package service, and a patch service. After one or more target services of the target application have changed, the developer can package the updated one or more target services in the form of updated data of the target service. The following will take the target service as a patch service or an offline package service as an example. However, the present disclosure is not limited thereto. For example, after obtaining the update data of the patch service or the offline package service, the client may update the target application at the local client. If there is only one target service, that is, only one target service of the target application has changed, the update data of the target application includes the update data of this target service; if there are two or more target services, that is, the target application has When two or more target services have changed, the update data of the target application may include the update data of one target service, some target services, or all the target services.

根据本公开的实施例,由于目标应用的更新数据可以包括目标应用的一个或多个目标业务的更新数据,为了区分不同目标业务的更新数据,可以建立索引文件存储不同目标业务的更新信息,其中,索引文件可以包括目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,其中,业务标识用于标识不同的目标业务,更新地址对应于该目标业务在CDN上的最新更新地址,且通过访问更新地址就可以获取该目标业务的更新数据,更新时间戳对应于该目标业务的更新数据上传至CDN上的时间戳。本公开将以目标应用有两个目标业务的对应数据发生改变,且业务标识采用业务名称的形式进行举例说明,但本公开不限于此。例如,目标应用APP2有两个目标业务,分别为配置中心业务(crystal_config)和离线包业务(speedboat_offline_deploy),其中,APP2的appKey为25230564,appVersion为7.20.4,配置中心业务的更新地址为https://xxx.xx/b/1json.json,更新时间戳为1563405958296,离线包业务的更新地址为https://xxx.xx/b/2json.json,更新时间戳为1564039123355,则APP2的索引文件可以表示为:According to the embodiment of the present disclosure, since the update data of the target application may include the update data of one or more target services of the target application, in order to distinguish the update data of different target services, an index file may be established to store the update information of different target services, wherein , the index file may include the service identifier, update address and update timestamp of at least one target service of the target application, wherein the service identifier is used to identify different target services, and the update address corresponds to the latest update address of the target service on the CDN, And by accessing the update address, the update data of the target service can be obtained, and the update time stamp corresponds to the time stamp when the update data of the target service is uploaded to the CDN. The present disclosure will take an example in which the corresponding data of the target application has two target services changed, and the service identifier is in the form of a service name, but the present disclosure is not limited thereto. For example, the target application APP2 has two target services, namely the configuration center service (crystal_config) and the offline package service (speedboat_offline_deploy). Among them, the appKey of APP2 is 25230564, the appVersion is 7.20.4, and the update address of the configuration center service is https: //xxx.xx/b/1json.json, the update timestamp is 1563405958296, the update address of the offline package service is https://xxx.xx/b/2json.json, and the update timestamp is 1564039123355, then the index file of APP2 It can be expressed as:

Figure BDA0002205050240000251
Figure BDA0002205050240000251

根据本公开的上述实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳,网关在接收到该更新信息之后,可以通过访问第二存储地址获取索引文件,还可以通过第二更新时间戳确定索引文件的最新更新时间。在通过第二存储地址获取索引文件之后,还可以从索引文件中获取目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,例如,服务器最新上传至CDN的更新数据包括目标应用的目标业务A的更新数据时,可以通过索引文件获取目标业务A的更新数据在CDN上的第一存储地址以及第一更新时间戳。本公开对第二存储地址采用的表示形式以及第二更新时间戳的获取方法不做具体限定。According to the above embodiments of the present disclosure, the update information includes the second storage address and the second update timestamp of the index file corresponding to the target application on the content distribution server. After receiving the update information, the gateway can access the second storage address by accessing the second storage address. The index file is obtained, and the latest update time of the index file can also be determined by using the second update timestamp. After the index file is obtained through the second storage address, the service identifier, update address and update timestamp of at least one target service of the target application can also be obtained from the index file. For example, the update data newly uploaded by the server to the CDN includes the target application's When updating the data of the target service A, the first storage address and the first update time stamp of the updated data of the target service A on the CDN can be obtained through the index file. The present disclosure does not specifically limit the representation form adopted by the second storage address and the method for obtaining the second update timestamp.

图4示出根据本公开实施例的数据更新方法的流程图。如图4所示,在所述步骤S301之后,即接收目标应用发送的请求之后,还包括以下步骤S401-S402:FIG. 4 shows a flowchart of a data update method according to an embodiment of the present disclosure. As shown in FIG. 4, after the step S301, that is, after receiving the request sent by the target application, the following steps S401-S402 are further included:

在步骤S401中,获取所述请求中携带的所述目标应用的所述应用标识;In step S401, the application identifier of the target application carried in the request is obtained;

在步骤S402中,在本地应用列表中未存储所述应用标识时,将所述应用标识加入所述本地应用列表。In step S402, when the application identifier is not stored in the local application list, the application identifier is added to the local application list.

根据本公开的实施例,由于客户端中目标应用发送给目标应用的服务器的所有请求都会经过服务器侧的网关,首先网关可以从请求中获取目标应用的应用标识,然后判断本地应用列表中是否已经存储该目标应用的应用标识,其中,本地应用列表用于存储不同应用的应用标识,若已经存储了该目标应用的应用标识,则不用在本地应用列表中添加该应用标识;若没有存储该目标应用的应用标识,则在本地应用列表中加入该应用标识。本公开对应用标识在本地应用列表中的存储方式不做具体限定,可以根据实际应用需要进行确定。According to the embodiment of the present disclosure, since all requests sent by the target application in the client to the server of the target application will pass through the gateway on the server side, the gateway can first obtain the application identifier of the target application from the request, and then determine whether the local application list has Store the application identifier of the target application, where the local application list is used to store the application identifiers of different applications. If the application identifier of the target application has been stored, the application identifier does not need to be added to the local application list; if the target application is not stored The application ID of the application is added to the local application list. The present disclosure does not specifically limit the storage method of the application identifier in the local application list, which can be determined according to actual application needs.

图5示出根据本公开实施例的将所述目标应用的更新信息携带在响应数据中返回给客户端的流程图。如图5所示,所述步骤S302,即将所述目标应用的更新信息携带在所述响应数据中返回,包括以下步骤S501-S502:FIG. 5 shows a flowchart of carrying the update information of the target application in response data and returning it to the client according to an embodiment of the present disclosure. As shown in FIG. 5, the step S302, that is, carrying the update information of the target application in the response data and returning it, includes the following steps S501-S502:

在步骤S501中,根据所述应用标识确定本地是否存储有所述目标应用的更新信息;In step S501, determine whether the update information of the target application is stored locally according to the application identifier;

在步骤S502中,在本地存储有所述目标应用的更新信息时,将所述目标应用的更新信息携带在所述响应数据中返回给客户端。In step S502, when the update information of the target application is stored locally, the update information of the target application is carried in the response data and returned to the client.

根据本公开的实施例,当获取应用标识之后,首先确定网关本地是否存储了目标应用的更新信息,若本地存储有目标应用的更新信息时,直接将目标应用的更新信息携带在响应数据中返回给客户端,从而避免了客户端直接向服务器请求目标应用的更新信息;若本地没有存储目标应用的更新信息时,则本次可以不在响应数据中携带该更新信息,而是在下一周期由网关向服务器请求并获取该目标应用的更新信息之后,再在响应数据中携带该更新信息并返回给客户端。According to an embodiment of the present disclosure, after obtaining the application identifier, it is first determined whether the gateway locally stores the update information of the target application, and if the update information of the target application is stored locally, the update information of the target application is directly carried in the response data and returned to the client, so as to avoid the client directly requesting the update information of the target application from the server; if the update information of the target application is not stored locally, the update information may not be carried in the response data this time, but will be sent by the gateway in the next cycle. After requesting and obtaining the update information of the target application from the server, the update information is carried in the response data and returned to the client.

图6示出根据本公开实施例的数据更新方法的流程图。如图6所示,所述数据更新方法还包括以下步骤S601-S602:FIG. 6 shows a flowchart of a data update method according to an embodiment of the present disclosure. As shown in Figure 6, the data update method further includes the following steps S601-S602:

在步骤S601中,周期性地向服务器发送所述目标应用的更新信息请求;In step S601, periodically sending an update information request of the target application to the server;

在步骤S602中,接收所述服务器返回的所述目标应用的所述更新信息。In step S602, the update information of the target application returned by the server is received.

根据本公开的实施例,网关根据本地应用列表中存储的目标应用的应用标识,周期性地向服务器发送目标应用的更新信息请求,其中,本公开对更新信息请求周期不做具体限定,可以根据实际情况进行限定,例如,可以为1秒。由于网关的数量远小于客户端的数量,从而缓解了服务器接收更新信息请求的压力。服务器响应于网关针对目标应用的更新信息请求,返回该目标应用的更新信息,通过该更新信息能够获取目标应用的更新数据在CDN上的第一存储地址和第一更新时间戳的信息。According to the embodiment of the present disclosure, the gateway periodically sends the update information request of the target application to the server according to the application identifier of the target application stored in the local application list. The actual situation is limited, for example, it can be 1 second. Since the number of gateways is much smaller than the number of clients, the pressure on the server to receive updated information requests is relieved. In response to the update information request of the target application by the gateway, the server returns the update information of the target application, through which the information of the first storage address and the first update timestamp of the update data of the target application on the CDN can be obtained.

根据本公开的实施例,网关从服务器端获取到目标应用的更新信息时,可以删除存储在网关本地的原始更新信息,而将从服务器端获取到的更新信息存储在本地,以代替原始更新信息;或者,网关从服务器端获取到目标应用的更新信息时,可以根据从服务器端获取到的该更新信息是否已经存储在网关本地来确定是否存储从服务器端获取的该更新信息,具体地,若本地没有存储其中一个或多个目标应用的更新信息时,网关可以直接将该更新信息存储在网关本地;若本地存储了与该一个或多个目标应用对应的本地更新信息时,网关可以进一步将获取的更新信息中的第一更新时间戳与本地存储的本地更新信息中的本地时间戳进行比较,若更新信息中的第一更新时间戳晚于本地更新信息中的本地时间戳,表明从服务器获取的更新信息比本地存储的本地更新信息更新,则可以接受服务器返回的一个或多个目标应用的更新信息,并将该更新信息存储在网关本地,反之,表明本地存储的本地更新信息已经是最新的更新信息,则可以不存储该更新信息。According to the embodiment of the present disclosure, when the gateway obtains the update information of the target application from the server, it can delete the original update information stored locally in the gateway, and store the update information obtained from the server locally instead of the original update information Or, when the gateway obtains the update information of the target application from the server side, it can determine whether to store the update information obtained from the server side according to whether the update information obtained from the server side has been stored locally in the gateway, specifically, if When the update information of one or more target applications is not stored locally, the gateway can directly store the update information locally; if the local update information corresponding to the one or more target applications is stored locally, the gateway can further store the update information locally. The first update time stamp in the obtained update information is compared with the local time stamp in the locally stored local update information. If the first update time stamp in the update information is later than the local time stamp in the local update information, it indicates that the slave server The obtained update information is newer than the locally stored local update information, then the update information of one or more target applications returned by the server can be accepted, and the update information is stored locally in the gateway. On the contrary, it indicates that the locally stored local update information is already the latest update information, the update information may not be stored.

图7示出根据本公开实施例的数据更新方法的流程图,所述数据更新方法在客户端执行。如图7所示,所述数据更新方法包括以下步骤S701-S704:FIG. 7 shows a flowchart of a method for updating data according to an embodiment of the present disclosure, and the method for updating data is executed on a client side. As shown in Figure 7, the data update method includes the following steps S701-S704:

在步骤S701中,向网关发送携带有目标应用的应用标识的请求;In step S701, a request carrying the application identifier of the target application is sent to the gateway;

在步骤S702中,接收所述网关返回的响应数据;In step S702, receiving the response data returned by the gateway;

在步骤S703中,获取所述网关添加在所述响应数据中的更新信息,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;In step S703, the update information added by the gateway to the response data is obtained, wherein the update information includes a first storage address on the content distribution server that can obtain the update data of the target application and a first update timestamp information;

在步骤S704中,根据所述更新信息确定是否更新所述目标应用。In step S704, whether to update the target application is determined according to the update information.

根据本公开的实施例,客户端中的目标应用向目标应用的服务器发送请求,请求会经过服务器端的网关再到达服务器,也即该请求先发送至服务器端的网关,其中,目标应用是指数据发生了更新的一个或多个应用,请求包括目标应用发出的任意请求。目标应用向服务器发送请求时,可以通过安装在本地的SDK拦截待发送出去的请求。为了了解目标应用是否存在更新信息,SDK可以在拦截下来的任意请求中携带目标应用的应用标识,并将该请求发送给服务器的网关,从而获取目标应用是否存在更新信息。由于请求包括包头和请求正文,可以将目标应用的应用标识携带在请求的包头中发送给服务器的网关。同理,在客户端获取网关返回的响应数据之后,也可以通过SDK从响应数据中获取目标应用的更新信息。其中,应用标识用于标识不同的目标应用的不同版本,应用标识可以包括应用唯一标识(appKey)和应用发布版本号(appVersion)。客户端可以是手持终端设备、笔记本电脑、蜂窝电话、智能电话、无线数据卡、个人数字助理电脑、平板型电脑、无绳电话、物联网设备(IOT设备)或是其他可以接入网络的终端设备,在本公开中不做具体限定。According to the embodiments of the present disclosure, the target application in the client sends a request to the server of the target application, and the request will pass through the gateway of the server and then arrive at the server, that is, the request is first sent to the gateway of the server, where the target application refers to the occurrence of data One or more applications that have been updated, the request includes any request made by the target application. When the target application sends a request to the server, it can intercept the request to be sent through the SDK installed locally. In order to know whether the target application has updated information, the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the gateway of the server to obtain whether the target application has updated information. Since the request includes a header and a request body, the application identifier of the target application can be carried in the header of the request and sent to the gateway of the server. Similarly, after the client obtains the response data returned by the gateway, it can also obtain the update information of the target application from the response data through the SDK. The application identifier is used to identify different versions of different target applications, and the application identifier may include an application unique identifier (appKey) and an application release version number (appVersion). Clients can be handheld terminal devices, laptop computers, cellular phones, smart phones, wireless data cards, personal digital assistant computers, tablet computers, cordless phones, Internet of Things devices (IOT devices), or other terminal devices that can access the network , which is not specifically limited in the present disclosure.

根据本公开的实施例,当网关接收到目标应用发送的请求之后,可以从该请求的包头中获取携带的应用标识,进而将该应用标识与网关本地所存储的应用标识进行比较。如果本地存储有该应用标识对应的更新信息,则在该请求的响应数据中携带该更新信息后返回给客户端。由于响应数据包括包头和正文,可以将目标应用的更新信息携带在响应数据的包头中返回给客户端。客户端在响应信息中获取更新信息,其中,更新信息包括能够获取目标应用的更新数据在CDN上的第一存储地址和第一更新时间戳的信息,其中,通过访问第一存储地址就可以获取更新数据,第一更新时间戳对应于更新数据上传至CDN上的时间戳。本公开对第一存储地址采用的表示形式以及第一更新时间戳的获取方法不做具体限定。According to the embodiment of the present disclosure, after receiving the request sent by the target application, the gateway can obtain the application identifier carried in the packet header of the request, and then compare the application identifier with the application identifier stored locally by the gateway. If the update information corresponding to the application identifier is stored locally, the update information is carried in the response data of the request and returned to the client. Since the response data includes a header and a body, the update information of the target application can be carried in the header of the response data and returned to the client. The client obtains the update information in the response information, where the update information includes the information that can obtain the first storage address and the first update timestamp of the update data of the target application on the CDN, wherein the information can be obtained by accessing the first storage address To update the data, the first update timestamp corresponds to the timestamp when the update data is uploaded to the CDN. The present disclosure does not specifically limit the representation form adopted by the first storage address and the method for obtaining the first update timestamp.

根据本公开的实施例,由于客户端在本地存储了目标应用上一次的本地更新信息,通过比较从网关获取的更新信息与目标应用在本地的更新信息,可以判断从网关获取的更新信息对应的更新数据是否已经在本地更新过,如果更新过,则可以不做处理,如果没有更新过,则可以从网关获取的更新信息中的第一存储地址下载目标应用的更新数据,并在本地对目标应用进行更新;当然,也可以先将该更新信息记录下来,之后再批量进行更新。According to the embodiment of the present disclosure, since the client locally stores the last local update information of the target application, by comparing the update information obtained from the gateway with the local update information of the target application, it can be determined that the update information obtained from the gateway corresponds to the update information. Whether the update data has been updated locally, if it has been updated, it is not necessary to process it; if it has not been updated, the update data of the target application can be downloaded from the first storage address in the update information obtained by the gateway, and the target application The application is updated; of course, the update information can also be recorded first, and then updated in batches.

根据本公开实施例提供的技术方案,通过向网关发送携带有目标应用的应用标识的请求,并接收网关返回的响应数据,同时获取网关添加在响应数据中的更新信息,从而根据更新信息确定是否更新目标应用。避免了客户端轮询主动请求更新数据方式中所产生的资源浪费的问题,同时,网关根据目标应用发送的请求中携带的目标应用的应用标识,直接在响应数据中携带目标应用的更新信息并返回给客户端,从而使客户端根据更新信息确定是否需要更新目标应用。According to the technical solutions provided by the embodiments of the present disclosure, by sending a request carrying the application identifier of the target application to the gateway, receiving the response data returned by the gateway, and acquiring the update information added by the gateway to the response data at the same time, the update information is used to determine whether to Update the target application. The problem of resource waste caused by the client polling and actively requesting to update data is avoided. At the same time, the gateway directly carries the update information of the target application in the response data according to the application identifier of the target application carried in the request sent by the target application. It is returned to the client, so that the client can determine whether the target application needs to be updated according to the update information.

根据本公开的一实施例,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。该实施例中,网关可以从服务器返回的更新信息中直接获取第一存储地址和第一更新时间戳。并且通过第一更新时间戳可以确定目标应用的更新数据在CDN上的更新时间,访问第一存储地址可以从CDN上获取目标应用的更新数据。可以理解,虽然本公开以第一存储地址采用统一资源定位符(Uniform ResourceLocator,URL)的表示形式,第一更新时间戳通过获取毫秒的方式进行举例说明,但本公开不限于此。例如,服务器将目标应用APP1的更新数据上传至CDN,并获取APP1在CDN上的第一存储地址(https://xxx.xx/a/1json.json)和第一更新时间戳(1564114914423),通过访问第一存储地址https://xxx.xx/a/1json.json就可以获取更新数据,并获取更新数据上传至CDN上的时间戳为1564114914423。According to an embodiment of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp. In this embodiment, the gateway may directly acquire the first storage address and the first update timestamp from the update information returned by the server. And the update time of the update data of the target application on the CDN can be determined by the first update timestamp, and the update data of the target application can be obtained from the CDN by accessing the first storage address. It can be understood that although the present disclosure uses the first storage address in the form of a Uniform Resource Locator (URL) and the first update timestamp is exemplified by obtaining milliseconds, the present disclosure is not limited thereto. For example, the server uploads the update data of the target application APP1 to the CDN, and obtains the first storage address (https://xxx.xx/a/1json.json) and the first update timestamp (1564114914423) of APP1 on the CDN, The update data can be obtained by accessing the first storage address https://xxx.xx/a/1json.json, and the timestamp of the update data uploaded to the CDN is 1564114914423.

根据本公开的另一实施例,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。According to another embodiment of the present disclosure, the update information includes a second storage address and a second update timestamp of an index file corresponding to the target application on the content distribution server; the index file includes the target application The service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

根据本公开的实施例,目标业务可以包括但不限于配置中心业务、离线包业务和补丁业务。目标应用的一个或多个目标业务发生变化后,开发人员可以以目标业务的更新数据的形式打包该更新后的一个或多个目标业务,下面将以目标业务为补丁业务或者离线包业务进行举例说明,但本公开并不限于此,例如,客户端在获得该补丁业务或者离线包业务的更新数据之后,可以在本地客户端对目标应用进行更新。若只有一个目标业务,即该目标应用只有一个目标业务发生了变化,则目标应用的更新数据包括这一个目标业务的更新数据;若有两个或两个以上目标业务时,即该目标应用有两个或两个以上的目标业务发生了变化,则目标应用的更新数据可以包括一个目标业务的更新数据,也可以包括部分目标业务的更新数据,也可以包括所有目标业务的更新数据。According to an embodiment of the present disclosure, the target service may include, but is not limited to, a configuration center service, an offline package service, and a patch service. After one or more target services of the target application have changed, the developer can package the updated one or more target services in the form of updated data of the target service. The following will take the target service as a patch service or an offline package service as an example. However, the present disclosure is not limited thereto. For example, after obtaining the update data of the patch service or the offline package service, the client may update the target application at the local client. If there is only one target service, that is, only one target service of the target application has changed, the update data of the target application includes the update data of this target service; if there are two or more target services, that is, the target application has When two or more target services have changed, the update data of the target application may include the update data of one target service, some target services, or all the target services.

根据本公开的实施例,由于目标应用的更新数据可以包括目标应用的一个或多个目标业务的更新数据,为了区分不同目标业务的更新数据,可以建立索引文件存储不同目标业务的更新信息,其中,索引文件可以包括目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,其中,业务标识用于标识不同的目标业务,更新地址对应于该目标业务在CDN上的最新更新地址,且通过访问更新地址就可以获取该目标业务的更新数据,更新时间戳对应于该目标业务的更新数据上传至CDN上的时间戳。本公开将以目标应用有两个目标业务的对应数据发生改变,且业务标识采用业务名称的形式进行举例说明,但本公开不限于此。例如,目标应用APP2有两个目标业务,分别为配置中心业务(crystal_config)和离线包业务(speedboat_offline_deploy),其中,APP2的appKey为25230564,appVersion为7.20.4,配置中心业务的更新地址为https://xxx.xx/b/1json.json,更新时间戳为1563405958296,离线包业务的更新地址为https://xxx.xx/b/2json.json,更新时间戳为1564039123355,则APP2的索引文件可以表示为:According to the embodiment of the present disclosure, since the update data of the target application may include the update data of one or more target services of the target application, in order to distinguish the update data of different target services, an index file may be established to store the update information of different target services, wherein , the index file may include the service identifier, update address and update timestamp of at least one target service of the target application, wherein the service identifier is used to identify different target services, and the update address corresponds to the latest update address of the target service on the CDN, And by accessing the update address, the update data of the target service can be obtained, and the update time stamp corresponds to the time stamp when the update data of the target service is uploaded to the CDN. The present disclosure will take an example in which the corresponding data of the target application has two target services changed, and the service identifier is in the form of a service name, but the present disclosure is not limited thereto. For example, the target application APP2 has two target services, namely the configuration center service (crystal_config) and the offline package service (speedboat_offline_deploy). Among them, the appKey of APP2 is 25230564, the appVersion is 7.20.4, and the update address of the configuration center service is https: //xxx.xx/b/1json.json, the update timestamp is 1563405958296, the update address of the offline package service is https://xxx.xx/b/2json.json, and the update timestamp is 1564039123355, then the index file of APP2 It can be expressed as:

Figure BDA0002205050240000311
Figure BDA0002205050240000311

根据本公开的上述实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳,网关在接收到该更新信息之后,可以通过访问第二存储地址获取索引文件,还可以通过第二更新时间戳确定索引文件的最新更新时间。在通过第二存储地址获取索引文件之后,还可以从索引文件中获取目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,例如,服务器最新上传至CDN的更新数据包括目标应用的目标业务A的更新数据时,可以通过索引文件获取目标业务A的更新数据在CDN上的第一存储地址以及第一更新时间戳。本公开对第二存储地址采用的表示形式以及第二更新时间戳的获取方法不做具体限定。According to the above embodiments of the present disclosure, the update information includes the second storage address and the second update timestamp of the index file corresponding to the target application on the content distribution server. After receiving the update information, the gateway can access the second storage address by accessing the second storage address. The index file is obtained, and the latest update time of the index file can also be determined by using the second update timestamp. After the index file is obtained through the second storage address, the service identifier, update address and update timestamp of at least one target service of the target application can also be obtained from the index file. For example, the update data newly uploaded by the server to the CDN includes the target application's When updating the data of the target service A, the first storage address and the first update time stamp of the updated data of the target service A on the CDN can be obtained through the index file. The present disclosure does not specifically limit the representation form adopted by the second storage address and the method for obtaining the second update timestamp.

图8示出根据本公开实施例的向网关发送携带有目标应用的应用标识的请求的流程图。如图8所示,所述步骤S701,即向网关发送携带有目标应用的应用标识的请求,包括以下步骤S801-S802:FIG. 8 shows a flowchart of sending a request carrying an application identifier of a target application to a gateway according to an embodiment of the present disclosure. As shown in Figure 8, the step S701, namely sending a request carrying the application identifier of the target application to the gateway, includes the following steps S801-S802:

在步骤S801中,拦截所述目标应用向服务器发送的所述请求;In step S801, intercept the request sent by the target application to the server;

在步骤S802中,将所述目标应用的应用标识携带在所述请求中发送至所述服务器的网关。In step S802, the application identifier of the target application is carried in the request and sent to the gateway of the server.

根据本公开的实施例,客户端中的目标应用向服务器发送请求时,可以通过安装在本地的SDK拦截待发送出去的请求。为了了解目标应用是否存在更新信息,SDK可以在拦截下来的任意请求中携带目标应用的应用标识,并将该请求发送给服务器的网关,从而获取目标应用的更新信息。由于请求包括包头和包正文,可以将目标应用的应用标识携带在请求的包头中发送给服务器的网关。同理,在客户端获取网关返回的响应数据之后,也可以通过SDK从响应数据中获取目标应用的更新信息。According to the embodiments of the present disclosure, when the target application in the client sends a request to the server, the request to be sent can be intercepted by the SDK installed locally. In order to know whether the target application has update information, the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the gateway of the server to obtain the update information of the target application. Since the request includes a packet header and a packet body, the application identifier of the target application can be carried in the packet header of the request and sent to the gateway of the server. Similarly, after the client obtains the response data returned by the gateway, it can also obtain the update information of the target application from the response data through the SDK.

根据本公开的实施例,所述步骤S704,即根据所述更新信息确定是否更新所述目标应用,还可被实施为:在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,记录所述目标应用有更新数据。在本实施例中,由于有些目标应用只需要确认是否已经更新,不需要立即下载该目标应用的更新数据。当第一更新时间戳晚于第三更新时间戳时,其中,第三更新时间戳可以是最近一次从CDN下载并对目标应用进行更新的更新数据的第一更新时间戳,可以确定本地存储的目标应用的更新数据发生了更新,可以先将该情况记录下来,以便在之后适当的时候进行下载并安装目标应用的更新数据。According to an embodiment of the present disclosure, the step S704, that is, determining whether to update the target application according to the update information, may also be implemented as: when the first update timestamp is later than the local first update time of the target application When the time stamp is updated, record that the target application has updated data. In this embodiment, since some target applications only need to confirm whether they have been updated, the update data of the target application does not need to be downloaded immediately. When the first update time stamp is later than the third update time stamp, where the third update time stamp may be the first update time stamp of the update data that was downloaded from the CDN for the last time and updated the target application, it may be determined that the locally stored When the update data of the target application is updated, the situation can be recorded first, so that the update data of the target application can be downloaded and installed at an appropriate time later.

根据本公开的实施例,所述步骤S704,即根据所述更新信息确定是否更新所述目标应用,还可被实施为:在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,从所述第一存储地址下载所述目标应用的更新数据;根据所述目标应用的更新数据更新所述目标应用。在本实施例中,可以通过比较第一更新时间戳与本地第三更新时间戳,其中,第三更新时间戳可以是最近一次从CDN下载并对目标应用进行更新的更新数据的第一更新时间戳,来确定是否下载并安装该目标应用的更新数据。具体地,当第一更新时间戳晚于本地第三更新时间戳时,表明目标数据的更新数据相较于本地目标应用对应的更新数据有更新,因此可以从第一存储地址下载目标应用的更新数据,并根据目标应用的更新数据更新目标应用。According to an embodiment of the present disclosure, the step S704, that is, determining whether to update the target application according to the update information, may also be implemented as: when the first update timestamp is later than the local first update time of the target application When updating the time stamp, download the update data of the target application from the first storage address; and update the target application according to the update data of the target application. In this embodiment, the first update time stamp can be compared with the local third update time stamp, where the third update time stamp can be the first update time of the latest update data downloaded from the CDN and updated to the target application to determine whether to download and install the update data of the target application. Specifically, when the first update timestamp is later than the local third update timestamp, it indicates that the update data of the target data is updated compared with the update data corresponding to the local target application, so the update of the target application can be downloaded from the first storage address data, and update the target application according to the update data of the target application.

图9示出根据本公开实施例的根据所述更新信息确定是否更新所述目标应用的流程图。如图9所示,所述步骤S704,即根据所述更新信息确定是否更新所述目标应用,包括以下步骤S901-S902:FIG. 9 shows a flowchart of determining whether to update the target application according to the update information according to an embodiment of the present disclosure. As shown in FIG. 9, the step S704, that is, determining whether to update the target application according to the update information, includes the following steps S901-S902:

在步骤S901中,在所述第二更新时间戳晚于本地索引文件的第四更新时间戳时,从所述第二存储地址下载所述索引文件;In step S901, when the second update time stamp is later than the fourth update time stamp of the local index file, the index file is downloaded from the second storage address;

在步骤S902中,根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用。In step S902, whether to update the target application is determined according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file.

根据本公开的实施例,客户端可以存储最近一次从服务器获取的目标应用对应的本地索引文件以及该本地索引文件在CDN上的第四更新时间戳,该索引文件中记载的目标应用的一个或多个目标业务的更新数据已经在本地目标应用上被更新过。当从网关获取的更新信息包括目标应用对应的索引文件以及索引文件在CDN上的第二存储地址以及第二更新时间戳时,可以通过比较第二更新时间戳与本地存储的本地索引文件的第四更新时间戳,其中,第四更新时间戳对应于本地索引文件上传至CDN上的时间戳,来确定从网关获取的索引文件是否发生了更新。具体地,当第二更新时间戳晚于第四更新时间戳时,表明从网关获取的索引文件相较于本地存储的本地索引文件有更新,因此可以从第二存储地址下载最新的索引文件。According to the embodiment of the present disclosure, the client can store the local index file corresponding to the target application obtained from the server most recently and the fourth update timestamp of the local index file on the CDN, one or the other of the target application recorded in the index file The update data of multiple target services have been updated on the local target application. When the update information obtained from the gateway includes the index file corresponding to the target application, the second storage address of the index file on the CDN, and the second update timestamp, the second update timestamp can be compared with the locally stored local index file. Four update timestamps, where the fourth update timestamp corresponds to the timestamp when the local index file is uploaded to the CDN, so as to determine whether the index file obtained from the gateway is updated. Specifically, when the second update time stamp is later than the fourth update time stamp, it indicates that the index file obtained from the gateway is updated compared to the local index file stored locally, so the latest index file can be downloaded from the second storage address.

根据本公开的实施例,由于索引文件关联存储至少一个目标业务的业务标识、第一存储地址和第一更新时间戳,当索引文件有更新时,表明索引文件中存储的至少一个目标业务发生了更新,从而可以根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳以及本地存储的本地索引文件中该目标业务的业务标识对应的更新时间戳来确定是否更新目标应用。According to the embodiment of the present disclosure, since the service identifier, the first storage address and the first update time stamp of the at least one target service are stored in the index file in association, when the index file is updated, it indicates that the at least one target service stored in the index file has occurred. Therefore, whether to update the target application can be determined according to the first update timestamp corresponding to the service identifier of at least one target service in the index file and the update timestamp corresponding to the service identifier of the target service in the locally stored local index file.

图10示出根据本公开实施例的根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用的流程图。如图10所示,所述步骤S902,即根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括以下步骤S1001-S1002:10 shows a flowchart of determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file according to an embodiment of the present disclosure. As shown in Figure 10, the step S902, that is, determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file, includes the following steps S1001-S1002:

在步骤S1001中,在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,从所述第一存储地址下载所述目标业务的更新数据;In step S1001, when the first update time stamp is later than the locally stored fifth update time stamp corresponding to the at least one target service, download the update data of the target service from the first storage address;

在步骤S1002中,根据所述目标业务的更新数据更新所述目标业务。In step S1002, the target service is updated according to the update data of the target service.

根据本公开的实施例,由于在本地存储了最近一次更新目标应用时从服务器下载的本地索引文件,且本地索引文件关联存储目标应用的至少一个目标业务的业务标识和第五更新时间戳,其中,第五更新时间戳对应于本地存储的目标业务的更新数据上传至CDN上的时间戳。当从第二存储地址下载的索引文件关联存储至少一个目标业务的业务标识、第一存储地址和第一更新时间戳时,可以通过比较第一更新时间戳与本地索引文件中目标业务的更新数据的第五更新时间戳,来确定是否下载并安装该目标业务的更新数据。具体地,当第一更新时间戳晚于第五更新时间戳时,表明目标业务的更新数据相较于本地索引文件中该目标业务对应的更新数据有更新,因此可以从第一存储地址下载该目标业务的更新数据,并根据更新数据对目标应用的目标业务进行更新。According to the embodiment of the present disclosure, since the local index file downloaded from the server when the target application was updated last time is stored locally, and the local index file stores the service identifier and the fifth update time stamp of at least one target service of the target application in association, wherein , and the fifth update timestamp corresponds to the timestamp of the locally stored update data of the target service uploaded to the CDN. When the index file downloaded from the second storage address associates and stores the service identifier of at least one target service, the first storage address, and the first update time stamp, the first update time stamp can be compared with the update data of the target service in the local index file. to determine whether to download and install the update data of the target service. Specifically, when the first update time stamp is later than the fifth update time stamp, it indicates that the update data of the target service is updated compared with the update data corresponding to the target service in the local index file, so the update data can be downloaded from the first storage address. Update data of the target service, and update the target service of the target application according to the update data.

例如:本地存储的本地索引文件1如下:For example: the local index file 1 stored locally is as follows:

Figure BDA0002205050240000341
Figure BDA0002205050240000341

从第二存储地址获取的索引文件2如下:The index file 2 obtained from the second storage address is as follows:

Figure BDA0002205050240000342
Figure BDA0002205050240000342

对于配置中心业务,由于第一更新时间戳1563405958296晚于第五更新时间戳1563405658296,表明本地存储的配置中心业务的更新数据发生了更新,因此,可以从第一存储地址https://xxx.xx/b/1json.json下载配置中心业务的更新数据。For the configuration center service, since the first update time stamp 1563405958296 is later than the fifth update time stamp 1563405658296, it indicates that the update data of the locally stored configuration center service has been updated. Therefore, the first storage address https://xxx.xx /b/1json.json downloads the updated data of the configuration center business.

由于目标应用中的有些目标业务只需要确认是否已经更新,不需要立即下载该目标业务的更新数据,例如,离线包业务和补丁业务只需要获取更新消息,并不需要立即下载该目标业务的更新数据,因此,根据本公开的实施例,所述步骤S902,即根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,还可被实施为:在所述第一更新时间戳晚于或等于本地存储的所述至少一个目标业务对应的第五更新时间戳时,记录所述目标业务有更新数据。Because some target services in the target application only need to confirm whether they have been updated, there is no need to download the update data of the target service immediately. For example, offline package services and patch services only need to obtain update information, and do not need to download the update of the target service immediately. Therefore, according to an embodiment of the present disclosure, the step S902, that is, determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file, can also be performed by The implementation is: when the first update time stamp is later than or equal to the fifth update time stamp corresponding to the at least one target service stored locally, recording that the target service has update data.

例如:本地存储的本地索引文件1如下:For example: the local index file 1 stored locally is as follows:

Figure BDA0002205050240000351
Figure BDA0002205050240000351

从第二存储地址获取的索引文件2如下:The index file 2 obtained from the second storage address is as follows:

Figure BDA0002205050240000352
Figure BDA0002205050240000352

对于离线包业务,由于第一更新时间戳1564039123355晚于第五更新时间戳1564036123355,因此,可以确定本地存储的离线包业务的更新数据发生了更新,可以先将该情况记录下来,以便在之后适当的时候进行下载并安装(例如批量从服务器下载目标业务的更新数据,并批量对目标应用的多个目标业务进行更新)。当用户需要下载离线包业务的更新数据时,可以进一步从第一存储地址https://xxx.xx/b/2json.json下载配置离线包业务的更新数据。For the offline package service, since the first update time stamp 1564039123355 is later than the fifth update time stamp 1564036123355, it can be determined that the update data of the offline package service stored locally has been updated. download and install it at the same time (for example, download the update data of the target service from the server in batches, and update multiple target services of the target application in batches). When the user needs to download the update data of the offline package service, he can further download the update data of the configuration offline package service from the first storage address https://xxx.xx/b/2json.json.

图11示出根据本公开实施例的数据更新方法的流程图。如图11所示,所述数据更新方法包括以下步骤S1101-S1104:FIG. 11 shows a flowchart of a data update method according to an embodiment of the present disclosure. As shown in Figure 11, the data update method includes the following steps S1101-S1104:

在步骤S1101中,服务器将目标应用的更新数据上传至内容分发服务器,并获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;In step S1101, the server uploads the update data of the target application to the content distribution server, and obtains the update information of the update data on the content distribution server, wherein the update information includes the ability to obtain the update data at the location where the update data can be obtained. the information of the first storage address and the first update timestamp on the content distribution server;

在步骤S1102中,所述服务器响应于网关针对所述目标应用的更新信息请求,向所述网关返回所述更新信息;In step S1102, the server returns the update information to the gateway in response to the update information request of the gateway for the target application;

在步骤S1103中,所述网关接收所述目标应用发送的请求,并将所述目标应用的所述更新信息携带在响应数据中返回给客户端,其中,所述请求包括所述目标应用的应用标识;In step S1103, the gateway receives the request sent by the target application, and returns the update information of the target application in response data to the client, where the request includes the application of the target application identification;

在步骤S1104中,所述客户端获取所述网关添加在所述响应数据中的所述更新信息,并根据所述更新信息确定是否更新所述目标应用。In step S1104, the client obtains the update information added by the gateway in the response data, and determines whether to update the target application according to the update information.

根据本公开的实施例,客户端中安装具备不同功能的应用(APP),其中,应用可以是安装在客户端上的软件,例如通信应用、游戏应用、娱乐应用、社交应用或实用生活应用等,在本公开中不做具体限定。为了缓解服务器的压力,提高数据请求的响应速度和命中率,当技术开发人员对目标应用进行更新后,可以通过服务器将目标应用的更新数据上传至CDN,其中,目标应用是指数据发生了更新的一个或多个应用,更新数据是指目标应用中发生了变化的数据。According to an embodiment of the present disclosure, an application (APP) with different functions is installed in the client, wherein the application may be software installed on the client, such as a communication application, a game application, an entertainment application, a social application, or a practical life application, etc. , which is not specifically limited in the present disclosure. In order to relieve the pressure on the server and improve the response speed and hit rate of data requests, after the technical developers update the target application, they can upload the updated data of the target application to the CDN through the server, where the target application refers to the data that has been updated One or more applications of the target application, update data refers to the data that has changed in the target application.

需要说明的是,本公开实施例中的服务器为目标应用的服务器,不同的目标应用可以对应不同的服务器。It should be noted that the server in the embodiment of the present disclosure is the server of the target application, and different target applications may correspond to different servers.

根据本公开的实施例,当目标应用的数量为两个或两个以上时,为了区分不同目标应用对应的更新数据,服务器可以同时将目标应用的应用标识以及对应的更新数据上传至CDN,其中,应用标识用于标识不同的目标应用的不同版本,应用标识可以包括应用唯一标识(appKey)和应用发布版本号(appVersion)。同时,可以将目标应用的应用标识以及对应的更新数据组装成Key-Value的数据结构存储在服务器本地非关系型数据库(比如Redis)中,其中,Key对应于应用标识,Value对应于更新数据。According to an embodiment of the present disclosure, when the number of target applications is two or more, in order to distinguish the update data corresponding to different target applications, the server may simultaneously upload the application identifier of the target application and the corresponding update data to the CDN, wherein , the application identifier is used to identify different versions of different target applications, and the application identifier may include an application unique identifier (appKey) and an application release version number (appVersion). At the same time, the application identifier of the target application and the corresponding update data can be assembled into a key-value data structure and stored in the server's local non-relational database (such as Redis), where the key corresponds to the application identifier and the value corresponds to the update data.

根据本公开的实施例,服务器将目标应用的更新数据上传至CDN之后,服务器可以进一步获取更新数据在CDN上的更新信息,更新信息包括能够获取更新数据在CDN上的第一存储地址和第一更新时间戳的信息,其中,通过访问第一存储地址就可以获取更新数据,第一更新时间戳对应于更新数据上传至CDN上的时间戳。本公开对第一存储地址采用的表示形式以及第一更新时间戳的获取方法不做具体限定。为了标识不同目标应用的更新数据对应的更新信息,可以将目标应用的应用标识和更新信息进行关联存储。According to the embodiment of the present disclosure, after the server uploads the update data of the target application to the CDN, the server can further obtain the update information of the update data on the CDN, and the update information includes the first storage address and the first storage address of the CDN that can obtain the update data on the CDN. The information of the update time stamp, wherein the update data can be obtained by accessing the first storage address, and the first update time stamp corresponds to the time stamp when the update data is uploaded to the CDN. The present disclosure does not specifically limit the representation form adopted by the first storage address and the method for obtaining the first update timestamp. In order to identify the update information corresponding to the update data of different target applications, the application identifier of the target application and the update information may be stored in association.

如上文所述,为了避免服务器主动推送更新数据或者客户端轮询主动请求更新数据两种方式出现的上述技术问题,根据本公开的实施例,可以设置网关周期性地向服务器发出目标应用的更新信息请求,本公开对更新信息请求的周期不做具体限定,例如,可以为1S。由于网关的数量远小于客户端的数量,从而缓解了服务器接收更新信息请求的压力。服务器响应于网关针对目标应用的更新信息请求,返回该目标应用最近一次的更新信息。为了标识不同目标应用对应的更新信息请求,更新信息请求可以携带目标应用的应用标识,服务器响应于网关针对目标应用的更新信息请求,并根据应用标识确定当前更新信息请求对应的目标应用,并将该目标应用的更新信息返回给网关。As described above, in order to avoid the above-mentioned technical problems that occur in two ways: the server actively pushes the update data or the client polls and actively requests the update data, according to the embodiments of the present disclosure, the gateway can be set to periodically send the update of the target application to the server For the information request, the present disclosure does not specifically limit the period of the update information request, for example, it may be 1S. Since the number of gateways is much smaller than the number of clients, the pressure on the server to receive updated information requests is relieved. In response to the update information request for the target application by the gateway, the server returns the latest update information of the target application. In order to identify the update information requests corresponding to different target applications, the update information request can carry the application identifier of the target application. The server responds to the update information request of the gateway for the target application, and determines the target application corresponding to the current update information request according to the application identifier, and sends The update information of the target application is returned to the gateway.

需要说明的是,本公开实施例中提到的网关是服务器端的网关,也即服务器与外界进行通信的网关。客户端上的目标应用向目标应用的服务器端的网络请求均可以通过该网关进入该服务器端。客户端可以是手持终端设备、笔记本电脑、蜂窝电话、智能电话、无线数据卡、个人数字助理电脑、平板型电脑、无绳电话、物联网设备(IOT设备)或是其他可以接入网络的终端设备,在本公开中不做具体限定。It should be noted that the gateway mentioned in the embodiments of the present disclosure is a server-side gateway, that is, a gateway through which the server communicates with the outside world. All network requests from the target application on the client to the server side of the target application can enter the server side through the gateway. Clients can be handheld terminal devices, laptop computers, cellular phones, smart phones, wireless data cards, personal digital assistant computers, tablet computers, cordless phones, Internet of Things devices (IOT devices), or other terminal devices that can access the network , which is not specifically limited in the present disclosure.

根据本公开的实施例,客户端上的目标应用发给目标应用的服务器端的请求,会先到达服务器端的网关。为了确定目标应用是否存在更新信息,本公开实施例中,客户端上的目标应用可以不用直接向服务器发送更新信息请求,而是由客户端上的专门开发的SDK通过拦截目标应用发送给服务器的任意请求,并在该请求中添加目标应用的应用标识,从而获取目标应用是否存在更新信息。由于请求包括包头和正文,客户端可以将目标应用的应用标识携带在请求的包头中发送给服务器。According to the embodiment of the present disclosure, the request sent by the target application on the client to the server side of the target application will first reach the gateway of the server side. In order to determine whether the target application has update information, in the embodiment of the present disclosure, the target application on the client may not directly send the update information request to the server, but the specially developed SDK on the client intercepts the information sent by the target application to the server. Any request, and the application identifier of the target application is added to the request, so as to obtain whether the target application has update information. Since the request includes a header and a body, the client can send the application identifier of the target application to the server in the header of the request.

根据本公开的实施例,当网关接收到客户端上的目标应用发送的请求数据之后,可以从该请求(例如包头)中获取携带的应用标识,进而将该应用标识与网关本地所存储的应用标识进行比较。如果网关本地存储有该应用标识对应的更新信息,则网关在该请求数据的响应数据中携带更新信息后返回给客户端。由于响应数据包括包头和正文,网关可以将目标应用的更新信息携带在响应数据的包头中返回给客户端。According to the embodiments of the present disclosure, after the gateway receives the request data sent by the target application on the client, it can obtain the application identifier carried in the request (for example, the packet header), and then associate the application identifier with the application stored locally on the gateway. identities for comparison. If the gateway locally stores the update information corresponding to the application identifier, the gateway returns the update information to the client after carrying the update information in the response data of the request data. Since the response data includes a header and a body, the gateway can carry the update information of the target application in the header of the response data and return it to the client.

根据本公开实施例,客户端在响应信息中获取更新信息之后,由于客户端在本地存储了目标应用上一次的本地更新信息,客户端通过比较从网关获取的更新信息与目标应用在客户端本地的更新信息,可以判断从网关获取的更新信息对应的更新数据是否已经在客户端本地更新过,如果更新过,则可以不做处理,如果没有更新过,则客户端可以从网关获取的更新信息中的第一存储地址下载目标应用的更新数据,并在本地对目标应用进行更新;当然,客户端也可以先将该更新信息记录下来,之后再批量进行更新。According to an embodiment of the present disclosure, after the client obtains the update information in the response information, since the client locally stores the last local update information of the target application, the client compares the update information obtained from the gateway with the target application locally on the client The update information obtained from the gateway can be judged whether the update data corresponding to the update information obtained from the gateway has been updated locally on the client. The update data of the target application is downloaded from the first storage address in the client application, and the target application is updated locally; of course, the client can also record the update information first, and then update it in batches.

根据本公开实施例提供的技术方案,服务器将目标应用的更新数据上传至内容分发服务器,并获取更新数据在内容分发服务器上的更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息,服务器响应于网关针对目标应用的更新信息请求,向网关返回所述更新信息,网关接收目标应用发送的请求,并将目标应用的更新信息携带在响应数据中返回给客户端,其中,请求包括目标应用的应用标识,客户端获取网关添加在响应数据中的更新信息,并根据更新信息确定是否更新目标应用。避免了客户端轮询主动请求更新数据方式中所产生的资源浪费问题,且网关直接在响应数据中携带着存储在网关本地的目标应用的更新信息并返回给客户端,从而使客户端根据更新信息确定是否需要更新目标应用,提高了更新数据的响应速度,从而使多个客户端同时实现“秒级”更新,同时,将客户端向服务器发送请求转化为网关周期性向服务器发起请求,缓解了服务器接收更新信息请求的压力。According to the technical solutions provided by the embodiments of the present disclosure, the server uploads the update data of the target application to the content distribution server, and obtains the update information of the update data on the content distribution server, wherein the update information includes the ability to obtain the update data on the content distribution server the information of the first storage address and the first update timestamp, the server returns the update information to the gateway in response to the update information request of the gateway for the target application, the gateway receives the request sent by the target application, and carries the update information of the target application with The response data is returned to the client, wherein the request includes the application identifier of the target application, and the client obtains the update information added by the gateway in the response data, and determines whether to update the target application according to the update information. The problem of resource waste caused by the client polling and actively requesting update data is avoided, and the gateway directly carries the update information of the target application stored locally in the gateway in the response data and returns it to the client, so that the client can update the data according to the update information. The information determines whether the target application needs to be updated, which improves the response speed of updating data, so that multiple clients can achieve "second-level" updates at the same time. The pressure on the server to receive requests for updated information.

根据本公开的一实施例,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。该实施例中,网关可以从服务器返回的更新信息中直接获取第一存储地址和第一更新时间戳。并且通过第一更新时间戳可以确定目标应用的更新数据在CDN上的更新时间,访问第一存储地址可以从CDN上获取目标应用的更新数据。可以理解,虽然本公开以第一存储地址采用统一资源定位符(Uniform ResourceLocator,URL)的表示形式,第一更新时间戳通过获取毫秒的方式进行举例说明,但本公开不限于此。例如,服务器将目标应用APP1的更新数据上传至CDN,并获取APP1在CDN上的第一存储地址(https://xxx.xx/a/1json.json)和第一更新时间戳(1564114914423),通过访问第一存储地址https://xxx.xx/a/1json.json就可以获取更新数据,并获取更新数据上传至CDN上的时间戳为1564114914423。According to an embodiment of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp. In this embodiment, the gateway may directly acquire the first storage address and the first update timestamp from the update information returned by the server. And the update time of the update data of the target application on the CDN can be determined by the first update timestamp, and the update data of the target application can be obtained from the CDN by accessing the first storage address. It can be understood that although the present disclosure uses the first storage address in the form of a Uniform Resource Locator (URL) and the first update timestamp is exemplified by obtaining milliseconds, the present disclosure is not limited thereto. For example, the server uploads the update data of the target application APP1 to the CDN, and obtains the first storage address (https://xxx.xx/a/1json.json) and the first update timestamp (1564114914423) of APP1 on the CDN, The update data can be obtained by accessing the first storage address https://xxx.xx/a/1json.json, and the timestamp of the update data uploaded to the CDN is 1564114914423.

根据本公开的另一实施例,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。According to another embodiment of the present disclosure, the update information includes a second storage address and a second update timestamp of an index file corresponding to the target application on the content distribution server; the index file includes the target application The service identifier, storage address and update time stamp of at least one target service of the target application; the update data includes the update data of at least one target service of the target application.

根据本公开的实施例,目标业务可以包括但不限于配置中心业务、离线包业务和补丁业务。目标应用的一个或多个目标业务发生变化后,开发人员可以以目标业务的更新数据的形式打包该更新后的一个或多个目标业务,下面将以目标业务为补丁业务或者离线包业务进行举例说明,但本公开并不限于此,例如,客户端在获得该补丁业务或者离线包业务的更新数据之后,可以在本地客户端对目标应用进行更新。若只有一个目标业务,即该目标应用只有一个目标业务发生了变化,则目标应用的更新数据包括这一个目标业务的更新数据;若有两个或两个以上目标业务时,即该目标应用有两个或两个以上的目标业务发生了变化,则目标应用的更新数据可以包括一个目标业务的更新数据,也可以包括部分目标业务的更新数据,也可以包括所有目标业务的更新数据。According to an embodiment of the present disclosure, the target service may include, but is not limited to, a configuration center service, an offline package service, and a patch service. After one or more target services of the target application have changed, the developer can package the updated one or more target services in the form of updated data of the target service. The following will take the target service as a patch service or an offline package service as an example. However, the present disclosure is not limited thereto. For example, after obtaining the update data of the patch service or the offline package service, the client may update the target application at the local client. If there is only one target service, that is, only one target service of the target application has changed, the update data of the target application includes the update data of this target service; if there are two or more target services, that is, the target application has When two or more target services have changed, the update data of the target application may include the update data of one target service, some target services, or all the target services.

根据本公开的实施例,由于目标应用的更新数据可以包括目标应用的一个或多个目标业务的更新数据,为了区分不同目标业务的更新数据,可以建立索引文件存储不同目标业务的更新信息,其中,索引文件可以包括目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,其中,业务标识用于标识不同的目标业务,更新地址对应于该目标业务在CDN上的最新更新地址,且通过访问更新地址就可以获取该目标业务的更新数据,更新时间戳对应于该目标业务的更新数据上传至CDN上的时间戳。本公开将以目标应用有两个目标业务的对应数据发生改变,且业务标识采用业务名称的形式进行举例说明,但本公开不限于此。例如,目标应用APP2有两个目标业务,分别为配置中心业务(crystal_config)和离线包业务(speedboat_offline_deploy),其中,APP2的appKey为25230564,appVersion为7.20.4,配置中心业务的更新地址为https://xxx.xx/b/1json.json,更新时间戳为1563405958296,离线包业务的更新地址为https://xxx.xx/b/2json.json,更新时间戳为1564039123355,则APP2的索引文件可以表示为:According to the embodiment of the present disclosure, since the update data of the target application may include the update data of one or more target services of the target application, in order to distinguish the update data of different target services, an index file may be established to store the update information of different target services, wherein , the index file may include the service identifier, update address and update timestamp of at least one target service of the target application, wherein the service identifier is used to identify different target services, and the update address corresponds to the latest update address of the target service on the CDN, And by accessing the update address, the update data of the target service can be obtained, and the update time stamp corresponds to the time stamp when the update data of the target service is uploaded to the CDN. The present disclosure will take an example in which the corresponding data of the target application has two target services changed, and the service identifier is in the form of a service name, but the present disclosure is not limited thereto. For example, the target application APP2 has two target services, namely the configuration center service (crystal_config) and the offline package service (speedboat_offline_deploy). Among them, the appKey of APP2 is 25230564, the appVersion is 7.20.4, and the update address of the configuration center service is https: //xxx.xx/b/1json.json, the update timestamp is 1563405958296, the update address of the offline package service is https://xxx.xx/b/2json.json, and the update timestamp is 1564039123355, then the index file of APP2 It can be expressed as:

Figure BDA0002205050240000391
Figure BDA0002205050240000391

Figure BDA0002205050240000401
Figure BDA0002205050240000401

根据本公开的上述实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳,网关在接收到该更新信息之后,可以通过访问第二存储地址获取索引文件,还可以通过第二更新时间戳确定索引文件的最新更新时间。在通过第二存储地址获取索引文件之后,还可以从索引文件中获取目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,例如,服务器最新上传至CDN的更新数据包括目标应用的目标业务A的更新数据时,可以通过索引文件获取目标业务A的更新数据在CDN上的第一存储地址以及第一更新时间戳。本公开对第二存储地址采用的表示形式以及第二更新时间戳的获取方法不做具体限定。According to the above embodiments of the present disclosure, the update information includes the second storage address and the second update timestamp of the index file corresponding to the target application on the content distribution server. After receiving the update information, the gateway can access the second storage address by accessing the second storage address. The index file is obtained, and the latest update time of the index file can also be determined by using the second update timestamp. After the index file is obtained through the second storage address, the service identifier, update address and update timestamp of at least one target service of the target application can also be obtained from the index file. For example, the update data newly uploaded by the server to the CDN includes the target application's When updating the data of the target service A, the first storage address and the first update time stamp of the updated data of the target service A on the CDN can be obtained through the index file. The present disclosure does not specifically limit the representation form adopted by the second storage address and the method for obtaining the second update timestamp.

图12示出根据本公开实施例的获取所述更新数据在所述内容分发服务器上的更新信息的流程图。如图12所示,所述步骤S1101中的获取所述更新数据在所述内容分发服务器上的更新信息,包括以下步骤S1201-S1204:FIG. 12 shows a flowchart of acquiring update information of the update data on the content distribution server according to an embodiment of the present disclosure. As shown in FIG. 12 , acquiring the update information of the update data on the content distribution server in the step S1101 includes the following steps S1201-S1204:

在步骤S1201中,所述服务器获取所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳;In step S1201, the server obtains the first storage address and the first update timestamp of the update data on the content distribution server;

在步骤S1202中,所述服务器根据所述第一存储地址和所述第一更新时间戳更新所述索引文件;In step S1202, the server updates the index file according to the first storage address and the first update timestamp;

在步骤S1203中,所述服务器将所述索引文件上传至所述内容分发服务器;In step S1203, the server uploads the index file to the content distribution server;

在步骤S1204中,所述服务器获取所述第二存储地址和所述第二更新时间戳。In step S1204, the server obtains the second storage address and the second update timestamp.

根据本公开的实施例,在目标应用的某个或多个目标业务被更新之后,服务器将其更新数据上传至CDN,并从CDN获得其上传地址也即第一存储地址和上传时间戳也即第一更新时间戳,由于目标应用的更新数据包括目标应用的至少一个目标业务的更新数据,因此,服务器获取了更新数据在内容分发服务器上的第一存储地址和第一更新时间戳,并将该第一存储地址和第一更新时间戳与更新数据中的一个或多个目标业务的业务标识分别关联存储在索引文件中,如果索引文件中已经关联存储了一个或多个目标业务的业务标识对应的条目时,则可以利用当前的第一存储地址和第一更新时间戳更新条目,即更新当前的索引文件。According to the embodiments of the present disclosure, after one or more target services of the target application are updated, the server uploads the updated data to the CDN, and obtains its upload address, that is, the first storage address and the upload time stamp, that is, from the CDN. The first update timestamp. Since the update data of the target application includes the update data of at least one target service of the target application, the server obtains the first storage address and the first update timestamp of the update data on the content distribution server, and stores the update data on the content distribution server. The first storage address and the first update time stamp are stored in the index file in association with the service identifiers of one or more target services in the update data, respectively. If the service identifiers of one or more target services have been associated and stored in the index file When there is a corresponding entry, the entry can be updated by using the current first storage address and the first update timestamp, that is, the current index file is updated.

根据本公开的实施例,为了缓解服务器的压力,服务器可以将该索引文件上传至CDN,并获取索引文件在CDN上的第二存储地址和第二更新时间戳,其中,第二更新时间戳对应于索引文件上传至CDN上的时间戳。通过访问第二存储地址就可以获取索引文件,进而可以从索引文件获取目标应用对应的一个或多个目标业务的更新信息,比如,与业务标识关联存储的第一存储地址和第一更新时间戳。当网关周期性地向服务器发出目标应用的更新信息请求时,服务器可以将索引文件在CDN上的第二存储地址和第二更新时间戳返回给网关。According to the embodiments of the present disclosure, in order to relieve the pressure on the server, the server may upload the index file to the CDN, and obtain the second storage address and the second update timestamp of the index file on the CDN, where the second update timestamp corresponds to The timestamp when the index file was uploaded to the CDN. The index file can be obtained by accessing the second storage address, and then the update information of one or more target services corresponding to the target application can be obtained from the index file, for example, the first storage address and the first update timestamp stored in association with the service identifier . When the gateway periodically sends an update information request of the target application to the server, the server may return the second storage address of the index file on the CDN and the second update timestamp to the gateway.

根据本公开的实施例,所述步骤S1202,即所述服务器根据所述第一存储地址和所述第一更新时间戳更新所述索引文件,还可被实施为:所述服务器将所述索引文件中所述目标业务的所述业务标识所关联的所述更新地址和所述更新时间戳更新为所述第一存储地址和所述第一更新时间戳。According to an embodiment of the present disclosure, the step S1202, that is, the server updates the index file according to the first storage address and the first update timestamp, can also be implemented as: the server updates the index file The update address and the update timestamp associated with the service identifier of the target service in the file are updated to the first storage address and the first update timestamp.

在本实施例中,索引文件中可以包括多个目标业务标识关联的更新信息,在其中一个或多个目标业务发生了更新时,服务器可以根据上传至CDN的更新数据的第一存储地址和第一更新时间戳更新该索引文件中一个或多个目标业务的业务标识对应的更新信息。服务器首先根据业务标识确定目标业务,然后将目标业务的更新地址更新为第一存储地址,并把更新时间戳更新为第一更新时间戳,从而完成索引文件的更新。例如,原有的索引文件为:In this embodiment, the index file may include update information associated with multiple target service identifiers, and when one or more of the target services are updated, the server may An update timestamp updates the update information corresponding to the service identifiers of one or more target services in the index file. The server first determines the target service according to the service identifier, then updates the update address of the target service to the first storage address, and updates the update time stamp to the first update time stamp, thereby completing the update of the index file. For example, the original index file is:

Figure BDA0002205050240000411
Figure BDA0002205050240000411

假设只有配置中心业务的业务文件发生改变,且第一存储地址为https://xxx.xx/b/3json.json,第一更新时间戳为1564014914423,则服务器将配置中心业务的更新地址https://xxx.xx/b/1json.json更新为第一存储地址https://xxx.xx/b/3json.json,更新时间戳1563405958296更新为第一更新时间戳1564014914423,从而获取更新后的索引文件为:Assuming that only the business file of the configuration center service is changed, and the first storage address is https://xxx.xx/b/3json.json, and the first update timestamp is 1564014914423, the server will configure the center service update address https: //xxx.xx/b/1json.json is updated to the first storage address https://xxx.xx/b/3json.json, and the update timestamp 1563405958296 is updated to the first update timestamp 1564014914423, so as to obtain the updated index The file is:

Figure BDA0002205050240000421
Figure BDA0002205050240000421

图13示出根据本公开实施例的所述网关接收所述目标应用发送的请求,并将所述目标应用的所述更新信息携带在响应数据中返回给客户端的流程图。如图13所示,所述步骤S1103,即所述网关接收所述目标应用发送的请求,并将所述目标应用的所述更新信息携带在响应数据中返回给客户端,还包括以下步骤S1301-S1304:FIG. 13 shows a flowchart of the gateway receiving the request sent by the target application, and returning the update information of the target application to the client in response data according to an embodiment of the present disclosure. As shown in FIG. 13 , the step S1103, that is, the gateway receives the request sent by the target application, carries the update information of the target application in the response data and returns it to the client, and further includes the following step S1301 -S1304:

在步骤S1301中,所述网关获取所述请求中携带的所述目标应用的所述应用标识;In step S1301, the gateway obtains the application identifier of the target application carried in the request;

在步骤S1302中,在本地应用列表中未存储所述应用标识时,所述网关将所述应用标识加入所述本地应用列表;In step S1302, when the application identifier is not stored in the local application list, the gateway adds the application identifier to the local application list;

在步骤S1303中,所述网关获取所述请求中携带的所述目标应用的所述应用标识;In step S1303, the gateway obtains the application identifier of the target application carried in the request;

在步骤S1304中,在本地应用列表中未存储所述应用标识时,所述网关将所述应用标识加入所述本地应用列表。In step S1304, when the application identifier is not stored in the local application list, the gateway adds the application identifier to the local application list.

根据本公开的实施例,由于客户端中目标应用发送给目标应用的服务器的所有请求都会经过服务器端的网关,首先网关可以从请求中获取目标应用的应用标识,然后判断网关本地应用列表中是否已经存储该目标应用的应用标识,其中,本地应用列表用于存储不同应用的应用标识,若网关已经存储了该目标应用的应用标识,则不用在本地应用列表中添加该应用标识;若网关没有存储该目标应用的应用标识,则在本地应用列表中加入该应用标识。本公开对应用标识在本地应用列表中的存储方式不做具体限定,可以根据实际应用需要进行确定。According to the embodiment of the present disclosure, since all requests sent by the target application in the client to the server of the target application will pass through the gateway on the server side, the gateway can first obtain the application identifier of the target application from the request, and then determine whether the local application list of the gateway has Store the application identifier of the target application, where the local application list is used to store the application identifiers of different applications. If the gateway has stored the application identifier of the target application, the application identifier does not need to be added to the local application list; if the gateway does not store the application identifier The application identifier of the target application is added to the local application list. The present disclosure does not specifically limit the storage method of the application identifier in the local application list, which can be determined according to actual application needs.

根据本公开的实施例,当网关获取应用标识之后,首先确定网关本地是否存储了目标应用的更新信息,若本地存储有目标应用的更新信息时,直接将目标应用的更新信息携带在响应数据中返回给客户端,从而避免了客户端直接向服务器请求目标应用的更新信息;若网关本地没有存储目标应用的更新信息时,则本次可以不在响应数据中携带该更新信息,而是在下一周期由网关向服务器请求并获取该目标应用的更新信息之后,网关在响应数据中携带该更新信息并返回给客户端。According to the embodiment of the present disclosure, after the gateway obtains the application identifier, it first determines whether the update information of the target application is stored locally by the gateway, and if the update information of the target application is stored locally, the update information of the target application is directly carried in the response data Return to the client, thereby avoiding the client directly requesting the update information of the target application from the server; if the gateway does not store the update information of the target application locally, the update information may not be carried in the response data this time, but in the next cycle After the gateway requests and obtains the update information of the target application from the server, the gateway carries the update information in the response data and returns it to the client.

图14示出根据本公开实施例的数据更新方法的流程图。如图14所示,所述数据更新方法还包括以下步骤S1401-S1402:FIG. 14 shows a flowchart of a data update method according to an embodiment of the present disclosure. As shown in Figure 14, the data update method further includes the following steps S1401-S1402:

在步骤S1401中,所述网关周期性地向服务器发送所述目标应用的更新信息请求;In step S1401, the gateway periodically sends an update information request of the target application to the server;

在步骤S1402中,所述网关接收所述服务器返回的所述目标应用的所述更新信息。In step S1402, the gateway receives the update information of the target application returned by the server.

根据本公开的实施例,网关根据本地应用列表中存储的目标应用的应用标识,周期性地向服务器发送目标应用的更新信息请求,其中,本公开对更新信息请求周期不做具体限定,可以根据实际情况进行限定,例如,可以为1秒。由于网关的数量远小于客户端的数量,从而缓解了服务器接收更新信息请求的压力。服务器响应于网关针对目标应用的更新信息请求,返回该目标应用的更新信息,通过该更新信息能够获取目标应用的更新数据在CDN上的第一存储地址和第一更新时间戳的信息。According to the embodiment of the present disclosure, the gateway periodically sends the update information request of the target application to the server according to the application identifier of the target application stored in the local application list. The actual situation is limited, for example, it can be 1 second. Since the number of gateways is much smaller than the number of clients, the pressure on the server to receive updated information requests is relieved. In response to the update information request of the target application by the gateway, the server returns the update information of the target application, through which the information of the first storage address and the first update timestamp of the update data of the target application on the CDN can be obtained.

根据本公开的实施例,网关从服务器端获取到目标应用的更新信息时,可以删除存储在网关本地的原始更新信息,而将从服务器端获取到的更新信息存储在本地,以代替原始更新信息;或者,网关从服务器端获取到目标应用的更新信息时,可以根据从服务器端获取到的该更新信息是否已经存储在网关本地来确定是否存储从服务器端获取的该更新信息,具体地,若网关本地没有存储其中一个或多个目标应用的更新信息时,网关可以直接将该更新信息存储在网关本地;若网关本地存储了与该一个或多个目标应用对应的本地更新信息时,网关可以进一步将获取的更新信息中的第一更新时间戳与本地存储的本地更新信息中的本地时间戳进行比较,若更新信息中的第一更新时间戳晚于本地更新信息中的本地时间戳,表明网关从服务器获取的更新信息比网关本地存储的本地更新信息更新,则网关可以接受服务器返回的一个或多个目标应用的更新信息,并将该更新信息存储在网关本地,反之,表明网关本地存储的本地更新信息已经是最新的更新信息,则网关可以不存储该更新信息。According to the embodiment of the present disclosure, when the gateway obtains the update information of the target application from the server, it can delete the original update information stored locally in the gateway, and store the update information obtained from the server locally instead of the original update information Or, when the gateway obtains the update information of the target application from the server side, it can determine whether to store the update information obtained from the server side according to whether the update information obtained from the server side has been stored locally in the gateway, specifically, if When the gateway does not store the update information of one or more target applications locally, the gateway can directly store the update information locally; if the gateway locally stores the local update information corresponding to the one or more target applications, the gateway can store the update information locally. Further compare the first update time stamp in the obtained update information with the local time stamp in the locally stored local update information, if the first update time stamp in the update information is later than the local time stamp in the local update information, it indicates that If the update information obtained by the gateway from the server is newer than the local update information stored locally by the gateway, the gateway can accept the update information of one or more target applications returned by the server and store the update information locally in the gateway. The local update information is already the latest update information, the gateway may not store the update information.

图15示出根据本公开实施例的数据更新方法的流程图。如图15所示,所述数据更新方法还包括以下步骤S1501-S1502:FIG. 15 shows a flowchart of a data update method according to an embodiment of the present disclosure. As shown in Figure 15, the data update method further includes the following steps S1501-S1502:

在步骤S1501中,所述客户端向所述网关发送携带有所述目标应用的所述应用标识的所述请求;In step S1501, the client sends the request carrying the application identifier of the target application to the gateway;

在步骤S1502中,所述客户端接收所述网关返回的所述响应数据。In step S1502, the client receives the response data returned by the gateway.

根据本公开的实施例,客户端中的目标应用向目标应用的服务器发送请求,请求会经过服务器端的网关再到达服务器,也即该请求先发送至服务器端的网关。客户端中的目标应用向服务器发送请求时,可以通过安装在客户端中本地的SDK拦截待发送出去的请求。为了了解客户端中的目标应用是否存在更新信息,SDK可以在拦截下来的任意请求中携带目标应用的应用标识,并将该请求发送给服务器的网关,从而获取目标应用是否存在更新信息。由于请求包括包头和请求正文,可以将目标应用的应用标识携带在请求的包头中发送给服务器的网关。同理,在客户端获取网关返回的响应数据之后,也可以通过SDK从响应数据中获取目标应用的更新信息。According to the embodiment of the present disclosure, the target application in the client sends a request to the server of the target application, and the request will pass through the gateway of the server and then arrive at the server, that is, the request is first sent to the gateway of the server. When the target application in the client sends a request to the server, the request to be sent can be intercepted by the local SDK installed in the client. In order to know whether the target application in the client has updated information, the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the gateway of the server to obtain whether the target application has updated information. Since the request includes a header and a request body, the application identifier of the target application can be carried in the header of the request and sent to the gateway of the server. Similarly, after the client obtains the response data returned by the gateway, it can also obtain the update information of the target application from the response data through the SDK.

图16示出根据本公开实施例的所述客户端向所述网关发送携带有所述目标应用的所述应用标识的所述请求的流程图。如图16所示,所述步骤S1501,即所述客户端向所述网关发送携带有所述目标应用的所述应用标识的所述请求,包括以下步骤S1601-S1602:FIG. 16 shows a flowchart of the client sending the request carrying the application identifier of the target application to the gateway according to an embodiment of the present disclosure. As shown in FIG. 16, the step S1501, that is, the client sends the request carrying the application identifier of the target application to the gateway, includes the following steps S1601-S1602:

在步骤S1601中,所述客户端拦截所述目标应用向服务器发送的所述请求;In step S1601, the client intercepts the request sent by the target application to the server;

在步骤S1602中,所述客户端将所述目标应用的应用标识携带在所述请求中发送至所述服务器的网关。In step S1602, the client sends the request to the gateway of the server by carrying the application identifier of the target application in the request.

根据本公开的实施例,客户端中的目标应用向服务器发送请求时,可以通过安装在本地的SDK拦截待发送出去的请求。为了了解目标应用是否存在更新信息,SDK可以在拦截下来的任意请求中携带目标应用的应用标识,并将该请求发送给服务器的网关,从而获取目标应用的更新信息。由于请求包括包头和包正文,客户端可以将目标应用的应用标识携带在请求的包头中发送给服务器的网关。According to the embodiments of the present disclosure, when the target application in the client sends a request to the server, the request to be sent can be intercepted by the SDK installed locally. In order to know whether the target application has update information, the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the gateway of the server to obtain the update information of the target application. Since the request includes a packet header and a packet body, the client can send the application identifier of the target application to the server's gateway in the packet header of the request.

根据本公开的实施例,所述步骤S1104,即所述客户端根据所述更新信息确定是否更新所述目标应用,还可被实施为:在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,所述客户端记录所述目标应用有更新数据。在本实施例中,由于有些目标应用只需要确认是否已经更新,不需要立即下载该目标应用的更新数据。当第一更新时间戳晚于第三更新时间戳时,其中,第三更新时间戳可以是最近一次从CDN下载并对目标应用进行更新的更新数据的第一更新时间戳,可以确定本地存储的目标应用的更新数据发生了更新,客户端可以先将该情况记录下来,以便在之后适当的时候进行下载目标应用的更新数据并安装。According to an embodiment of the present disclosure, the step S1104, that is, the client determines whether to update the target application according to the update information, may also be implemented as: when the first update timestamp is later than the target application At the local third update timestamp, the client records that the target application has updated data. In this embodiment, since some target applications only need to confirm whether they have been updated, the update data of the target application does not need to be downloaded immediately. When the first update time stamp is later than the third update time stamp, where the third update time stamp may be the first update time stamp of the update data that was downloaded from the CDN for the last time and updated the target application, it may be determined that the locally stored When the update data of the target application is updated, the client can first record the situation, so as to download and install the update data of the target application at an appropriate time later.

根据本公开的实施例,所述步骤S1104,即所述客户端根据所述更新信息确定是否更新所述目标应用,还可被实施为:在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,所述客户端从所述第一存储地址下载所述目标应用的更新数据;所述客户端根据所述目标应用的更新数据更新所述目标应用。在本实施例中,可以通过比较第一更新时间戳与本地第三更新时间戳,其中,第三更新时间戳可以是最近一次从CDN下载并对目标应用进行更新的更新数据的第一更新时间戳,来确定是否下载并安装该目标应用的更新数据。具体地,当第一更新时间戳晚于本地第三更新时间戳时,表明目标数据的更新数据相较于本地目标应用对应的更新数据有更新,因此客户端可以从第一存储地址下载目标应用的更新数据,并根据目标应用的更新数据更新目标应用。According to an embodiment of the present disclosure, the step S1104, that is, the client determines whether to update the target application according to the update information, may also be implemented as: when the first update timestamp is later than the target application At the local third update timestamp, the client downloads the update data of the target application from the first storage address; the client updates the target application according to the update data of the target application. In this embodiment, the first update time stamp can be compared with the local third update time stamp, where the third update time stamp can be the first update time of the latest update data downloaded from the CDN and updated to the target application to determine whether to download and install the update data of the target application. Specifically, when the first update timestamp is later than the local third update timestamp, it indicates that the update data of the target data is updated compared with the update data corresponding to the local target application, so the client can download the target application from the first storage address update data of the target application, and update the target application according to the update data of the target application.

图17示出根据本公开实施例的所述客户端根据所述更新信息确定是否更新所述目标应用的流程图。如图17所示,所述步骤S1104,即所述客户端根据所述更新信息确定是否更新所述目标应用,包括以下步骤S1701-S1702:FIG. 17 shows a flowchart of the client determining whether to update the target application according to the update information according to an embodiment of the present disclosure. As shown in FIG. 17, the step S1104, that is, the client determines whether to update the target application according to the update information, includes the following steps S1701-S1702:

在步骤S1701中,在所述第二更新时间戳晚于本地索引文件的第四更新时间戳时,所述客户端从所述第二存储地址下载所述索引文件;In step S1701, when the second update timestamp is later than the fourth update timestamp of the local index file, the client downloads the index file from the second storage address;

在步骤S1702中,所述客户端根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用。In step S1702, the client determines whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file.

根据本公开的实施例,客户端可以存储最近一次从服务器获取的目标应用对应的本地索引文件以及该本地索引文件在CDN上的第四更新时间戳,该索引文件中记载的目标应用的一个或多个目标业务的更新数据已经在本地目标应用上被更新过。当客户端从网关获取的更新信息包括目标应用对应的索引文件以及索引文件在CDN上的第二存储地址以及第二更新时间戳时,可以通过比较第二更新时间戳与本地存储的本地索引文件的第四更新时间戳,其中,第四更新时间戳对应于本地索引文件上传至CDN上的时间戳,来确定从网关获取的索引文件是否发生了更新。具体地,当第二更新时间戳晚于第四更新时间戳时,表明客户端从网关获取的索引文件相较于本地存储的本地索引文件有更新,因此客户端可以从第二存储地址下载最新的索引文件。According to the embodiment of the present disclosure, the client can store the local index file corresponding to the target application obtained from the server most recently and the fourth update timestamp of the local index file on the CDN, one or the other of the target application recorded in the index file The update data of multiple target services have been updated on the local target application. When the update information obtained by the client from the gateway includes the index file corresponding to the target application, the second storage address of the index file on the CDN, and the second update timestamp, the second update timestamp can be compared with the locally stored local index file. The fourth update timestamp corresponds to the timestamp when the local index file is uploaded to the CDN, so as to determine whether the index file obtained from the gateway has been updated. Specifically, when the second update timestamp is later than the fourth update timestamp, it indicates that the index file obtained by the client from the gateway is updated compared to the local index file stored locally, so the client can download the latest update from the second storage address index file.

根据本公开的实施例,由于索引文件关联存储至少一个目标业务的业务标识、第一存储地址和第一更新时间戳,当索引文件有更新时,表明索引文件中存储的至少一个目标业务发生了更新,从而客户端可以根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳以及本地存储的本地索引文件中该目标业务的业务标识对应的更新时间戳来确定是否更新目标应用。According to the embodiment of the present disclosure, since the service identifier, the first storage address and the first update time stamp of the at least one target service are stored in the index file in association, when the index file is updated, it indicates that the at least one target service stored in the index file has occurred. Therefore, the client can determine whether to update the target application according to the first update timestamp corresponding to the service identifier of at least one target service in the index file and the update timestamp corresponding to the service identifier of the target service in the local index file stored locally.

图18示出根据本公开实施例的所述客户端根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用的流程图。如图18所示,所述步骤S1702,即所述客户端根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括以下步骤S1801-S1802:18 shows a flowchart of the client determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file according to an embodiment of the present disclosure. As shown in FIG. 18 , the step S1702, that is, the client determines whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file, includes the following step S1801 -S1802:

在步骤S1801中,在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,所述客户端从所述第一存储地址下载所述目标业务的更新数据;In step S1801, when the first update timestamp is later than the locally stored fifth update timestamp corresponding to the at least one target service, the client downloads the target service from the first storage address update data;

在步骤S1802中,所述客户端根据所述目标业务的更新数据更新所述目标业务。In step S1802, the client updates the target service according to the update data of the target service.

根据本公开的实施例,由于客户端在本地存储了最近一次更新目标应用时从服务器下载的本地索引文件,且本地索引文件关联存储目标应用的至少一个目标业务的业务标识和第五更新时间戳,其中,第五更新时间戳对应于、客户端本地存储的目标业务的更新数据上传至CDN上的时间戳。当客户端从第二存储地址下载的索引文件关联存储至少一个目标业务的业务标识、第一存储地址和第一更新时间戳时,可以通过比较第一更新时间戳与本地索引文件中目标业务的更新数据的第五更新时间戳,来确定是否下载并安装该目标业务的更新数据。具体地,当第一更新时间戳晚于第五更新时间戳时,表明目标业务的更新数据相较于本地索引文件中该目标业务对应的更新数据有更新,因此客户端可以从第一存储地址下载该目标业务的更新数据,并根据更新数据对目标应用的目标业务进行更新。According to the embodiment of the present disclosure, since the client locally stores the local index file downloaded from the server when the target application was updated last time, and the local index file stores the service identifier of at least one target service and the fifth update timestamp of the target application in association with the local index file , wherein the fifth update timestamp corresponds to the timestamp of the update data of the target service stored locally by the client and uploaded to the CDN. When the index file downloaded by the client from the second storage address associates and stores the service identifier of at least one target service, the first storage address and the first update timestamp, the first update timestamp can be compared with the target service in the local index file. The fifth update timestamp of the update data is used to determine whether to download and install the update data of the target service. Specifically, when the first update time stamp is later than the fifth update time stamp, it indicates that the update data of the target service is updated compared with the update data corresponding to the target service in the local index file, so the client can store the data from the first storage address The update data of the target service is downloaded, and the target service of the target application is updated according to the update data.

例如:客户端本地存储的本地索引文件1如下:For example: the local index file 1 stored locally by the client is as follows:

Figure BDA0002205050240000471
Figure BDA0002205050240000471

客户端从第二存储地址获取的索引文件2如下:The index file 2 obtained by the client from the second storage address is as follows:

Figure BDA0002205050240000472
Figure BDA0002205050240000472

对于配置中心业务,由于第一更新时间戳1563405958296晚于第五更新时间戳1563405658296,表明本地存储的配置中心业务的更新数据发生了更新,因此,客户端可以从第一存储地址https://xxx.xx/b/1json.json下载配置中心业务的更新数据。For the configuration center service, since the first update timestamp 1563405958296 is later than the fifth update timestamp 1563405658296, it indicates that the locally stored update data of the configuration center service has been updated. Therefore, the client can access the first storage address https://xxx .xx/b/1json.json to download the updated data of the configuration center business.

由于客户端目标应用中的有些目标业务只需要确认是否已经更新,不需要立即下载该目标业务的更新数据,例如,离线包业务和补丁业务只需要获取更新消息,并不需要客户端立即下载该目标业务的更新数据,因此,根据本公开的实施例,所述步骤S1702,即所述客户端根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,还可被实施为:在所述第一更新时间戳晚于或等于本地存储的所述至少一个目标业务对应的第五更新时间戳时,所述客户端记录所述目标业务有更新数据。Because some target services in the target application of the client only need to confirm whether they have been updated, they do not need to download the update data of the target service immediately. For example, the offline package service and patch service only need to obtain the update message, and the client does not need to download the update data immediately. The update data of the target service, therefore, according to the embodiment of the present disclosure, the step S1702, that is, the client determines whether to update according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file The target application can also be implemented as: when the first update time stamp is later than or equal to the fifth update time stamp corresponding to the at least one target service stored locally, the client records the target service There is updated data.

例如:客户端本地存储的本地索引文件1如下:For example: the local index file 1 stored locally by the client is as follows:

Figure BDA0002205050240000481
Figure BDA0002205050240000481

客户端从第二存储地址获取的索引文件2如下:The index file 2 obtained by the client from the second storage address is as follows:

Figure BDA0002205050240000482
Figure BDA0002205050240000482

对于离线包业务,由于第一更新时间戳1564039123355晚于第五更新时间戳1564036123355,因此,可以确定客户端本地存储的离线包业务的更新数据发生了更新,客户端可以先将该情况记录下来,以便在之后适当的时候进行下载并安装(例如批量从服务器下载目标业务的更新数据,并批量对目标应用的多个目标业务进行更新)。当用户需要下载离线包业务的更新数据时,可以进一步从第一存储地址https://xxx.xx/b/2json.json下载配置离线包业务的更新数据。For the offline package service, since the first update time stamp 1564039123355 is later than the fifth update time stamp 1564036123355, it can be determined that the update data of the offline package service stored locally by the client has been updated, and the client can record the situation first. In order to download and install at an appropriate time later (for example, download update data of the target service from the server in batches, and update multiple target services of the target application in batches). When the user needs to download the update data of the offline package service, he can further download the update data of the configuration offline package service from the first storage address https://xxx.xx/b/2json.json.

图19示出根据本公开的实施例的数据更新系统1900的结构示意图。如图19所示,所述数据更新系统包括服务器1901、网关1902和客户端1903,其中,FIG. 19 shows a schematic structural diagram of a data update system 1900 according to an embodiment of the present disclosure. As shown in FIG. 19, the data update system includes a server 1901, a gateway 1902 and a client 1903, wherein,

所述服务器1901,用于将目标应用的更新数据上传至内容分发服务器,获取所述更新数据在所述内容分发服务器上的更新信息,并响应于网关针对所述目标应用的更新信息请求,向所述网关返回所述更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;The server 1901 is configured to upload the update data of the target application to the content distribution server, obtain the update information of the update data on the content distribution server, and respond to the update information request for the target application by the gateway to the content distribution server. The gateway returns the update information, wherein the update information includes information that can obtain a first storage address and a first update timestamp of the update data on the content distribution server;

所述网关1902,用于接收所述目标应用发送的请求,将所述目标应用的所述更新信息携带在响应数据中返回给客户端,其中,所述请求包括所述目标应用的应用标识;The gateway 1902 is configured to receive a request sent by the target application, and carry the update information of the target application in response data and return it to the client, where the request includes the application identifier of the target application;

所述客户端1903,用于向所述网关发送携带有所述目标应用的所述应用标识的所述请求,接收所述网关返回的所述响应数据,获取所述网关添加在所述响应数据中的更新信息,根据所述更新信息确定是否更新所述目标应用。The client 1903 is configured to send the request carrying the application identifier of the target application to the gateway, receive the response data returned by the gateway, and obtain the response data added by the gateway to the response data. update information in , and determine whether to update the target application according to the update information.

根据本公开的实施例,服务器为目标应用的服务器,不同的目标应用可以对应不同的服务器。网关是服务器端的网关,也即服务器与外界进行通信的网关,客户端上的目标应用向目标应用的服务器端的网络请求均可以通过该网关进入该服务器端。客户端可以是手持终端设备、笔记本电脑、蜂窝电话、智能电话、无线数据卡、个人数字助理电脑、平板型电脑、无绳电话、物联网设备(IOT设备)或是其他可以接入网络的终端设备,在本公开中不做具体限定。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to the embodiment of the present disclosure, the server is the server of the target application, and different target applications may correspond to different servers. The gateway is the gateway of the server, that is, the gateway through which the server communicates with the outside world. The network requests from the target application on the client to the server of the target application can enter the server through the gateway. Clients can be handheld terminal devices, laptop computers, cellular phones, smart phones, wireless data cards, personal digital assistant computers, tablet computers, cordless phones, Internet of Things devices (IOT devices), or other terminal devices that can access the network , which is not specifically limited in the present disclosure. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the update information includes a second storage address and a second update timestamp of an index file corresponding to the target application on the content distribution server; the index file includes at least a The service identifier, storage address and update time stamp of a target service; the update data includes the update data of at least one target service of the target application. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述服务器用于获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳,根据所述第一存储地址和第一更新时间戳更新所述索引文件,将所述索引文件上传至所述内容分发服务器,获取所述第二存储地址和所述第二更新时间戳。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the server is configured to acquire a first storage address and a first update timestamp of the update data on the content distribution server, and update the update data according to the first storage address and the first update timestamp For the index file, upload the index file to the content distribution server, and obtain the second storage address and the second update timestamp. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述服务器用于将所述索引文件中所述目标业务的所述业务标识所关联的所述更新地址和所述更新时间戳更新为所述第一存储地址和所述第一更新时间戳。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the server is configured to update the update address and the update timestamp associated with the service identifier of the target service in the index file to the first storage address and the update time stamp. Describe the first update timestamp. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述网关用于获取所述请求中携带的所述目标应用的所述应用标识,在本地应用列表中未存储所述应用标识时,将所述应用标识加入所述本地应用列表,根据所述应用标识确定本地是否存储有所述目标应用的更新信息,在本地存储有所述目标应用的更新信息时,将所述目标应用的更新信息携带在所述响应数据中返回给客户端。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the gateway is configured to acquire the application identifier of the target application carried in the request, and when the application identifier is not stored in the local application list, add the application identifier to the A list of local applications, determining whether the update information of the target application is stored locally according to the application identifier, and when the update information of the target application is stored locally, the update information of the target application is carried in the response data returned to the client. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述网关用于周期性地向所述服务器发送所述目标应用的所述更新信息请求,并接收所述服务器返回的所述目标应用的所述更新信息。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the gateway is configured to periodically send the update information request of the target application to the server, and receive the update information of the target application returned by the server. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述客户端用于向所述网关发送携带有所述目标应用的所述应用标识的所述请求,并接收所述网关返回的所述响应数据。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the client is configured to send the request carrying the application identifier of the target application to the gateway, and receive the response data returned by the gateway. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述客户端用于拦截所述目标应用向所述服务器发送的所述请求,并将所述目标应用的所述应用标识携带在所述请求中发送至所述服务器的所述网关。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the client is configured to intercept the request sent by the target application to the server, and send the request to the server by carrying the application identifier of the target application in the request of the gateway. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述客户端用于在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,记录所述目标应用有更新数据。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the client is configured to record that the target application has updated data when the first update timestamp is later than a local third update timestamp of the target application. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述客户端用于在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,从所述第一存储地址下载所述目标应用的更新数据,根据所述目标应用的更新数据更新所述目标应用。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the client is configured to, when the first update timestamp is later than a local third update timestamp of the target application, download the target application's update timestamp from the first storage address Update data, and update the target application according to the update data of the target application. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述客户端在所述第二更新时间戳晚于本地索引文件的第四更新时间戳时,从所述第二存储地址下载所述索引文件,根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, when the second update time stamp is later than the fourth update time stamp of the local index file, the client downloads the index file from the second storage address, and according to the index file The first update timestamp corresponding to the service identifier of the at least one target service in determines whether to update the target application. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述客户端在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,记录所述目标业务有更新数据。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, when the first update timestamp is later than the locally stored fifth update timestamp corresponding to the at least one target service, the client records that the target service has updated data. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述客户端在所述第一时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,从所述第一存储地址下载所述目标业务的更新数据,根据所述目标业务的更新数据更新所述目标业务。本公开的实施例的具体实现细节,已在上文中描述,此处不再赘述。According to an embodiment of the present disclosure, the client downloads the target service from the first storage address when the first time stamp is later than a locally stored fifth update time stamp corresponding to the at least one target service update data of the target service, and update the target service according to the update data of the target service. The specific implementation details of the embodiments of the present disclosure have been described above, and are not repeated here.

根据本公开的实施例,所述目标业务包括配置中心业务、离线包业务和补丁业务。According to an embodiment of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

图20示出根据本公开的实施例的数据更新装置2000的结构框图。其中,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图20所示,所述数据更新装置包括上传模块2010、第一获取模块2020和第一返回模块2030。FIG. 20 shows a structural block diagram of a data update apparatus 2000 according to an embodiment of the present disclosure. Wherein, the apparatus may be realized by software, hardware or a combination of the two to become part or all of the electronic device. As shown in FIG. 20 , the data updating apparatus includes an uploading module 2010 , a first acquiring module 2020 and a first returning module 2030 .

上传模块2010,被配置为将目标应用的更新数据上传至内容分发服务器;The uploading module 2010 is configured to upload the update data of the target application to the content distribution server;

第一获取模块2020,被配置为获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;The first obtaining module 2020 is configured to obtain update information of the update data on the content distribution server, wherein the update information includes a first storage address that can obtain the update data on the content distribution server and the information of the first update timestamp;

第一返回模块2030,被配置为响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。The first returning module 2030 is configured to return the update information in response to the update information request of the gateway for the target application.

根据本公开的实施例,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。According to an embodiment of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp.

根据本公开的实施例,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。According to an embodiment of the present disclosure, the update information includes a second storage address and a second update timestamp of an index file corresponding to the target application on the content distribution server; the index file includes at least a The service identifier, storage address and update time stamp of a target service; the update data includes the update data of at least one target service of the target application.

根据本公开的实施例,获取所述更新数据在所述内容分发服务器上的更新信息,包括:According to an embodiment of the present disclosure, acquiring the update information of the update data on the content distribution server includes:

获取所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳;acquiring the first storage address and the first update timestamp of the update data on the content distribution server;

根据所述第一存储地址和所述第一更新时间戳更新所述索引文件;Update the index file according to the first storage address and the first update timestamp;

将所述索引文件上传至所述内容分发服务器;uploading the index file to the content distribution server;

获取所述第二存储地址和所述第二更新时间戳。Obtain the second storage address and the second update timestamp.

根据本公开的实施例,所述根据所述第一存储地址和所述第一更新时间戳更新所述索引文件,包括:According to an embodiment of the present disclosure, the updating of the index file according to the first storage address and the first update timestamp includes:

将所述索引文件中所述目标业务的所述业务标识所关联的所述更新地址和所述更新时间戳更新为所述第一存储地址和所述第一更新时间戳。The update address and the update timestamp associated with the service identifier of the target service in the index file are updated to the first storage address and the first update timestamp.

根据本公开的实施例,所述目标业务包括配置中心业务、离线包业务和补丁业务。According to an embodiment of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

本公开实施例中的数据更新装置与图1所示实施例及相关实施例所述的数据更新方法对应一致,具体细节参见上述图1所示的数据更新方法,在此不再赘述。The data update apparatus in the embodiment of the present disclosure corresponds to the data update method described in the embodiment shown in FIG. 1 and related embodiments. For details, refer to the data update method shown in FIG. 1 above, which will not be repeated here.

图21示出根据本公开的实施例的数据更新装置2100的结构框图。其中,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图21所示,所述数据更新装置包括第一接收模块2110和第二返回模块2120。FIG. 21 shows a structural block diagram of a data update apparatus 2100 according to an embodiment of the present disclosure. Wherein, the apparatus may be realized by software, hardware or a combination of the two to become part or all of the electronic device. As shown in FIG. 21 , the data updating apparatus includes a first receiving module 2110 and a second returning module 2120 .

第一接收模块2110,被配置为接收目标应用发送的请求,其中,所述请求包括所述目标应用的应用标识;The first receiving module 2110 is configured to receive a request sent by a target application, wherein the request includes an application identifier of the target application;

第二返回模块2120,被配置为将所述目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。The second return module 2120 is configured to carry the update information of the target application in response data and return it to the client, wherein the update information includes the first information on the content distribution server that can obtain the update data of the target application. A storage address and first update timestamp information.

根据本公开的实施例,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。According to an embodiment of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp.

根据本公开的实施例,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。According to an embodiment of the present disclosure, the update information includes a second storage address and a second update timestamp of an index file corresponding to the target application on the content distribution server; the index file includes at least a The service identifier, storage address and update time stamp of a target service; the update data includes the update data of at least one target service of the target application.

根据本公开的实施例,所述将所述目标应用的更新信息携带在响应数据中返回给客户端,包括:According to an embodiment of the present disclosure, carrying the update information of the target application in response data and returning it to the client includes:

根据所述应用标识确定本地是否存储有所述目标应用的更新信息;Determine whether the update information of the target application is stored locally according to the application identifier;

在本地存储有所述目标应用的更新信息时,将所述目标应用的更新信息携带在所述响应数据中返回给客户端。When the update information of the target application is stored locally, the update information of the target application is carried in the response data and returned to the client.

根据本公开的实施例,还包括:According to an embodiment of the present disclosure, it also includes:

第二获取模块2130,被配置为获取所述请求中携带的所述目标应用的所述应用标识;A second obtaining module 2130, configured to obtain the application identifier of the target application carried in the request;

加入模块2140,被配置为在本地应用列表中未存储所述应用标识时,将所述应用标识加入所述本地应用列表。The adding module 2140 is configured to add the application identifier to the local application list when the application identifier is not stored in the local application list.

根据本公开的实施例,还包括:According to an embodiment of the present disclosure, it also includes:

第一发送模块2150,被配置为周期性地向服务器发送所述目标应用的更新信息请求;The first sending module 2150 is configured to periodically send the update information request of the target application to the server;

第二接收模块2160,被配置为接收所述服务器返回的所述目标应用的所述更新信息。The second receiving module 2160 is configured to receive the update information of the target application returned by the server.

根据本公开的实施例,所述目标业务包括配置中心业务、离线包业务和补丁业务。According to an embodiment of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

本公开实施例中的数据更新装置与图3所示实施例及相关实施例所述的数据更新方法对应一致,具体细节参见上述图3所示的数据更新方法,在此不再赘述。The data updating apparatus in the embodiment of the present disclosure corresponds to the data updating method described in the embodiment shown in FIG. 3 and related embodiments. For details, refer to the data updating method shown in FIG. 3 above, which will not be repeated here.

图22示出根据本公开的实施例的数据更新装置2200的结构框图。其中,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图22所示,所述数据更新装置包括第二发送模块2210、第三接收模块2220、第三获取模块2230和确定模块2240。FIG. 22 shows a structural block diagram of a data update apparatus 2200 according to an embodiment of the present disclosure. Wherein, the apparatus may be realized by software, hardware or a combination of the two to become part or all of the electronic device. As shown in FIG. 22 , the data updating apparatus includes a second sending module 2210 , a third receiving module 2220 , a third obtaining module 2230 and a determining module 2240 .

第二发送模块2210,被配置为向网关发送携带有目标应用的应用标识的请求;The second sending module 2210 is configured to send a request carrying the application identifier of the target application to the gateway;

第三接收模块2220,被配置为接收所述网关返回的响应数据;a third receiving module 2220, configured to receive the response data returned by the gateway;

第三获取模块2230,被配置为获取所述网关添加在所述响应数据中的更新信息,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;The third obtaining module 2230 is configured to obtain the update information added by the gateway to the response data, wherein the update information includes a first storage address on the content distribution server that can obtain the update data of the target application and the information of the first update timestamp;

确定模块2240,被配置为根据所述更新信息确定是否更新所述目标应用。The determining module 2240 is configured to determine whether to update the target application according to the update information.

根据本公开的实施例,所述更新信息包括所述更新数据在所述内容分发服务器上的所述第一存储地址和所述第一更新时间戳。According to an embodiment of the present disclosure, the update information includes the first storage address of the update data on the content distribution server and the first update timestamp.

根据本公开的实施例,所述更新信息包括所述目标应用对应的索引文件在所述内容分发服务器上的第二存储地址和第二更新时间戳;所述索引文件包括所述目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;所述更新数据包括所述目标应用的至少一个目标业务的更新数据。According to an embodiment of the present disclosure, the update information includes a second storage address and a second update timestamp of an index file corresponding to the target application on the content distribution server; the index file includes at least a The service identifier, storage address and update time stamp of a target service; the update data includes the update data of at least one target service of the target application.

根据本公开的实施例,所述向网关发送携带有目标应用的应用标识的请求,包括:According to an embodiment of the present disclosure, the sending the request carrying the application identifier of the target application to the gateway includes:

拦截所述目标应用向服务器发送的所述请求;Intercepting the request sent by the target application to the server;

将所述目标应用的应用标识携带在所述请求中发送至所述服务器的网关。The application identifier of the target application is carried in the request and sent to the gateway of the server.

根据本公开的实施例,所述根据所述更新信息和所述目标应用在本地第三更新时间戳确定是否更新所述目标应用,包括:According to an embodiment of the present disclosure, the determining whether to update the target application according to the update information and the local third update timestamp of the target application includes:

在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,记录所述目标应用有更新数据。When the first update time stamp is later than the third local update time stamp of the target application, it is recorded that the target application has update data.

根据本公开的实施例,所述根据所述更新信息和所述目标应用在本地的第三更新时间戳确定是否更新所述目标应用,包括:According to an embodiment of the present disclosure, the determining whether to update the target application according to the update information and the local third update timestamp of the target application includes:

在所述第一更新时间戳晚于所述目标应用在本地的第三更新时间戳时,从所述第一存储地址下载所述目标应用的更新数据;When the first update time stamp is later than the local third update time stamp of the target application, downloading the update data of the target application from the first storage address;

根据所述目标应用的更新数据更新所述目标应用。The target application is updated according to the update data of the target application.

根据本公开的实施例,所述根据所述更新信息和所述目标应用在本地的第三更新时间戳确定是否更新所述目标应用,包括:According to an embodiment of the present disclosure, the determining whether to update the target application according to the update information and the local third update timestamp of the target application includes:

在所述第二更新时间戳晚于本地索引文件的第四更新时间戳时,从所述第二存储地址下载所述索引文件;When the second update time stamp is later than the fourth update time stamp of the local index file, downloading the index file from the second storage address;

根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用。Whether to update the target application is determined according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file.

根据本公开的实施例,所述根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括:According to an embodiment of the present disclosure, the determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file includes:

在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,记录所述目标业务有更新数据。When the first update time stamp is later than the locally stored fifth update time stamp corresponding to the at least one target service, record that the target service has update data.

根据本公开的实施例,所述根据所述索引文件中所述至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新所述目标应用,包括:According to an embodiment of the present disclosure, the determining whether to update the target application according to the first update timestamp corresponding to the service identifier of the at least one target service in the index file includes:

在所述第一更新时间戳晚于本地存储的所述至少一个目标业务对应的第五更新时间戳时,从所述第一存储地址下载所述目标业务的更新数据;When the first update time stamp is later than the locally stored fifth update time stamp corresponding to the at least one target service, downloading the update data of the target service from the first storage address;

根据所述目标业务的更新数据更新所述目标业务。The target service is updated according to the update data of the target service.

根据本公开的实施例,所述目标业务包括配置中心业务、离线包业务和补丁业务。According to an embodiment of the present disclosure, the target service includes a configuration center service, an offline package service, and a patch service.

本公开实施例中的数据更新装置与图7所示实施例及相关实施例所述的数据更新方法对应一致,具体细节参见上述图7所示的数据更新方法,在此不再赘述。The data update apparatus in the embodiment of the present disclosure corresponds to the data update method described in the embodiment shown in FIG. 7 and related embodiments. For details, refer to the data update method shown in FIG. 7 above, which will not be repeated here.

本公开还公开了一种电子设备,图23示出根据本公开的实施例的电子设备2300的结构框图。The present disclosure also discloses an electronic device, and FIG. 23 shows a structural block diagram of an electronic device 2300 according to an embodiment of the present disclosure.

如图23所示,所述电子设备2300包括存储器2301和处理器2302;其中,As shown in FIG. 23, the electronic device 2300 includes a memory 2301 and a processor 2302; wherein,

所述存储器2301用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器2302执行以实现以下方法步骤:The memory 2301 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 2302 to implement the following method steps:

将目标应用的更新数据上传至内容分发服务器;Upload the update data of the target application to the content distribution server;

获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;Acquiring update information of the update data on the content distribution server, wherein the update information includes information that can obtain a first storage address and a first update timestamp of the update data on the content distribution server;

响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。The update information is returned in response to the update information request by the gateway for the target application.

本公开还公开了一种电子设备,所述电子设备包括存储器和处理器;其中,The present disclosure also discloses an electronic device, the electronic device includes a memory and a processor; wherein,

所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现以下方法步骤::The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the following method steps:

接收目标应用发送的请求,其中,所述请求包括所述目标应用的应用标识;receiving a request sent by a target application, wherein the request includes an application identifier of the target application;

将所述目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。Carrying the update information of the target application in the response data and returning it to the client, where the update information includes a first storage address and a first update timestamp on the content distribution server that can obtain the update data of the target application Information.

本公开还公开了一种电子设备,所述电子设备包括存储器和处理器;其中,The present disclosure also discloses an electronic device, the electronic device includes a memory and a processor; wherein,

所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现以下方法步骤::The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the following method steps:

向网关发送携带有目标应用的应用标识的请求;Send a request carrying the application identifier of the target application to the gateway;

接收所述网关返回的响应数据;receiving the response data returned by the gateway;

获取所述网关添加在所述响应数据中的更新信息,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;acquiring the update information added by the gateway to the response data, wherein the update information includes information that can acquire the first storage address and the first update timestamp of the update data of the target application on the content distribution server;

根据所述更新信息确定是否更新所述目标应用。Whether to update the target application is determined according to the update information.

图24示出适于用来实现根据本公开实施例的数据更新方法的计算机系统的结构示意图。FIG. 24 shows a schematic structural diagram of a computer system suitable for implementing the data update method according to an embodiment of the present disclosure.

如图24所示,计算机系统2400包括中央处理单元(CPU)2401,其可以根据存储在只读存储器(ROM)2402中的程序或者从存储部分2408加载到随机访问存储器(RAM)2403中的程序而执行上述实施例中的各种处理。在RAM2403中,还存储有系统2400操作所需的各种程序和数据。CPU2401、ROM2402以及RAM2403通过总线2404彼此相连。输入/输出(I/O)接口2405也连接至总线2404。As shown in FIG. 24, a computer system 2400 includes a central processing unit (CPU) 2401 which can be loaded into a random access memory (RAM) 2403 according to a program stored in a read only memory (ROM) 2402 or a program from a storage section 2408 Instead, various processes in the above-described embodiments are performed. In the RAM 2403, various programs and data necessary for the operation of the system 2400 are also stored. The CPU 2401 , the ROM 2402 and the RAM 2403 are connected to each other through a bus 2404 . An input/output (I/O) interface 2405 is also connected to bus 2404 .

以下部件连接至I/O接口2405:包括键盘、鼠标等的输入部分2406;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分2407;包括硬盘等的存储部分2408;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分2409。通信部分2409经由诸如因特网的网络执行通信处理。驱动器2410也根据需要连接至I/O接口2405。可拆卸介质2411,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器2410上,以便于从其上读出的计算机程序根据需要被安装入存储部分2408。The following components are connected to the I/O interface 2405: an input section 2406 including a keyboard, a mouse, etc.; an output section 2407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 2408 including a hard disk, etc. ; and a communication section 2409 including a network interface card such as a LAN card, a modem, and the like. The communication section 2409 performs communication processing via a network such as the Internet. Drivers 2410 are also connected to I/O interface 2405 as needed. A removable medium 2411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 2410 as needed so that a computer program read therefrom is installed into the storage section 2408 as needed.

特别地,根据本公开的实施例,上文描述的所有方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行上述对象类别确定方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分2409从网络上被下载和安装,和/或从可拆卸介质2411被安装。In particular, according to the embodiments of the present disclosure, all the methods described above can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing the above-described object class determination method. In such an embodiment, the computer program may be downloaded and installed from the network through the communication portion 2409, and/or installed from the removable medium 2411.

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.

描述于本公开实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过可编程硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The units or modules involved in the embodiments of the present disclosure may be implemented in a software manner, or may be implemented in a programmable hardware manner. The described units or modules may also be provided in the processor, and the names of these units or modules do not constitute a limitation on the units or modules themselves in certain circumstances.

作为另一方面,本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中电子设备或计算机系统中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,所述程序被一个或者一个以上的处理器用来执行描述本公开的方法。As another aspect, the present disclosure also provides a computer-readable storage medium, and the computer-readable storage medium may be a computer-readable storage medium included in the electronic device or computer system in the above-mentioned embodiments; it may also exist independently , a computer-readable storage medium that does not fit into a device. The computer-readable storage medium stores one or more programs used by one or more processors to perform the methods describing the present disclosure.

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, and should also cover the above-mentioned technical features without departing from the inventive concept. Other technical solutions formed by any combination of its equivalent features. For example, a technical solution is formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) with similar functions.

Claims (10)

1.一种数据更新方法,其特征在于,包括:1. a data update method, is characterized in that, comprises: 将目标应用的更新数据上传至内容分发服务器;Upload the update data of the target application to the content distribution server; 获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;Acquiring update information of the update data on the content distribution server, wherein the update information includes information that can obtain a first storage address and a first update timestamp of the update data on the content distribution server; 响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。The update information is returned in response to the update information request by the gateway for the target application. 2.一种数据更新方法,其特征在于,包括:2. a data update method, is characterized in that, comprises: 接收目标应用发送的请求,其中,所述请求包括所述目标应用的应用标识;receiving a request sent by a target application, wherein the request includes an application identifier of the target application; 将所述目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。Carrying the update information of the target application in the response data and returning it to the client, where the update information includes a first storage address and a first update timestamp on the content distribution server that can obtain the update data of the target application Information. 3.一种数据更新方法,其特征在于,包括:3. a data update method, is characterized in that, comprises: 向网关发送携带有目标应用的应用标识的请求;Send a request carrying the application identifier of the target application to the gateway; 接收所述网关返回的响应数据;receiving the response data returned by the gateway; 获取所述网关添加在所述响应数据中的更新信息,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;acquiring the update information added by the gateway to the response data, wherein the update information includes information that can acquire the first storage address and the first update timestamp of the update data of the target application on the content distribution server; 根据所述更新信息确定是否更新所述目标应用。Whether to update the target application is determined according to the update information. 4.一种数据更新方法,其特征在于,包括:4. a data update method, is characterized in that, comprises: 服务器将目标应用的更新数据上传至内容分发服务器,并获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;The server uploads the update data of the target application to the content distribution server, and obtains the update information of the update data on the content distribution server, wherein the update information includes that the update data can be obtained on the content distribution server information of the first storage address and the first update timestamp; 所述服务器响应于网关针对所述目标应用的更新信息请求,向所述网关返回所述更新信息;The server returns the update information to the gateway in response to the update information request of the gateway for the target application; 所述网关接收所述目标应用发送的请求,并将所述目标应用的所述更新信息携带在响应数据中返回给客户端,其中,所述请求包括所述目标应用的应用标识;The gateway receives the request sent by the target application, and returns the update information of the target application in response data to the client, wherein the request includes the application identifier of the target application; 所述客户端获取所述网关添加在所述响应数据中的所述更新信息,并根据所述更新信息确定是否更新所述目标应用。The client acquires the update information added by the gateway in the response data, and determines whether to update the target application according to the update information. 5.一种数据更新系统,其特征在于,包括:服务器、网关和客户端,其中,5. A data update system, comprising: a server, a gateway and a client, wherein, 所述服务器,用于将目标应用的更新数据上传至内容分发服务器,获取所述更新数据在所述内容分发服务器上的更新信息,并响应于网关针对所述目标应用的更新信息请求,向所述网关返回所述更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;The server is configured to upload the update data of the target application to the content distribution server, obtain the update information of the update data on the content distribution server, and in response to the update information request for the target application by the gateway, send the update information to the content distribution server. the gateway returns the update information, wherein the update information includes information that can obtain the first storage address and the first update timestamp of the update data on the content distribution server; 所述网关,用于接收所述目标应用发送的请求,将所述目标应用的所述更新信息携带在响应数据中返回给客户端,其中,所述请求包括所述目标应用的应用标识;the gateway, configured to receive a request sent by the target application, and carry the update information of the target application in response data and return it to the client, where the request includes the application identifier of the target application; 所述客户端,用于向所述网关发送携带有所述目标应用的所述应用标识的所述请求,接收所述网关返回的所述响应数据,获取所述网关添加在所述响应数据中的更新信息,根据所述更新信息确定是否更新所述目标应用。The client is configured to send the request carrying the application identifier of the target application to the gateway, receive the response data returned by the gateway, obtain the gateway and add it to the response data update information, and determine whether to update the target application according to the update information. 6.一种电子设备,其特征在于,包括存储器和处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现以下方法步骤:6. An electronic device, comprising a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to achieve The following method steps: 将目标应用的更新数据上传至内容分发服务器;Upload the update data of the target application to the content distribution server; 获取所述更新数据在所述内容分发服务器上的更新信息,其中,所述更新信息包括能够获取所述更新数据在所述内容分发服务器上的第一存储地址和第一更新时间戳的信息;Acquiring update information of the update data on the content distribution server, wherein the update information includes information that can obtain a first storage address and a first update timestamp of the update data on the content distribution server; 响应于网关针对所述目标应用的更新信息请求,返回所述更新信息。The update information is returned in response to the update information request by the gateway for the target application. 7.一种电子设备,其特征在于,包括存储器和处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现以下方法步骤:7. An electronic device, comprising a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to achieve The following method steps: 接收目标应用发送的请求,其中,所述请求包括所述目标应用的应用标识;receiving a request sent by a target application, wherein the request includes an application identifier of the target application; 将所述目标应用的更新信息携带在响应数据中返回给客户端,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。Carrying the update information of the target application in the response data and returning it to the client, where the update information includes a first storage address and a first update timestamp on the content distribution server that can obtain the update data of the target application Information. 8.一种电子设备,其特征在于,包括存储器和处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现以下方法步骤:8. An electronic device, comprising a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to achieve The following method steps: 向网关发送携带有目标应用的应用标识的请求;Send a request carrying the application identifier of the target application to the gateway; 接收所述网关返回的响应数据;receiving the response data returned by the gateway; 获取所述网关添加在所述响应数据中的更新信息,其中,所述更新信息包括能够获取所述目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;acquiring the update information added by the gateway to the response data, wherein the update information includes information that can acquire the first storage address and the first update timestamp of the update data of the target application on the content distribution server; 根据所述更新信息确定是否更新所述目标应用。Whether to update the target application is determined according to the update information. 9.一种可读存储介质,其上存储有计算机指令,其特征在于,该计算机指令被处理器执行时实现权利要求1所述的方法步骤。9. A readable storage medium having computer instructions stored thereon, wherein the computer instructions implement the method steps of claim 1 when executed by a processor. 10.一种可读存储介质,其上存储有计算机指令,其特征在于,该计算机指令被处理器执行时实现权利要求2所述的方法步骤。10. A readable storage medium having computer instructions stored thereon, wherein the computer instructions implement the method steps of claim 2 when executed by a processor.
CN201910878239.1A 2019-09-17 2019-09-17 Data updating method, system, device, electronic equipment and computer storage medium Pending CN111026416A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910878239.1A CN111026416A (en) 2019-09-17 2019-09-17 Data updating method, system, device, electronic equipment and computer storage medium
PCT/CN2020/076892 WO2021051747A1 (en) 2019-09-17 2020-02-27 Data update method, system and device, electronic device, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910878239.1A CN111026416A (en) 2019-09-17 2019-09-17 Data updating method, system, device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN111026416A true CN111026416A (en) 2020-04-17

Family

ID=70203773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910878239.1A Pending CN111026416A (en) 2019-09-17 2019-09-17 Data updating method, system, device, electronic equipment and computer storage medium

Country Status (2)

Country Link
CN (1) CN111026416A (en)
WO (1) WO2021051747A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723062A (en) * 2020-06-28 2020-09-29 天津联想协同科技有限公司 File synchronization method, device and storage medium
CN112000850A (en) * 2020-08-26 2020-11-27 杭州海康威视系统技术有限公司 Method, device, system and equipment for data processing
CN112104733A (en) * 2020-09-15 2020-12-18 京东数字科技控股股份有限公司 Method, device, electronic equipment and medium for acquiring preset service information
CN112838980A (en) * 2020-12-30 2021-05-25 北京奇艺世纪科技有限公司 Message processing method, system, device, electronic equipment and storage medium
CN114491327A (en) * 2020-11-12 2022-05-13 博泰车联网科技(上海)股份有限公司 Data processing method and device, electronic equipment and storage medium
CN114519090A (en) * 2020-11-20 2022-05-20 马上消费金融股份有限公司 Stop word management method and device and electronic equipment
CN120428996A (en) * 2025-05-07 2025-08-05 北京点富科技有限公司 Mobile application hot update method, device, medium, program product and terminal based on React Native framework

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11695853B1 (en) 2022-04-07 2023-07-04 T-Mobile Usa, Inc. Content management systems providing zero recovery point objective

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060427A (en) * 2006-04-19 2007-10-24 华为技术有限公司 A system and method for realizing the remote software updating
CN103973475A (en) * 2013-02-05 2014-08-06 腾讯科技(深圳)有限公司 Difference service pack generating method, difference service pack downloading method, server and client-side
CN108429779A (en) * 2017-02-15 2018-08-21 上海众人信息技术有限公司 A kind of method for down loading and system of the application system based on mobile terminal
CN108777632A (en) * 2018-05-18 2018-11-09 阿里巴巴集团控股有限公司 Data processing method, client, business platform and configuration platform
US20190087168A1 (en) * 2015-12-22 2019-03-21 Intel Corporation Dynamic data difference generation and distribution
CN109697075A (en) * 2017-10-20 2019-04-30 北京京东尚科信息技术有限公司 File updating method, system and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014094315A1 (en) * 2012-12-22 2014-06-26 华为技术有限公司 Method, apparatus and device for processing service in system upgrade process
CN105934759A (en) * 2015-10-13 2016-09-07 深圳还是威健康科技有限公司 Data updating method and device, terminal and server
CN105511889B (en) * 2016-01-15 2020-01-07 珠海金山网络游戏科技有限公司 A general game version incremental update system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060427A (en) * 2006-04-19 2007-10-24 华为技术有限公司 A system and method for realizing the remote software updating
CN103973475A (en) * 2013-02-05 2014-08-06 腾讯科技(深圳)有限公司 Difference service pack generating method, difference service pack downloading method, server and client-side
US20190087168A1 (en) * 2015-12-22 2019-03-21 Intel Corporation Dynamic data difference generation and distribution
CN108429779A (en) * 2017-02-15 2018-08-21 上海众人信息技术有限公司 A kind of method for down loading and system of the application system based on mobile terminal
CN109697075A (en) * 2017-10-20 2019-04-30 北京京东尚科信息技术有限公司 File updating method, system and device
CN108777632A (en) * 2018-05-18 2018-11-09 阿里巴巴集团控股有限公司 Data processing method, client, business platform and configuration platform

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723062A (en) * 2020-06-28 2020-09-29 天津联想协同科技有限公司 File synchronization method, device and storage medium
CN112000850A (en) * 2020-08-26 2020-11-27 杭州海康威视系统技术有限公司 Method, device, system and equipment for data processing
CN112000850B (en) * 2020-08-26 2024-02-20 杭州海康威视系统技术有限公司 Methods, devices, systems and equipment for data processing
CN112104733A (en) * 2020-09-15 2020-12-18 京东数字科技控股股份有限公司 Method, device, electronic equipment and medium for acquiring preset service information
CN112104733B (en) * 2020-09-15 2024-03-05 京东科技控股股份有限公司 Method, device, electronic equipment and medium for acquiring preset service information
CN114491327A (en) * 2020-11-12 2022-05-13 博泰车联网科技(上海)股份有限公司 Data processing method and device, electronic equipment and storage medium
CN114519090A (en) * 2020-11-20 2022-05-20 马上消费金融股份有限公司 Stop word management method and device and electronic equipment
CN114519090B (en) * 2020-11-20 2023-11-21 马上消费金融股份有限公司 Method and device for managing stop words and electronic equipment
CN112838980A (en) * 2020-12-30 2021-05-25 北京奇艺世纪科技有限公司 Message processing method, system, device, electronic equipment and storage medium
CN120428996A (en) * 2025-05-07 2025-08-05 北京点富科技有限公司 Mobile application hot update method, device, medium, program product and terminal based on React Native framework

Also Published As

Publication number Publication date
WO2021051747A1 (en) 2021-03-25

Similar Documents

Publication Publication Date Title
CN111026416A (en) Data updating method, system, device, electronic equipment and computer storage medium
CN110311983B (en) Service request processing method, device and system, electronic equipment and storage medium
CN102227901B (en) Trickle sync protocol
US9282137B2 (en) Dynamic package creation for predictive page load optimization
WO2018219178A1 (en) Data synchronization method and apparatus, server, and storage medium
KR101389101B1 (en) Method and apparatus for tracking device management data changes
CN102984278B (en) Realize the system and method that browser data synchronizes
CN111611091A (en) A service invocation method, device and medium of a business object
CN111221469B (en) Method, device and system for synchronizing cache data
CN103581207A (en) Cloud terminal data storage system and data storing and sharing method based on cloud terminal data storage system
JP2016508322A (en) Advertisement processing method and apparatus
CN103024050B (en) Distributor and the method that multiple server is distributed
CN104486379A (en) Parameter updating method as well as relevant equipment and system
US9582561B2 (en) Size-based data synchronization
CN103024049B (en) Realize the system that browser data is synchronous
CN103024051B (en) A kind of device, method and corresponding system carrying out server distribution
JP2010079523A (en) Method of sharing session data
CN111404979A (en) Method and device for processing service request and computer readable storage medium
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
HK40019640A (en) A data updating method, system, device, electronic apparatus and computer storage medium
CN114827083B (en) Domain name resolution method, domain name resolution system and ECS (electronic control system) recursion server
WO2024173713A1 (en) Opportunistic migration of data between cloud storage provider systems
CN103297497B (en) Computer implemented method, computer system and computer-readable medium
CN103036990A (en) Browser client
WO2022237428A1 (en) Method and apparatus for processing network request information, and device and storage medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40019640

Country of ref document: HK

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200417