CN112445986A - Cache information updating method, cache information pushing method, cache information updating device, cache information pushing device and cache information pushing medium - Google Patents

Cache information updating method, cache information pushing method, cache information updating device, cache information pushing device and cache information pushing medium Download PDF

Info

Publication number
CN112445986A
CN112445986A CN201910818007.7A CN201910818007A CN112445986A CN 112445986 A CN112445986 A CN 112445986A CN 201910818007 A CN201910818007 A CN 201910818007A CN 112445986 A CN112445986 A CN 112445986A
Authority
CN
China
Prior art keywords
updating
cache information
mode
request
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910818007.7A
Other languages
Chinese (zh)
Inventor
马诗
陈小钟
李逸骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guizhou Baishancloud Technology Co Ltd
Original Assignee
Guizhou Baishancloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guizhou Baishancloud Technology Co Ltd filed Critical Guizhou Baishancloud Technology Co Ltd
Priority to CN201910818007.7A priority Critical patent/CN112445986A/en
Publication of CN112445986A publication Critical patent/CN112445986A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Abstract

The application provides a cache information updating method, which comprises the steps of receiving an updating request of cache information, determining an updating mode of the cache information according to the updating request, and updating the cache information according to the determined updating mode. By the method, the cache information can be processed in time, the pressure of returning to the source is reduced as much as possible, and the cache service can be stably and normally performed.

Description

