Resource updating method and device, electronic equipment and storage medium
1. A method for resource update, comprising:
acquiring resource positioning identification data of a resource to be updated, and generating cache resource identification data based on the resource positioning identification data;
determining life cycle data of the resource to be updated, and generating target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the life cycle data;
if the local cache resource identification data identical to the cache resource identification data is detected to exist, verifying the target resource identification data;
and if the target resource identification data passes the verification, deleting the resource to be updated corresponding to the local cache resource identification data, and acquiring the updated resource corresponding to the target resource identification data so as to update the resource to be updated through the updated resource.
2. The resource updating method according to claim 1, wherein the method further comprises:
and sending the target resource identification data to a service source station, so as to generate updated resource positioning identification data corresponding to the target resource identification data and the resource positioning identification data through the service source station, and issuing the updated resource positioning identification data to realize linkage update of the resource positioning identification data.
3. The resource updating method according to claim 1, wherein the generating target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the lifetime data comprises:
acquiring service identification data and resource attribute data corresponding to the resource to be updated;
and encrypting the cache resource identification data, the life cycle data, the service identification data and the resource attribute data to obtain the target resource identification data.
4. The resource updating method according to claim 1, wherein deleting the resource to be updated corresponding to the local cache resource identification data if the target resource identification data passes verification comprises:
generating a cache hit table corresponding to the target resource identification data, and recording the states of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data through the cache hit table;
when the target resource identification data is verified, current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the target resource identification data is determined;
and if the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the target resource identification data are detected to be successfully processed, determining that the target resource identification data pass verification, and deleting the resource to be updated corresponding to the local cache resource identification data.
5. The resource updating method according to claim 4, wherein determining that the target resource identification data passes verification if it is detected that all current processing status data of the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data in the target resource identification data are successfully processed comprises:
decrypting the target resource identification data to obtain the cache resource identification data, life cycle data, service identification data and resource attribute data;
acquiring target cache resource identification data, target life cycle data, target service identification data and target resource attribute data corresponding to the resource positioning identification data;
if the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are detected to respectively correspond to the target cache resource identification data, the target life cycle data, the target service identification data and the target resource attribute data, determining that the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are all the processing success, and determining that the target resource identification data passes the verification.
6. The resource updating method according to claim 1, wherein the obtaining of the updated resource corresponding to the target resource identification data to update the resource to be updated by the updated resource comprises:
receiving a page request for updating the resource positioning identification data;
and sending the page request to a target node so that the target node merges the page request, and acquiring an update resource corresponding to the page request from the service source station so as to update the resource to be updated through the update resource.
7. The resource updating method according to claim 1, wherein the method further comprises:
determining the updating frequency of the resource to be updated according to the updating states of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the cache hit table;
acquiring an updating frequency threshold of the resource to be updated;
and deleting the resource to be updated corresponding to the local cache resource identification data when detecting that the updating frequency of the resource to be updated is smaller than the updating frequency threshold.
8. A resource updating apparatus, comprising:
the data acquisition module is used for acquiring resource positioning identification data of the resource to be updated and generating cache resource identification data based on the resource positioning identification data;
the data generation module is used for determining life cycle data of the resource to be updated and generating target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the life cycle data;
the data verification module is used for verifying the target resource identification data if the local cache resource identification data identical to the cache resource identification data is detected to exist;
and the data updating module is used for deleting the resource to be updated corresponding to the local cache resource identification data if the target resource identification data passes the verification, and acquiring the updated resource corresponding to the target resource identification data so as to update the resource to be updated through the updated resource.
9. An electronic device, comprising:
a processor; and
a memory having stored thereon computer readable instructions which, when executed by the processor, implement the resource updating method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the resource updating method according to any one of claims 1 to 7.
Background
With the increasing maturity of internet technology, the status of data caching and data distribution in network communication becomes more and more important. Consequently, content distribution networks that integrate data storage, data distribution, and data load balancing play an increasingly important role in the internet.
However, in a technical solution for updating resources related to a Content Delivery Network (CDN), an update or delete instruction is issued through a management system interface in the Content Delivery Network, and a cache node deletes or replaces a cache resource after receiving the update or delete instruction, or changes a resource name or updates a resource access path. In the former resource updating method, all cache nodes need to be issued layer by a resource updating or deleting instruction through a management system, such as cross-cache nodes and cross-internet data centers, so that the resource updating efficiency is low and the consistency of resource updating is poor; the latter resource updating method has the problems of low resource updating efficiency, poor consistency of resource updating and low utilization rate of cache space. Therefore, how to improve the efficiency and consistency of resource updates, and improve the utilization of cache space is for the content distribution network to wait for technical issues to be resolved.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a resource updating method, a resource updating apparatus, an electronic device, and a computer-readable storage medium, so as to overcome the problems of low resource updating efficiency and poor resource updating consistency of related resource updating methods at least to a certain extent.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the embodiments of the present disclosure, there is provided a resource updating method, including: acquiring resource positioning identification data of a resource to be updated, and generating cache resource identification data based on the resource positioning identification data; determining life cycle data of the resource to be updated, and generating target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the life cycle data; if the local cache resource identification data identical to the cache resource identification data is detected to exist, verifying the target resource identification data; and if the target resource identification data passes the verification, deleting the resource to be updated corresponding to the local cache resource identification data, and acquiring the updated resource corresponding to the target resource identification data so as to update the resource to be updated through the updated resource.
In some example embodiments of the present disclosure, based on the foregoing, the method further includes: and sending the target resource identification data to a service source station, so as to generate updated resource positioning identification data corresponding to the target resource identification data and the resource positioning identification data through the service source station, and issuing the updated resource positioning identification data to realize linkage update of the resource positioning identification data.
In some example embodiments of the present disclosure, based on the foregoing solution, the generating, based on the cache resource identification data and the lifetime data, target resource identification data corresponding to the resource to be updated includes: acquiring service identification data and resource attribute data corresponding to the resource to be updated; and encrypting the cache resource identification data, the life cycle data, the service identification data and the resource attribute data to obtain the target resource identification data.
In some example embodiments of the present disclosure, based on the foregoing scheme, if the target resource identification data passes verification, deleting the resource to be updated corresponding to the local cache resource identification data includes: generating a cache hit table corresponding to the target resource identification data, and recording the states of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data through the cache hit table; when the target resource identification data is verified, current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the target resource identification data is determined; and if the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the target resource identification data are detected to be successfully processed, determining that the target resource identification data pass verification, and deleting the resource to be updated corresponding to the local cache resource identification data.
In some example embodiments of the present disclosure, based on the foregoing scheme, if it is detected that current processing state data of the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data in the target resource identification data are all successfully processed, determining that the target resource identification data passes verification includes: decrypting the target resource identification data to obtain the cache resource identification data, life cycle data, service identification data and resource attribute data; acquiring target cache resource identification data, target life cycle data, target service identification data and target resource attribute data corresponding to the resource positioning identification data; if the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are detected to respectively correspond to the target cache resource identification data, the target life cycle data, the target service identification data and the target resource attribute data, determining that the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are all the processing success, and determining that the target resource identification data passes the verification.
In some example embodiments of the present disclosure, based on the foregoing solution, the obtaining an updated resource corresponding to the target resource identification data to update the resource to be updated through the updated resource includes: receiving a page request for updating the resource positioning identification data; and sending the page request to a target node so that the target node merges the page request, and acquiring an update resource corresponding to the page request from the service source station so as to update the resource to be updated through the update resource.
In some example embodiments of the present disclosure, based on the foregoing, the method further includes: determining the updating frequency of the resource to be updated according to the updating states of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the cache hit table; acquiring an updating frequency threshold of the resource to be updated; and deleting the resource to be updated corresponding to the local cache resource identification data when detecting that the updating frequency of the resource to be updated is smaller than the updating frequency threshold.
According to a second aspect of the embodiments of the present disclosure, there is provided a resource updating apparatus, including: the data acquisition module is used for acquiring resource positioning identification data of the resource to be updated and generating cache resource identification data based on the resource positioning identification data; the data generation module is used for determining life cycle data of the resource to be updated and generating target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the life cycle data; the data verification module is used for verifying the target resource identification data if the local cache resource identification data identical to the cache resource identification data is detected to exist; and the data updating module is used for deleting the resource to be updated corresponding to the local cache resource identification data if the target resource identification data passes the verification, and acquiring the updated resource corresponding to the target resource identification data so as to update the resource to be updated through the updated resource.
In some example embodiments of the present disclosure, based on the foregoing scheme, the resource updating apparatus further includes a data publishing module, where the data publishing module is configured to send the target resource identification data to a service source station, so as to generate, by the service source station, updated resource positioning identification data corresponding to the target resource identification data and the resource positioning identification data, and publish the updated resource positioning identification data to implement linkage updating of the resource positioning identification data.
In some example embodiments of the present disclosure, based on the foregoing scheme, the data generation module further includes a data generation unit, where the data generation unit is configured to obtain service identification data and resource attribute data corresponding to the resource to be updated; and encrypting the cache resource identification data, the life cycle data, the service identification data and the resource attribute data to obtain the target resource identification data.
In some example embodiments of the present disclosure, based on the foregoing solution, the data verification module further includes a data verification unit, where the data verification unit is configured to generate a cache hit table corresponding to the target resource identification data, and record the states of the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data through the cache hit table; when the target resource identification data is verified, current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the target resource identification data is determined; and if the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the target resource identification data are detected to be successfully processed, determining that the target resource identification data pass verification, and deleting the resource to be updated corresponding to the local cache resource identification data.
In some example embodiments of the present disclosure, based on the foregoing scheme, the data verification module further includes a detection unit, where the detection unit is configured to decrypt the target resource identification data to obtain the cache resource identification data, the life cycle data, the service identification data, and the resource attribute data; acquiring target cache resource identification data, target life cycle data, target service identification data and target resource attribute data corresponding to the resource positioning identification data; if the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are detected to respectively correspond to the target cache resource identification data, the target life cycle data, the target service identification data and the target resource attribute data, the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are determined to be the successful processing.
In some example embodiments of the present disclosure, based on the foregoing, the data updating module further includes a data updating unit, configured to receive a page request with the updated resource location identification data; and sending the page request to a target node so that the target node merges the page request, and acquiring an update resource corresponding to the page request from the service source station so as to update the resource to be updated through the update resource.
In some example embodiments of the present disclosure, based on the foregoing scheme, the resource updating apparatus further includes a data deleting module, where the data deleting module is configured to determine an updating frequency of the resource to be updated according to an updating state of the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data in the cache hit table; acquiring an updating frequency threshold of the resource to be updated; and deleting the resource to be updated corresponding to the local cache resource identification data when detecting that the updating frequency of the resource to be updated is smaller than the updating frequency threshold.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; and a memory having computer readable instructions stored thereon, the computer readable instructions when executed by the processor implementing the resource updating method of any one of the above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a resource updating method according to any one of the above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the resource updating method in the exemplary embodiment of the present disclosure, resource positioning identification data of a resource to be updated is acquired, and cache resource identification data is generated based on the resource positioning identification data; determining life cycle data of the resource to be updated, and generating target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the life cycle data; if the local cache resource identification data identical to the cache resource identification data is detected to exist, verifying the target resource identification data; and if the target resource identification data passes the verification, deleting the resource to be updated corresponding to the local cache resource identification data, and acquiring the updated resource corresponding to the target resource identification data so as to update the resource to be updated through the updated resource. On one hand, by generating a cache resource identification data tool corresponding to the resource positioning identification data of the resource identification data to be updated and target resource identification data, each cache node only needs to verify the target resource identification data when local cache resource identification data which is the same as the cache resource identification data exists locally, and if the target resource identification data passes the verification, the resource identification data to be updated corresponding to the local cache resource identification data is directly deleted, so that the resource updating efficiency is improved; on the other hand, each cache node can simultaneously inquire whether local cache resource identification data corresponding to the cache resource identification data exists locally, if the local cache resource identification data exists, the target resource identification data can be verified, the resource to be updated is deleted when the target resource identification data passes the verification, the updated resource corresponding to the resource to be updated is obtained, the consistency of resource updating is improved, and the problem that the cache node possibly returns the non-updated resource to the client again due to different time of receiving the instruction issued by the management system, so that the source return flow is large is solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 schematically illustrates a schematic diagram of a resource update method, according to some embodiments of the present disclosure;
FIG. 2 schematically illustrates a schematic diagram of target resource identification data generation, in accordance with some embodiments of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of a target resource identification data validation method, in accordance with some embodiments of the present disclosure;
FIG. 4 schematically illustrates a schematic diagram of a resource update method to be updated, according to some embodiments of the present disclosure;
FIG. 5 schematically illustrates a multi-level cache node deployment structure in accordance with some embodiments of the present disclosure;
FIG. 6 schematically illustrates a schematic diagram of another resource update method according to some embodiments of the present disclosure;
FIG. 7 schematically illustrates a schematic diagram of a method of automatic purging of cache resources according to some embodiments of the present disclosure;
FIG. 8 schematically illustrates a schematic diagram of a resource update apparatus, according to some embodiments of the present disclosure;
FIG. 9 schematically illustrates a structural schematic of a computer system of an electronic device, in accordance with some embodiments of the present disclosure;
fig. 10 schematically illustrates a schematic diagram of a computer-readable storage medium, according to some embodiments of the present disclosure.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
Furthermore, the drawings are merely schematic illustrations and are not necessarily drawn to scale. The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
In the present exemplary embodiment, there is first provided a resource update method that can be applied to a server. Fig. 1 schematically illustrates a schematic diagram of a resource update method flow, according to some embodiments of the present disclosure. Referring to fig. 1, the resource updating method may include the steps of:
step S110, acquiring resource positioning identification data of a resource to be updated, and generating cache resource identification data based on the resource positioning identification data;
step S120, determining life cycle data of the resource to be updated, and generating target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the life cycle data;
step S130, if the local cache resource identification data identical to the cache resource identification data is detected to exist, the target resource identification data is verified;
step S140, if the target resource identification data passes the verification, deleting the resource to be updated corresponding to the local cache resource identification data, and acquiring the updated resource corresponding to the target resource identification data to update the resource to be updated through the updated resource.
According to the resource updating method in the present exemplary embodiment, on one hand, by generating a cache resource identification data set corresponding to the resource positioning identification data of the resource identification data to be updated and target resource identification data, each cache node only needs to verify the target resource identification data when querying that local cache resource identification data identical to the cache resource identification data exists locally, and if the target resource identification data passes verification, directly deleting the resource identification data to be updated corresponding to the local cache resource identification data, thereby improving the efficiency of resource updating; on the other hand, each cache node can simultaneously inquire whether local cache resource identification data corresponding to the cache resource identification data exists locally, if the local cache resource identification data exists, the target resource identification data can be verified, the resource to be updated is deleted when the target resource identification data passes the verification, the updated resource corresponding to the resource to be updated is obtained, the consistency of resource updating is improved, and the problem that the cache node possibly returns the non-updated resource to the client again to cause large return flow due to different time of receiving the instruction issued by the management system is solved.
Next, the resource updating method in the present exemplary embodiment will be further explained.
In step S110, resource location identification data of the resource to be updated is obtained, and cache resource identification data is generated based on the resource location identification data.
In an example embodiment of the present disclosure, the Resource positioning identification data may refer to description information used for obtaining the Resource to be updated, for example, the Resource positioning identification data may be a character string used for obtaining the Resource to be updated, such as a URL (Uniform Resource Locator), that is, a website for accessing the Resource to be updated, and of course, the Resource positioning identification data may also be other description information used for obtaining the Resource to be updated, which is not particularly limited in this embodiment.
The cache resource identification data may refer to identification data of a resource to be updated in the cache node, for example, the cache resource identification data may be identification data of the resource to be updated, such as a cache key (key) corresponding to a CDN (Content Delivery Network), generated in the cache node according to a URL of the resource to be updated and service identification data corresponding to the resource to be updated, and of course, the cache resource identification data may also be other identification data of the resource to be updated in the cache node, which is not particularly limited in this embodiment.
The cache resource identification data corresponding to the resource to be updated can be generated according to the service identification data of the resource to be updated, such as the service ID and the URL of the resource to be updated, so that when the local cache resource identification data identical to the cache resource identification data exists in each cache node, the target resource identification data related to the cache resource identification data is verified, if the target resource identification data passes the verification, the resource to be updated corresponding to the local cache resource identification data is deleted, the updated resource corresponding to the resource to be updated is obtained, and the efficient updating of the resource to be updated is realized.
In step S120, lifetime data of the resource to be updated is determined, and target resource identification data corresponding to the resource to be updated is generated based on the cache resource identification data and the lifetime data.
In an example embodiment of the present disclosure, the lifetime data may refer to effective time of the resource to be updated in the cache, for example, the lifetime data may be time data calculated based on cache time of the resource to be updated, and if the cache time of the resource to be updated may be 1 day, the lifetime data of the resource to be updated may be time data calculated by adding 1 more day to the cache time of the resource to be updated, that is, the lifetime data of the resource to be updated may be 2 days, and of course, the lifetime data may also be other time data calculated based on the cache time of the resource to be updated, which is not particularly limited in this example embodiment.
The target resource identification data may refer to identification data with update information of a resource to be updated, for example, the target resource identification data may be identification data with life cycle data of the resource to be updated, the target resource identification data may also be identification data with cache resource identification data of the resource to be updated, the target resource identification data may also be identification data composed of life cycle data of the resource to be updated, cache resource identification data, service identification data, and the like, which is not particularly limited in this embodiment.
The updating identification data corresponding to the resource to be updated can be generated through life cycle data, service identification data, cache resource identification data and the like of the resource to be updated, the updating resource positioning identification data with the updating information of the resource to be updated is issued to an external server through a service source station, so that when a user accesses the resource to be updated, a browser analyzes a URL with the updating information corresponding to the resource to be updated, a cache node inquires whether local cache resource identification data identical to the cache resource identification data exists, if the local cache resource identification data exists, the resource to be updated corresponding to the local cache resource identification data is deleted, the updating resource corresponding to the resource to be updated is obtained from the service source station, and real-time updating of the resource to be updated is achieved.
In step S130, if it is detected that the local cache resource identification data identical to the cache resource identification data exists, the target resource identification data is verified.
In an example embodiment of the present disclosure, the local cache resource identification data may refer to resource identification data of a resource to be updated in the cache node, for example, the local cache resource identification data may be a cache key in the cache node, and certainly, the local cache resource identification data may also be other resource identification data of the resource to be updated in the cache node, which is not particularly limited in this example embodiment.
The updating of the resources to be updated can be realized by detecting whether local resource identification data which is the same as the cache resource identification data exists in the cache node or not, and directly acquiring the updated resources corresponding to the resources to be updated if the local cache resource identification data which is the same as the cache resource identification data does not exist; and if the local cache resource identification data identical to the cache resource identification data exists, deleting the resource to be updated corresponding to the local cache resource identification data, acquiring the updated resource corresponding to the resource to be updated, and updating the resource to be updated.
In step S140, if the target resource identification data passes the verification, deleting the resource to be updated corresponding to the local cache resource identification data, and acquiring the updated resource corresponding to the target resource identification data to update the resource to be updated through the updated resource.
In an example embodiment of the present disclosure, the parameters in the target resource identification data may be respectively compared with the parameters of the updated resource positioning identification data, for example, the service identification data and the lifetime data of the target resource identification data are respectively matched with the service identification data and the lifetime data of the updated resource positioning identification data, if the service identification data and the lifetime data of the target resource identification data are the same, the target resource identification data passes verification, that is, the resource to be updated in the cache node needs to be updated when the lifetime data arrives.
If only one level of cache nodes exist in the content distribution network, when the target resource identification data passes the verification, the resources to be updated corresponding to the local cache resource identification data in the cache nodes are deleted, the updated resources corresponding to the resources to be updated are obtained from the service source station, the resources to be updated are updated, and meanwhile, the benefit rate of the cache space is improved by deleting the cached resources to be updated in the cache nodes. If a plurality of levels of cache nodes exist in the content distribution network, after the upper level cache node verifies the target resource identification data, if the target resource identification data passes the verification, the upper level cache node sends the webpage request corresponding to the updated resource positioning identification data with the target resource identification data to the lower level cache node, so that the lower level cache node verifies the target resource identification data, and simultaneously merges the webpage requests corresponding to the updated resource positioning identification data with the target resource identification data, acquires the updated resource corresponding to the resource to be updated from the service source station, sends the updated resource to the upper level cache node, and feeds the updated resource back to the client through the upper level cache node, thereby realizing the linkage update of the resource to be updated and improving the update consistency of the resource to be updated.
In an example embodiment of the present disclosure, the target resource identification data may be sent to the service source station, so as to generate updated resource positioning identification data corresponding to the target resource identification data and the resource positioning identification data through the service source station, and issue the updated resource positioning identification data to implement linkage update of the resource positioning identification data.
The updated resource location identification data may refer to resource location identification data of the updated resource to be updated, for example, the updated resource location identification data may be resource location identification data composed of target resource identification data and resource location identification data of the resource to be updated before updating, and of course, the updated resource location identification data may also be identification data composed of other update messages of the resource to be updated, which is not particularly limited in this embodiment.
The updating resource positioning identification data of the resource to be updated can be issued through the service source station, so that when all the cache nodes receive a request of a user for accessing the resource to be updated, cache resource identification data is generated according to the updating resource positioning identification data, target resource identification data is generated according to the service identification data, the life cycle data and the like of the resource to be updated, whether local cache resource identification data identical to the cache resource identification data exists is inquired, if the local cache resource identification data exists, the target resource identification data is verified, if the target resource identification data passes the verification, the resource to be updated corresponding to the local cache resource identification data is deleted, the updating resource corresponding to the target resource identification data or the updating resource locator with the target resource identification data is obtained, and the linkage updating of the resource to be updated is realized, the updating efficiency and the updating consistency of the resources to be updated are improved.
FIG. 2 schematically illustrates a schematic diagram of a target resource identification data generation method flow, in accordance with some embodiments of the present disclosure. Referring to fig. 2, the target resource identification data generation method may include the steps of:
in step S210, service identification data and resource attribute data corresponding to the resource to be updated are obtained;
in step S220, the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data are encrypted to obtain the target resource identification data.
The resource attribute data may refer to characteristic attribute data of the resource to be updated, for example, the resource attribute data may be characteristic attribute data of the resource to be updated, such as a resource size, a resource type, and a resource modification time, the resource attribute data may also be an encrypted value of the resource to be updated, such as an MD5(Message-digest algorithm 5) value, of course, the resource attribute data may also be other attribute data uniquely representing the resource to be updated, such as a resource fingerprint, which is not particularly limited in this embodiment.
The method comprises the steps of generating a character string according to service identification data, cache resource identification data, resource attribute data and life cycle data of a resource to be updated, encrypting the character string by using a symmetric encryption key to convert the character string into a 16-system character string to obtain target resource identification data, generating update resource positioning identification data according to the target resource identification data and resource positioning identification data of the resource to be updated, inquiring whether local cache resource identification data identical to the cache resource identification data exists in a cache node or not, and verifying the target resource identification data, so that a resource request to be updated is prevented from being maliciously used or tampered, and the safety and reliability of accessing the resource to be updated are improved.
FIG. 3 schematically illustrates a schematic diagram of a target resource identification data validation method flow, in accordance with some embodiments of the present disclosure. Referring to fig. 3, the target resource identification data verification method may include the steps of:
in step S310, a cache hit table corresponding to the target resource identification data is generated, and states of the cache resource identification data, the life cycle data, the service identification data, and the resource attribute data are recorded through the cache hit table;
in step S320, when the target resource identification data is verified, current processing state data of the cache resource identification data, the life cycle data, the service identification data, and the resource attribute data in the target resource identification data is determined;
in step S330, if it is detected that all the current processing status data of the cache resource identification data, the life cycle data, the service identification data, and the resource attribute data in the target resource identification data are successfully processed, it is determined that the target resource identification data passes verification, and the resource to be updated corresponding to the local cache resource identification data is deleted.
The cache name table may refer to a data table for recording a parameter processing state of the target resource identification data, for example, the cache hit table may be a data table for recording a decryption state of the target resource identification data, or may be a data table for recording parameters of the decrypted target resource identification data, such as service identification data, resource attribute data, life cycle data, and a processing state of the cache resource identification data, and of course, the cache hit table may also be a data table for recording a processing state of other parameters of the target resource identification data, which is not limited in this embodiment.
The current processing status data may refer to status data of each parameter when the target resource identification data is verified, for example, the current processing status data may be status data determined according to a comparison result of each parameter in the target resource identification data, such as service identification data, resource attribute data, lifetime data, and cache resource identification data, corresponding to the initial resource location identification data of the resource to be updated, such as target service identification data, target resource attribute number, target lifetime data, and target cache resource identification data, wherein, if each parameter in the target resource identification data, such as service identification data, resource attribute data, lifetime data, cache resource identification data, corresponds to each parameter in the initial resource location identification data of the resource to be updated, such as target service identification data, target resource attribute number, cache resource identification data, and target resource location identification data, If the target lifetime data and the target cache resource identification data are in one-to-one correspondence, the processing status data of each parameter in the target resource identification data is processing success, otherwise, the processing status data of each parameter in the target resource identification data is processing failure, and of course, the current processing status data may also be other status data obtained when the target resource identification data is verified, such as status data corresponding to successful decryption or failed decryption of the target resource identification data, which is not particularly limited in this embodiment.
Preferably, when the target resource identification data is generated, a cache name table corresponding to the target resource identification data is generated, and state data of each parameter in the target resource identification data, such as service identification data, resource attribute data, cache resource identification data, and lifetime data, is initialized, that is, the state data of each parameter in the target resource identification data, such as service identification data, resource attribute data, cache resource identification data, and lifetime data, is set to be in a processing state. When detecting that the current resource positioning identification data carries the target resource identification data, the uniqueness and the correctness of the target resource identification data can be verified according to the initial resource positioning identification data of the resource to be updated. Specifically, the target resource identification data is converted into binary data, the target resource identification data is decrypted according to a decryption key to obtain life cycle data, cache resource identification data, resource attribute data and service identification data corresponding to the target resource identification data, the life cycle data, the cache resource identification data, the resource attribute data and the service identification data obtained by decryption are respectively compared with the target life cycle data, the target cache resource identification data, the target resource attribute data and the target service identification data carried by the resource positioning identification data of the initial resource to be updated, and if the life cycle data, the cache resource identification data, the resource attribute data and the service identification data obtained by decryption are respectively compared with the target life cycle data, the target cache resource identification data and the service identification data carried by the resource positioning identification data of the initial resource to be updated, And the target resource attribute data and the target service identification data are in one-to-one correspondence, and the current state data of each parameter in the target resource identification data is processed successfully.
Meanwhile, whether the life cycle data in the target resource identification data is greater than the current time is detected, and if the life cycle data in the target resource identification data is greater than the current time, the resource to be updated does not need to be updated; on the contrary, if it is detected that the life cycle data in the target resource identification data is less than or equal to the current time, the updated resource corresponding to the resource to be updated is obtained, so that the resource to be updated is updated through the updated resource, and the update of the resource to be updated is realized. In addition, a cache capacity threshold of the cache hit table may be set, and if the cache capacity of the cache hit table is equal to or greater than the cache capacity threshold, it may be considered that cache data failed in processing is preferentially deleted, and then, a cache resource that is least recently accessed by the client is deleted, so as to reduce memory usage, and further improve data transmission efficiency.
In an example embodiment of the present disclosure, the target resource identification data may be decrypted to obtain the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data, and obtain the target cache resource identification data, the target lifetime data, the target service identification data, and the target resource attribute data corresponding to the resource positioning identification data; if the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are detected to respectively correspond to the target cache resource identification data, the target life cycle data, the target service identification data and the target resource attribute data, determining that the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are all the processing success, and determining that the target resource identification data passes the verification.
The target cache resource identification data can refer to cache resource identification data corresponding to initial resource positioning identification data to be updated; the target life cycle data and the life cycle data corresponding to the initial resource positioning identification data of the resource to be updated; the target service identification data may refer to service identification data corresponding to initial resource location identification data to be updated; the target resource attribute data may refer to resource attribute data corresponding to the initial resource location identification data to be updated.
After detecting that local cache resource identification data identical to the cache resource identification data exists in the cache node, detecting whether the current resource positioning identification data is resource positioning identification data carrying target resource identification data, and if detecting that the current resource positioning identification data carries the target resource identification data, verifying the target resource identification data; and when the target resource identification data passes verification, deleting the resource to be updated (cache resource) corresponding to the local cache resource identification data, and acquiring the updated resource corresponding to the resource to be updated. And if the current resource positioning identification data is detected not to carry the target resource identification data, the resource to be updated corresponding to the local cache resource identification data is not required to be deleted, and the resource to be updated is directly returned to the client. Whether the target resource identification data passes the verification is determined according to whether the service identification data, the resource attribute data, the cache resource identification data and the survival cycle data in the target resource identification data respectively correspond to the target service identification data, the target resource attribute data, the target cache resource identification data and the target survival cycle data corresponding to the initial resource positioning identification data of the resource to be updated. If the service identification data, the resource attribute data, the cache resource identification data and the life cycle data in the target resource identification data respectively correspond to the target service identification data, the target resource attribute data, the target cache resource identification data and the target life cycle data corresponding to the initial resource positioning identification data of the resource to be updated one by one, the target resource identification data passes the verification, which indicates that the resource to be updated cached in the cache node needs to be updated. If the target resource identification data is not verified, network access error information such as 403 errors and the like with access exception is returned to the client, so that the user is prevented from waiting for page data for a long time.
Fig. 4 schematically illustrates a schematic diagram of a resource update method flow to be updated according to some embodiments of the present disclosure. Referring to fig. 4, the method for updating the resource to be updated may include the following steps:
in step S410, receiving a page request associated with the updated resource location identification data;
in step S420, the page request is sent to a target node, so that the target node merges the page request, and obtains an update resource corresponding to the page request from the service source station, so as to update the resource to be updated through the update resource.
The target node may refer to a cache node that schedules an updated resource in the content distribution network, for example, the target node may be a cache node closer to the client in the content distribution network, and the target node may also be a cache node closer to the service source station, and of course, the target node may also be another cache node between the client and the service source station, which is not particularly limited in this embodiment.
Preferably, when receiving a page request sent by a client, if it is detected that there is no local cache resource identification data that is the same as the cache resource identification data, the page request may be sent to a target node, so that the target node pulls an update resource corresponding to the page request, and verifies the validity of the target resource identification data corresponding to the update resource. If the target resource identification data passes the verification, the target node merges the page request sent by the client, only needs to obtain the updated resource from the service source station once and returns the updated resource to the original cache node, so that the source return request quantity of the original cache node to the service source station is reduced, and the speed of obtaining the updated resource by the client is also improved.
When the local resource identification data identical to the cache resource identification data is detected to exist and the target resource identification data passes the verification, the page request can be sent to the target node, so that the target node pulls the updated resource corresponding to the page request. Meanwhile, the target node inquires whether local cache resource identification data same as the cache resource identification data exists according to the resource positioning identification data corresponding to the page request, if the local cache resource identification data same as the cache resource identification data exists, the cache resource (resource to be updated) corresponding to the local cache resource identification data is deleted, and the received page request is combined, so that the once updated resource is obtained from the service source station, the updated resource is returned to the upper-level cache node, the source return request amount of the page request is reduced, and the network resource is saved.
Fig. 5 schematically illustrates a schematic diagram of a multi-level cache node deployment structure, according to some embodiments of the present disclosure. Referring to fig. 5, the multi-level cache node deployment structure 500 mainly includes a first region client 510, a first region 520 of the multi-level cache node, a second region client 530, a second region 540 of the multi-level cache node, and a service source station 550; the multi-level cache node first region 520 includes a CDN cache sub-node 521, a CDN cache sub-node 522, and a CDN secondary cache node 523, and the multi-level cache node second region 540 includes a CDN cache sub-node 541, a CDN cache sub-node 542, and a CDN secondary cache node 543; meanwhile, the CDN cache child node 522 includes a target resource identification data verification module 511 and a resource deletion module 512, the CDN cache child node 523 includes a target resource identification data verification module 513 and a resource deletion module 514, and the CDN secondary cache node 524 includes a target resource identification data verification module 515 and a resource deletion module 516; the CDN cache sub-node 541 includes a target resource identification data verification module 531 and a resource deletion module 532, the CDN cache sub-node 542 includes a target resource identification data verification module 533 and a resource deletion module 534, and the CDN secondary cache node 543 includes a target resource identification data verification module 535 and a resource deletion module 536.
After the CDN cache sub-nodes verify the target resource identification data, if the target resource identification data passes the verification, resources (cache resources) to be updated corresponding to the local cache resource identification data are deleted, page requests corresponding to updated resource positioning identification data carrying the target resource identification data are sent to CDN secondary cache nodes, so that the CDN secondary cache nodes merge the page requests of the CDN cache sub-nodes, updated resources corresponding to the page requests are obtained from a service source station, the updated resources are returned to the CDN cache sub-nodes, and the source return request quantity of the CDN cache sub-nodes is reduced. For example, if the target resource identification data in the CDN cache sub-node 541 and the CDN cache sub-node 542 pass verification, the CDN cache sub-node 541 and the CDN cache sub-node 542 may send the page request to the CDN secondary cache node 543, the CDN secondary cache node 543 merges the page requests sent by the CDN cache sub-node 541 and the CDN cache sub-node 542, after merging the page requests, only needs to send the page request to the service source station 550 once, and then return the updated resource obtained by the request to the CDN cache sub-node 541 and the CDN cache sub-node 542, so that the updated resource is returned to the client by the CDN cache sub-node 541 and the CDN cache sub-node 542, which avoids the service source station receiving the page requests of the CDN cache sub-node 541 and the CDN cache sub-node 542, reduces the amount of source return requests, and also reduces the burden of the service source station for responding to each cache node.
Meanwhile, if the CDN cache child node does not have local cache resource identification data which are the same as the cache resource identification data, the page request is directly sent to a CDN secondary cache node, so that the CDN secondary cache node pulls an updated resource corresponding to the page request, and the validity of target resource identification data corresponding to the updated resource is verified. If the target resource identification data passes the verification, the CDN secondary cache node merges the page requests sent by the CDN cache sub-nodes, only needs to obtain the updated resources from the service source station once and returns the updated resources to the CDN cache sub-nodes, the source return request amount of the original cache node to the service source station is reduced, and the speed of the client side for obtaining the updated resources is also improved.
FIG. 6 schematically illustrates a schematic diagram of another resource update method flow, in accordance with some embodiments of the present disclosure. Referring to fig. 6, the resource updating method may include the steps of:
in step S601, resource location identification data of a resource to be updated is acquired, and cache resource identification data is generated based on the resource location identification data;
in step S602, service identification data, lifetime data, and resource attribute data corresponding to the resource to be updated are obtained, and the cached resource identification data, the service identification data, the lifetime data, and the resource attribute data are encrypted to generate target resource identification data;
in step S603, the target resource identifier data is sent to a service source station, so that the service source station generates updated resource location identifier data according to the resource location identifier data and the target resource identifier data, and sends the updated resource location identifier data to an extranet server;
in step S604, a page request sent by the client is received;
in step S605, searching whether there is local cache resource identification data that is the same as the cache resource identification data, if there is local cache resource identification data that is the same as the cache resource identification data, jumping to step S606, otherwise jumping to step S609;
in step S606, detecting whether the resource location identification data of the page request received by the local cache node carries target resource identification data, if the resource location identification data of the page request received by the local cache node carries the target resource identification data, jumping to step S607, otherwise jumping to step S615;
in step S607, the target resource identification data carried in the resource positioning identification data of the page request is decrypted, and the parameter of the target resource identification data obtained by decryption is verified;
in step S608, detecting whether the parameters of the target resource identification data all pass verification, if the parameters of the target resource identification data all pass verification, jumping to step S609, otherwise jumping to step S608;
in step S609, the resource to be updated (cache resource) corresponding to the local cache resource identification data is deleted;
in step S610, a page request sent by a client is sent to a target node, so that the target node pulls an update resource corresponding to the page request;
in step S611, the client is returned 403, and the user accesses the information that there is an exception;
in step S612, secondarily verifying, by the target node, target resource identification data in the resource location identification data corresponding to the page request;
in step S613, secondarily detecting whether the target resource identification data passes the verification, if the target resource identification passes the verification, jumping to step S614, otherwise, jumping to step S615;
in step S614, the same page requests are merged, and the updated resource is returned to each local cache node, so as to implement filling of the updated resource;
in step S615, the cache resource of the local cache node is returned to the client.
The local cache node may refer to a cache node directly connected to the client; the cache resource of the local cache node may be a previously cached resource to be updated, or may be a cached update resource corresponding to the resource to be updated; specifically, if local cache resource identification data corresponding to the cache resource identification data exists in the local cache node, detecting whether resource positioning identification data corresponding to the page request carries target resource identification data, and if the resource positioning identification data corresponding to the page request carries the target resource identification data, deleting the resource to be updated cached in the local cache node, and receiving an updated resource pulled by the target node from the service source station, that is, the cache resource of the local cache node is the updated resource after the resource to be updated is updated; if the resource positioning identification data corresponding to the page request does not carry the target resource identification data, acquiring the resource to be updated cached in the local cache node, and returning the resource to be updated to the client, namely, the resource to be updated does not need to be updated; on the contrary, if the local cache resource identification data corresponding to the cache resource identification data does not exist in the local cache node, the target node pulls the updated resource corresponding to the resource to be updated, and returns the updated resource to the client.
Preferably, the target resource identification data is decrypted, and the security and the validity of parameters such as cache resource identification data, service identification data, resource attribute data and life cycle data in the decrypted target resource identification data are verified, so that the request for updating the resource is prevented from being maliciously used and tampered. Meanwhile, the same page requests are merged through the target node, so that the condition that a plurality of local cache nodes respectively send the page requests to the service source station is avoided, the source return request amount is reduced, and the efficiency of accessing page data by a user is improved. In addition, the target resource identification data is verified through the local cache node and the target node, if the target resource identification data passes the verification, the resources to be updated cached in the local cache node and the target node are deleted, the updated resources corresponding to the resources to be updated are obtained, the linkage updating of the resources to be updated is realized, and the cache space utilization rate of the local cache node and the target node is also improved.
Fig. 7 schematically illustrates a schematic diagram of a flow of an automatic cache resource purging method according to some embodiments of the present disclosure. Referring to fig. 7, the method for automatically clearing cache resources may include the following steps:
in step S710, determining an update frequency of the resource to be updated according to the update states of the cache resource identifier data, the lifetime data, the service identifier data, and the resource attribute data in the cache hit table;
in step S720, obtaining an update frequency threshold of the resource to be updated;
in step S730, if it is detected that the update frequency of the resource to be updated is smaller than the update frequency threshold, the resource to be updated corresponding to the local cache resource identification data is deleted.
The update frequency threshold may refer to preset index data for detecting whether a resource is an expired resource that is infrequently accessed by a user, for example, the update frequency threshold may be 1 time/month, that is, the resource is updated for at least 1time in a month, and when it is detected that the update frequency of the resource is less than the update frequency threshold, the resource may be used as the expired resource, and the resource cached in the cache node is automatically cleared, so as to improve the utilization rate of the cache space.
The updating frequency of the resource to be updated corresponding to the cache hit table can be determined according to the updating times of the initial state or the current state of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the cache hit table. When detecting that the update frequency is smaller than the preset update frequency threshold, the resource to be updated can be used as an expired resource, and the cache node can automatically delete the cached resource to be updated in the cache space, so as to improve the utilization rate of the cache space.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
In addition, in the present exemplary embodiment, a resource updating apparatus is also provided. Referring to fig. 8, the resource updating apparatus 800 includes: the system comprises a data acquisition module 810, a data generation module 820, a data verification module 830 and a data update module 840. Wherein: a data obtaining module 810, configured to obtain resource location identification data of a resource to be updated, and generate cache resource identification data based on the resource location identification data; a data generating module 820, configured to determine lifetime data of the resource to be updated, and generate target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the lifetime data; a data verification module 830, configured to verify the target resource identification data if it is detected that local cache resource identification data identical to the cache resource identification data exists; a data updating module 840, configured to delete the resource to be updated corresponding to the local cache resource identification data if the target resource identification data passes the verification, and obtain an updated resource corresponding to the target resource identification data to update the resource to be updated through the updated resource.
In some example embodiments of the present disclosure, based on the foregoing solution, the resource updating apparatus 800 further includes a data publishing module, where the data publishing module is configured to send the target resource identification data to a service source station, so as to generate, by the service source station, updated resource positioning identification data corresponding to the target resource identification data and the resource positioning identification data, and publish the updated resource positioning identification data to implement linkage updating of the resource positioning identification data.
In some example embodiments of the present disclosure, based on the foregoing solution, the data generating module 820 further includes a data generating unit, where the data generating unit is configured to obtain service identification data and resource attribute data corresponding to the resource to be updated; and encrypting the cache resource identification data, the life cycle data, the service identification data and the resource attribute data to obtain the target resource identification data.
In some example embodiments of the present disclosure, based on the foregoing solution, the data verification module 820 further includes a data verification unit, configured to generate a cache hit table corresponding to the target resource identification data, and record the states of the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data through the cache hit table; when the target resource identification data is verified, current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the target resource identification data is determined; and if the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data in the target resource identification data are detected to be successfully processed, determining that the target resource identification data pass verification, and deleting the resource to be updated corresponding to the local cache resource identification data.
In some example embodiments of the present disclosure, based on the foregoing scheme, the data verification module 820 further includes a detection unit, where the detection unit is configured to decrypt the target resource identification data to obtain the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data; acquiring target cache resource identification data, target life cycle data, target service identification data and target resource attribute data corresponding to the resource positioning identification data; if the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are detected to respectively correspond to the target cache resource identification data, the target life cycle data, the target service identification data and the target resource attribute data, determining that the current processing state data of the cache resource identification data, the life cycle data, the service identification data and the resource attribute data are all the processing success, and determining that the target resource identification data passes the verification.
In some example embodiments of the present disclosure, based on the foregoing solution, the data updating module 840 further includes a data updating unit, where the data updating unit is configured to, if a page request with the updated resource location identification data is received; and sending the page request to a target node so that the target node merges the page request, and acquiring an update resource corresponding to the page request from the service source station so as to replace the resource to be updated with the update resource, thereby realizing the update of the resource to be updated.
In some example embodiments of the present disclosure, based on the foregoing solution, the resource updating apparatus 800 further includes a data deleting module, where the data deleting module is configured to determine an updating frequency of the resource to be updated according to the updating states of the cache resource identification data, the lifetime data, the service identification data, and the resource attribute data in the cache hit table; acquiring an updating frequency threshold of the resource to be updated; and deleting the resource to be updated corresponding to the local cache resource identification data when detecting that the updating frequency of the resource to be updated is smaller than the updating frequency threshold.
The details of each module of the resource updating apparatus have been described in detail in the corresponding resource updating method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the resource updating apparatus are mentioned, this division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the resource updating method is also provided.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 900 according to such an embodiment of the disclosure is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.
Wherein the storage unit stores program code that is executable by the processing unit 910 to cause the processing unit 910 to perform steps according to various exemplary embodiments of the present disclosure described in the above section "exemplary method" of the present specification. For example, the processing unit 910 may execute step S110 shown in fig. 1, obtain resource location identification data of a resource to be updated, and generate cache resource identification data based on the resource location identification data; step S120, determining life cycle data of the resource to be updated, and generating target resource identification data corresponding to the resource to be updated based on the cache resource identification data and the life cycle data; step S130, if the local cache resource identification data identical to the cache resource identification data is detected to exist, the target resource identification data is verified; step S140, if the target resource identification data passes the verification, deleting the resource to be updated corresponding to the local cache resource identification data, and acquiring the updated resource corresponding to the target resource identification data to update the resource to be updated through the updated resource.
The storage unit 920 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)921 and/or a cache memory unit 922, and may further include a read only memory unit (ROM) 923.
Storage unit 920 may also include a program/utility 924 having a set (at least one) of program modules 925, such program modules 925 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 930 can be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 900 may also communicate with one or more external devices 970 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 900, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 900 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 950. Also, the electronic device 900 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 960. As shown, the network adapter 960 communicates with the other modules of the electronic device 900 via the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the present disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the "exemplary methods" section above of this specification, when the program product is run on the terminal device.
Referring to fig. 10, a program product 1000 for implementing the resource updating method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes included in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.