WO2021051747A1 - Data update method, system and device, electronic device, and computer storage medium - Google Patents
Data update method, system and device, electronic device, and computer storage medium Download PDFInfo
- Publication number
- WO2021051747A1 WO2021051747A1 PCT/CN2020/076892 CN2020076892W WO2021051747A1 WO 2021051747 A1 WO2021051747 A1 WO 2021051747A1 CN 2020076892 W CN2020076892 W CN 2020076892W WO 2021051747 A1 WO2021051747 A1 WO 2021051747A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- update
- target application
- target
- data
- timestamp
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
- G06F16/134—Distributed indices
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Definitions
- the present disclosure relates to the field of computer application technology, and in particular to a data update method, system, device, electronic equipment, and computer storage medium.
- the client generally uses two methods to obtain application update data: the server actively pushes the update data or the client polls and actively requests the update data.
- the server actively pushes updated data, that is, the server establishes a long link with the client.
- the client polls actively to request update data, that is, the client can control the request time period by itself and request the latest application update data from the server.
- the embodiments of the present disclosure provide a data update method, system, device, electronic equipment, and computer storage medium.
- an embodiment of the present disclosure provides a data update method, which includes: uploading update data of a target application to a content distribution server; obtaining update information of the update data on the content distribution server, where the update information includes being able to obtain The first storage address of the update data on the content distribution server and the first update timestamp information; in response to the gateway's update information request for the target application, the update information is returned.
- an embodiment of the present disclosure provides a data update method, including: receiving a request sent by a target application, where the request includes the application identifier of the target application; carrying the update information of the target application in the response data and returning it to the client Terminal, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server.
- an embodiment of the present disclosure provides a data update method, which includes: sending a request carrying an application identifier of the target application to a gateway; receiving response data returned by the gateway; obtaining update information added by the gateway to the response data,
- the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server; according to the update information, it is determined whether to update the target application.
- an embodiment of the present disclosure provides a data update method, which includes: a server uploads update data of a target application to a content distribution server, and obtains update information of the update data on the content distribution server, where the update information includes The information of the first storage address and the first update timestamp of the update data on the content distribution server can be obtained; the server responds to the gateway's update information request for the target application and returns update information to the gateway; the gateway receives the request sent by the target application, and The update information of the target application is carried in the response data and returned to the client, where the request includes the application identification of the target application; 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.
- an embodiment of the present disclosure provides a data update system, including: a server, a gateway, and a client.
- the server is used to upload update data of the target application to the content distribution server, and obtain the update data in the content distribution server.
- the update information on the server, and in response to the gateway's update information request for the target application, the update information is returned to the gateway, where the update information includes the first storage address and the first update timestamp that can obtain the update data on the content distribution server Information; gateway, used to receive the request sent by the target application, the update information of the target application is carried in the response data and returned to the client, where the request includes the application identification of the target application; the client is used to send the target carrying the target to the gateway
- the request for the application identifier of the application receives the response data returned by the gateway, obtains the update information added by the gateway to the response data, and determines whether to update the target application according to the update information.
- an embodiment of the present disclosure provides a data update device, including: an upload module configured to upload update data of a target application to a content distribution server; a first acquisition module configured to acquire update data in the content The update information on the distribution server, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data on the content distribution server; the first return module is configured to respond to the gateway’s response to the target application Update information request, return update information.
- an embodiment of the present disclosure provides a data update device, including: a first receiving module configured to receive a request sent by a target application, wherein the request includes the application identifier of the target application; and a second return module, It is configured to carry the update information of the target application in the response data and return it to the client, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server.
- an embodiment of the present disclosure provides a data update device, including: a second sending module configured to send a request carrying an application identifier of a target application to a gateway; and a third receiving module configured to receive the gateway Returned response data; the third obtaining module is configured to obtain the update information added by the gateway to the response data, where the update information includes the first storage address and the first update on the content distribution server that can obtain the update data of the target application Time stamp information; the determining module is configured to determine whether to update the target application according to the update information.
- an embodiment of the present disclosure provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer instructions, where one or more computer instructions are executed by the processor to achieve the following The method of any one of the first aspect, the second aspect, the third aspect to the fourth aspect.
- an embodiment of the present disclosure provides a readable storage medium with computer instructions stored thereon.
- the computer instructions are executed by a processor, the first aspect, the second aspect, the third aspect to the fourth aspect are implemented. Any one of the methods.
- the pressure on the server to receive the update information request is alleviated, and at the same time, the problem of resource waste generated in the way that the client polls actively requests to update the data is avoided.
- Fig. 1 shows a flowchart of a data update method according to an embodiment of the present disclosure
- Fig. 2 shows a flowchart of a data update method according to an embodiment of the present disclosure
- Fig. 3 shows a flowchart of a data update method according to an embodiment of the present disclosure
- Fig. 4 shows a flowchart of a data update method according to an embodiment of the present disclosure
- FIG. 5 shows a schematic structural diagram of a data update system 500 according to an embodiment of the present disclosure
- FIG. 6 shows a structural block diagram of a data update device 600 according to an embodiment of the present disclosure
- FIG. 7 shows a structural block diagram of a data update device 700 according to an embodiment of the present disclosure
- FIG. 8 shows a structural block diagram of a data update device 800 according to an embodiment of the present disclosure
- FIG. 9 shows a structural block diagram of an electronic device 900 according to an embodiment of the present disclosure.
- Fig. 10 shows a schematic structural diagram of a computer system suitable for implementing the data update method according to an embodiment of the present disclosure.
- the network between the server and the client sometimes becomes unstable, which causes the long link between the server and the client to be unstable. Therefore, it is necessary to constantly retry the link to re-establish the connection between the server and the client. Long link.
- the number of target clients for the server to push updated data will increase, resulting in an uncontrollable situation in which the arrival rate, coverage rate, and coverage time of the server push updated data. Therefore, it will cost more Resources.
- the user will shorten the request time period to obtain the server's fast response, resulting in the rapid increase of client requests to the server.
- the pressure on the server will increase. The larger the future, the support of a large number of resources such as databases is also required, and therefore, a waste of resources will be formed.
- 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.
- the data update method includes the following steps S101-S103:
- step S101 upload the update data of the target application to the content distribution server
- step S102 obtain update information of the update data on the content distribution server, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data on the content distribution server;
- step S103 in response to the gateway's update information request for the target application, the update information is returned.
- an application with different functions is installed in the client, where 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.
- the update data of the target application can be uploaded to the content delivery server (Content Delivery Network, CDN) through the server.
- CDN Content Delivery Network
- the target application refers to one or more applications whose data has been updated, and the updated data refers to the data that has changed in the target application.
- server in the embodiment of the present disclosure is the server of the target application, and different target applications may correspond to different servers.
- the application identification of the target application and the corresponding update data can be uploaded to the CDN at the same time, where:
- 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).
- the application identification 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 Key corresponds to the application identification and Value corresponds to the update data.
- 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 on the content distribution server that can obtain the update data.
- An update time stamp information wherein the update data can be obtained by accessing the first storage address, and the first update time stamp corresponds to the time stamp of the update data uploaded to the CDN.
- the embodiment of 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.
- the application identification of the target application and the update information can be stored in association.
- the gateway can be set to periodically send the update of the target application to the server.
- Information request the embodiment of 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.
- the server In response to the gateway's request for update information of the target application, the server returns the latest update information of the target application.
- the update information request can carry the application identification of the target application. The server responds to the gateway's update information request for the target application and determines the target application corresponding to the current update information request according to the application identification. The updated information of the target application is returned to the gateway.
- the gateway mentioned in the embodiment of the present disclosure is a gateway on the server side, 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 of the target application can enter the server through the gateway.
- the pressure on the server to receive the update information request is alleviated, and at the same time, the problem of resource waste generated in the way that the client polls actively requests to update the data is avoided.
- the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
- the gateway can directly obtain the first storage address and the first update timestamp from the update information returned by the server.
- the update time of the update data of the target application on the CDN can be determined through the first update timestamp, and the update data of the target application can be obtained from the CDN by accessing the first storage address.
- URL Uniform Resource Locator
- 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"), by accessing the first storage address "https://xxx.xx/a/1json.json", the updated data can be obtained, and the timestamp "1564114914423" of the updated data uploaded to the CDN can be obtained.
- 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;
- the index file includes the service identification and storage of at least one target service of the target application.
- the update data includes update data of at least one target service of the target application.
- the target service may include, but is not limited to, configuration center service, offline package service, and patch service.
- the developer can package the updated one or more target businesses in the form of updated data of the target business.
- the following will take the target business as a patch business or an offline package business as an example Note, but the embodiments of the present disclosure are not limited to this.
- the target application can be updated on the local client.
- the update data of the target application includes the update data of this target business; if there are two or more target businesses, that is, the target application has If two or more target businesses have changed, the update data of the target application may include update data of one target business, may include update data of part of the target business, or may include update data of all target businesses.
- an index file can be established to store the update information of different target services, where ,
- the index file may include the service identifier, update address, and update timestamp of at least one target service of the target application, where 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 timestamp corresponds to the timestamp of the update data of the target service uploaded to the CDN.
- the target application APP2 has two target services, namely the configuration center service ("crystal_config") and the offline package service ("speedboat_offline_deploy”).
- the appKey of APP2 is "25230564" and the appVersion is "7.20.4”.
- the update address of the central business is "https://xxx.xx/b/1json.json”
- the update timestamp is "1563405958296”
- the update address of the offline package business is "https://xxx.xx/b/2json. json”
- the update timestamp is "1564039123355"
- the index file of APP2 can be expressed as:
- 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.
- the gateway can access the second storage address
- the index file is acquired, and the latest update time of the index file can also be determined through the second update timestamp.
- the service identification, update address, and update timestamp of at least one target service of the target application can also be obtained from the index file.
- the latest update data uploaded by the server to the CDN includes information about the target application.
- the first storage address and the first update timestamp of the updated data of the target service A on the CDN can be obtained through the index file.
- the embodiment of 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.
- the step S102 that is, obtaining the update information of the update data on the content distribution server, includes the following steps: obtaining the first storage address and the first update timestamp of the update data on the content distribution server; Update the index file with the first storage address and the first update timestamp; upload the index file to the content distribution server; obtain the second storage address and the second update timestamp.
- the server uploads its update data to the CDN, and obtains its upload address, that is, the first storage address, and the upload timestamp, that is, from the CDN.
- the first update timestamp Since the update data of the target application includes 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 acquired, and the The first storage address and the first update timestamp are associated and stored in the index file with the business identification of one or more target services in the update data. If the index file has been associated and stored corresponding to the business identification of one or more target services In the case of the entry, the current first storage address and the first update timestamp can be used to update the entry, that is, to update the current index file.
- the index file in order to relieve the pressure on the server, 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 index file is uploaded to the latest timestamp on the CDN.
- the index file can be obtained by accessing the second storage address, and 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 .
- the gateway may return the second storage address and the second update timestamp of the index file on the CDN to the gateway.
- the update of the index file according to the first storage address and the first update timestamp may also be implemented as: update the update address and 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.
- the index file may include update information associated with multiple target service identifiers.
- the index file may be updated according to the first storage address and the first storage address of the update data uploaded to the CDN.
- the update timestamp updates the update information corresponding to the service identification of one or more target services in the index file.
- the target service is determined according to the service identifier, and then the update address of the target service is updated to the first storage address, and the update timestamp is updated to the first update timestamp, thereby completing the update of the index file.
- the original index file is:
- Fig. 2 shows a flowchart of a data update method according to an embodiment of the present disclosure, and the data update method is executed at the gateway end.
- the data update method includes the following steps S201-S202:
- step S201 a request sent by a target application is received, where the request includes an application identifier of the target application;
- step S202 the update information of the target application is carried in the response data and returned to the client, where the update information includes the first storage address and the first update timestamp that can obtain the update data of the target application on the content distribution server. information.
- 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 that can perform network communication.
- the target application may not directly send an update information request to the server, but a specially developed software development kit (SDK) is sent to the target application by intercepting the target application.
- SDK software development kit
- Any request from the server, and the application identifier of the target application is added to the request to obtain update information about the target application.
- the application identifier is used to identify different target applications and different versions of the same target application, and the application identifier may include the application Unique 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.
- the gateway after the gateway receives the request data sent by the target application, it can obtain the application identifier carried in the request (for example, a 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 then 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 application identifier for example, a packet header
- the problem of resource waste generated in the way that the client polls actively requests to 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
- the response speed of update data is improved, so that multiple clients can achieve "second-level" updates at the same time.
- the client sends a request to the server into a periodic request from the gateway to the server, which relieves the server from receiving update information. The pressure of the request.
- the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
- 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;
- the index file includes the service identification and storage of at least one target service of the target application.
- the update data includes update data of at least one target service of the target application.
- the target service includes a configuration center service, an offline package service, and a patch service.
- a configuration center service for the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
- the method after receiving the request sent by the target application, the method further includes the following steps:
- the gateway can first obtain the application identification of the target application from the request, and then determine whether the local application list is already Store the application identification of the target application.
- the local application list is used to store the application identifications of different applications. If the application identification of the target application has been stored, the application identification does not need to be added to the local application list; if the target is not stored The application ID of the application is added to the local application list.
- the embodiment of the present disclosure does not specifically limit the storage manner of the application identifier in the local application list, and may be determined according to actual application requirements.
- carrying the update information of the target application in the response data and returning includes the following steps: determining 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.
- the gateway after obtaining the application identifier, it is first determined whether the gateway locally stores the update information of the target application. 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, thereby avoiding 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 the gateway will be used 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.
- the data update method further includes the following steps: periodically sending a request for update information of the target application to the server; and receiving update information of the target application returned by the server.
- 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 embodiment of the present disclosure does not specifically limit the update information request period. It can be limited according to actual conditions, 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.
- the server In response to the gateway's request for update information of the target application, the server returns the update information of the target application, and 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 through the update information.
- the gateway 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 to replace the original update information. ; Or, when the gateway obtains the update information of the target application from the server, it can determine whether to store the update information obtained from the server according to whether the update information obtained from the server 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. The first update timestamp in the acquired update information is compared with the local timestamp in the locally stored local update information.
- the slave server If the first update timestamp in the update information is later than the local timestamp in the local update information, it indicates that the slave server The obtained update information is newer than the local update information stored locally, you can accept the update information of one or more target applications returned by the server and store the update information locally in the gateway. Otherwise, it indicates that the locally stored local update information is already The latest update information may not be stored.
- 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 client.
- the data update method includes the following steps S301-S304:
- step S301 a request carrying the application identifier of the target application is sent to the gateway;
- step S302 the response data returned by the gateway is received
- step S303 the update information added by the gateway to the response data is obtained, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server;
- step S304 it is determined whether to update the target application according to the update information.
- the target application in the client sends a request to the server of the target application, and the request will pass through the server-side gateway before reaching the server, that is, the request is first sent to the server-side gateway, where the target application refers to the data generation If one or more applications are updated, the request includes any request issued by the target application.
- 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 update information, the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the server's gateway, so as to obtain whether the target application has update information.
- the application identifier of the target application can be carried in the header of the request and sent to the gateway of the server.
- the update information of the target application can also be obtained 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).
- the client can be a handheld terminal device, a laptop computer, a cellular phone, a smart phone, a wireless data card, a personal digital assistant computer, a tablet computer, a cordless phone, an Internet of Things device (IOT device) or other terminal devices that can access the network
- IOT device Internet of Things device
- the gateway after the gateway receives the request sent by the target application, it can obtain the application identifier carried in the 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 then 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 first storage address and the first update timestamp information on the CDN that can obtain the update data of the target application, where it can be obtained by accessing the first storage address
- the data is updated, and the first update timestamp corresponds to the timestamp when the update data is uploaded to the CDN.
- the embodiment of 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.
- the client 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 update information of the target application locally, it can be determined that the update information obtained from the gateway corresponds to Whether the update data has been updated locally, if it has been updated, no processing is required. 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 can be updated locally The application is updated; of course, you can also record the update information first, and then update it in batches.
- the gateway directly sends the application identifier of the target application according to the application identifier of the target application carried in the request sent by the target application.
- the response data carries the update information of the target application and is returned to the client, so that the client can determine whether the target application needs to be updated according to the update information.
- the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
- 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;
- the index file includes the service identification and storage of at least one target service of the target application.
- the update data includes update data of at least one target service of the target application.
- the target service includes a configuration center service, an offline package service, and a patch service.
- a configuration center service for the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
- the step S301 that is, sending a request carrying the application identifier of the target application to the gateway, includes the following steps: intercepting the request sent by the target application to the server; carrying the application identifier of the target application in the request and sending Gateway to the server.
- the request to be sent can be intercepted through the SDK installed locally.
- the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the server's gateway 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 request header and sent to the server's gateway.
- the update information of the target application can also be obtained from the response data through the SDK.
- the step S304 that is, determining whether to update the target application according to the update information, can also be implemented as: when the first update timestamp is later than the third update timestamp of the target application locally, recording the target The app has updated data.
- the step S304 since some target applications only need to confirm whether they have been updated, there is no need to download the update data of the target application immediately.
- the third update timestamp may be the first update timestamp of the update data that was most recently downloaded from the CDN and updated the target application, and the locally stored If the update data of the target application has been 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.
- the step S304 which is to determine whether to update the target application according to the update information, can also be implemented as: when the first update timestamp is later than the third update timestamp of the target application locally A storage address downloads the update data of the target application; the target application is updated according to the update data of the target application.
- the first update timestamp may be compared with the local third update timestamp, where the third update timestamp may be the first update time of the update data that was most recently downloaded from the CDN and updated the target application Stamp to determine whether to download and install the updated data of the target application.
- the first update timestamp when the first update timestamp is later than the third local update timestamp, it indicates that the update data of the target data is updated compared to 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 updated data of the target application.
- the step S304 that is, determining whether to update the target application according to the update information, includes the following steps: when the second update timestamp is later than the fourth update timestamp of the local index file, from the second storage address Download the index file; 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.
- the client can store the local index file corresponding to the target application last obtained from the server and the fourth update timestamp of the local index file on the CDN, and one or more of the target applications recorded in the index file The updated data of multiple target services has been updated on the local target application.
- 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 first update timestamp of the local index file stored locally.
- Four update timestamps where the fourth update timestamp corresponds to the timestamp when the local index file is uploaded to the CDN to determine whether the index file obtained from the gateway has been updated.
- the second update timestamp is later than the fourth update timestamp, 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.
- the index file since the index file stores the service identifier, the first storage address, and the first update timestamp of at least one target service in association, when the index file is updated, it indicates that at least one target service stored in the index file has occurred. Update, so that 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 local index file stored locally.
- 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 the following steps: the first update timestamp is later than at least one stored locally At the fifth update timestamp corresponding to the target service, download the update data of the target service from the first storage address; update the target service according to the update data of the target service.
- 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 timestamp of at least one target service of the target application in association with each other.
- the fifth update timestamp corresponds to the timestamp of the locally stored update data of the target service uploaded to the CDN.
- the index file downloaded from the second storage address stores the service identifier of at least one target service, the first storage address, and the first update timestamp in association
- the first update timestamp 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.
- the update data can be downloaded from the first storage address. Update data of the target business, and update the target business of the target application according to the updated data.
- the local index file 1 stored locally is as follows:
- the index file 2 obtained from the second storage address is as follows:
- step S902 which is to 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, can also be implemented as: at the first update time When the stamp is later than or equal to the fifth update timestamp corresponding to at least one target service stored locally, it is recorded that the target service has update data.
- the local index file 1 stored locally is as follows:
- the index file 2 obtained from the second storage address is as follows:
- Fig. 4 shows a flowchart of a data update method according to an embodiment of the present disclosure.
- the data update method includes the following steps S401-S404:
- step S401 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, where the update information includes the first storage address that can obtain the update data on the content distribution server And the information of the first update timestamp;
- step S402 the server returns update information to the gateway in response to the gateway's update information request for the target application
- step S403 the gateway receives the request sent by the target application, and returns the update information of the target application to the client in response data, where the request includes the application identifier of the target application;
- step S404 the client obtains the update information added by the gateway to the response data, and determines whether to update the target application according to the update information.
- an application with different functions is installed in the client, where 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.
- the update data of the target application can be uploaded to the CDN through the server.
- the target application refers to the data update.
- update data refers to the data that has changed in the target application.
- server in the embodiment of the present disclosure is the server of the target application, and different target applications may correspond to different servers.
- the server can upload the application identification of the target application and the corresponding update data to the CDN at the same time, where
- 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).
- the application identification 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 Key corresponds to the application identification and Value corresponds to the update data.
- the server can further obtain the update information of the update data on the CDN.
- the update information includes the first storage address and the first storage address of the CDN that can obtain the update data.
- Update the information of the timestamp where the update data can be obtained by accessing the first storage address, and the first update timestamp corresponds to the timestamp of the update data uploaded to the CDN.
- the embodiment of 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.
- the application identification of the target application and the update information can be stored in association.
- the gateway can be set to periodically send the update of the target application to the server.
- Information request the embodiment of 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.
- the server In response to the gateway's request for update information of the target application, the server returns the latest update information of the target application.
- the update information request can carry the application identification of the target application. The server responds to the gateway's update information request for the target application and determines the target application corresponding to the current update information request according to the application identification. The updated information of the target application is returned to the gateway.
- the gateway mentioned in the embodiment of the present disclosure is a gateway on the server side, 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 of the target application can enter the server through the gateway.
- the client can be a handheld terminal device, a laptop computer, a cellular phone, a smart phone, a wireless data card, a personal digital assistant computer, a tablet computer, a cordless phone, an Internet of Things device (IOT device) or other terminal devices that can access the network
- IOT device Internet of Things device
- 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.
- the target application on the client does not need to directly send an update information request to the server.
- the specially developed SDK on the client intercepts the target application sent to the server. Any request, and add the application identifier of the target application 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 carry the application identifier of the target application in the header of the request and send it to the server.
- the gateway 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 in the gateway. Identifies 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.
- the application identifier carried in the request for example, the packet header
- 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.
- the client compares the update information obtained from the gateway with the target application locally on the client.
- the update information can be judged whether the update data corresponding to the update information obtained from the gateway has been updated locally on the client. If it has been updated, it can not be processed. If it has not been updated, the client can obtain the update information from the gateway.
- the first storage address in downloads the update data of the target application, and updates the target application locally; of course, the client can also record the update information first, and then update it in batches.
- 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 determine whether it needs to update the target application according to the update information, which improves the response speed of the update data, so that multiple clients can achieve "second-level" updates at the same time, and at the same time, the client sends a request to the server to convert In order for the gateway to periodically initiate requests to the server, the pressure on the server to receive requests for updated information is relieved.
- the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
- 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;
- the index file includes the service identification and storage of at least one target service of the target application.
- the update data includes update data of at least one target service of the target application.
- the target service includes a configuration center service, an offline package service, and a patch service.
- a configuration center service for the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
- obtaining the update information of the update data on the content distribution server in the step S401 includes the following steps: the server obtains the first storage address and the 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.
- the server uploads its update data to the CDN, and obtains its upload address, that is, the first storage address, and the upload timestamp, 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 adds The first storage address and the first update timestamp are associated and stored in the index file with the service identification of one or more target services in the update data. If the index file has already associated and stored the service identification of one or more target services For the corresponding entry, the current first storage address and the first update timestamp can be used to update the entry, that is, to update the current index file.
- 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 is uploaded to the CDN.
- the index file can be obtained by accessing the second storage address, and 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 .
- the gateway periodically sends a request for update information of the target application to the server, the server may return the second storage address and the second update timestamp of the index file on the CDN to the gateway.
- the server updates the index file according to the first storage address and the first update timestamp, which may also be implemented as: the server updates the update address and update timestamp associated with the service identifier of the target service in the index file The update is the first storage address and the first update timestamp.
- the index file may include update information associated with multiple target service identifiers.
- the server may according to the first storage address and the first storage address of the update data uploaded to the CDN.
- An update timestamp updates the update information corresponding to the service identification 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 timestamp to the first update timestamp, thereby completing the update of the index file.
- the original index file is:
- the server will configure the center service
- the update address "https://xxx.xx/b/1json.json” is updated to the first storage address "https://xxx.xx/b/3json.json”
- the update timestamp "1563405958296” is updated to the first update Timestamp "1564014914423" to obtain the updated index file as:
- the step S403 that is, the gateway receives the request sent by the target application, and returns the update information of the target application in the response data to the client, and further includes the following step: the gateway obtains the target carried in the request The application identifier of the application; 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 obtains 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 ID is added to the local application list.
- the gateway can first obtain the application identification of the target application from the request, and then determine whether the local application list of the gateway is already 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 already stored the application identifier of the target application, there is no need to add the application identifier 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 embodiment of the present disclosure does not specifically limit the storage manner of the application identifier in the local application list, and may be determined according to actual application requirements.
- the gateway after the gateway obtains the application identifier, it first determines whether the gateway locally stores the update information of the target application. 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.
- the data update method further includes the following steps: 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.
- 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 embodiment of the present disclosure does not specifically limit the update information request period. It can be limited according to actual conditions, 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.
- the server In response to the gateway's request for update information of the target application, the server returns the update information of the target application, and 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 through the update information.
- the gateway 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 to replace the original update information. ; Or, when the gateway obtains the update information of the target application from the server, it can determine whether to store the update information obtained from the server according to whether the update information obtained from the server 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 The first update timestamp in the obtained update information is further compared with the local timestamp in the locally stored local update information.
- the first update timestamp in the update information is later than the local timestamp in the local update information, it indicates The update information that the gateway obtains from the server is newer than the local update information stored locally in 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. Otherwise, it indicates that the gateway stores locally. If the local update information of is already the latest update information, the gateway may not store the update information.
- the data update method further includes the following steps: the client sends a request carrying the application identifier of the target application to the gateway; the client receives the response data returned by the gateway.
- the target application in the client sends a request to the server of the target application, and the request passes through the server-side gateway and then reaches the server, that is, the request is first sent to the server-side gateway.
- the target application in the client sends a request to the server, it can intercept the request to be sent through the SDK installed locally in the client.
- the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the server's gateway to obtain whether the target application has update 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.
- the update information of the target application can also be obtained from the response data through the SDK.
- the client sends a request carrying the application identification of the target application to the gateway, including the following steps: the client intercepts the request sent by the target application to the server; the client carries the application identification of the target application in the request The gateway sent to the server in the.
- the request to be sent can be intercepted through the SDK installed locally.
- the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the server's gateway to obtain the update information of the target application. Since the request includes a packet header and a packet body, the client can carry the application identifier of the target application in the request header and send it to the server's gateway.
- the step S404 that is, the client determines whether to update the target application according to the update information
- the client since some target applications only need to confirm whether they have been updated, there is no need to download the update data of the target application immediately.
- the third update timestamp may be the first update timestamp of the update data that was most recently downloaded from the CDN and updated the target application, and the locally stored If the update data of the target application is updated, the client can record the situation first, so that the update data of the target application can be downloaded and installed at an appropriate time later.
- the step S404 that is, the client determines whether to update the target application according to the update information
- the client can also be implemented as: when the first update timestamp is later than the third update timestamp of the target application locally, 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.
- the first update timestamp may be compared with the local third update timestamp, where the third update timestamp may be the first update time of the update data that was most recently downloaded from the CDN and updated the target application Stamp to determine whether to download and install the updated data of the target application.
- 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.
- the step S404 that is, the client determines whether to update the target application according to the update information, includes the following steps: when the second update timestamp is later than the fourth update timestamp of the local index file, the client starts from The index file is downloaded at the second storage address; the client terminal determines 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.
- the client can store the local index file corresponding to the target application last obtained from the server and the fourth update timestamp of the local index file on the CDN, and one or more of the target applications recorded in the index file The updated data of multiple target services has been updated on the local target application.
- 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 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. Therefore, the client can download the latest update from the second storage address. Index file.
- the index file since the index file stores the service identifier, the first storage address, and the first update timestamp of at least one target service in association, when the index file is updated, it indicates that at least one target service stored in the index file has occurred. Update, so that 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.
- 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, including the following steps: the first update timestamp is later than the locally stored When the fifth update timestamp corresponding to 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.
- the client 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 associatedly stores the service identifier and the fifth update timestamp of at least one target service of the target application , Where the fifth update timestamp corresponds to the timestamp at which the update data of the target service stored locally in the client is uploaded to the CDN.
- the index file downloaded by the client from the second storage address stores the service identification of at least one target service, the first storage address, and the first update timestamp in association
- the first update timestamp can be compared with the target service information 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.
- the client can download from the first storage address Download the updated data of the target business, and update the target business of the target application according to the updated data.
- the local index file 1 stored locally on the client is as follows:
- the index file 2 obtained by the client from the second storage address is as follows:
- the client can download from the first storage address " https://xxx.xx/b/1json.json" to download the updated data of the configuration center business.
- 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 at least one target service in the index file, which can also be implemented as : When the first update timestamp is later than or equal to the fifth update timestamp corresponding to at least one target service stored locally, the client terminal records that the target service has update data.
- the local index file 1 stored locally on the client is as follows:
- the index file 2 obtained by the client from the second storage address is as follows:
- the client can first Record the situation so that it can be downloaded and installed at an appropriate time later (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).
- the user needs to download the update data of the offline package service, he can further download the update data for configuring the offline package service from the first storage address "https://xxx.xx/b/2json.json".
- FIG. 5 shows a schematic structural diagram of a data update system 500 according to an embodiment of the present disclosure.
- the data update system includes a server 501, a gateway 502, and a client 503.
- the server 501 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 gateway's update information request for the target application, return the update information to the gateway, where the update
- the information includes information capable of obtaining the first storage address and the first update timestamp of the update data on the content distribution server;
- the gateway 502 is configured to receive a request sent by the target application, carry the update information of the target application in the response data and return it to the client, where the request includes the application identifier of the target application;
- the client 503 is configured to send a request carrying the application identifier of the target application to the gateway, receive response data returned by the gateway, obtain update information added by the gateway to the response data, and determine whether to update the target application according to the update information.
- the server is the server of the target application, and different target applications may correspond to different servers.
- the gateway is the gateway on the server side, that is, the 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.
- the client can be a handheld terminal device, a laptop computer, a cellular phone, a smart phone, a wireless data card, a personal digital assistant computer, a tablet computer, a cordless phone, an Internet of Things device (IOT device) or other terminal devices that can access the network
- IOT device Internet of Things device
- the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
- 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;
- the index file includes the service identification, storage address, and storage address of at least one target service of the target application.
- Update time stamp the update data includes update data of at least one target service of the target application.
- the server is configured to obtain 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, and upload the index file to The content distribution server obtains the second storage address and the second update timestamp.
- the server is configured to update the update address and update timestamp associated with the service identification of the target service in the index file to the first storage address and the first update timestamp.
- the gateway is used to obtain the application identification of the target application carried in the request, and when the application identification is not stored in the local application list, the application identification is added to the local application list, and the application identification is used to determine whether the target application is stored locally
- 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.
- the gateway is used 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 client is used to send a request carrying the application identifier of the target application to the gateway, and receive response data returned by the gateway.
- the client is used to intercept the request sent by the target application to the server, and carry the application identifier of the target application in the request and send it to the gateway of the server.
- the client is used to record that the target application has update data when the first update timestamp is later than the third update timestamp of the target application locally.
- the client is configured to download the update data of the target application from the first storage address when the first update timestamp is later than the third update timestamp of the target application locally, and update according to the update data of the target application Target application.
- the client downloads the index file from the second storage address, according to the corresponding service identifier of at least one target service in the index file
- the first update timestamp determines whether to update the target application.
- the client when the first update timestamp is later than the fifth update timestamp corresponding to at least one target service stored locally, the client records the update data of the target service.
- the client downloads the update data of the target service from the first storage address, and then downloads the update data of the target service according to the update data of the target service. Update the target business.
- target services include configuration center services, offline package services, and patch services.
- the data update system in the embodiment of the present disclosure corresponds to the data update method of the embodiment shown in FIG. 4 and related embodiments. For specific details, refer to the data update method shown in FIG. 4 above, which will not be repeated here.
- FIG. 6 shows a structural block diagram of a data update device 600 according to an embodiment of the present disclosure.
- the device can be implemented as part or all of the electronic equipment through software, hardware or a combination of the two.
- the data update device includes an upload module 610, a first acquisition module 620, and a first return module 630.
- the upload module 610 is configured to upload update data of the target application to the content distribution server;
- the first obtaining module 620 is configured to obtain update information of the update data on the content distribution server, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data on the content distribution server;
- the first return module 630 is configured to return update information in response to the update information request of the gateway for the target application.
- the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
- 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;
- the index file includes the service identification, storage address, and storage address of at least one target service of the target application.
- Update time stamp the update data includes update data of at least one target service of the target application.
- obtaining the update information of the update data on the content distribution server includes: obtaining the first storage address and the first update timestamp of the update data on the content distribution server; according to the first storage address and the first update Update the index file with the timestamp; upload the index file to the content distribution server; obtain the second storage address and the second update timestamp.
- updating the index file according to the first storage address and the first update timestamp includes: updating the update address and 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. An update timestamp.
- target services include configuration center services, offline package services, and patch services.
- the data update device in the embodiment of the present disclosure corresponds to the data update method of the embodiment shown in FIG. 1 and related embodiments. For specific details, refer to the data update method shown in FIG. 1 above, which will not be repeated here.
- FIG. 7 shows a structural block diagram of a data update device 700 according to an embodiment of the present disclosure.
- the device can be implemented as part or all of the electronic equipment through software, hardware or a combination of the two.
- the data update device includes a first receiving module 710 and a second returning module 720.
- the first receiving module 710 is configured to receive a request sent by a target application, where the request includes an application identifier of the target application;
- the second return module 720 is configured to carry the update information of the target application in the response data and return it to the client, where the update information includes the first storage address and the first storage address on the content distribution server that can obtain the update data of the target application. Update the information of the timestamp.
- the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
- 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;
- the index file includes the service identification, storage address, and storage address of at least one target service of the target application.
- Update time stamp the update data includes update data of at least one target service of the target application.
- carrying the update information of the target application in the response data and returning it to the client includes: determining 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.
- it further includes:
- the second obtaining module 730 is configured to obtain the application identifier of the target application carried in the request;
- the adding module 740 is configured to add the application identifier to the local application list when the application identifier is not stored in the local application list.
- it further includes:
- the first sending module 750 is configured to periodically send the update information request of the target application to the server;
- the second receiving module 760 is configured to receive update information of the target application returned by the server.
- target services include configuration center services, offline package services, and patch services.
- the data update device in the embodiment of the present disclosure corresponds to the data update method of the embodiment shown in FIG. 3 and related embodiments. For specific details, refer to the data update method shown in FIG. 3 above, which will not be repeated here.
- FIG. 8 shows a structural block diagram of a data update device 800 according to an embodiment of the present disclosure.
- the device can be implemented as part or all of the electronic equipment through software, hardware or a combination of the two.
- the data update device includes a second sending module 810, a third receiving module 820, a third acquiring module 830, and a determining module 840.
- the second sending module 810 is configured to send a request carrying the application identifier of the target application to the gateway;
- the third receiving module 820 is configured to receive response data returned by the gateway
- the third obtaining module 830 is configured to obtain the update information added by the gateway to the response data, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server ;
- the determining module 840 is configured to determine whether to update the target application according to the update information.
- the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
- 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;
- the index file includes the service identification, storage address, and storage address of at least one target service of the target application.
- Update time stamp the update data includes update data of at least one target service of the target application.
- 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; carrying the application identifier of the target application in the request and sending it to the gateway of the server.
- determining whether to update the target application according to the update information and the local third update timestamp of the target application includes: recording the target when the first update timestamp is later than the third update timestamp of the target application locally The app has updated data.
- 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 timestamp is later than the third update timestamp of the target application locally, from Download the update data of the target application at the first storage address; update the target application according to the update data of the target application.
- 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 timestamp is later than the fourth update timestamp of the local index file, starting from the first 2. Download the index file from the storage address; 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.
- 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 first update timestamp is later than the locally stored at least one target service corresponding to When the fifth time stamp is updated, the update data of the target business is recorded.
- 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 first update timestamp is later than the locally stored at least one target service corresponding to When the fifth time stamp is updated, the update data of the target service is downloaded from the first storage address; the target service is updated according to the update data of the target service.
- target services include configuration center services, offline package services, and patch services.
- the data update device in the embodiment of the present disclosure corresponds to the data update method of the embodiment shown in FIG. 7 and related embodiments. For specific details, refer to the data update method shown in FIG. 7 above, which will not be repeated here.
- FIG. 9 shows a structural block diagram of an electronic device 900 according to an embodiment of the present disclosure.
- the electronic device 900 includes a memory 901 and a processor 902; where
- the memory 901 is configured to store one or more computer instructions, where one or more computer instructions are executed by the processor 902 to implement any method according to the embodiments of the present disclosure.
- Fig. 10 shows a schematic structural diagram of a computer system suitable for implementing the data update method according to an embodiment of the present disclosure.
- the computer system 1000 includes a central processing unit (CPU) 1001, which can be based on a program stored in a read only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003
- CPU central processing unit
- ROM read only memory
- RAM random access memory
- the various processes in the above-mentioned embodiment are executed.
- RAM 1003 various programs and data required for the operation of the system 1000 are also stored.
- the CPU 1001, ROM 1002, and RAM 1003 are connected to each other through a bus 1004.
- An input/output (I/O) interface 1005 is also connected to the bus 1004.
- the following components are connected to the I/O interface 1005: an input part 1006 including a keyboard, a mouse, etc.; an output part 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and speakers, etc.; a storage part 1008 including a hard disk, etc. ; And a communication part 1009 including a network interface card such as a LAN card, a modem, and the like.
- the communication section 1009 performs communication processing via a network such as the Internet.
- the driver 1010 is also connected to the I/O interface 1005 as needed.
- a removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that the computer program read therefrom is installed into the storage portion 1008 as needed.
- an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly embodied on a machine-readable medium, and the computer program includes program code for executing the foregoing object category determination method.
- the computer program may be downloaded and installed from the network through the communication part 1009, and/or installed from the removable medium 1011.
- each block in the route diagram or block diagram can represent a module, program segment, or part of the code, and the module, program segment, or part of the code contains one or more executables that are used to implement the specified logical functions. instruction.
- the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
- each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
- the units or modules involved in the embodiments described in the present disclosure can be implemented in software or hardware.
- 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 under certain circumstances.
- the present disclosure also provides a computer-readable storage medium.
- the computer-readable storage medium may be the computer-readable storage medium included in the electronic device or computer system in the above-mentioned embodiments; or it may exist alone.
- the computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the methods described in the present disclosure.
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 Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
相关申请的交叉引用Cross-references to related applications
本公开要求于2019年09月17日提交的中国专利申请号为“CN201910878239.1”的优先权,其全部内容作为整体并入本申请中。This disclosure claims the priority of the Chinese patent application number "CN201910878239.1" filed on September 17, 2019, the entire content of which is incorporated into this application as a whole.
本公开涉及计算机应用技术领域,具体涉及一种数据更新方法、系统、装置、电子设备及计算机存储介质。The present disclosure relates to the field of computer application technology, and in particular to a data update method, system, device, electronic equipment, and computer storage medium.
随着互联网技术的发展,用户对客户端应用(APP)功能的丰富化和多样化提出了更高的需求,服务器端技术开发人员需要不断改进应用的功能,形成应用的更新数据,并生成新的应用版本,从而使用户在客户端进行应用更新。相关技术中,客户端获取应用更新数据一般采用两种方式:服务器主动推送更新数据或者客户端轮询主动请求更新数据。服务器主动推送更新数据,即服务器与客户端建立长链接,当服务器端有应用的更新数据时,会主动将应用的更新数据推送给目标客户端。客户端轮询主动请求更新数据,即客户端可以自行控制请求时间周期,向服务器请求最新的应用更新数据。With the development of Internet technology, users have put forward higher demands for the enrichment and diversification of client application (APP) functions. Server-side technology developers need to continuously improve application functions, form application update data, and generate new The version of the application that allows users to update the application on the client. In related technologies, the client generally uses two methods to obtain application update data: the server actively pushes the update data or the client polls and actively requests the update data. The server actively pushes updated 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 by itself and request the latest application update data from the server.
发明内容Summary of the invention
本公开实施例提供一种数据更新方法、系统、装置、电子设备及计算机存储介质。The embodiments of the present disclosure provide a data update method, system, device, electronic equipment, and computer storage medium.
第一方面,本公开实施例中提供了一种数据更新方法,包括:将目标应用的更新数据上传至内容分发服务器;获取更新数据在内容分发服务器上的更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;响应于网关针对目标应用的更新信息请求,返回更新信息。In the first aspect, an embodiment of the present disclosure provides a data update method, which includes: uploading update data of a target application to a content distribution server; obtaining update information of the update data on the content distribution server, where the update information includes being able to obtain The first storage address of the update data on the content distribution server and the first update timestamp information; in response to the gateway's update information request for the target application, the update information is returned.
第二方面,本公开实施例中提供了一种数据更新方法,包括:接收目标应用发送的请求,其中,请求包括目标应用的应用标识;将目标应用的更新信息携带在响应数据中返回给客户端,其中,更新信息包括能够获取目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。In a second aspect, an embodiment of the present disclosure provides a data update method, including: receiving a request sent by a target application, where the request includes the application identifier of the target application; carrying the update information of the target application in the response data and returning it to the client Terminal, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server.
第三方面,本公开实施例中提供了一种数据更新方法,包括:向网关发送携带有目标应用的应用标识的请求;接收网关返回的响应数据;获取网关添加在响应数据中的更新信息,其中,更新信息包括能够获取目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;根据更新信息确定是否更新目标应用。In a third aspect, an embodiment of the present disclosure provides a data update method, which includes: sending a request carrying an application identifier of the target application to a gateway; receiving response data returned by the gateway; obtaining update information added by the gateway to the response data, Wherein, the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server; according to the update information, it is determined whether to update the target application.
第四方面,本公开实施例中提供了一种数据更新方法,包括:服务器将目标应用的更新数据上传至内容分发服务器,并获取更新数据在内容分发服务器上的更新信息,其 中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;服务器响应于网关针对目标应用的更新信息请求,向网关返回更新信息;网关接收目标应用发送的请求,并将目标应用的更新信息携带在响应数据中返回给客户端,其中,请求包括目标应用的应用标识;客户端获取网关添加在响应数据中的更新信息,并根据更新信息确定是否更新目标应用。In a fourth aspect, an embodiment of the present disclosure provides a data update method, which includes: a server uploads update data of a target application to a content distribution server, and obtains update information of the update data on the content distribution server, where the update information includes The information of the first storage address and the first update timestamp of the update data on the content distribution server can be obtained; the server responds to the gateway's update information request for the target application and returns update information to the gateway; the gateway receives the request sent by the target application, and The update information of the target application is carried in the response data and returned to the client, where the request includes the application identification of the target application; 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.
第五方面,本公开实施例中提供了一种数据更新系统,包括:服务器、网关和客户端,其中,服务器,用于将目标应用的更新数据上传至内容分发服务器,获取更新数据在内容分发服务器上的更新信息,并响应于网关针对目标应用的更新信息请求,向网关返回更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;网关,用于接收目标应用发送的请求,将目标应用的更新信息携带在响应数据中返回给客户端,其中,请求包括目标应用的应用标识;客户端,用于向网关发送携带有目标应用的应用标识的请求,接收网关返回的响应数据,获取网关添加在响应数据中的更新信息,根据更新信息确定是否更新目标应用。In a fifth aspect, an embodiment of the present disclosure provides a data update system, including: a server, a gateway, and a client. The server is used to upload update data of the target application to the content distribution server, and obtain the update data in the content distribution server. The update information on the server, and in response to the gateway's update information request for the target application, the update information is returned to the gateway, where the update information includes the first storage address and the first update timestamp that can obtain the update data on the content distribution server Information; gateway, used to receive the request sent by the target application, the update information of the target application is carried in the response data and returned to the client, where the request includes the application identification of the target application; the client is used to send the target carrying the target to the gateway The request for the application identifier of the application receives the response data returned by the gateway, obtains the update information added by the gateway to the response data, and determines whether to update the target application according to the update information.
第六方面,本公开实施例中提供了一种数据更新装置,包括:上传模块,被配置为将目标应用的更新数据上传至内容分发服务器;第一获取模块,被配置为获取更新数据在内容分发服务器上的更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;第一返回模块,被配置为响应于网关针对目标应用的更新信息请求,返回更新信息。In a sixth aspect, an embodiment of the present disclosure provides a data update device, including: an upload module configured to upload update data of a target application to a content distribution server; a first acquisition module configured to acquire update data in the content The update information on the distribution server, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data on the content distribution server; the first return module is configured to respond to the gateway’s response to the target application Update information request, return update information.
第七方面,本公开实施例中提供了一种数据更新装置,包括:第一接收模块,被配置为接收目标应用发送的请求,其中,请求包括目标应用的应用标识;第二返回模块,被配置为将目标应用的更新信息携带在响应数据中返回给客户端,其中,更新信息包括能够获取目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。In a seventh aspect, an embodiment of the present disclosure provides a data update device, including: a first receiving module configured to receive a request sent by a target application, wherein the request includes the application identifier of the target application; and a second return module, It is configured to carry the update information of the target application in the response data and return it to the client, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server.
第八方面,本公开实施例中提供了一种数据更新装置,包括:第二发送模块,被配置为向网关发送携带有目标应用的应用标识的请求;第三接收模块,被配置为接收网关返回的响应数据;第三获取模块,被配置为获取网关添加在响应数据中的更新信息,其中,更新信息包括能够获取目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;确定模块,被配置为根据更新信息确定是否更新目标应用。In an eighth aspect, an embodiment of the present disclosure provides a data update device, including: a second sending module configured to send a request carrying an application identifier of a target application to a gateway; and a third receiving module configured to receive the gateway Returned response data; the third obtaining module is configured to obtain the update information added by the gateway to the response data, where the update information includes the first storage address and the first update on the content distribution server that can obtain the update data of the target application Time stamp information; the determining module is configured to determine whether to update the target application according to the update information.
第九方面,本公开实施例提供了一种电子设备,包括存储器和处理器,其中,存储器用于存储一条或多条计算机指令,其中,一条或多条计算机指令被处理器执行以实现如第一方面、第二方面、第三方面至第四方面中任一项的方法。In a ninth aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer instructions, where one or more computer instructions are executed by the processor to achieve the following The method of any one of the first aspect, the second aspect, the third aspect to the fourth aspect.
第十方面,本公开实施例中提供了一种可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现如第一方面、第二方面、第三方面至第四方面中任一项的方法。In a tenth aspect, an embodiment of the present disclosure provides a readable storage medium with computer instructions stored thereon. When the computer instructions are executed by a processor, the first aspect, the second aspect, the third aspect to the fourth aspect are implemented. Any one of the methods.
根据本公开实施例提供的技术方案,缓解了服务器接收更新信息请求的压力,同时避免了客户端轮询主动请求更新数据方式中所产生的资源浪费的问题。According to the technical solution provided by the embodiments of the present disclosure, the pressure on the server to receive the update information request is alleviated, and at the same time, the problem of resource waste generated in the way that the client polls actively requests to update the data is avoided.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure.
结合附图,通过以下非限制性实施方式的详细描述,本公开的其它特征、目的和优点将变得更加明显。在附图中:With reference to the accompanying drawings, through the following detailed description of the non-limiting implementation manners, other features, purposes and advantages of the present disclosure will become more apparent. In the attached picture:
图1示出根据本公开实施例的数据更新方法的流程图;Fig. 1 shows a flowchart of a data update method according to an embodiment of the present disclosure;
图2示出根据本公开实施例的数据更新方法的流程图;Fig. 2 shows a flowchart of a data update method according to an embodiment of the present disclosure;
图3示出根据本公开实施例的数据更新方法的流程图;Fig. 3 shows a flowchart of a data update method according to an embodiment of the present disclosure;
图4示出根据本公开实施例的数据更新方法的流程图;Fig. 4 shows a flowchart of a data update method according to an embodiment of the present disclosure;
图5示出根据本公开的实施例的数据更新系统500的结构示意图;FIG. 5 shows a schematic structural diagram of a data update system 500 according to an embodiment of the present disclosure;
图6示出根据本公开的实施例的数据更新装置600的结构框图;FIG. 6 shows a structural block diagram of a
图7示出根据本公开的实施例的数据更新装置700的结构框图;FIG. 7 shows a structural block diagram of a
图8示出根据本公开的实施例的数据更新装置800的结构框图;FIG. 8 shows a structural block diagram of a
图9示出根据本公开的实施例的电子设备900的结构框图;FIG. 9 shows a structural block diagram of an
图10示出适于用来实现根据本公开实施例的数据更新方法的计算机系统的结构示意图。Fig. 10 shows a schematic structural diagram of a computer system suitable for implementing the data update method according to an embodiment of the present disclosure.
下文中,将参考附图详细描述本公开的示例性实施方式,以使本领域技术人员可容易地实现它们。此外,为了清楚起见,在附图中省略了与描述示例性实施方式无关的部分。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. In addition, for the sake of clarity, parts that are not related to the description of the exemplary embodiments are omitted in the drawings.
在本公开中,应理解,诸如“包括”或“具有”等的术语旨在指示本说明书中所公开的特征、数字、步骤、行为、部件、部分或其组合的存在,并且不欲排除一个或多个其他特征、数字、步骤、行为、部件、部分或其组合存在或被添加的可能性。In the present disclosure, it should be understood that terms such as "including" or "having" are intended to indicate the existence of the features, numbers, steps, actions, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude one The possibility of existence or addition of multiple other features, numbers, steps, behaviors, components, parts or combinations thereof.
另外还需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。In addition, it should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other if there is no conflict. Hereinafter, the present disclosure will be described in detail with reference to the drawings and in conjunction with the embodiments.
服务器主动推送更新数据方式中,由于服务器与客户端的网络有时会出现不稳定的情况,导致服务器与客户端之间的长链接不稳定,因此,需要不断重试链接,从而重新建立服务器与客户端的长链接。同时,随着客户端数量的增大,会使服务器推送更新数据的目标客户端增多,导致服务器推送更新数据的到达率、覆盖率和覆盖时间出现不可控的情况,因此,会耗费较多的资源。In the way that the server actively pushes the update data, the network between the server and the client sometimes becomes unstable, which causes the long link between the server and the client to be 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, as the number of clients increases, the number of target clients for the server to push updated data will increase, resulting in an uncontrollable situation in which the arrival rate, coverage rate, and coverage time of the server push updated data. Therefore, it will cost more Resources.
客户端轮询主动请求更新数据方式中,用户会通过缩短请求时间周期来获取服务器 快速的响应,导致客户端对服务器的请求快速增多,随着客户端的数量越来越多,服务器的压力会越来越大,同时还需要大量的数据库等资源的支撑,因此,会形成资源的浪费。In the client polling active request update data mode, the user will shorten the request time period to obtain the server's fast response, resulting in the rapid increase of client requests to the server. As the number of clients increases, the pressure on the server will increase. The larger the future, the support of a large number of resources such as databases is also required, and therefore, a waste of resources will be formed.
图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, upload the update data of the target application to the content distribution server;
在步骤S102中,获取更新数据在内容分发服务器上的更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;In step S102, obtain update information of the update data on the content distribution server, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data on the content distribution server;
在步骤S103中,响应于网关针对目标应用的更新信息请求,返回更新信息。In step S103, in response to the gateway's update information request 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, where 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. There is no specific limitation in the embodiments of the present disclosure. In order to relieve the pressure on the server and improve the response speed and hit rate of data requests, when the technical developer updates the target application, the update data of the target application can be uploaded to the content delivery 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 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 application identification of the target application and the corresponding update data can be uploaded to the CDN at the same time, where: 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 identification 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 Key corresponds to the application identification and 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 on the content distribution server that can obtain the update data. An update time stamp information, wherein the update data can be obtained by accessing the first storage address, and the first update time stamp corresponds to the time stamp of the update data uploaded to the CDN. The embodiment of 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 identification of the target application and the update information can be stored in association.
如上文所述,为了避免服务器主动推送更新数据或者客户端轮询主动请求更新数据两种方式出现的上述技术问题,根据本公开的实施例,可以设置网关周期性地向服务器发出目标应用的更新信息请求,本公开实施例对更新信息请求的周期不做具体限定,例 如,可以为1S。由于网关的数量远小于客户端的数量,从而缓解了服务器接收更新信息请求的压力。服务器响应于网关针对目标应用的更新信息请求,返回该目标应用最近一次的更新信息。为了标识不同目标应用对应的更新信息请求,更新信息请求可以携带目标应用的应用标识,服务器响应于网关针对目标应用的更新信息请求,并根据应用标识确定当前更新信息请求对应的目标应用,并将该目标应用的更新信息返回给网关。As mentioned above, in order to avoid the above-mentioned technical problems caused by the server actively pushing update data or the client polling actively requesting update data, according to the embodiment of the present disclosure, the gateway can be set to periodically send the update of the target application to the server. Information request, the embodiment of 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 gateway's request for update information of the target application, the server returns the latest update information of the target application. In order to identify the update information request corresponding to different target applications, the update information request can carry the application identification of the target application. The server responds to the gateway's update information request for the target application and determines the target application corresponding to the current update information request according to the application identification. The updated information of the target application is returned to the gateway.
需要说明的是,本公开实施例中提到的网关是服务器端的网关,也即服务器与外界进行通信的网关。客户端上的目标应用向目标应用的服务器端的网络请求均可以通过该网关进入该服务器端。It should be noted that the gateway mentioned in the embodiment of the present disclosure is a gateway on the server side, 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 of the target application can enter the server through the gateway.
根据本公开实施例提供的技术方案,缓解了服务器接收更新信息请求的压力,同时避免了客户端轮询主动请求更新数据方式中所产生的资源浪费的问题。According to the technical solution provided by the embodiments of the present disclosure, the pressure on the server to receive the update information request is alleviated, and at the same time, the problem of resource waste generated in the way that the client polls actively requests to update the data is avoided.
根据本公开的一实施例,更新信息包括更新数据在内容分发服务器上的第一存储地址和第一更新时间戳。该实施例中,网关可以从服务器返回的更新信息中直接获取第一存储地址和第一更新时间戳。并且通过第一更新时间戳可以确定目标应用的更新数据在CDN上的更新时间,访问第一存储地址可以从CDN上获取目标应用的更新数据。可以理解,虽然本公开实施例以第一存储地址采用统一资源定位符(Uniform Resource Locator,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 a first storage address of the update data on the content distribution server and a first update timestamp. In this embodiment, the gateway can directly obtain 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 through 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 embodiment of the present disclosure uses a uniform resource locator (Uniform Resource Locator, URL) representation form for the first storage address, and the first update timestamp is illustrated by obtaining milliseconds, the embodiment of the present disclosure is not limited to this. 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"), by accessing the first storage address "https://xxx.xx/a/1json.json", the updated data can be obtained, and the timestamp "1564114914423" of the updated data uploaded to the CDN can be obtained.
根据本公开的另一实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳;索引文件包括目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;更新数据包括目标应用的至少一个目标业务的更新数据。According to another embodiment 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; the index file includes the service identification and storage of at least one target service of the target application. Address and update timestamp; the update data includes 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, configuration center service, offline package service, and patch service. After one or more target businesses of the target application change, the developer can package the updated one or more target businesses in the form of updated data of the target business. The following will take the target business as a patch business or an offline package business as an example Note, but the embodiments of the present disclosure are not limited to this. For example, after the client obtains the update data of the patch service or offline package service, the target application can be updated on the local client. If there is only one target business, that is, the target application has only one target business changed, the update data of the target application includes the update data of this target business; if there are two or more target businesses, that is, the target application has If two or more target businesses have changed, the update data of the target application may include update data of one target business, may include update data of part of the target business, or may include update data of all target businesses.
根据本公开的实施例,由于目标应用的更新数据可以包括目标应用的一个或多个目 标业务的更新数据,为了区分不同目标业务的更新数据,可以建立索引文件存储不同目标业务的更新信息,其中,索引文件可以包括目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,其中,业务标识用于标识不同的目标业务,更新地址对应于该目标业务在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 embodiments 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 can be established to store the update information of different target services, where , The index file may include the service identifier, update address, and update timestamp of at least one target service of the target application, where 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 timestamp corresponds to the timestamp of the update data of the target service uploaded to the CDN. In the embodiment of the present disclosure, the corresponding data of the two target services in the target application will be changed, and the service identifier will be illustrated in the form of the service name, but the embodiment of the present disclosure is not limited to this. 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" and the appVersion is "7.20.4". The update address of the central business is "https://xxx.xx/b/1json.json", the update timestamp is "1563405958296", and the update address of the offline package business is "https://xxx.xx/b/2json. json", the update timestamp is "1564039123355", the index file of APP2 can be expressed as:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1563405958296;https://xxx.xx/b/1json.json"}。"crystal_config":"25230564-7.20.4-1563405958296; https://xxx.xx/b/1json.json"}.
根据本公开的上述实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳,网关在接收到该更新信息之后,可以通过访问第二存储地址获取索引文件,还可以通过第二更新时间戳确定索引文件的最新更新时间。在通过第二存储地址获取索引文件之后,还可以从索引文件中获取目标应用的至少一个目标业务的业务标识、更新地址和更新时间戳,例如,服务器最新上传至CDN的更新数据包括目标应用的目标业务A的更新数据时,可以通过索引文件获取目标业务A的更新数据在CDN上的第一存储地址以及第一更新时间戳。本公开实施例对第二存储地址采用的表示形式以及第二更新时间戳的获取方法不做具体限定。According to the above-mentioned embodiment 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 The index file is acquired, and the latest update time of the index file can also be determined through the second update timestamp. After the index file is obtained through the second storage address, the service identification, 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 latest update data uploaded by the server to the CDN includes information about the target application. When the data of the target service A is updated, the first storage address and the first update timestamp of the updated data of the target service A on the CDN can be obtained through the index file. The embodiment of 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.
根据本公开的实施例,所述步骤S102,即获取更新数据在内容分发服务器上的更新信息,包括以下步骤:获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳;根据第一存储地址和第一更新时间戳更新索引文件;将索引文件上传至内容分发服务器;获取第二存储地址和第二更新时间戳。According to an embodiment of the present disclosure, the step S102, that is, obtaining the update information of the update data on the content distribution server, includes the following steps: obtaining the first storage address and the first update timestamp of the update data on the content distribution server; Update the index file with the first storage address and the first update timestamp; upload the index file to the content distribution server; obtain 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 its update data to the CDN, and obtains its upload address, that is, the first storage address, and the upload timestamp, that is, from the CDN. The first update timestamp. Since the update data of the target application includes 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 acquired, and the The first storage address and the first update timestamp are associated and stored in the index file with the business identification of one or more target services in the update data. If the index file has been associated and stored corresponding to the business identification of one or more target services In the case of the entry, the current first storage address and the first update timestamp can be used to update the entry, that is, to update the current index file.
根据本公开的实施例,为了缓解服务器的压力,可以将该索引文件上传至CDN,并获取索引文件在CDN上的第二存储地址和第二更新时间戳,其中,第二更新时间戳对应于索引文件上传至CDN上的最新时间戳。通过访问第二存储地址就可以获取索引文件,进而可以从索引文件获取目标应用对应的一个或多个目标业务的更新信息,比如,与业务标识关联存储的第一存储地址和第一更新时间戳。当网关周期性地向服务器发出目标应用的更新信息请求时,服务器可以将索引文件在CDN上的第二存储地址和第二更新时间戳返回给网关。According to an 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 index file is uploaded to the latest timestamp on the CDN. The index file can be obtained by accessing the second storage address, and 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 a request for update information of the target application to the server, the server may return the second storage address and the second update timestamp of the index file on the CDN to the gateway.
根据本公开的实施例,所述根据第一存储地址和第一更新时间戳更新索引文件,还可被实施为:将索引文件中目标业务的业务标识所关联的更新地址和更新时间戳更新为第一存储地址和第一更新时间戳。According to an embodiment of the present disclosure, the update of the index file according to the first storage address and the first update timestamp may also be implemented as: update the update address and 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.
在本实施例中,索引文件中可以包括多个目标业务标识关联的更新信息,在其中一个或多个目标业务发生了更新时,可以根据上传至CDN的更新数据的第一存储地址和第一更新时间戳更新该索引文件中一个或多个目标业务的业务标识对应的更新信息。首先根据业务标识确定目标业务,然后将目标业务的更新地址更新为第一存储地址,并把更新时间戳更新为第一更新时间戳,从而完成索引文件的更新。例如,原有的索引文件为:In this embodiment, the index file may include update information associated with multiple target service identifiers. When one or more target services are updated, the index file may be updated according to the first storage address and the first storage address of the update data uploaded to the CDN. The update timestamp updates the update information corresponding to the service identification of one or more target services in the index file. First, the target service is determined according to the service identifier, and then the update address of the target service is updated to the first storage address, and the update timestamp is updated to the first update timestamp, thereby completing the update of the index file. For example, the original index file is:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1563405958296;https://xxx.xx/b/1json.json"}"crystal_config":"25230564-7.20.4-1563405958296; https://xxx.xx/b/1json.json"}
假设只有配置中心业务的业务文件发生改变,且第一存储地址为“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 business is changed, and the first storage address is "https://xxx.xx/b/3json.json" and the first update timestamp is "1564014914423", then the configuration center business update will be changed The 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 time Stamp "1564014914423" to obtain the updated index file as:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1564014914423;https://xxx.xx/b/3json.json"}。"crystal_config":"25230564-7.20.4-1564014914423; https://xxx.xx/b/3json.json"}.
图2示出根据本公开实施例的数据更新方法的流程图,数据更新方法在网关端执行。如图2所示,数据更新方法包括以下步骤S201-S202:Fig. 2 shows a flowchart of a data update method according to an embodiment of the present disclosure, and the data update method is executed at the gateway end. As shown in Figure 2, the data update method includes the following steps S201-S202:
在步骤S201中,接收目标应用发送的请求,其中,请求包括目标应用的应用标识;In step S201, a request sent by a target application is received, where the request includes an application identifier of the target application;
在步骤S202中,将目标应用的更新信息携带在响应数据中返回给客户端,其中,更新信息包括能够获取目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息。In step S202, the update information of the target application is carried in the response data and returned to the client, where the update information includes the first storage address and the first update timestamp that can obtain the update data of the target application on the content distribution server. information.
根据本公开的实施例,客户端上的目标应用发给目标应用的服务器端的请求,会先到达服务器端的网关,其中,目标应用可以是安装在客户端的任意一个能够进行网络通信的应用。为了确定目标应用是否存在更新信息,本公开实施例中,目标应用可以不用直接向服务器发送更新信息请求,而是由专门开发的软件开发工具包(Software Development Kit,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 that can perform network communication. In order to determine whether the target application has update information, in the embodiments of the present disclosure, the target application may not directly send an update information request to the server, but a specially developed software development kit (SDK) is sent to the target application by intercepting the target application. Any request from the server, and the application identifier of the target application is added to the request to obtain update information about the target application. The application identifier is used to identify different target applications and different versions of the same target application, and the application identifier may include the application Unique 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 application identifier carried in the request (for example, a 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 then 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 solution provided by the embodiments of the present disclosure, the problem of resource waste generated in the way that the client polls actively requests to 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 For the client, the response speed of update data is improved, so that multiple clients can achieve "second-level" updates at the same time. At the same time, the client sends a request to the server into a periodic request from the gateway to the server, which relieves the server from receiving update information. The pressure of the request.
根据本公开的一实施例,更新信息包括更新数据在内容分发服务器上的第一存储地址和第一更新时间戳。本公开的实施例的具体实现细节,可以参见上文中在服务器端执行的数据更新方法中的相关描述,此处不再赘述。According to an embodiment of the present disclosure, the update information includes a first storage address of the update data on the content distribution server and a first update timestamp. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
根据本公开的另一实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳;索引文件包括目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;更新数据包括目标应用的至少一个目标业务的更新数据。本公开的实施例的具体实现细节,可以参见上文中在服务器端执行的数据更新方法中的相关描述,此处不再赘述。According to another embodiment 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; the index file includes the service identification and storage of at least one target service of the target application. Address and update timestamp; the update data includes update data of at least one target service of the target application. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be 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. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
根据本公开的实施例,所述接收目标应用发送的请求之后,还包括以下步骤:According to an embodiment of the present disclosure, after receiving the request sent by the target application, the method further includes the following steps:
获取请求中携带的目标应用的应用标识;在本地应用列表中未存储应用标识时,将应用标识加入本地应用列表。Obtain 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.
根据本公开的实施例,由于客户端中目标应用发送给目标应用的服务器的所有请求 都会经过服务器侧的网关,首先网关可以从请求中获取目标应用的应用标识,然后判断本地应用列表中是否已经存储该目标应用的应用标识,其中,本地应用列表用于存储不同应用的应用标识,若已经存储了该目标应用的应用标识,则不用在本地应用列表中添加该应用标识;若没有存储该目标应用的应用标识,则在本地应用列表中加入该应用标识。本公开实施例对应用标识在本地应用列表中的存储方式不做具体限定,可以根据实际应用需要进行确定。According to the embodiment of the present disclosure, since all requests sent by the target application to the server of the target application in the client terminal will pass through the server-side gateway, the gateway can first obtain the application identification of the target application from the request, and then determine whether the local application list is already Store the application identification of the target application. The local application list is used to store the application identifications of different applications. If the application identification of the target application has been stored, the application identification does not need to be added to the local application list; if the target is not stored The application ID of the application is added to the local application list. The embodiment of the present disclosure does not specifically limit the storage manner of the application identifier in the local application list, and may be determined according to actual application requirements.
根据本公开的实施例,所述将目标应用的更新信息携带在响应数据中返回,包括以下步骤:根据应用标识确定本地是否存储有目标应用的更新信息;在本地存储有目标应用的更新信息时,将目标应用的更新信息携带在响应数据中返回给客户端。According to an embodiment of the present disclosure, carrying the update information of the target application in the response data and returning includes the following steps: determining 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 the 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. 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, thereby avoiding 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 the gateway will be used 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.
根据本公开的实施例,所述数据更新方法还包括以下步骤:周期性地向服务器发送目标应用的更新信息请求;接收服务器返回的目标应用的更新信息。According to an embodiment of the present disclosure, the data update method further includes the following steps: periodically sending a request for update information of the target application to the server; and receiving 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 embodiment of the present disclosure does not specifically limit the update information request period. It can be limited according to actual conditions, 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 gateway's request for update information of the target application, the server returns the update information of the target application, and 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 through the update information.
根据本公开的实施例,网关从服务器端获取到目标应用的更新信息时,可以删除存储在网关本地的原始更新信息,而将从服务器端获取到的更新信息存储在本地,以代替原始更新信息;或者,网关从服务器端获取到目标应用的更新信息时,可以根据从服务器端获取到的该更新信息是否已经存储在网关本地来确定是否存储从服务器端获取的该更新信息,具体地,若本地没有存储其中一个或多个目标应用的更新信息时,网关可以直接将该更新信息存储在网关本地;若本地存储了与该一个或多个目标应用对应的本地更新信息时,网关可以进一步将获取的更新信息中的第一更新时间戳与本地存储的本地更新信息中的本地时间戳进行比较,若更新信息中的第一更新时间戳晚于本地更新信息中的本地时间戳,表明从服务器获取的更新信息比本地存储的本地更新信息更新,则可以接受服务器返回的一个或多个目标应用的更新信息,并将该更新信息存储在网关本地,反之,表明本地存储的本地更新信息已经是最新的更新信息,则可以不存储该更新 信息。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 to replace the original update information. ; Or, when the gateway obtains the update information of the target application from the server, it can determine whether to store the update information obtained from the server according to whether the update information obtained from the server 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. The first update timestamp in the acquired update information is compared with the local timestamp in the locally stored local update information. If the first update timestamp in the update information is later than the local timestamp in the local update information, it indicates that the slave server The obtained update information is newer than the local update information stored locally, you can accept the update information of one or more target applications returned by the server and store the update information locally in the gateway. Otherwise, it indicates that the locally stored local update information is already The latest update information may not be stored.
图3示出根据本公开实施例的数据更新方法的流程图,数据更新方法在客户端执行。如图3所示,数据更新方法包括以下步骤S301-S304: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 client. As shown in Figure 3, the data update method includes the following steps S301-S304:
在步骤S301中,向网关发送携带有目标应用的应用标识的请求;In step S301, a request carrying the application identifier of the target application is sent to the gateway;
在步骤S302中,接收网关返回的响应数据;In step S302, the response data returned by the gateway is received;
在步骤S303中,获取网关添加在响应数据中的更新信息,其中,更新信息包括能够获取目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;In step S303, the update information added by the gateway to the response data is obtained, where the update information includes information capable of obtaining the first storage address and the first update timestamp of the update data of the target application on the content distribution server;
在步骤S304中,根据更新信息确定是否更新目标应用。In step S304, it is determined whether to update the target application according to the update information.
根据本公开的实施例,客户端中的目标应用向目标应用的服务器发送请求,请求会经过服务器端的网关再到达服务器,也即该请求先发送至服务器端的网关,其中,目标应用是指数据发生了更新的一个或多个应用,请求包括目标应用发出的任意请求。目标应用向服务器发送请求时,可以通过安装在本地的SDK拦截待发送出去的请求。为了了解目标应用是否存在更新信息,SDK可以在拦截下来的任意请求中携带目标应用的应用标识,并将该请求发送给服务器的网关,从而获取目标应用是否存在更新信息。由于请求包括包头和请求正文,可以将目标应用的应用标识携带在请求的包头中发送给服务器的网关。同理,在客户端获取网关返回的响应数据之后,也可以通过SDK从响应数据中获取目标应用的更新信息。其中,应用标识用于标识不同的目标应用的不同版本,应用标识可以包括应用唯一标识(appKey)和应用发布版本号(appVersion)。客户端可以是手持终端设备、笔记本电脑、蜂窝电话、智能电话、无线数据卡、个人数字助理电脑、平板型电脑、无绳电话、物联网设备(IOT设备)或是其他可以接入网络的终端设备,在本公开实施例中不做具体限定。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 server-side gateway before reaching the server, that is, the request is first sent to the server-side gateway, where the target application refers to the data generation If one or more applications are updated, the request includes any request issued 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 update information, the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the server's gateway, so as to obtain whether the target application has update 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. In the same way, after the client obtains the response data returned by the gateway, the update information of the target application can also be obtained 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). The client can be a handheld terminal device, a laptop computer, a cellular phone, a smart phone, a wireless data card, a personal digital assistant computer, a tablet computer, a cordless phone, an Internet of Things device (IOT device) or other terminal devices that can access the network There is no specific limitation in the embodiments of the present disclosure.
根据本公开的实施例,当网关接收到目标应用发送的请求之后,可以从该请求的包头中获取携带的应用标识,进而将该应用标识与网关本地所存储的应用标识进行比较。如果本地存储有该应用标识对应的更新信息,则在该请求的响应数据中携带该更新信息后返回给客户端。由于响应数据包括包头和正文,可以将目标应用的更新信息携带在响应数据的包头中返回给客户端。客户端在响应信息中获取更新信息,其中,更新信息包括能够获取目标应用的更新数据在CDN上的第一存储地址和第一更新时间戳的信息,其中,通过访问第一存储地址就可以获取更新数据,第一更新时间戳对应于更新数据上传至CDN上的时间戳。本公开实施例对第一存储地址采用的表示形式以及第一更新时间戳的获取方法不做具体限定。According to the embodiments of the present disclosure, after the gateway receives the request sent by the target application, it can obtain the application identifier carried in the 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 then 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 first storage address and the first update timestamp information on the CDN that can obtain the update data of the target application, where it can be obtained by accessing the first storage address The data is updated, and the first update timestamp corresponds to the timestamp when the update data is uploaded to the CDN. The embodiment of 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 update information of the target application locally, it can be determined that the update information obtained from the gateway corresponds to Whether the update data has been updated locally, if it has been updated, no processing is required. 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 can be updated locally The application is updated; of course, you can also record the update information first, and then update it in batches.
根据本公开实施例提供的技术方案,避免了客户端轮询主动请求更新数据方式中所产生的资源浪费的问题,同时,网关根据目标应用发送的请求中携带的目标应用的应用标识,直接在响应数据中携带目标应用的更新信息并返回给客户端,从而使客户端根据更新信息确定是否需要更新目标应用。According to the technical solution provided by the embodiments of the present disclosure, the problem of resource waste generated in the way that the client polls actively requests to update data is avoided. At the same time, the gateway directly sends the application identifier of the target application according to the application identifier of the target application carried in the request sent by the target application. The response data carries the update information of the target application and is returned to the client, so that the client can determine whether the target application needs to be updated according to the update information.
根据本公开的一实施例,更新信息包括更新数据在内容分发服务器上的第一存储地址和第一更新时间戳。本公开的实施例的具体实现细节,可以参见上文中在服务器端执行的数据更新方法中的相关描述,此处不再赘述。According to an embodiment of the present disclosure, the update information includes a first storage address of the update data on the content distribution server and a first update timestamp. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
根据本公开的另一实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳;索引文件包括目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;更新数据包括目标应用的至少一个目标业务的更新数据。本公开的实施例的具体实现细节,可以参见上文中在服务器端执行的数据更新方法中的相关描述,此处不再赘述。According to another embodiment 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; the index file includes the service identification and storage of at least one target service of the target application. Address and update timestamp; the update data includes update data of at least one target service of the target application. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be 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. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
根据本公开的实施例,所述步骤S301,即向网关发送携带有目标应用的应用标识的请求,包括以下步骤:拦截目标应用向服务器发送的请求;将目标应用的应用标识携带在请求中发送至服务器的网关。According to an embodiment of the present disclosure, the step S301, that is, sending a request carrying the application identifier of the target application to the gateway, includes the following steps: intercepting the request sent by the target application to the server; carrying the application identifier of the target application in the request and sending Gateway to the server.
根据本公开的实施例,客户端中的目标应用向服务器发送请求时,可以通过安装在本地的SDK拦截待发送出去的请求。为了了解目标应用是否存在更新信息,SDK可以在拦截下来的任意请求中携带目标应用的应用标识,并将该请求发送给服务器的网关,从而获取目标应用的更新信息。由于请求包括包头和包正文,可以将目标应用的应用标识携带在请求的包头中发送给服务器的网关。同理,在客户端获取网关返回的响应数据之后,也可以通过SDK从响应数据中获取目标应用的更新信息。According to the embodiment 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 through 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 server's gateway 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 request header and sent to the server's gateway. In the same way, after the client obtains the response data returned by the gateway, the update information of the target application can also be obtained from the response data through the SDK.
根据本公开的实施例,所述步骤S304,即根据更新信息确定是否更新目标应用,还可被实施为:在第一更新时间戳晚于目标应用在本地的第三更新时间戳时,记录目标应用有更新数据。在本实施例中,由于有些目标应用只需要确认是否已经更新,不需要立即下载该目标应用的更新数据。当第一更新时间戳晚于第三更新时间戳时,其中,第三更新时间戳可以是最近一次从CDN下载并对目标应用进行更新的更新数据的第一更新时间戳,可以确定本地存储的目标应用的更新数据发生了更新,可以先将该情况记录下来,以便在之后适当的时候进行下载并安装目标应用的更新数据。According to an embodiment of the present disclosure, the step S304, that is, determining whether to update the target application according to the update information, can also be implemented as: when the first update timestamp is later than the third update timestamp of the target application locally, recording the target The app has updated data. In this embodiment, since some target applications only need to confirm whether they have been updated, there is no need to download the update data of the target application immediately. When the first update timestamp is later than the third update timestamp, where the third update timestamp may be the first update timestamp of the update data that was most recently downloaded from the CDN and updated the target application, and the locally stored If the update data of the target application has been 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.
根据本公开的实施例,所述步骤S304,即根据更新信息确定是否更新目标应用,还可被实施为:在第一更新时间戳晚于目标应用在本地的第三更新时间戳时,从第一存储地址下载目标应用的更新数据;根据目标应用的更新数据更新目标应用。在本实施例中,可以通过比较第一更新时间戳与本地第三更新时间戳,其中,第三更新时间戳可以是最近一次从CDN下载并对目标应用进行更新的更新数据的第一更新时间戳,来确定是否下载并安装该目标应用的更新数据。具体地,当第一更新时间戳晚于本地第三更新时间戳时,表明目标数据的更新数据相较于本地目标应用对应的更新数据有更新,因此可以从第一存储地址下载目标应用的更新数据,并根据目标应用的更新数据更新目标应用。According to an embodiment of the present disclosure, the step S304, which is to determine whether to update the target application according to the update information, can also be implemented as: when the first update timestamp is later than the third update timestamp of the target application locally A storage address downloads the update data of the target application; the target application is updated according to the update data of the target application. In this embodiment, the first update timestamp may be compared with the local third update timestamp, where the third update timestamp may be the first update time of the update data that was most recently downloaded from the CDN and updated the target application Stamp to determine whether to download and install the updated data of the target application. Specifically, when the first update timestamp is later than the third local update timestamp, it indicates that the update data of the target data is updated compared to 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 updated data of the target application.
根据本公开的实施例,所述步骤S304,即根据更新信息确定是否更新目标应用,包括以下步骤:在第二更新时间戳晚于本地索引文件的第四更新时间戳时,从第二存储地址下载索引文件;根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新目标应用。According to an embodiment of the present disclosure, the step S304, that is, determining whether to update the target application according to the update information, includes the following steps: when the second update timestamp is later than the fourth update timestamp of the local index file, from the second storage address Download the index file; 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.
根据本公开的实施例,客户端可以存储最近一次从服务器获取的目标应用对应的本地索引文件以及该本地索引文件在CDN上的第四更新时间戳,该索引文件中记载的目标应用的一个或多个目标业务的更新数据已经在本地目标应用上被更新过。当从网关获取的更新信息包括目标应用对应的索引文件以及索引文件在CDN上的第二存储地址以及第二更新时间戳时,可以通过比较第二更新时间戳与本地存储的本地索引文件的第四更新时间戳,其中,第四更新时间戳对应于本地索引文件上传至CDN上的时间戳,来确定从网关获取的索引文件是否发生了更新。具体地,当第二更新时间戳晚于第四更新时间戳时,表明从网关获取的索引文件相较于本地存储的本地索引文件有更新,因此可以从第二存储地址下载最新的索引文件。According to an embodiment of the present disclosure, the client can store the local index file corresponding to the target application last obtained from the server and the fourth update timestamp of the local index file on the CDN, and one or more of the target applications recorded in the index file The updated data of multiple target services has 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 first update timestamp of the local index file stored locally. Four update timestamps, where the fourth update timestamp corresponds to the timestamp when the local index file is uploaded to the CDN 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 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 index file stores the service identifier, the first storage address, and the first update timestamp of at least one target service in association, when the index file is updated, it indicates that at least one target service stored in the index file has occurred. Update, so that 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 local index file stored locally.
根据本公开的实施例,所述根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新目标应用,包括以下步骤:在第一更新时间戳晚于本地存储的至少一个目标业务对应的第五更新时间戳时,从第一存储地址下载目标业务的更新数据;根据目标业务的更新数据更新目标业务。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 the following steps: the first update timestamp is later than at least one stored locally At the fifth update timestamp corresponding to the target service, download the update data of the target service from the first storage address; update the target service according to the update data of the target service.
根据本公开的实施例,由于在本地存储了最近一次更新目标应用时从服务器下载的本地索引文件,且本地索引文件关联存储目标应用的至少一个目标业务的业务标识和第五更新时间戳,其中,第五更新时间戳对应于本地存储的目标业务的更新数据上传至 CDN上的时间戳。当从第二存储地址下载的索引文件关联存储至少一个目标业务的业务标识、第一存储地址和第一更新时间戳时,可以通过比较第一更新时间戳与本地索引文件中目标业务的更新数据的第五更新时间戳,来确定是否下载并安装该目标业务的更新数据。具体地,当第一更新时间戳晚于第五更新时间戳时,表明目标业务的更新数据相较于本地索引文件中该目标业务对应的更新数据有更新,因此可以从第一存储地址下载该目标业务的更新数据,并根据更新数据对目标应用的目标业务进行更新。According to the embodiment of the present disclosure, 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 timestamp of at least one target service of the target application in association with each other. , 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 stores the service identifier of at least one target service, the first storage address, and the first update timestamp in association, the first update timestamp 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 timestamp is later than the fifth update timestamp, 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. Therefore, the update data can be downloaded from the first storage address. Update data of the target business, and update the target business of the target application according to the updated data.
例如:本地存储的本地索引文件1如下:For example: the local index file 1 stored locally is as follows:
{"speedboat_offline_deploy":25230564-7.20.4-1564036123355;{"speedboat_offline_deploy":25230564-7.20.4-1564036123355;
https://xxx.xx/b/22json.json",https://xxx.xx/b/22json.json",
"crystal_config":"25230564-7.20.4-1563405658296;https://xxx.xx/b/21json.json"}"crystal_config":"25230564-7.20.4-1563405658296; https://xxx.xx/b/21json.json"}
从第二存储地址获取的索引文件2如下:The index file 2 obtained from the second storage address is as follows:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1563405958296;https://xxx.xx/b/1json.json"}"crystal_config":"25230564-7.20.4-1563405958296; https://xxx.xx/b/1json.json"}
对于配置中心业务,由于第一更新时间戳“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 first storage address "https: //xxx.xx/b/1json.json" to download 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, it is not necessary to download the update data of the target service immediately, for example, offline package services and patch services only need to obtain update messages, but do not need to download the update of the target service immediately Therefore, according to the embodiment of the present disclosure, step S902, which is to 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, can also be implemented as: at the first update time When the stamp is later than or equal to the fifth update timestamp corresponding to at least one target service stored locally, it is recorded that the target service has update data.
例如:本地存储的本地索引文件1如下:For example: the local index file 1 stored locally is as follows:
{"speedboat_offline_deploy":25230564-7.20.4-1564036123355;{"speedboat_offline_deploy":25230564-7.20.4-1564036123355;
https://xxx.xx/b/22json.json",https://xxx.xx/b/22json.json",
"crystal_config":"25230564-7.20.4-1563405658296;https://xxx.xx/b/21json.json"}"crystal_config":"25230564-7.20.4-1563405658296; https://xxx.xx/b/21json.json"}
从第二存储地址获取的索引文件2如下:The index file 2 obtained from the second storage address is as follows:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1563405958296;https://xxx.xx/b/1json.json"}"crystal_config":"25230564-7.20.4-1563405958296; https://xxx.xx/b/1json.json"}
对于离线包业务,由于第一更新时间戳“1564039123355”晚于第五更新时间戳“1564036123355”,因此,可以确定本地存储的离线包业务的更新数据发生了更新,可以先将该情况记录下来,以便在之后适当的时候进行下载并安装(例如批量从服务器下 载目标业务的更新数据,并批量对目标应用的多个目标业务进行更新)。当用户需要下载离线包业务的更新数据时,可以进一步从第一存储地址“https://xxx.xx/b/2json.json”下载配置离线包业务的更新数据。For offline packet services, since the first update timestamp "1564039123355" is later than the fifth update timestamp "1564036123355", it can be determined that the update data of offline packet services stored locally has been updated, and this situation can be recorded first. In order to download and install at an appropriate time later (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 for configuring the offline package service from the first storage address "https://xxx.xx/b/2json.json".
图4示出根据本公开实施例的数据更新方法的流程图。如图4所示,数据更新方法包括以下步骤S401-S404:Fig. 4 shows a flowchart of a data update method according to an embodiment of the present disclosure. As shown in Figure 4, the data update method includes the following steps S401-S404:
在步骤S401中,服务器将目标应用的更新数据上传至内容分发服务器,并获取更新数据在内容分发服务器上的更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;In step S401, 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, where the update information includes the first storage address that can obtain the update data on the content distribution server And the information of the first update timestamp;
在步骤S402中,服务器响应于网关针对目标应用的更新信息请求,向网关返回更新信息;In step S402, the server returns update information to the gateway in response to the gateway's update information request for the target application;
在步骤S403中,网关接收目标应用发送的请求,并将目标应用的更新信息携带在响应数据中返回给客户端,其中,请求包括目标应用的应用标识;In step S403, the gateway receives the request sent by the target application, and returns the update information of the target application to the client in response data, where the request includes the application identifier of the target application;
在步骤S404中,客户端获取网关添加在响应数据中的更新信息,并根据更新信息确定是否更新目标应用。In step S404, the client obtains the update information added by the gateway to 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, where 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. There is no specific limitation in the embodiments of the present disclosure. In order to relieve the pressure on the server and improve the response speed and hit rate of data requests, when the technical developer updates the target application, the update data of the target application can be uploaded to the CDN through the server. The target application refers to the data update. For one or more applications, 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 can upload the application identification of the target application and the corresponding update data to the CDN at the same time, where 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 identification 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 Key corresponds to the application identification and Value corresponds to the update data.
根据本公开的实施例,服务器将目标应用的更新数据上传至CDN之后,服务器可以进一步获取更新数据在CDN上的更新信息,更新信息包括能够获取更新数据在CDN上的第一存储地址和第一更新时间戳的信息,其中,通过访问第一存储地址就可以获取更新数据,第一更新时间戳对应于更新数据上传至CDN上的时间戳。本公开实施例对第一存储地址采用的表示形式以及第一更新时间戳的获取方法不做具体限定。为了标识不同目标应用的更新数据对应的更新信息,可以将目标应用的应用标识和更新信息进行 关联存储。According to an 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. The update information includes the first storage address and the first storage address of the CDN that can obtain the update data. Update the information of the timestamp, where the update data can be obtained by accessing the first storage address, and the first update timestamp corresponds to the timestamp of the update data uploaded to the CDN. The embodiment of 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 identification of the target application and the update information can be stored in association.
如上文所述,为了避免服务器主动推送更新数据或者客户端轮询主动请求更新数据两种方式出现的上述技术问题,根据本公开的实施例,可以设置网关周期性地向服务器发出目标应用的更新信息请求,本公开实施例对更新信息请求的周期不做具体限定,例如,可以为1S。由于网关的数量远小于客户端的数量,从而缓解了服务器接收更新信息请求的压力。服务器响应于网关针对目标应用的更新信息请求,返回该目标应用最近一次的更新信息。为了标识不同目标应用对应的更新信息请求,更新信息请求可以携带目标应用的应用标识,服务器响应于网关针对目标应用的更新信息请求,并根据应用标识确定当前更新信息请求对应的目标应用,并将该目标应用的更新信息返回给网关。As mentioned above, in order to avoid the above-mentioned technical problems caused by the server actively pushing update data or the client polling actively requesting update data, according to the embodiment of the present disclosure, the gateway can be set to periodically send the update of the target application to the server. Information request, the embodiment of 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 gateway's request for update information of the target application, the server returns the latest update information of the target application. In order to identify the update information request corresponding to different target applications, the update information request can carry the application identification of the target application. The server responds to the gateway's update information request for the target application and determines the target application corresponding to the current update information request according to the application identification. The updated information of the target application is returned to the gateway.
需要说明的是,本公开实施例中提到的网关是服务器端的网关,也即服务器与外界进行通信的网关。客户端上的目标应用向目标应用的服务器端的网络请求均可以通过该网关进入该服务器端。客户端可以是手持终端设备、笔记本电脑、蜂窝电话、智能电话、无线数据卡、个人数字助理电脑、平板型电脑、无绳电话、物联网设备(IOT设备)或是其他可以接入网络的终端设备,在本公开实施例中不做具体限定。It should be noted that the gateway mentioned in the embodiment of the present disclosure is a gateway on the server side, 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 of the target application can enter the server through the gateway. The client can be a handheld terminal device, a laptop computer, a cellular phone, a smart phone, a wireless data card, a personal digital assistant computer, a tablet computer, a cordless phone, an Internet of Things device (IOT device) or other terminal devices that can access the network There is no specific limitation in the embodiments of 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 of the target application will first reach the gateway of the server. In order to determine whether the target application has update information, in the embodiments of the present disclosure, the target application on the client does not need to directly send an update information request to the server. Instead, the specially developed SDK on the client intercepts the target application sent to the server. Any request, and add the application identifier of the target application 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 carry the application identifier of the target application in the header of the request and send it to the server.
根据本公开的实施例,当网关接收到客户端上的目标应用发送的请求数据之后,可以从该请求(例如包头)中获取携带的应用标识,进而将该应用标识与网关本地所存储的应用标识进行比较。如果网关本地存储有该应用标识对应的更新信息,则网关在该请求数据的响应数据中携带更新信息后返回给客户端。由于响应数据包括包头和正文,网关可以将目标应用的更新信息携带在响应数据的包头中返回给客户端。According to the embodiment 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 in the gateway. Identifies 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 the 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 can be judged whether the update data corresponding to the update information obtained from the gateway has been updated locally on the client. If it has been updated, it can not be processed. If it has not been updated, the client can obtain the update information from the gateway. The first storage address in downloads the update data of the target application, and updates the target application locally; of course, the client can also record the update information first, and then update it in batches.
根据本公开实施例提供的技术方案,避免了客户端轮询主动请求更新数据方式中所产生的资源浪费问题,且网关直接在响应数据中携带着存储在网关本地的目标应用的更新信息并返回给客户端,从而使客户端根据更新信息确定是否需要更新目标应用,提高 了更新数据的响应速度,从而使多个客户端同时实现“秒级”更新,同时,将客户端向服务器发送请求转化为网关周期性向服务器发起请求,缓解了服务器接收更新信息请求的压力。According to the technical solution provided by the embodiments of the present disclosure, the problem of resource waste generated in the way that the client polls actively requests to 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 determine whether it needs to update the target application according to the update information, which improves the response speed of the update data, so that multiple clients can achieve "second-level" updates at the same time, and at the same time, the client sends a request to the server to convert In order for the gateway to periodically initiate requests to the server, the pressure on the server to receive requests for updated information is relieved.
根据本公开的一实施例,更新信息包括更新数据在内容分发服务器上的第一存储地址和第一更新时间戳。本公开的实施例的具体实现细节,可以参见上文中在服务器端执行的数据更新方法中的相关描述,此处不再赘述。According to an embodiment of the present disclosure, the update information includes a first storage address of the update data on the content distribution server and a first update timestamp. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
根据本公开的另一实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳;索引文件包括目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;更新数据包括目标应用的至少一个目标业务的更新数据。本公开的实施例的具体实现细节,可以参见上文中在服务器端执行的数据更新方法中的相关描述,此处不再赘述。According to another embodiment 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; the index file includes the service identification and storage of at least one target service of the target application. Address and update timestamp; the update data includes update data of at least one target service of the target application. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be 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. For the specific implementation details of the embodiments of the present disclosure, reference may be made to the relevant description in the data update method executed on the server side above, which will not be repeated here.
根据本公开的实施例,所述步骤S401中的获取更新数据在内容分发服务器上的更新信息,包括以下步骤:服务器获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳;服务器根据第一存储地址和第一更新时间戳更新索引文件;服务器将索引文件上传至内容分发服务器;服务器获取第二存储地址和第二更新时间戳。According to an embodiment of the present disclosure, obtaining the update information of the update data on the content distribution server in the step S401 includes the following steps: the server obtains the first storage address and the 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.
根据本公开的实施例,在目标应用的某个或多个目标业务被更新之后,服务器将其更新数据上传至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 its update data to the CDN, and obtains its upload address, that is, the first storage address, and the upload timestamp, 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 adds The first storage address and the first update timestamp are associated and stored in the index file with the service identification of one or more target services in the update data. If the index file has already associated and stored the service identification of one or more target services For the corresponding entry, the current first storage address and the first update timestamp can be used to update the entry, that is, to update the current index file.
根据本公开的实施例,为了缓解服务器的压力,服务器可以将该索引文件上传至CDN,并获取索引文件在CDN上的第二存储地址和第二更新时间戳,其中,第二更新时间戳对应于索引文件上传至CDN上的时间戳。通过访问第二存储地址就可以获取索引文件,进而可以从索引文件获取目标应用对应的一个或多个目标业务的更新信息,比如,与业务标识关联存储的第一存储地址和第一更新时间戳。当网关周期性地向服务器发出目标应用的更新信息请求时,服务器可以将索引文件在CDN上的第二存储地址和第二更新时间戳返回给网关。According to the embodiment of the present disclosure, in order to relieve the pressure of 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 is uploaded to the CDN. The index file can be obtained by accessing the second storage address, and 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 a request for update information of the target application to the server, the server may return the second storage address and the second update timestamp of the index file on the CDN to the gateway.
根据本公开的实施例,所述服务器根据第一存储地址和第一更新时间戳更新索引文 件,还可被实施为:服务器将索引文件中目标业务的业务标识所关联的更新地址和更新时间戳更新为第一存储地址和第一更新时间戳。According to an embodiment of the present disclosure, the server updates the index file according to the first storage address and the first update timestamp, which may also be implemented as: the server updates the update address and update timestamp associated with the service identifier of the target service in the index file The update is 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. When one or more of the target services is updated, the server may according to the first storage address and the first storage address of the update data uploaded to the CDN. An update timestamp updates the update information corresponding to the service identification 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 timestamp to the first update timestamp, thereby completing the update of the index file. For example, the original index file is:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1563405958296;https://xxx.xx/b/1json.json"}"crystal_config":"25230564-7.20.4-1563405958296; https://xxx.xx/b/1json.json"}
假设只有配置中心业务的业务文件发生改变,且第一存储地址为“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 The 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" to obtain the updated index file as:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1564014914423;https://xxx.xx/b/3json.json"}。"crystal_config":"25230564-7.20.4-1564014914423; https://xxx.xx/b/3json.json"}.
根据本公开的实施例,所述步骤S403,即网关接收目标应用发送的请求,并将目标应用的更新信息携带在响应数据中返回给客户端,还包括以下步骤:网关获取请求中携带的目标应用的应用标识;在本地应用列表中未存储应用标识时,网关将应用标识加入本地应用列表;网关获取请求中携带的目标应用的应用标识;在本地应用列表中未存储应用标识时,网关将应用标识加入本地应用列表。According to the embodiment of the present disclosure, the step S403, that is, the gateway receives the request sent by the target application, and returns the update information of the target application in the response data to the client, and further includes the following step: the gateway obtains the target carried in the request The application identifier of the application; 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 obtains 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 ID is added to the local application list.
根据本公开的实施例,由于客户端中目标应用发送给目标应用的服务器的所有请求都会经过服务器端的网关,首先网关可以从请求中获取目标应用的应用标识,然后判断网关本地应用列表中是否已经存储该目标应用的应用标识,其中,本地应用列表用于存储不同应用的应用标识,若网关已经存储了该目标应用的应用标识,则不用在本地应用列表中添加该应用标识;若网关没有存储该目标应用的应用标识,则在本地应用列表中加入该应用标识。本公开实施例对应用标识在本地应用列表中的存储方式不做具体限定,可以根据实际应用需要进行确定。According to the embodiments of the present disclosure, since all requests sent by the target application to the server of the target application in the client terminal will pass through the server-side gateway, the gateway can first obtain the application identification of the target application from the request, and then determine whether the local application list of the gateway is already 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 already stored the application identifier of the target application, there is no need to add the application identifier 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 embodiment of the present disclosure does not specifically limit the storage manner of the application identifier in the local application list, and may be determined according to actual application requirements.
根据本公开的实施例,当网关获取应用标识之后,首先确定网关本地是否存储了目标应用的更新信息,若本地存储有目标应用的更新信息时,直接将目标应用的更新信息携带在响应数据中返回给客户端,从而避免了客户端直接向服务器请求目标应用的更新 信息;若网关本地没有存储目标应用的更新信息时,则本次可以不在响应数据中携带该更新信息,而是在下一周期由网关向服务器请求并获取该目标应用的更新信息之后,网关在响应数据中携带该更新信息并返回给客户端。According to the embodiment of the present disclosure, after the gateway obtains the application identifier, it first determines whether the gateway locally stores the update information of the target application. 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.
根据本公开的实施例,所述数据更新方法还包括以下步骤:网关周期性地向服务器发送目标应用的更新信息请求;网关接收服务器返回的目标应用的更新信息。According to an embodiment of the present disclosure, the data update method further includes the following steps: 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.
根据本公开的实施例,网关根据本地应用列表中存储的目标应用的应用标识,周期性地向服务器发送目标应用的更新信息请求,其中,本公开实施例对更新信息请求周期不做具体限定,可以根据实际情况进行限定,例如,可以为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 embodiment of the present disclosure does not specifically limit the update information request period. It can be limited according to actual conditions, 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 gateway's request for update information of the target application, the server returns the update information of the target application, and 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 through the update information.
根据本公开的实施例,网关从服务器端获取到目标应用的更新信息时,可以删除存储在网关本地的原始更新信息,而将从服务器端获取到的更新信息存储在本地,以代替原始更新信息;或者,网关从服务器端获取到目标应用的更新信息时,可以根据从服务器端获取到的该更新信息是否已经存储在网关本地来确定是否存储从服务器端获取的该更新信息,具体地,若网关本地没有存储其中一个或多个目标应用的更新信息时,网关可以直接将该更新信息存储在网关本地;若网关本地存储了与该一个或多个目标应用对应的本地更新信息时,网关可以进一步将获取的更新信息中的第一更新时间戳与本地存储的本地更新信息中的本地时间戳进行比较,若更新信息中的第一更新时间戳晚于本地更新信息中的本地时间戳,表明网关从服务器获取的更新信息比网关本地存储的本地更新信息更新,则网关可以接受服务器返回的一个或多个目标应用的更新信息,并将该更新信息存储在网关本地,反之,表明网关本地存储的本地更新信息已经是最新的更新信息,则网关可以不存储该更新信息。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 to replace the original update information. ; Or, when the gateway obtains the update information of the target application from the server, it can determine whether to store the update information obtained from the server according to whether the update information obtained from the server 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 The first update timestamp in the obtained update information is further compared with the local timestamp in the locally stored local update information. If the first update timestamp in the update information is later than the local timestamp in the local update information, it indicates The update information that the gateway obtains from the server is newer than the local update information stored locally in 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. Otherwise, it indicates that the gateway stores locally. If the local update information of is already the latest update information, the gateway may not store the update information.
根据本公开的实施例,所述数据更新方法还包括以下步骤:客户端向网关发送携带有目标应用的应用标识的请求;客户端接收网关返回的响应数据。According to an embodiment of the present disclosure, the data update method further includes the following steps: the client sends a request carrying the application identifier of the target application to the gateway; 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 passes through the server-side gateway and then reaches the server, that is, the request is first sent to the server-side gateway. When the target application in the client sends a request to the server, it can intercept the request to be sent through the SDK installed locally in the client. In order to know whether the target application in the client has update information, the SDK can carry the application identifier of the target application in any intercepted request, and send the request to the server's gateway to obtain whether the target application has update 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. In the same way, after the client obtains the response data returned by the gateway, the update information of the target application can also be obtained from the response data through the SDK.
根据本公开的实施例,所述客户端向网关发送携带有目标应用的应用标识的请求, 包括以下步骤:客户端拦截目标应用向服务器发送的请求;客户端将目标应用的应用标识携带在请求中发送至服务器的网关。According to an embodiment of the present disclosure, the client sends a request carrying the application identification of the target application to the gateway, including the following steps: the client intercepts the request sent by the target application to the server; the client carries the application identification of the target application in the request The gateway sent to the server in the.
根据本公开的实施例,客户端中的目标应用向服务器发送请求时,可以通过安装在本地的SDK拦截待发送出去的请求。为了了解目标应用是否存在更新信息,SDK可以在拦截下来的任意请求中携带目标应用的应用标识,并将该请求发送给服务器的网关,从而获取目标应用的更新信息。由于请求包括包头和包正文,客户端可以将目标应用的应用标识携带在请求的包头中发送给服务器的网关。According to the embodiment 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 through 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 server's gateway to obtain the update information of the target application. Since the request includes a packet header and a packet body, the client can carry the application identifier of the target application in the request header and send it to the server's gateway.
根据本公开的实施例,所述步骤S404,即客户端根据更新信息确定是否更新目标应用,还可被实施为:在第一更新时间戳晚于目标应用在本地的第三更新时间戳时,客户端记录目标应用有更新数据。在本实施例中,由于有些目标应用只需要确认是否已经更新,不需要立即下载该目标应用的更新数据。当第一更新时间戳晚于第三更新时间戳时,其中,第三更新时间戳可以是最近一次从CDN下载并对目标应用进行更新的更新数据的第一更新时间戳,可以确定本地存储的目标应用的更新数据发生了更新,客户端可以先将该情况记录下来,以便在之后适当的时候进行下载目标应用的更新数据并安装。According to an embodiment of the present disclosure, the step S404, that is, the client determines whether to update the target application according to the update information, can also be implemented as: when the first update timestamp is later than the third update timestamp of the target application locally, 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, there is no need to download the update data of the target application immediately. When the first update timestamp is later than the third update timestamp, where the third update timestamp may be the first update timestamp of the update data that was most recently downloaded from the CDN and updated the target application, and the locally stored If the update data of the target application is updated, the client can record the situation first, so that the update data of the target application can be downloaded and installed at an appropriate time later.
根据本公开的实施例,所述步骤S404,即客户端根据更新信息确定是否更新目标应用,还可被实施为:在第一更新时间戳晚于目标应用在本地的第三更新时间戳时,客户端从第一存储地址下载目标应用的更新数据;客户端根据目标应用的更新数据更新目标应用。在本实施例中,可以通过比较第一更新时间戳与本地第三更新时间戳,其中,第三更新时间戳可以是最近一次从CDN下载并对目标应用进行更新的更新数据的第一更新时间戳,来确定是否下载并安装该目标应用的更新数据。具体地,当第一更新时间戳晚于本地第三更新时间戳时,表明目标数据的更新数据相较于本地目标应用对应的更新数据有更新,因此客户端可以从第一存储地址下载目标应用的更新数据,并根据目标应用的更新数据更新目标应用。According to an embodiment of the present disclosure, the step S404, that is, the client determines whether to update the target application according to the update information, can also be implemented as: when the first update timestamp is later than the third update timestamp of the target application locally, 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 timestamp may be compared with the local third update timestamp, where the third update timestamp may be the first update time of the update data that was most recently downloaded from the CDN and updated the target application Stamp to determine whether to download and install the updated data of the target application. Specifically, when the first update timestamp is later than the third local update timestamp, it indicates that the update data of the target data is updated compared to 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.
根据本公开的实施例,所述步骤S404,即客户端根据更新信息确定是否更新目标应用,包括以下步骤:在第二更新时间戳晚于本地索引文件的第四更新时间戳时,客户端从第二存储地址下载索引文件;客户端根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新目标应用。According to an embodiment of the present disclosure, the step S404, that is, the client determines whether to update the target application according to the update information, includes the following steps: when the second update timestamp is later than the fourth update timestamp of the local index file, the client starts from The index file is downloaded at the second storage address; the client terminal determines 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.
根据本公开的实施例,客户端可以存储最近一次从服务器获取的目标应用对应的本地索引文件以及该本地索引文件在CDN上的第四更新时间戳,该索引文件中记载的目标应用的一个或多个目标业务的更新数据已经在本地目标应用上被更新过。当客户端从网关获取的更新信息包括目标应用对应的索引文件以及索引文件在CDN上的第二存储地址以及第二更新时间戳时,可以通过比较第二更新时间戳与本地存储的本地索引文件的第四更新时间戳,其中,第四更新时间戳对应于本地索引文件上传至CDN上的时间戳,来确定从网关获取的索引文件是否发生了更新。具体地,当第二更新时间戳晚于第 四更新时间戳时,表明客户端从网关获取的索引文件相较于本地存储的本地索引文件有更新,因此客户端可以从第二存储地址下载最新的索引文件。According to an embodiment of the present disclosure, the client can store the local index file corresponding to the target application last obtained from the server and the fourth update timestamp of the local index file on the CDN, and one or more of the target applications recorded in the index file The updated data of multiple target services has 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 of, where the fourth update timestamp corresponds to the timestamp of the local index file uploaded to the CDN 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. Therefore, the client can download the latest update from the second storage address. Index file.
根据本公开的实施例,由于索引文件关联存储至少一个目标业务的业务标识、第一存储地址和第一更新时间戳,当索引文件有更新时,表明索引文件中存储的至少一个目标业务发生了更新,从而客户端可以根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳以及本地存储的本地索引文件中该目标业务的业务标识对应的更新时间戳来确定是否更新目标应用。According to the embodiment of the present disclosure, since the index file stores the service identifier, the first storage address, and the first update timestamp of at least one target service in association, when the index file is updated, it indicates that at least one target service stored in the index file has occurred. Update, so that 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.
根据本公开的实施例,所述客户端根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新目标应用,包括以下步骤:在第一更新时间戳晚于本地存储的至少一个目标业务对应的第五更新时间戳时,客户端从第一存储地址下载目标业务的更新数据;客户端根据目标业务的更新数据更新目标业务。According to an embodiment of the present disclosure, 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, including the following steps: the first update timestamp is later than the locally stored When the fifth update timestamp corresponding to 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.
根据本公开的实施例,由于客户端在本地存储了最近一次更新目标应用时从服务器下载的本地索引文件,且本地索引文件关联存储目标应用的至少一个目标业务的业务标识和第五更新时间戳,其中,第五更新时间戳对应于、客户端本地存储的目标业务的更新数据上传至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 associatedly stores the service identifier and the fifth update timestamp of at least one target service of the target application , Where the fifth update timestamp corresponds to the timestamp at which the update data of the target service stored locally in the client is uploaded to the CDN. When the index file downloaded by the client from the second storage address stores the service identification of at least one target service, the first storage address, and the first update timestamp in association, the first update timestamp can be compared with the target service information 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 timestamp is later than the fifth update timestamp, 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. Therefore, the client can download from the first storage address Download the updated data of the target business, and update the target business of the target application according to the updated data.
例如:客户端本地存储的本地索引文件1如下:For example: the local index file 1 stored locally on the client is as follows:
{"speedboat_offline_deploy":25230564-7.20.4-1564036123355;{"speedboat_offline_deploy":25230564-7.20.4-1564036123355;
https://xxx.xx/b/22json.json",https://xxx.xx/b/22json.json",
"crystal_config":"25230564-7.20.4-1563405658296;https://xxx.xx/b/21json.json"}"crystal_config":"25230564-7.20.4-1563405658296; https://xxx.xx/b/21json.json"}
客户端从第二存储地址获取的索引文件2如下:The index file 2 obtained by the client from the second storage address is as follows:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1563405958296;https://xxx.xx/b/1json.json"}"crystal_config":"25230564-7.20.4-1563405958296; https://xxx.xx/b/1json.json"}
对于配置中心业务,由于第一更新时间戳“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 download from 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 client's target application only need to confirm whether they have been updated, there is no need to download the update data of the target business immediately. For example, offline package services and patch services only need to obtain update messages, and the client does not need to download the update immediately. The update data of the target service. Therefore, according to the embodiment of the present disclosure, 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 at least one target service in the index file, which can also be implemented as : When the first update timestamp is later than or equal to the fifth update timestamp corresponding to at least one target service stored locally, the client terminal records that the target service has update data.
例如:客户端本地存储的本地索引文件1如下:For example: the local index file 1 stored locally on the client is as follows:
{"speedboat_offline_deploy":25230564-7.20.4-1564036123355;{"speedboat_offline_deploy":25230564-7.20.4-1564036123355;
https://xxx.xx/b/22json.json",https://xxx.xx/b/22json.json",
"crystal_config":"25230564-7.20.4-1563405658296;https://xxx.xx/b/21json.json"}"crystal_config":"25230564-7.20.4-1563405658296; https://xxx.xx/b/21json.json"}
客户端从第二存储地址获取的索引文件2如下:The index file 2 obtained by the client from the second storage address is as follows:
{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;{"speedboat_offline_deploy":25230564-7.20.4-1564039123355;
https://xxx.xx/b/2json.json",https://xxx.xx/b/2json.json",
"crystal_config":"25230564-7.20.4-1563405958296;https://xxx.xx/b/1json.json"}"crystal_config":"25230564-7.20.4-1563405958296; https://xxx.xx/b/1json.json"}
对于离线包业务,由于第一更新时间戳“1564039123355”晚于第五更新时间戳“1564036123355”,因此,可以确定客户端本地存储的离线包业务的更新数据发生了更新,客户端可以先将该情况记录下来,以便在之后适当的时候进行下载并安装(例如批量从服务器下载目标业务的更新数据,并批量对目标应用的多个目标业务进行更新)。当用户需要下载离线包业务的更新数据时,可以进一步从第一存储地址“https://xxx.xx/b/2json.json”下载配置离线包业务的更新数据。For offline packet services, since the first update timestamp "1564039123355" is later than the fifth update timestamp "1564036123355", it can be determined that the update data of offline packet services stored locally on the client has been updated, and the client can first Record the situation so that it can be downloaded and installed at an appropriate time later (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 for configuring the offline package service from the first storage address "https://xxx.xx/b/2json.json".
图5示出根据本公开的实施例的数据更新系统500的结构示意图。如图5所示,数据更新系统包括服务器501、网关502和客户端503,其中,FIG. 5 shows a schematic structural diagram of a data update system 500 according to an embodiment of the present disclosure. As shown in Figure 5, the data update system includes a server 501, a gateway 502, and a client 503.
服务器501,用于将目标应用的更新数据上传至内容分发服务器,获取更新数据在内容分发服务器上的更新信息,并响应于网关针对目标应用的更新信息请求,向网关返回更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;The server 501 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 gateway's update information request for the target application, return the update information to the gateway, where the update The information includes information capable of obtaining the first storage address and the first update timestamp of the update data on the content distribution server;
网关502,用于接收目标应用发送的请求,将目标应用的更新信息携带在响应数据中返回给客户端,其中,请求包括目标应用的应用标识;The gateway 502 is configured to receive a request sent by the target application, carry the update information of the target application in the response data and return it to the client, where the request includes the application identifier of the target application;
客户端503,用于向网关发送携带有目标应用的应用标识的请求,接收网关返回的响应数据,获取网关添加在响应数据中的更新信息,根据更新信息确定是否更新目标应用。The client 503 is configured to send a request carrying the application identifier of the target application to the gateway, receive response data returned by the gateway, obtain update information added by the gateway to the response data, 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 on the server side, that is, the 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. The client can be a handheld terminal device, a laptop computer, a cellular phone, a smart phone, a wireless data card, a personal digital assistant computer, a tablet computer, a cordless phone, an Internet of Things device (IOT device) or other terminal devices that can access the network There is no specific limitation in the embodiments of the present disclosure.
根据本公开的实施例,更新信息包括更新数据在内容分发服务器上的第一存储地址和第一更新时间戳。According to an embodiment of the present disclosure, the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
根据本公开的实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳;索引文件包括目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;更新数据包括目标应用的至少一个目标业务的更新数据。According to an embodiment 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; the index file includes the service identification, storage address, and storage address of at least one target service of the target application. Update time stamp; the update data includes update data of at least one target service of the target application.
根据本公开的实施例,服务器用于获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳,根据第一存储地址和第一更新时间戳更新索引文件,将索引文件上传至内容分发服务器,获取第二存储地址和第二更新时间戳。According to an embodiment of the present disclosure, the server is configured to obtain 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, and upload the index file to The content distribution server obtains the second storage address and the second update timestamp.
根据本公开的实施例,服务器用于将索引文件中目标业务的业务标识所关联的更新地址和更新时间戳更新为第一存储地址和第一更新时间戳。According to an embodiment of the present disclosure, the server is configured to update the update address and update timestamp associated with the service identification of the target service in the index file to the first storage address and the first update timestamp.
根据本公开的实施例,网关用于获取请求中携带的目标应用的应用标识,在本地应用列表中未存储应用标识时,将应用标识加入本地应用列表,根据应用标识确定本地是否存储有目标应用的更新信息,在本地存储有目标应用的更新信息时,将目标应用的更新信息携带在响应数据中返回给客户端。According to an embodiment of the present disclosure, the gateway is used to obtain the application identification of the target application carried in the request, and when the application identification is not stored in the local application list, the application identification is added to the local application list, and the application identification is used to determine whether the target application is stored locally 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, the gateway is used 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.
根据本公开的实施例,客户端用于向网关发送携带有目标应用的应用标识的请求,并接收网关返回的响应数据。According to an embodiment of the present disclosure, the client is used to send a request carrying the application identifier of the target application to the gateway, and receive response data returned by the gateway.
根据本公开的实施例,客户端用于拦截目标应用向服务器发送的请求,并将目标应用的应用标识携带在请求中发送至服务器的网关。According to the embodiment of the present disclosure, the client is used to intercept the request sent by the target application to the server, and carry the application identifier of the target application in the request and send it to the gateway of the server.
根据本公开的实施例,客户端用于在第一更新时间戳晚于目标应用在本地的第三更新时间戳时,记录目标应用有更新数据。According to an embodiment of the present disclosure, the client is used to record that the target application has update data when the first update timestamp is later than the third update timestamp of the target application locally.
根据本公开的实施例,客户端用于在第一更新时间戳晚于目标应用在本地的第三更新时间戳时,从第一存储地址下载目标应用的更新数据,根据目标应用的更新数据更新目标应用。According to an embodiment of the present disclosure, the client is configured to download the update data of the target application from the first storage address when the first update timestamp is later than the third update timestamp of the target application locally, and update according to the update data of the target application Target application.
根据本公开的实施例,客户端在第二更新时间戳晚于本地索引文件的第四更新时间戳时,从第二存储地址下载索引文件,根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新目标应用。According to an embodiment of the present disclosure, 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, according to the corresponding service identifier of at least one target service in the index file The first update timestamp determines whether to update the target application.
根据本公开的实施例,客户端在第一更新时间戳晚于本地存储的至少一个目标业务对应的第五更新时间戳时,记录目标业务有更新数据。According to an embodiment of the present disclosure, when the first update timestamp is later than the fifth update timestamp corresponding to at least one target service stored locally, the client records the update data of the target service.
根据本公开的实施例,客户端在第一时间戳晚于本地存储的至少一个目标业务对应的第五更新时间戳时,从第一存储地址下载目标业务的更新数据,根据目标业务的更新数据更新目标业务。According to an embodiment of the present disclosure, when the first time stamp is later than the fifth update time stamp corresponding to at least one target service stored locally, the client downloads the update data of the target service from the first storage address, and then downloads the update data of the target service according to the update data of the target service. Update the target business.
根据本公开的实施例,目标业务包括配置中心业务、离线包业务和补丁业务。According to an embodiment of the present disclosure, target services include configuration center services, offline package services, and patch services.
本公开实施例中的数据更新系统与图4所示实施例及相关实施例的数据更新方法对应一致,具体细节参见上述图4所示的数据更新方法,在此不再赘述。The data update system in the embodiment of the present disclosure corresponds to the data update method of the embodiment shown in FIG. 4 and related embodiments. For specific details, refer to the data update method shown in FIG. 4 above, which will not be repeated here.
图6示出根据本公开的实施例的数据更新装置600的结构框图。其中,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图6所示,数据更新装置包括上传模块610、第一获取模块620和第一返回模块630。FIG. 6 shows a structural block diagram of a
上传模块610,被配置为将目标应用的更新数据上传至内容分发服务器;The upload
第一获取模块620,被配置为获取更新数据在内容分发服务器上的更新信息,其中,更新信息包括能够获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;The first obtaining
第一返回模块630,被配置为响应于网关针对目标应用的更新信息请求,返回更新信息。The
根据本公开的实施例,更新信息包括更新数据在内容分发服务器上的第一存储地址和第一更新时间戳。According to an embodiment of the present disclosure, the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
根据本公开的实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳;索引文件包括目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;更新数据包括目标应用的至少一个目标业务的更新数据。According to an embodiment 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; the index file includes the service identification, storage address, and storage address of at least one target service of the target application. Update time stamp; the update data includes update data of at least one target service of the target application.
根据本公开的实施例,获取更新数据在内容分发服务器上的更新信息,包括:获取更新数据在内容分发服务器上的第一存储地址和第一更新时间戳;根据第一存储地址和第一更新时间戳更新索引文件;将索引文件上传至内容分发服务器;获取第二存储地址和第二更新时间戳。According to an embodiment of the present disclosure, obtaining the update information of the update data on the content distribution server includes: obtaining the first storage address and the first update timestamp of the update data on the content distribution server; according to the first storage address and the first update Update the index file with the timestamp; upload 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, updating the index file according to the first storage address and the first update timestamp includes: updating the update address and 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. An update timestamp.
根据本公开的实施例,目标业务包括配置中心业务、离线包业务和补丁业务。According to an embodiment of the present disclosure, target services include configuration center services, offline package services, and patch services.
本公开实施例中的数据更新装置与图1所示实施例及相关实施例的数据更新方法对应一致,具体细节参见上述图1所示的数据更新方法,在此不再赘述。The data update device in the embodiment of the present disclosure corresponds to the data update method of the embodiment shown in FIG. 1 and related embodiments. For specific details, refer to the data update method shown in FIG. 1 above, which will not be repeated here.
图7示出根据本公开的实施例的数据更新装置700的结构框图。其中,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图7所示,数据更新装置包括第一接收模块710和第二返回模块720。FIG. 7 shows a structural block diagram of a
第一接收模块710,被配置为接收目标应用发送的请求,其中,请求包括目标应用的应用标识;The
第二返回模块720,被配置为将目标应用的更新信息携带在响应数据中返回给客户端,其中,更新信息包括能够获取目标应用的更新数据在内容分发服务器上的第一存储 地址和第一更新时间戳的信息。The
根据本公开的实施例,更新信息包括更新数据在内容分发服务器上的第一存储地址和第一更新时间戳。According to an embodiment of the present disclosure, the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
根据本公开的实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳;索引文件包括目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;更新数据包括目标应用的至少一个目标业务的更新数据。According to an embodiment 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; the index file includes the service identification, storage address, and storage address of at least one target service of the target application. Update time stamp; the update data includes update data of at least one target service of the target application.
根据本公开的实施例,将目标应用的更新信息携带在响应数据中返回给客户端,包括:根据应用标识确定本地是否存储有目标应用的更新信息;在本地存储有目标应用的更新信息时,将目标应用的更新信息携带在响应数据中返回给客户端。According to the embodiment of the present disclosure, carrying the update information of the target application in the response data and returning it to the client includes: determining 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 the embodiment of the present disclosure, it further includes:
第二获取模块730,被配置为获取请求中携带的目标应用的应用标识;The second obtaining
加入模块740,被配置为在本地应用列表中未存储应用标识时,将应用标识加入本地应用列表。The adding
根据本公开的实施例,还包括:According to the embodiment of the present disclosure, it further includes:
第一发送模块750,被配置为周期性地向服务器发送目标应用的更新信息请求;The
第二接收模块760,被配置为接收服务器返回的目标应用的更新信息。The
根据本公开的实施例,目标业务包括配置中心业务、离线包业务和补丁业务。According to an embodiment of the present disclosure, target services include configuration center services, offline package services, and patch services.
本公开实施例中的数据更新装置与图3所示实施例及相关实施例的数据更新方法对应一致,具体细节参见上述图3所示的数据更新方法,在此不再赘述。The data update device in the embodiment of the present disclosure corresponds to the data update method of the embodiment shown in FIG. 3 and related embodiments. For specific details, refer to the data update method shown in FIG. 3 above, which will not be repeated here.
图8示出根据本公开的实施例的数据更新装置800的结构框图。其中,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图8所示,数据更新装置包括第二发送模块810、第三接收模块820、第三获取模块830和确定模块840。FIG. 8 shows a structural block diagram of a
第二发送模块810,被配置为向网关发送携带有目标应用的应用标识的请求;The
第三接收模块820,被配置为接收网关返回的响应数据;The
第三获取模块830,被配置为获取网关添加在响应数据中的更新信息,其中,更新信息包括能够获取目标应用的更新数据在内容分发服务器上的第一存储地址和第一更新时间戳的信息;The third obtaining
确定模块840,被配置为根据更新信息确定是否更新目标应用。The determining
根据本公开的实施例,更新信息包括更新数据在内容分发服务器上的第一存储地址和第一更新时间戳。According to an embodiment of the present disclosure, the update information includes a first storage address of the update data on the content distribution server and a first update timestamp.
根据本公开的实施例,更新信息包括目标应用对应的索引文件在内容分发服务器上的第二存储地址和第二更新时间戳;索引文件包括目标应用的至少一个目标业务的业务标识、存储地址和更新时间戳;更新数据包括目标应用的至少一个目标业务的更新数据。According to an embodiment 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; the index file includes the service identification, storage address, and storage address of at least one target service of the target application. Update time stamp; the update data includes update data of at least one target service of the target application.
根据本公开的实施例,向网关发送携带有目标应用的应用标识的请求,包括:拦截 目标应用向服务器发送的请求;将目标应用的应用标识携带在请求中发送至服务器的网关。According to an embodiment of the present disclosure, 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; carrying the application identifier of the target application in the request and sending it to the gateway of the server.
根据本公开的实施例,根据更新信息和目标应用在本地第三更新时间戳确定是否更新目标应用,包括:在第一更新时间戳晚于目标应用在本地的第三更新时间戳时,记录目标应用有更新数据。According to an embodiment of the present disclosure, determining whether to update the target application according to the update information and the local third update timestamp of the target application includes: recording the target when the first update timestamp is later than the third update timestamp of the target application locally The app has updated data.
根据本公开的实施例,根据更新信息和目标应用在本地的第三更新时间戳确定是否更新目标应用,包括:在第一更新时间戳晚于目标应用在本地的第三更新时间戳时,从第一存储地址下载目标应用的更新数据;根据目标应用的更新数据更新目标应用。According to an embodiment of the present disclosure, 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 timestamp is later than the third update timestamp of the target application locally, from Download the update data of the target application at the first storage address; update the target application according to the update data of the target application.
根据本公开的实施例,根据更新信息和目标应用在本地的第三更新时间戳确定是否更新目标应用,包括:在第二更新时间戳晚于本地索引文件的第四更新时间戳时,从第二存储地址下载索引文件;根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新目标应用。According to an embodiment of the present disclosure, 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 timestamp is later than the fourth update timestamp of the local index file, starting from the first 2. Download the index file from the storage address; 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.
根据本公开的实施例,根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新目标应用,包括:在第一更新时间戳晚于本地存储的至少一个目标业务对应的第五更新时间戳时,记录目标业务有更新数据。According to an embodiment of the present disclosure, 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 first update timestamp is later than the locally stored at least one target service corresponding to When the fifth time stamp is updated, the update data of the target business is recorded.
根据本公开的实施例,根据索引文件中至少一个目标业务的业务标识对应的第一更新时间戳确定是否更新目标应用,包括:在第一更新时间戳晚于本地存储的至少一个目标业务对应的第五更新时间戳时,从第一存储地址下载目标业务的更新数据;根据目标业务的更新数据更新目标业务。According to an embodiment of the present disclosure, 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 first update timestamp is later than the locally stored at least one target service corresponding to When the fifth time stamp is updated, the update data of the target service is downloaded 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, target services include configuration center services, offline package services, and patch services.
本公开实施例中的数据更新装置与图7所示实施例及相关实施例的数据更新方法对应一致,具体细节参见上述图7所示的数据更新方法,在此不再赘述。The data update device in the embodiment of the present disclosure corresponds to the data update method of the embodiment shown in FIG. 7 and related embodiments. For specific details, refer to the data update method shown in FIG. 7 above, which will not be repeated here.
本公开还公开了一种电子设备,图9示出根据本公开的实施例的电子设备900的结构框图。The present disclosure also discloses an electronic device, and FIG. 9 shows a structural block diagram of an
如图9所示,电子设备900包括存储器901和处理器902;其中,As shown in FIG. 9, the
存储器901用于存储一条或多条计算机指令,其中,一条或多条计算机指令被处理器902执行以实现根据本公开的实施例的任一方法。The
图10示出适于用来实现根据本公开实施例的数据更新方法的计算机系统的结构示意图。Fig. 10 shows a schematic structural diagram of a computer system suitable for implementing the data update method according to an embodiment of the present disclosure.
如图10所示,计算机系统1000包括中央处理单元(CPU)1001,其可以根据存储在只读存储器(ROM)1002中的程序或者从存储部分1008加载到随机访问存储器(RAM)1003中的程序而执行上述实施例中的各种处理。在RAM1003中,还存储有系统1000操作所需的各种程序和数据。CPU1001、ROM1002以及RAM1003通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。As shown in FIG. 10, the
以下部件连接至I/O接口1005:包括键盘、鼠标等的输入部分1006;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1007;包括硬盘等的存储部分1008;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1009。通信部分1009经由诸如因特网的网络执行通信处理。驱动器1010也根据需要连接至I/O接口1005。可拆卸介质1011,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1010上,以便于从其上读出的计算机程序根据需要被安装入存储部分1008。The following components are connected to the I/O interface 1005: an
特别地,根据本公开的实施例,上文描述的所有方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,计算机程序包含用于执行上述对象类别确定方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分1009从网络上被下载和安装,和/或从可拆卸介质1011被安装。In particular, according to the embodiments of the present disclosure, all the methods described above can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly embodied on a machine-readable medium, and the computer program includes program code for executing the foregoing object category determination method. In such an embodiment, the computer program may be downloaded and installed from the network through the
附图中的流程图和框图,图示了按照本公开各种实施方式的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,路程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the route diagram or block diagram can represent a module, program segment, or part of the code, and the module, program segment, or part of the code contains one or more executables that are used to implement the specified logical functions. instruction. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
描述于本公开实施方式中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The units or modules involved in the embodiments described in the present disclosure can be implemented in software or hardware. 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 under certain circumstances.
作为另一方面,本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施方式中电子设备或计算机系统中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,程序被一个或者一个以上的处理器用来执行描述于本公开的方法。As another aspect, the present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be the computer-readable storage medium included in the electronic device or computer system in the above-mentioned embodiments; or it may exist alone. , A computer-readable storage medium that is not installed in the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the methods described in the present disclosure.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover the technical solutions described above without departing from the inventive concept. Other technical solutions formed by arbitrarily combining equivalent features. For example, the above-mentioned features and the technical features disclosed in the present disclosure (but not limited to) having similar functions are replaced with each other to form a technical solution.
Claims (78)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910878239.1 | 2019-09-17 | ||
| 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 |
|---|---|
| WO2021051747A1 true WO2021051747A1 (en) | 2021-03-25 |
Family
ID=70203773
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/076892 Ceased WO2021051747A1 (en) | 2019-09-17 | 2020-02-27 | Data update method, system and device, electronic device, and computer storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN111026416A (en) |
| WO (1) | WO2021051747A1 (en) |
Cited By (1)
| 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 |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111723062A (en) * | 2020-06-28 | 2020-09-29 | 天津联想协同科技有限公司 | File synchronization method, device and storage medium |
| CN112000850B (en) * | 2020-08-26 | 2024-02-20 | 杭州海康威视系统技术有限公司 | Methods, devices, systems and equipment for data processing |
| 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 |
| CN114519090B (en) * | 2020-11-20 | 2023-11-21 | 马上消费金融股份有限公司 | Method and device for managing stop words and electronic equipment |
| CN112838980B (en) * | 2020-12-30 | 2023-06-13 | 北京奇艺世纪科技有限公司 | 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 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103380593A (en) * | 2012-12-22 | 2013-10-30 | 华为技术有限公司 | Method, apparatus, a device for processing business in system updating process |
| CN105511889A (en) * | 2016-01-15 | 2016-04-20 | 珠海金山网络游戏科技有限公司 | General game version incremental updating system and method |
| WO2017063143A1 (en) * | 2015-10-13 | 2017-04-20 | 深圳还是威健康科技有限公司 | Method and device for updating data, terminal and server |
| 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 |
Family Cites Families (4)
| 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 |
| CN103973475B (en) * | 2013-02-05 | 2018-07-06 | 腾讯科技(深圳)有限公司 | Different patch packet generation method and method for down loading, server, client |
| US9940122B2 (en) * | 2015-12-22 | 2018-04-10 | Intel Corporation | Dynamic data difference generation and distribution |
| CN109697075A (en) * | 2017-10-20 | 2019-04-30 | 北京京东尚科信息技术有限公司 | File updating method, system and device |
-
2019
- 2019-09-17 CN CN201910878239.1A patent/CN111026416A/en active Pending
-
2020
- 2020-02-27 WO PCT/CN2020/076892 patent/WO2021051747A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103380593A (en) * | 2012-12-22 | 2013-10-30 | 华为技术有限公司 | Method, apparatus, a device for processing business in system updating process |
| WO2017063143A1 (en) * | 2015-10-13 | 2017-04-20 | 深圳还是威健康科技有限公司 | Method and device for updating data, terminal and server |
| CN105511889A (en) * | 2016-01-15 | 2016-04-20 | 珠海金山网络游戏科技有限公司 | General game version incremental updating system and method |
| 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 |
Cited By (2)
| 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 |
| US12244678B2 (en) | 2022-04-07 | 2025-03-04 | T-Mobile Usa, Inc. | Content management systems providing zero recovery point objective |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111026416A (en) | 2020-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021051747A1 (en) | Data update method, system and device, electronic device, and computer storage medium | |
| CN110311983B (en) | Service request processing method, device and system, electronic equipment and storage medium | |
| US9282137B2 (en) | Dynamic package creation for predictive page load optimization | |
| US10069942B2 (en) | Method and apparatus for changing configurations | |
| CN111611091A (en) | A service invocation method, device and medium of a business object | |
| KR101389101B1 (en) | Method and apparatus for tracking device management data changes | |
| CN102984278B (en) | Realize the system and method that browser data synchronizes | |
| US20200059353A1 (en) | Data fetching in data exchange networks | |
| JP2016508322A (en) | Advertisement processing method and apparatus | |
| WO2012151993A1 (en) | Service pushing method and device | |
| CN110661857B (en) | Data synchronization method and device | |
| JP5109901B2 (en) | Session data sharing method | |
| WO2024066503A1 (en) | Service invocation method and apparatus | |
| US10805427B1 (en) | Backup and restore of customer devices | |
| CN114138895B (en) | Data synchronization method and device for multiple data sources, computer equipment and storage medium | |
| CN103024049A (en) | System capable of achieving browser data synchronization | |
| CN103036989B (en) | Socket server and socket service methods | |
| CN103024051A (en) | Device, method for server dispensing and corresponding system | |
| CN103064899B (en) | A kind of distribution information database system | |
| CN113296968B (en) | Address list updating method, device, medium and electronic equipment | |
| CN114979025A (en) | Resource refreshing method, device and equipment and readable storage medium | |
| HK40019640A (en) | A data updating method, system, device, electronic apparatus and computer storage medium | |
| CN114500485B (en) | Data processing method and device | |
| CN103036990B (en) | a browser client | |
| US12056450B1 (en) | Message content reduction using message templates |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20865919 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20865919 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20865919 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 201022) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20865919 Country of ref document: EP Kind code of ref document: A1 |