Cache information updating method, cache information pushing method, cache information updating device, cache information pushing device and cache information pushing medium
Technical Field
The present application relates to the field of network security, and in particular, to a method, an apparatus, and a medium for updating and pushing cache information.
Background
Currently, in order to obtain faster response speed and reduce back sources, many pieces of information (including resources, data, and the like) are cached on a cache server, for example, a cache server of a CDN node. However, after the information is updated, the cached information needs to be updated or deleted in time, otherwise, the user accesses the old content, which may cause unknown risks.
Disclosure of Invention
In order to solve the above-described problems, the present application provides an update method, a push method, an apparatus, and a medium of cache information.
One aspect of the present application provides a method for updating cache information, including:
receiving an updating request of cache information, determining an updating mode of the cache information according to the updating request, and updating the cache information according to the determined updating mode.
The updating mode of the cache information comprises URL updating and batch updating.
Wherein, according to the update request, determining one of the update modes of the cache information:
the first method is as follows: judging whether a preset updating mode in the updating request is a batch updating mode, if so, determining batch cache information to be updated, and recording an updating type and updating request time in the batch updating mode;
and determining cache information which is not updated according to the update type in the batch cache information in preset time, and updating according to the update type.
The second method comprises the following steps: judging whether the preset updating mode in the updating request is a preset batch updating mode which is cancelled or not, if so, cancelling the preset batch updating mode according to the cancelling type;
the third method comprises the following steps: and judging whether the preset updating mode in the updating request is the URL updating mode, if so, updating the URL cache information according to the updating type, and recording the updating time.
Wherein, the updating method further comprises:
storing cache information in a multi-level index mode;
the updating method further comprises the following steps: and determining the cache information to be updated in a multi-level index mode according to the updating request.
Wherein, the updating method further comprises:
identifying the same cache information in different text formats;
determining the cache information of all text formats through the identification before processing the cache information according to the determined updating mode;
the updating the cache information according to the determined updating mode comprises: and updating the cache information of all text formats.
Wherein, the first mode still includes:
and if a plurality of update requests for the same batch of cache information are received, determining the update type according to the update mode in the last update request, and recording the update request time.
In an aspect of the present application, a method for pushing cache information is provided, where the method for pushing includes:
receiving an access request, determining a processing mode of the cache information according to a preset updating mode and the latest processing time of the cache information, processing the cache information according to the determined processing mode, and pushing the processed cache information to a sending end of the access request.
Determining a processing mode of the cache information according to a preset processing mode and the latest processing time of the cache information:
if the update type in the preset processing mode is overdue, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an inquiry request to a target server providing the cache information; if the feedback information indicates that the cache information is the latest version, recording the receiving time of the feedback information as the updating time, and pushing the cache information to a processing request sending terminal; and if the feedback information carries the cache information of the updated version, covering the cache information of the updated version with the cache information and storing the cache information to a cache server, recording the updating time, and pushing the cache information of the updated version to a processing request sending terminal.
Determining a processing mode of the cache information according to a preset processing mode and the latest processing time of the cache information: if the update type in the preset processing mode is deletion, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an acquisition request to a target server providing the cache information; and updating corresponding cache information according to the feedback information, and pushing the updated cache information to a processing request sending terminal.
Another aspect of the present application provides an apparatus for updating cache information, including:
a receiving module for receiving the update request of the cache information,
and the updating module is used for determining an updating mode of the cache information according to the updating request and updating the cache information according to the determined updating mode.
The updating mode comprises URL updating and batch updating.
Wherein the update module is to:
according to the updating request, determining one of the updating modes of the cache information:
the first method is as follows: judging whether a preset updating mode in the updating request is a batch updating mode, if so, determining batch cache information to be updated, and recording an updating type and updating request time in the batch updating mode;
and determining cache information which is not updated according to the update type in the batch cache information in preset time, and updating according to the update type.
The second method comprises the following steps: judging whether the preset updating mode in the updating request is a preset batch updating mode which is cancelled or not, if so, cancelling the preset batch updating mode according to the cancellation type
The third method comprises the following steps: and judging whether the preset updating mode in the updating request is the URL updating mode, if so, updating the URL cache information according to the updating type, and recording the updating time.
Wherein the updating means further comprises:
the storage module is used for storing cache information in a multi-level index mode;
the update module is to: and determining the cache information to be updated in a multi-level index mode according to the updating request.
Wherein the updating means further comprises:
the identification module is used for identifying the same cache information in different text formats;
the identification module is further used for determining the cache information in all text formats through the identification before processing the cache information according to the determined updating mode;
the update module is to: and updating the cache information of all text formats.
Wherein the update module is to:
and if a plurality of update requests for the same batch of cache information are received, recording the update type in the preset update mode in the last update request, and recording the update request time.
In another aspect of the present application, a device for pushing cache information is further provided, including:
the request receiving module is used for receiving an access request of the cache information;
the processing module is used for determining a processing mode of the cache information according to a preset updating mode and the latest processing time of the cache information and processing the cache information according to the determined processing mode;
and the pushing module is used for pushing the processed cache information to the sending end of the access request.
Wherein the processing module is configured to:
if the update type in the preset processing mode is overdue, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an inquiry request to a target server providing the cache information; if the feedback information indicates that the cache information is the latest version, recording the receiving time of the feedback information as the updating time, and pushing the cache information to a processing request sending terminal; and if the feedback information carries the cache information of the updated version, covering the cache information of the updated version with the cache information and storing the cache information to a cache server, recording the updating time, and pushing the cache information of the updated version to a processing request sending terminal.
Wherein the processing module is configured to:
if the update type in the preset processing mode is deletion, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an acquisition request to a target server providing the cache information; and updating corresponding cache information according to the feedback information, and pushing the updated cache information to a processing request sending terminal.
Yet another aspect of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method.
Yet another aspect of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method.
Another aspect of the present application also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the program.
Another aspect of the present application also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the program.
According to the method provided by the application, the cache information can be processed in time through the mode, the pressure of returning the source is reduced as much as possible, and meanwhile, the cache service can be stably and normally performed.
1) According to the batch processing mode, the cache information is processed, so that the cache information can be processed as required, and the efficiency is improved.
2) And caching the cache information in a multi-level index mode so as to facilitate searching, processing and pushing during processing and pushing. And all cache information does not need to be searched, processed and pushed in a traversal mode like in the traditional mode.
3) The storage states of different version formats of the same cache information are identified by marking the same cache information in different text formats, for example, a compressed version and an uncompressed version are identified, so that the same cache information in all different text formats can be processed and pushed at the same time during processing and pushing.
4) By establishing a processing mode of canceling deletion, the situation that when operation is wrong, for example, a task of deleting information is submitted by mistake, a lot of information which is not to be deleted is avoided. If the information is requested to be obtained, the information can be obtained only by a source returning mode, and pressure is brought to a target server (a source station or other storage nodes).
5) According to the preset processing mode and the latest processing time of the cache information, the processing mode of the cache information is determined, so that the cache information can be processed as required, and the efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application. In the drawings, like reference numerals are used to indicate like elements. The drawings in the following description are directed to some, but not all embodiments of the application. For a person skilled in the art, other figures can be derived from these figures without inventive effort.
FIG. 1 illustrates a method for updating cached information, according to an exemplary embodiment;
FIG. 2 illustrates a storage with domain names as indices, according to an example embodiment;
FIG. 3 illustrates a method for pushing cache information according to an example embodiment;
FIG. 4 illustrates an apparatus for updating cached information in accordance with an exemplary embodiment;
FIG. 5 illustrates a push device for caching information, according to an example embodiment;
FIG. 6 is a block diagram illustrating a computer device for caching data updates, according to an example embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The application provides a cache information processing method, which comprises the steps of receiving an update request of cache information, determining a processing mode of the cache information according to the update request, and updating the cache information according to the determined update mode. The application also provides a device corresponding to the cache information updating method. By the method, the cache information can be processed in time, the pressure of returning to the source is reduced as much as possible, and the cache service can be stably and normally performed.
The following describes the method for updating cache information provided by the present application in detail with reference to the accompanying drawings.
In an embodiment of the present application, there is provided a cache information updating method, which may be applied to a cache server, as shown in fig. 1, and illustrates an updating method of cache information according to an exemplary embodiment, including:
step 101, receiving an update request of cache information;
the cache server receives an update request from an update request sender, e.g., from a source station.
And 102, determining an updating mode of the cache information according to the received updating request, and updating the cache information according to the determined updating mode.
The cache information may be information in any required form, and may also be stored in a required manner, for example, the cache information may be metadata of the relevant resource, and the metadata is stored on a disk.
The updating request comprises preset updating modes which are different, and the processing modes are different. Determining an update mode of the cache information according to the received update request comprises:
(A) judging whether a preset updating mode in the updating request is a batch updating mode, if so, determining batch cache information to be updated, recording the batch cache information in a regular expression mode, and simultaneously recording the updating type and the updating request time in the batch updating mode. And if the preset mode in the updating request is a batch updating mode, recording batch cache information required to be updated in a regular expression mode.
And determining cache information which is not updated according to the update type in the batch cache information in preset time, updating according to the update type, and recording the update time.
The update type of the batch cache information in the preset update mode may include:
a. forced expiration is carried out on batch cache information under the specified directory;
b. and deleting the batch cache information under the specified directory.
In order to reduce the processing pressure of the cache server, the update request of the batch cache information is not to update the batch cache information when receiving the update request of the batch cache information processing, but to update the batch cache information at a preset time. For example, the batch cache information may be updated when the load is low in the morning. In a predetermined time, when updating the batch cache information, it is determined which of the batch cache information has been updated according to the update type and which batch cache information has not been updated according to the update type. And updating the cache information which is not updated according to the updating type.
For the updating processing of the batch cache information, if the same batch cache information is submitted with a plurality of updating tasks before the preset time, the cache server takes the last updating request as the final updating task and records the time for receiving the updating request. For example, the source station sends a task of deleting the png batch cache files in the designated directory to the cache server, and sends a task of forcibly expiring png batch cache information in the designated directory to the cache server before a predetermined time, that is, the same batch cache information is forcibly expired, and the cache server records that the processing task of the batch cache information is forcibly expired, and records the update request time received by the task of forcibly expiring.
(B) Judging whether the preset updating mode in the updating request is a preset batch updating mode which is cancelled or not, if so, cancelling the preset batch updating mode according to the cancelling type
The preset revocation type in the updating mode may include:
e. canceling the operation of forcibly overdue the batch cache information under the specified directory;
f. and canceling the operation of deleting the batch cache information under the specified directory.
For revocation of update processing, when an update request is received, the update request is processed. For example, when a revocation request for forcibly expiring batch cache information in a specified directory is received, an operation for forcibly expiring preset batch cache information in the specified directory is revoked.
(C) And judging whether the preset updating mode in the updating request is the URL updating mode, if so, updating the URL cache information according to the updating type, and recording the updating time.
The preset update type of the URL cache information in the update mode may include:
c. forced expiration is carried out on URL cache information under the specified directory;
d. deleting URL cache information under the specified directory;
for the update of the URL cache information, when an update request is received, the update request is processed. For example, when an update request for deleting the URL cache information in the designated directory is received, the cache information is deleted.
The method for updating cache information provided by the application may further include: and storing the cache information in a cache server in a multi-level index mode. For example, a domain name may be used as a parent directory, and the corresponding cache information under the domain name is correspondingly stored under the index child directory. As shown in fig. 2. Fig. 2 illustrates an example of a storage manner using domain names as indexes. The domain name a has 5 pieces of cache information a1, a2, a3, a4 and a5, which are correspondingly stored in the directory of the domain name a. The pair of domain names B is correspondingly stored under the directory where the domain name B is located by 3 pieces of cache information B1, B2 and B3. The pair of domain names C has 4 cache information C1, C2, C3 and C4, which are correspondingly stored in the directory of the domain name C.
In executing step 102, the cache information may be determined by way of a multi-level index. For example, the cache information C1 needs to be updated in the update request, it may be determined that the cache information C1 is stored in the domain name C directory, and during the query, the domain name C directory may be directly locked, and then the cache information C1 is searched under the domain name C directory.
And caching the cache information in a multi-level index mode so as to facilitate searching, processing and pushing during processing and pushing. And all cache information does not need to be searched and processed in a traversal mode like in the traditional mode.
The information caching method provided by the application can further include: the same cached information in different text formats is identified. The identification mode may be set as required, for example, the same cache information in different text formats is identified in a character string and the first bit is the same, for example, a compressed version of a certain cache information is identified by 1a, and an uncompressed version of the cache information is identified by 1 b.
Before processing the cache information according to the determined updating mode, the cache information needing to be processed in all text formats can be determined through identification. For example, if the compressed version of the cache information c1 to be processed is identified as 1a and the uncompressed version is identified as 1b, then it can be determined that the cache information c1 to be updated includes two text formats, a compressed version and an uncompressed version. When the cache information is processed according to the determined processing method, the cache information c1 of the cache information c1 in two text formats is processed.
The storage states of different version formats of the same cache information are identified by marking the same cache information in different text formats, for example, a compressed version and an uncompressed version are identified, so that the same cache information in all different text formats can be processed at the same time during processing and pushing.
The application also provides a cache information pushing method, as shown in fig. 3. Fig. 3 illustrates a cache information pushing method according to an exemplary embodiment, which may be applied to a cache server, and includes:
step 201, an access request of cache information is received.
Step 202, determining a processing mode of the cache information according to a preset processing mode and the latest processing time of the cache information, and processing the cache information according to the determined processing mode.
Step 203, pushing the processed cache information to the sending end of the access request.
The client sends an access request of the cache information to the cache server, and after the cache server receives the access request of the cache information, the cache server determines a processing mode of the cache information according to a preset processing mode and the latest processing time of the cache information.
If the update type in the preset processing mode is overdue, for example, the batch cache information is overdue or the URL cache information is overdue, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, namely, overdue the corresponding cache information, and sending an inquiry request to a target server providing the cache information, for example, a source station; if the feedback information indicates that the cache information is the latest version, recording the receiving time of the feedback information as the updating time, and pushing the cache information to a processing request sending terminal; and if the feedback information carries the cache information of the updated version, covering the cache information of the updated version with the cache information and storing the cache information to a cache server, recording the updating time, and pushing the cache information of the updated version to a processing request sending terminal.
If the source station sends an overdue task for the png batch cache files including the 1.png files in the specified directory to the cache server before the client sends an access request for the 1.png files in the specified directory to the cache server. When the cache server receives an access request of a client, firstly judging that the preset processing mode of the cache information of the 1.png file is an overdue task of batch cache files, performing overdue processing on the cache information of the 1.png file, sending an acquisition request to a source station, if the feedback information of the source station is received, indicating that the cache information of the 1.png file is the latest version, for example, receiving a 304 state code returned by the source station, indicating that the cache information of the 1.png file is the latest version, recording the receiving time of the feedback information as the updating time by the cache server, and pushing the cache information of the 1.png file to the client. And if the feedback information received from the source station is 200 state codes and carries the cache information of the updated version, covering the cache information of the 1.png file on the cache server with the cache information of the updated version, storing the cache information of the updated version to the cache server, and recording the updating time. And pushing the cache information of the updated version to a sending end of the processing request.
If the update type in the preset processing mode is deletion, for example, deletion of batch cache information or deletion of URL cache information, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an acquisition request to a target server providing the cache information; and updating corresponding cache information according to the feedback information, and pushing the updated cache information to a processing request sending terminal.
For example, if the source station sends a delete task to the cache server for a png batch of cache files that include 1.png files under a specified directory before the client sends an access request to the cache server for the 1.png files under the specified directory. When the cache server receives an access request of a client, firstly judging that the preset processing mode of the 1.png files is a task of deleting the batch cache files, deleting the 1.png files, sending an acquisition request to a source station, after receiving feedback information of the source station, storing the cache information of the 1.png files carried in the feedback information by the cache server, and pushing the updated cache information to the client.
The technical solution provided in the present application is described in detail below with reference to a specific example:
com, there are three files 1.png, 2.png, 3.png in total under the specified directory a.com of the cache server. The last treatment time was 8 months, 9 days, 10:00 in 2019.
Source station 8 month 10 day 13 in 2019: 00 sends a bulk expired request to the caching service specifying all of the png files under directory a.com. After receiving the batch expiration setting request, the cache server records cache information of all files with the end of png in the specified directory a.com in a regular expression mode, for example, the cache information is specified in an x-png mode, and records the processing mode of the batch cache information as expiration setting and the receiving time TG of the updating request as 13:00 of 8 months and 10 days in 2019. The given time may be any time set by the cache server, for example, the time may be selected to be performed when the load is low in the morning.
The source station is again in 2019, 8, 10, 15:00, sending a request for batch deletion of the batch cache information to the cache server again, namely deleting all the cache information of the files ending in the png under the a.com. The processing mode of the cache server for recording the batch cache information is deletion, and the receiving time TG of the updating request is recorded as 8 months, 10 days and 15:00 in 2019. In this case, the batch update method for the designated directory is batch deletion.
Client 16 in 2019, 8 month, 10 day: 00, sending an access request of a.com/1.png to a cache server, after receiving the access request, determining that a preset processing mode aiming at the cache information exists in the preset processing modes for deleting the batch of cache information, judging whether the update request time of the preset processing mode is later than the latest processing time of the cache information, finding that the update request time of the preset processing mode is 2019, 8, 9, 15:00 is later than the latest processing time of the cache information, 2019, 8, 9, 10:00, deleting the resource, namely a.com/1.png, sending a request for reacquiring the resource to a target server, such as a source station, caching the cache information of the resource returned by the target server, and recording the latest processing time of the cache data as 2019, 8, 10, 16: 00. and meanwhile, pushing the updated cache information to the client.
After the above processing, the latest processing time of the a.com/1.png in the cache server is 16:00 in 8/10/2019, and the latest processing time of the a.com/2.png and the a.com/3.png is 13:00 in 8/10/2019.
At a given time, 8 months and 11 days in the morning of 2019, 0:00, the cache server performs predetermined processing operations on a.com/1.png, a.com/2.png and a.com/3. png. Firstly, judging whether the set time of the preset processing mode is later than the latest processing time of the three files, wherein the latest processing time of a.com/1.png is 16:00 in 8/10/2019, and 15:00 in 8/10/2019, and the processing is not carried out. The latest processing time of the a.com/2.png and the a.com/3.png is 13:00 in 8 months and 10 days in 2019, the setting time of the preset processing mode is 15:00 later than the setting time of the a.com/2.png and the a.com/3.png in 8 months and 10 days in 2019, and the cache server deletes the cache information of the a.com/2.png and the a.com/3. png.
Client end in 2019, 8, 11, 10:00, sending an access request of a.com/2.png to a cache server, the cache server determining that no cache information about a.com/2.png exists through query, sending an acquisition request to a target server of the file, such as a source station or a server storing the file, and providing the cache information of the file to the cache server by the target server according to the acquisition request. The cache server stores the file and records the storage time as 8 months, 11 days and 10 days in 2019: 00, i.e. the most recent treatment time was 10:00 at 8 months and 11 days in 2019.
The present application further provides a processing apparatus for cache information, as shown in fig. 4, fig. 4 is an updating apparatus for cache information according to an exemplary embodiment, and the updating apparatus includes: the receiving module receives the updating request of the cache information, the updating module determines the updating mode of the cache information according to the updating request, and the cache information is updated according to the determined updating mode. The updating mode can comprise URL updating and batch updating.
Wherein the update module is configured to: according to the updating request, determining one of the updating modes of the cache information:
the first method is as follows: judging whether a preset updating mode in the updating request is a batch updating mode, if so, determining batch cache information to be updated, and recording the updating type and the updating request time in the batch updating mode; and determining cache information which is not updated according to the update type in the batch cache information in preset time, and updating according to the update type.
The second method comprises the following steps: judging whether the preset updating mode in the updating request is a preset batch updating mode which is cancelled or not, if so, cancelling the preset batch updating mode according to the cancelling type
The third method comprises the following steps: and judging whether the preset updating mode in the updating request is the URL updating mode, if so, updating the URL cache information according to the updating type, and recording the updating time.
The updating apparatus further includes: the storage module is used for storing cache information in a multi-level index mode; the update module is to: and determining the cache information to be updated in a multi-level index mode according to the updating request.
The updating apparatus further includes: the identification module is used for identifying the same cache information in different text formats;
the identification module is further used for determining the cache information in all text formats through identification before processing the cache information according to the determined updating mode;
the update module is to: and updating the cache information of all text formats.
The update module is to: and if a plurality of update requests for the same batch of cache information are received, recording the update type in the preset update mode in the last update request, and recording the update request time.
The present application further provides a cache information pushing apparatus, as shown in fig. 5, fig. 5 is a cache information pushing apparatus shown according to an exemplary embodiment, and the cache information pushing apparatus includes:
the request receiving module is used for receiving an access request of the cache information;
the processing module is used for determining a processing mode of the cache information according to a preset updating mode and the latest processing time of the cache information and processing the cache information according to the determined processing mode;
and the pushing module is used for pushing the processed cache information to a sending end of the access request.
Wherein the processing module is configured to: if the update type in the preset processing mode is overdue, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an inquiry request to a target server providing the cache information; if the feedback information indicates that the cache information is the latest version, recording the receiving time of the feedback information as the updating time, and pushing the cache information to a processing request sending terminal; and if the feedback information carries the cache information of the updated version, covering the cache information of the updated version with the cache information and storing the cache information to a cache server, recording the updating time, and pushing the cache information of the updated version to a processing request sending terminal.
If the update type in the preset processing mode is deletion, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an acquisition request to a target server providing the cache information; and updating corresponding cache information according to the feedback information, and pushing the updated cache information to a processing request sending terminal.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method as set forth in the present application.
The present application further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as proposed in the present application when executing said program.
FIG. 6 is a block diagram illustrating a computer device 600 for caching data updates, according to an example embodiment. For example, the computer device 600 may be provided as a server. Referring to fig. 6, the computer device 600 includes a processor 601, and the number of processors may be set to one or more as necessary. The computer device 600 further comprises a memory 602 for storing instructions, such as application programs, executable by the processor 601. The number of the memories can be set to one or more according to needs. Which may store one or more application programs. The processor 601 is configured to execute instructions to execute the above-mentioned updating method of the cache data and the above-mentioned pushing method of the cache data.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, including, but not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer, and the like. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional like elements in the article or device comprising the element.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and variations of this invention provided they come within the scope of the appended claims and their equivalents.

Claims (22)

1. A method for updating cache information, comprising:
receiving an updating request of cache information, determining an updating mode of the cache information according to the updating request, and updating the cache information according to the determined updating mode.
2. The updating method of claim 1, wherein the updating manner of the cache information comprises URL updating and batch updating.
3. The updating method of claim 2, wherein determining the updating manner of the cache information according to the updating request comprises one of:
the first method is as follows: judging whether a preset updating mode in the updating request is a batch updating mode, if so, determining batch cache information to be updated, and recording an updating type and updating request time in the batch updating mode;
and determining cache information which is not updated according to the update type in the batch cache information in preset time, and updating according to the update type.
The second method comprises the following steps: judging whether the preset updating mode in the updating request is a preset batch updating mode which is cancelled or not, if so, cancelling the preset batch updating mode according to the cancelling type;
the third method comprises the following steps: and judging whether the preset updating mode in the updating request is the URL updating mode, if so, updating the URL cache information according to the updating type, and recording the updating time.
4. The updating method of claim 1, wherein the updating method further comprises:
storing cache information in a multi-level index mode;
the updating method further comprises the following steps: and determining the cache information to be updated in a multi-level index mode according to the updating request.
5. The updating method of claim 1, wherein the updating method further comprises:
identifying the same cache information in different text formats;
determining the cache information of all text formats through the identification before processing the cache information according to the determined updating mode;
the updating the cache information according to the determined updating mode comprises: and updating the cache information of all text formats.
6. The updating method of claim 3, wherein the first mode further comprises:
and if a plurality of update requests for the same batch of cache information are received, determining the update type according to the update mode in the last update request, and recording the update request time.
7. A method for pushing cache information is characterized by comprising the following steps:
receiving an access request, determining a processing mode of the cache information according to a preset updating mode and the latest processing time of the cache information, processing the cache information according to the determined processing mode, and pushing the processed cache information to a sending end of the access request.
8. The push method according to claim 7, wherein the processing mode of the cache information is determined according to the predetermined processing mode and the latest processing time of the cache information:
if the update type in the preset processing mode is overdue, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an inquiry request to a target server providing the cache information; if the feedback information indicates that the cache information is the latest version, recording the receiving time of the feedback information as the updating time, and pushing the cache information to a processing request sending terminal; and if the feedback information carries the cache information of the updated version, covering the cache information of the updated version with the cache information and storing the cache information to a cache server, recording the updating time, and pushing the cache information of the updated version to a processing request sending terminal.
9. The push method according to claim 7, wherein the processing mode of the cache information is determined according to the predetermined processing mode and the latest processing time of the cache information: if the update type in the preset processing mode is deletion, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an acquisition request to a target server providing the cache information; and updating corresponding cache information according to the feedback information, and pushing the updated cache information to a processing request sending terminal.
10. An apparatus for updating cache information, comprising:
a receiving module for receiving the update request of the cache information,
and the updating module is used for determining an updating mode of the cache information according to the updating request and updating the cache information according to the determined updating mode.
11. The updating apparatus of claim 10,
the updating mode comprises URL updating and batch updating.
12. The update apparatus of claim 11, wherein the update module is to:
according to the updating request, determining one of the updating modes of the cache information:
the first method is as follows: judging whether a preset updating mode in the updating request is a batch updating mode, if so, determining batch cache information to be updated, and recording an updating type and updating request time in the batch updating mode;
and determining cache information which is not updated according to the update type in the batch cache information in preset time, and updating according to the update type.
The second method comprises the following steps: judging whether the preset updating mode in the updating request is a preset batch updating mode which is cancelled or not, if so, cancelling the preset batch updating mode according to the cancellation type
The third method comprises the following steps: and judging whether the preset updating mode in the updating request is the URL updating mode, if so, updating the URL cache information according to the updating type, and recording the updating time.
13. The updating apparatus of claim 10, wherein said updating apparatus further comprises:
the storage module is used for storing cache information in a multi-level index mode;
the update module is to: and determining the cache information to be updated in a multi-level index mode according to the updating request.
14. The updating apparatus of claim 10, wherein said updating apparatus further comprises:
the identification module is used for identifying the same cache information in different text formats;
the identification module is further used for determining the cache information in all text formats through the identification before processing the cache information according to the determined updating mode;
the update module is to: and updating the cache information of all text formats.
15. The update apparatus of claim 12, wherein the update module is to:
and if a plurality of update requests for the same batch of cache information are received, recording the update type in the preset update mode in the last update request, and recording the update request time.
16. A pushing device for cache information, comprising:
the request receiving module is used for receiving an access request of the cache information;
the processing module is used for determining a processing mode of the cache information according to a preset updating mode and the latest processing time of the cache information and processing the cache information according to the determined processing mode;
and the pushing module is used for pushing the processed cache information to the sending end of the access request.
17. The pushing device of claim 16, wherein the processing module is to:
if the update type in the preset processing mode is overdue, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an inquiry request to a target server providing the cache information; if the feedback information indicates that the cache information is the latest version, recording the receiving time of the feedback information as the updating time, and pushing the cache information to a processing request sending terminal; and if the feedback information carries the cache information of the updated version, covering the cache information of the updated version with the cache information and storing the cache information to a cache server, recording the updating time, and pushing the cache information of the updated version to a processing request sending terminal.
18. The pushing device of claim 16, wherein the processing module is to:
if the update type in the preset processing mode is deletion, judging whether the update request time of the preset processing mode is later than the latest processing time, if so, executing the preset processing mode, and sending an acquisition request to a target server providing the cache information; and updating corresponding cache information according to the feedback information, and pushing the updated cache information to a processing request sending terminal.
19. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
20. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 7 to 9.
21. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1 to 6 when executing the program.
22. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 7 to 9 when executing the program.
CN201910818007.7A 2019-08-30 2019-08-30 Cache information updating method, cache information pushing method, cache information updating device, cache information pushing device and cache information pushing medium Pending CN112445986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910818007.7A CN112445986A (en) 2019-08-30 2019-08-30 Cache information updating method, cache information pushing method, cache information updating device, cache information pushing device and cache information pushing medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910818007.7A CN112445986A (en) 2019-08-30 2019-08-30 Cache information updating method, cache information pushing method, cache information updating device, cache information pushing device and cache information pushing medium

Publications (1)

Publication Number Publication Date
CN112445986A true CN112445986A (en) 2021-03-05

Family

ID=74735221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910818007.7A Pending CN112445986A (en) 2019-08-30 2019-08-30 Cache information updating method, cache information pushing method, cache information updating device, cache information pushing device and cache information pushing medium

Country Status (1)

Country Link
CN (1) CN112445986A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699154A (en) * 2021-03-25 2021-04-23 上海洋漪信息技术有限公司 Multi-level caching method for large-flow data
CN113515530A (en) * 2021-03-30 2021-10-19 贵州白山云科技股份有限公司 Cache object updating method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878370A (en) * 2016-09-19 2017-06-20 阿里巴巴集团控股有限公司 The update method and equipment of a kind of local cache
CN108769166A (en) * 2018-05-17 2018-11-06 北京云端智度科技有限公司 A kind of CDN cache contents managing devices based on metadata
CN110046175A (en) * 2019-03-18 2019-07-23 阿里巴巴集团控股有限公司 A kind of buffer update, data return method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878370A (en) * 2016-09-19 2017-06-20 阿里巴巴集团控股有限公司 The update method and equipment of a kind of local cache
CN108769166A (en) * 2018-05-17 2018-11-06 北京云端智度科技有限公司 A kind of CDN cache contents managing devices based on metadata
CN110046175A (en) * 2019-03-18 2019-07-23 阿里巴巴集团控股有限公司 A kind of buffer update, data return method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699154A (en) * 2021-03-25 2021-04-23 上海洋漪信息技术有限公司 Multi-level caching method for large-flow data
CN113515530A (en) * 2021-03-30 2021-10-19 贵州白山云科技股份有限公司 Cache object updating method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11190587B1 (en) Synchronizing cloud data based upon network sensing operations
US20190026190A1 (en) Restoring data in a hierarchical storage management system
US20210004353A1 (en) Snapshot metadata arrangement for efficient cloud integrated data management
US20150100546A1 (en) Selective Synchronization in a Hierarchical Folder Structure
US8386494B2 (en) Providing data structures for determining whether keys of an index are present in a storage system
CN106202492B (en) Metadata service optimization method and system for network file system
EP2024874A2 (en) Permission-based document server
US20150142749A1 (en) Method and system for a safe archiving of data
US7376650B1 (en) Method and system for redirecting a request using redirection patterns
CN110442371B (en) Method, device and medium for releasing codes and computer equipment
US20060161591A1 (en) System and method for intelligent deletion of crawled documents from an index
CN112445986A (en) Cache information updating method, cache information pushing method, cache information updating device, cache information pushing device and cache information pushing medium
CN112448979B (en) Cache information updating method, device and medium
CN113282540A (en) Cloud object storage synchronization method and device, computer equipment and storage medium
US9990378B2 (en) Opportunistic clearing of sync states associated with a database
CN111190899A (en) Buried point data processing method and device, server and storage medium
CN111382142B (en) Database operation method, server and computer storage medium
CN108241758B (en) Data query method and related equipment
US10860212B1 (en) Method or an apparatus to move perfect de-duplicated unique data from a source to destination storage tier
CN113760830B (en) Distributed file storage editable system and method
CN106371867B (en) Financial equipment software updating method and system
US10942912B1 (en) Chain logging using key-value data storage
WO2018094689A1 (en) Method, apparatus and device for improving browsing experience
CN111435342B (en) Poster updating method, poster updating system and poster management system
CN114968963A (en) File overwriting method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination