WO2021037072A1 - 一种缓存信息的更新方法、装置、设备及介质 - Google Patents

一种缓存信息的更新方法、装置、设备及介质 Download PDF

Info

Publication number
WO2021037072A1
WO2021037072A1 PCT/CN2020/111441 CN2020111441W WO2021037072A1 WO 2021037072 A1 WO2021037072 A1 WO 2021037072A1 CN 2020111441 W CN2020111441 W CN 2020111441W WO 2021037072 A1 WO2021037072 A1 WO 2021037072A1
Authority
WO
WIPO (PCT)
Prior art keywords
update
cache information
updated
information
batch
Prior art date
Application number
PCT/CN2020/111441
Other languages
English (en)
French (fr)
Inventor
马诗
陈小钟
李逸骏
Original Assignee
贵州白山云科技股份有限公司
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 贵州白山云科技股份有限公司 filed Critical 贵州白山云科技股份有限公司
Priority to US17/637,758 priority Critical patent/US11853229B2/en
Publication of WO2021037072A1 publication Critical patent/WO2021037072A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/128Replacement control using replacement algorithms adapted to multidimensional cache systems, e.g. set-associative, multicache, multiset or multilevel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0815Cache consistency protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/126Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Definitions

  • This application relates to but is not limited to the field of network security, and in particular to a method, device, device, and medium for updating cache information.
  • a lot of information (including resources, data, etc.) is cached on a cache server, such as a cache server of a CDN node, in order to obtain a faster response speed and reduce return to the source.
  • a cache server such as a cache server of a CDN node
  • the cached information needs to be updated or deleted in time, otherwise the user may access the old content, which may cause unknown risks.
  • the present application provides a method, device, equipment and medium for updating cache information.
  • a method for updating cache information including:
  • An update request for cache information is received, an update processing mode is determined according to the number of cache information to be updated indicated in the update request, and the cache information to be updated is updated according to the determined update processing mode.
  • determining the update processing method according to the number of cache information to be updated indicated by the update request includes:
  • the update processing mode is the first update processing mode; If not, the update processing method is the second update processing method.
  • updating the batch cache information to be updated according to the determined update processing method includes:
  • the update processing method is the first update processing method, record the update type and update request time; at a predetermined time, determine the cache information in the batch cache information that is not updated according to the update type, and update it according to the update type; or
  • the batch cache information that needs to be updated is updated according to the update type.
  • the update method further includes:
  • the update method further includes:
  • the update method further includes: determining the cache information to be updated in a multi-level index according to the update request.
  • the update method further includes:
  • the cache information that needs to be updated Before updating the cache information that needs to be updated according to the determined update processing mode, it further includes: determining all the cache information that needs to be updated in a text format through the identifier;
  • the updating the cache information that needs to be updated according to the determined update processing mode includes: updating all the cache information that needs to be updated in a text format.
  • the first update method further includes:
  • a device for updating cache information including:
  • the receiving module is set to receive the update request of the cached information
  • the determining modulus is set to determine the update processing mode according to the number of cache information to be updated indicated in the update request;
  • the update module is configured to update the cache information that needs to be updated according to the determined update processing mode.
  • the determining module is set to,
  • the update processing mode is the first update processing mode; If not, the update processing method is the second update processing method.
  • the update module is set to:
  • the update processing method is the first update processing method, record the update type and update request time; at a predetermined time, determine the cache information in the batch cache information that is not updated according to the update type, and update it according to the update type; or
  • the batch cache information that needs to be updated is updated according to the update type.
  • the updating device further includes:
  • the storage module is set to count the number of cached information in the specified directory.
  • the storage module is further configured to store cache information in a multi-level index
  • the update module is also configured to determine the cache information to be updated in a multi-level index according to the update request.
  • the updating device further includes:
  • the identification module is set to identify the same cache information in different text formats
  • the identification module is further configured to determine all the cache information in text format through the identification before updating the cache information that needs to be updated according to the determined update processing mode;
  • the update module is also configured to update all the cache information to be updated in text format.
  • the update module is also set to:
  • the update processing method is the first update processing method
  • the update type and update request time in the last update request are recorded, and at the predetermined time, according to the last update request
  • the update type updates the cache information in the batch cache information that is not updated according to the update type.
  • a computer-readable storage medium stores a computer program, and when the program is executed by a processor, the steps of the above method are realized.
  • a computer device which includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the processor implements the foregoing when the program is executed. Method steps.
  • the cached information can be processed in a timely manner, while reducing the pressure of returning to the source as much as possible, and at the same time ensuring that the cache service can be carried out stably and normally.
  • the cached information is cached through a multi-level index, so that it can be searched and processed and pushed during processing and pushing. There is no need to look up, process and push all cached information in a traversal manner as in the traditional mode.
  • the storage status of different versions of the same cached information is identified, for example, the compressed version and the uncompressed version are identified, so that when processing and pushing, all The same cached information in different text formats is processed and pushed.
  • Fig. 1 shows a method for updating cache information according to an exemplary embodiment
  • Fig. 2 shows a storage method using domain names as an index according to an exemplary embodiment
  • Fig. 3 shows a device for updating cache information according to an exemplary embodiment
  • Fig. 4 is a block diagram showing a computer device for updating cache information according to an exemplary embodiment.
  • This application provides a method for processing cached information, which receives an update request for cached information, according to the update request, determines whether the preset update mode in the update request is a batch update mode, and if so, according to the number of batch cached information that needs to be updated Determine the update processing method, and update the batch cache information that needs to be updated according to the determined update processing method.
  • the application also provides a device corresponding to the method for updating cache information. This application can perform differentiated processing based on the amount of batch cached information through the above method, which reduces the pressure of returning to the source as much as possible, and at the same time ensures that the cache service can be performed stably and normally.
  • a method for updating cache information is provided, which can be applied to a cache server, as shown in FIG. 1, which illustrates a method for updating cache information according to an exemplary embodiment.
  • FIG. 1 illustrates a method for updating cache information according to an exemplary embodiment.
  • Step 101 Receive an update request for cached information
  • the cache server receives the update request from the update request sender, for example, receives the update request from the source station.
  • Step 102 Determine an update processing mode according to the number of cache information to be updated indicated in the update request.
  • the cache information can be any required form of information, and can also be stored in a required manner.
  • the cache information can be metadata of related resources, and the metadata is stored on a disk.
  • the cache server determines whether the cache information to be updated indicated in the update request is batch cache information. If so, it determines whether the number of batch cache information to be updated is greater than a predetermined threshold. If so, you can follow The first update processing mode is processed, if not, it can be processed in the second update processing mode.
  • Step 103 Update the cache information that needs to be updated according to the determined update processing mode.
  • the update processing method is the first update processing method, record the update type and update request time; at a predetermined time, determine the cache information in the batch cache information that is not updated according to the update type, and update it according to the update type; or
  • the batch cache information that needs to be updated is updated according to the update type.
  • the types of batch cache information update processing methods can include:
  • the cache server In order to alleviate the processing pressure of the cache server, for the cache request indicated in the update request that needs to be updated, it will be determined according to the amount of cache information whether to process the update request upon receipt or to process it at a predetermined time.
  • the cache server receives the update request, it can determine whether the update request is a batch cache information update request, that is, whether there are multiple cache information to be updated, and if so, it is the batch cache information.
  • a predetermined threshold is set for the quantity of batch cache information under each specified directory, and the cache server will record the quantity of batch cache data under the specified directory in real time.
  • the batch cache information will be updated, but the batch cache information will be updated at a predetermined time. For example, you can choose to update the batch cache information when the load is low in the early morning.
  • it will first determine which ones have been updated according to the update type and which ones have not been updated according to the update type. And the cache information that has not been updated is updated according to the update type. If the quantity of the batch cache information in the designated directory does not exceed its predetermined threshold, then batch processing is performed on the batch cache information in the designated directory. If the received update request is for the cache information of a single file, the cache server updates the cache information of the single file when receiving the update request.
  • the cache server can record the update type and update request time in the update request in the form of a record table, and record the batch cache information that needs to be updated in the form of regular expressions, for example, record the needs in the form of regular expressions. Updated bulk cache information. In this way, the cache database can easily find all the cache information that needs to be updated when processing the update request, saving processing time and the pressure of the cache database.
  • the cache server regards the last update request as the final update task and records the time when the update request is received. For example, the origin site sends to the cache server a task to delete the *.png batch cache files in the specified directory, and before the scheduled time, sends the cache server a task to expire the *.png batch cache information in the specified directory. , That is, the same batch of cached information is forced to expire, the cache server records the batch of cached information processing tasks as set to expire, and records the update request time received by the expired task.
  • the cache database performs real-time quantity statistics on the batch cache information in the specified directory according to different specified directories for the cache information it caches.
  • the real-time counted quantity is compared with a preset threshold. Different processing methods are adopted according to the comparison result.
  • batch updates of the cache can be performed efficiently and quickly, reducing the back-to-source pressure as much as possible, and at the same time ensuring the stable and normal operation of the cache service is the goal of this application.
  • different strategies are adopted, which are more practical and efficient. For example, for a scenario where the amount of cached information in the specified directory is small, that is, when it is less than the preset threshold, the batch cache information can be updated directly, without the need to maintain the update request in the form of a record table. No need to query the record table.
  • the method for updating cache information provided in this application may further include: storing the cache information in a multi-level index in the cache server.
  • the domain name can be used as the parent directory, and the corresponding cache information under the domain name can be correspondingly stored in the index subdirectory. as shown in picture 2.
  • Fig. 2 exemplarily shows a storage method using domain names as indexes.
  • Domain name A corresponds to five cached information a1, a2, a3, a4 and a5, which are correspondingly stored in the directory where domain name A is located.
  • the domain name B pair uses three cached information b1, b2, and b3, which are correspondingly stored in the directory where the domain name B is located.
  • the domain name C pair uses 4 cached information c1, c2, c3 and c4, which are correspondingly stored in the directory where the domain name C is located.
  • the batch cache information that needs to be updated can be determined through a multi-level index. For example, in the update request, the batch cache information c1, c2, c3, and c4 need to be updated. It can be determined that the batch cache information c1, c2, c3, and c4 are stored in the domain name C directory. When querying, you can directly lock the domain name C directory. Then determine the batch cache information under the C directory.
  • the cached information is cached through a multi-level index, so that it can be searched and processed and pushed during processing and pushing. There is no need to search and process all cached information in a traversal manner as in the traditional mode.
  • the method for caching information provided in this application may further include: identifying the same cache information in different text formats.
  • the identification method can be set according to needs, for example, the same cache information in different text formats is identified by a string with the same first position, for example, a compressed version of a certain cache information is identified by 1a, and a non-compressed version of the cache information is used 1b to identify.
  • the cache information c1 to be processed Before processing the cache information according to the determined update mode, it is also possible to determine all the cache information to be processed in text format through the identifier. For example, if the compressed version of the cached information c1 to be processed is identified as 1a, and the uncompressed version is identified as 1b, then it can be determined that the cached information c1 to be updated includes two text formats, a compressed version and a non-compressed version, based on the identifiers. When processing the cache information according to the determined processing method, both the cache information c1 in the two text formats of the cache information c1 are processed.
  • the storage status of different versions of the same cached information is identified, such as the compressed version and the uncompressed version, so that all different texts can be processed and pushed at the same time.
  • the format of the same cache information is processed.
  • the origin station sends a request for expiration of all .png files in the specified directory a.com to the caching service at 13:00 on August 10, 2019.
  • the cache server judges that the update request is a batch expiration request, and judges whether the amount of batch cache information is greater than a preset threshold.
  • the number of the above-mentioned batch cache information is 3, if the preset threshold is 2.
  • the number of batches of cached information is greater than the preset threshold.
  • the cache server records the batch cache information update type, batch set expiration, and the receiving time TG of the update request is 13:00 on August 10, 2019, and specify all files ending with .png in the form of regular expressions to do batch Processing, for example, specify in the form of *.png.
  • the given time can be any time set by the cache server, for example, it can be done when the load is low in the early morning.
  • the origin station again sent a batch deletion request for the batch cache information to the cache server, that is, all files ending with .png under a.com were deleted.
  • the cache server stores the update request, and records the receiving time TG of the update request as 15:00 on August 10, 2019.
  • the batch update method for the specified directory is batch deletion.
  • the client sends an access request of a.com/1.png to the cache server at 16:00 on August 10, 2019.
  • the cache server determines that the preset processing methods for deleting the batch cache information mentioned above are targeted
  • the preset processing method of the cached information determines whether the update request time of the preset processing method is later than the latest processing time of the cached information, and it is found that the update request time of the preset processing method is later than the cache at 15:00 on August 9, 2019 The latest processing time of the information is at 10:00 on August 9, 2019.
  • the cache server deletes the resource (a.com/1.png), sends a request to the target server, such as the origin site, to reacquire the resource, and returns the target server
  • the most recent processing time for caching and recording the cached data of the resource’s cached data is 16:00 on August 10, 2019. At the same time, push the updated cache information to the client.
  • the latest processing time of a.com/1.png is 16:00 on August 10, 2019, and the latest processing time of a.com/2.png and a.com/3.png It is 13:00 on August 10, 2019.
  • the cache server performs scheduled processing operations on a.com/1.png, a.com/2.png, and a.com/3.png. Determine the cache information that is not updated according to the update type, and update it according to the update type. Among them, a.com/2.png and a.com/3.png are not updated according to the update type, and the cache server deletes the cache information of a.com/2.png and a.com/3.png to complete the information sent by the origin site Requests for bulk deletion.
  • the origin station sends a batch expiration request for all files in the specified directory a.com to the caching service at 13:00 on August 10, 2019.
  • batch processing uses regular expressions to specify all files ending in .png for batch processing, such as *.png.
  • the cache server determines whether the quantity of the batch cache information is greater than the preset threshold. The number of the above batch cache information is 3, if the preset threshold is 5. The number of batches of cached information is less than the preset threshold.
  • the cache server directly finds all the cache information under the specified directory a.com from the cache information table, that is, the cache information of the three files 1.png, 2.png, and 3.png, sets them to expire, and completes the sending of the source site Set expired requests in batches.
  • the present application also provides an apparatus for processing cached information, as shown in FIG. 3, which is an apparatus for updating cached information according to an exemplary embodiment, including: a receiving module configured to receive cached information
  • the update request determines the modulus and is set to determine the update processing method according to the number of cache information to be updated indicated in the update request; the update module is set to update the cache information to be updated according to the determined update processing method .
  • the determining module is further configured to determine whether the cache information to be updated indicated in the update request is batch cache information, if so, determine whether the number of batch cache information to be updated is greater than a preset threshold, and if so, update
  • the processing method is the first update processing method; if not, the update processing method is the second update processing method.
  • the update module is set to: when the update processing mode is the first update processing mode, record the update type and update request time; at a predetermined time, determine the cache information that is not updated according to the update type in the batch cache information, and according to the update type Update; or
  • the batch cache information to be updated is updated according to the update type.
  • the update device also includes a storage module, which is configured to perform quantitative statistics on the cached information in the designated directory.
  • the storage module is also configured to store cache information in a multi-level index.
  • the update module is also set to determine the cache information to be updated in a multi-level index according to the update request.
  • the updating device also includes an identification module, which is set to identify the same cache information in different text formats.
  • the identification module is also set to: before updating the cache information that needs to be updated according to the determined update processing mode, determine all the cache information in the text format through the identification; the update module is also set to: update all the cache information in the text format The cache information that needs to be updated.
  • the update module is also set to: when the update processing mode is the first update processing mode, if multiple update requests for the same batch cache information are received, record the update type and update request time in the last update request, At a predetermined time, update the cache information in the batch cache information that is not updated according to the update type according to the update type in the last update request.
  • the unit modules in the method for updating cache information in the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the steps of the method for updating cache information as described above when the computer program is executed.
  • the specific manner involved when the foregoing computer program is executed has been described in detail in the embodiment of the method, and will not be elaborated here.
  • Fig. 4 is a block diagram showing a computer device 400 for updating cache information according to an exemplary embodiment.
  • the computer device 400 may be provided as a server. 4
  • the computer device 400 includes a processor 401, and the number of processors can be set to one or more as required.
  • the computer device 400 further includes a memory 402 for storing instructions executable by the processor 401, such as application programs.
  • the number of memories can be set to one or more as required.
  • the stored application programs can be one or more.
  • the processor 401 is configured to execute instructions to execute the above-mentioned method for updating cache information and the above-mentioned method for pushing cache information.
  • this application may be provided as methods, devices (equipment), or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing 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 disk (DVD) or other optical disk storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or can be used for Any other medium that stores desired information and can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media. .
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • This application provides a method and device for processing cached information, which receives an update request for cached information, according to the update request, determines whether the preset update mode in the update request is a batch update mode, and if so, according to the batch cache information that needs to be updated The number determines the update processing method, and updates the batch cache information that needs to be updated according to the determined update processing method.
  • This application can perform differentiated processing according to the quantity of batch cached information through the above-mentioned method, which reduces the pressure of returning to the source as much as possible, and at the same time ensures that the cache service can be performed stably and normally.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本申请提供了一种缓存信息的更新方法,接收缓存信息的更新请求,根据所述更新请求中指示的需更新的缓存信息的数量确定更新处理方式,根据确定的更新处理方式更新所述需更新的缓存信息。本申请根据缓存信息的数量,使用不同的处理方式,这样可以根据需要进行缓存信息的处理,提高效率。

Description

一种缓存信息的更新方法、装置、设备及介质
本申请要求在2019年08月30日提交中国专利局、申请号为201910818157.8,发明名称为“一种缓存信息的更新方法、装置及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及但不限于网络安全领域,尤其涉及一种缓存信息的更新方法、装置、设备及介质。
背景技术
目前,很多信息(包括资源、数据等)为了获得更快的响应速度,减少回源,会将信息缓存在缓存服务器上,例如CDN节点的缓存服务器上。但是当信息进行更新之后,缓存的信息需要做到及时更新或是删除,否则用户访问到旧的内容,可能导致未知的风险。
发明内容
为克服相关技术中存在的问题,本申请提供一种缓存信息的更新方法、装置、设备及介质。
根据本申请的第一方面,提供一种缓存信息的更新方法,包括:
接收缓存信息的更新请求,根据所述更新请求中指示的需更新的缓存信息的数量确定更新处理方式,根据确定的更新处理方式更新所述需更新的缓存信息。
其中,根据所述更新请求指示需更新的缓存信息的数量确定更新处理方式包括:
判断所述更新请求中指示的需更新的缓存信息是否为批量缓存信息,如果是,判断需更新的批量缓存信息的数量是否大于预设阈值,如果是,更新处理方式为第一更新处理方式;如果不是,更新处理方式为第二更新处理方式。
其中,根据确定的更新处理方式更新所述需更新的批量缓存信息包括:
当更新处理方式为第一更新处理方式时,记录更新类型和更新请求时间;在预定时间,确定所述批量缓存信息中未按照更新类型更新的缓存信息,并按照更新类型更新;或者
当更新处理方式为第二更新处理方式时,根据更新类型更新需更新的批量缓存信息。
其中,所述更新方法还包括:
对指定目录下的缓存信息进行数量统计。
其中,所述更新方法还包括:
以多级索引的方式存储缓存信息;
所述更新方法还包括:根据所述更新请求,以多级索引的方式确定需更新的缓存信息。
其中,所述更新方法还包括:
标识不同文本格式的同一缓存信息;
在根据确定的更新处理方式更新所述需更新的缓存信息之前还包括,通过所述标识确定所有文本格式的所述需更新的缓存信息;
所述根据确定的更新处理方式更新所述需更新的缓存信息包括:更新所有文本格式的所述需更新的缓存信息。
其中,所述第一更新方式还包括:
如果接收到多个对相同批量缓存信息的更新请求,记录最后一次更新请求中的更新类型和更新请求时间,在预定时间,按照最后一次更新请求中的更新类型更新批量缓存信息中未按照更新类型更新的缓存信息。
本申请的另一个方面,提供了一种缓存信息的更新装置,包括:
接收模块,被设置为接收缓存信息的更新请求,
确定模量,被设置为根据所述更新请求中指示的需更新的缓存信息的数量确定更新处理方式;
更新模块,被设置为根据确定的更新处理方式更新所述需更新的缓存信息。
其中,所述确定模块被设置为,
判断所述更新请求中指示的需更新的缓存信息是否为批量缓存信息,如果是,判断需更新的批量缓存信息的数量是否大于预设阈值,如果是,更新处理方式为第一更新处理方式;如果不是,更新处理方式为第二更新处理方式。
其中,所述更新模块被设置为:
当更新处理方式为第一更新处理方式时,记录更新类型和更新请求时间;在预定时间,确定所述批量缓存信息中未按照更新类型更新的缓存信息,并按照更新类型更新;或者
当更新处理方式为第二更新处理方式时,根据更新类型更新需更新的批量缓存信息。
其中,所述更新装置还包括:
存储模块,被设置为对指定目录下的缓存信息进行数量统计。
其中,所述存储模块还被设置为:以多级索引的方式存储缓存信息;
所述更新模块还被设置为:根据更新请求,以多级索引的方式确定需更新的缓存信息。
其中,所述更新装置还包括:
标识模块,被设置为标识不同文本格式的同一缓存信息;
所述标识模块还被设置为,在根据确定的更新处理方式更新所述需更新的缓存信息之前,通过所述标识确定所有文本格式的所述缓存信息;
所述更新模块还被设置为:更新所有文本格式的所述需更新的缓存信息。
其中,所述更新模块还被设置为:
当更新处理方式为第一更新处理方式时,如果接收到多个对相同批量缓存信息的更新请求,记录最后一次更新请求中的更新类型和更新请求时间,在预定时间,按照最后一次更新请求中的更新类型更新批量缓存信息中未按照更新类型更新的缓存信息。
本申请的另一方面,提供了一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
本申请的另一方面,提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法的步骤。
本申请提供的一种缓存信息的处理方法和装置,可以实现以下有益效果:
1)对缓存信息能够进行及时处理,同时尽可能地降低了回源的压力,同时保障缓存服务可以稳定正常的进行。
2)对于批量处理的方式,根据缓存信息的数量,使用不同的处理方式,这样可以根据需要进行缓存信息的处理,提高效率。
3)通过多级索引的方式对缓存信息进行缓存,以便于在处理以及推送时进行查找并进行处理和推送。而不需要像传统模式下的需要以遍历的方式对所有缓存信息进行查找并进行处理和推送。
4)通过标记不同文本格式的同一缓存信息的方式,对同一缓存信息的不同版本格式的存储状态进行标识,例如对压缩版本和非压缩版本进行标识,以便于在处理和推送时,同时将所有不同文本格式的同一缓存信息进行处理和推送。
附图说明
构成本申请的一部分的附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为根据一示例性的实施例示出的一种缓存信息的更新方法;
图2为是根据一示例性实施例示出的一种以域名为作为索引的存储方式;
图3为根据一示例性实施例示出的一种缓存信息的更新装置;
图4为根据一示例性实施例示出的一种用于缓存信息更新的计算机设备的框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清 楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
本申请提供了一种缓存信息的处理方法,其接收缓存信息的更新请求,根据更新请求,判断更新请求中预设更新方式是否为批量更新方式,如果是,根据需更新的批量缓存信息的数量确定更新处理方式,根据确定的更新处理方式更新需更新的批量缓存信息。本申请还提供了一种与缓存信息的更新方法相对应的装置。本申请通过上述方法可以根据批量缓存信息的数量进行区别处理,尽可能地降低了回源的压力,同时保障缓存服务可以稳定正常的进行。
下面结合附图对本申请所提供的缓存信息更新的方法进行详细说明。
本申请的一个实施例中,提供了一种缓存信息的更新方法,可以应用于缓存服务器,如图1所示,图示了根据一示例性的实施例示出的一种缓存信息的更新方法,包括:
步骤101,接收缓存信息的更新请求;
缓存服务器从更新请求发送端接收更新请求,例如从源站接收更新请求。
步骤102,根据所述更新请求中指示的需更新的缓存信息的数量确定更新处理方式。
其中,缓存信息可以是任何需要形式的信息,也可以以需要的方式进行存储,例如缓存信息可以是相关资源的元数据,元数据存储在磁盘上。
所需更新的缓存信息的数量不同,可以采用不同的更新处理方式。缓存服务器在收到更新请求后,判断更新请求中所指示的需更新的缓存信息是否为批量缓存信息,如果是,判断该需更新的批量缓存信息的数量是否大于预定阈值,如果是,可以按照第一更新处理方式处理,如果不是,可以按照第二更新处理方式处理。
步骤103,根据确定的更新处理方式更新所述需更新的缓存信息。
当更新处理方式为第一更新处理方式时,记录更新类型和更新请求时间;在预定时间,确定所述批量缓存信息中未按照更新类型更新的缓存信息,并按 照更新类型更新;或者
当更新处理方式为第二更新处理方式时,根据更新类型更新需更新的批量缓存信息。
批量缓存信息更新处理方式的类型可以包括:
a.对指定目录下的批量缓存信息置强制过期;
b.对指定目录下的批量缓存信息删除。
为了减缓缓存服务器的处理压力,对于更新请求中指示的需更新的缓存请求,会根据缓存信息的数量来确定是接收到更新请求就进行处理,还是在预定时间进行处理。缓存服务器在接收到更新请求时,可以判断该更新请求是否为批量缓存信息更新请求,即需更新的缓存信息是否为多个,如果是,则为批量缓存信息。对于每个指定目录下的批量缓存信息的数量均设置有预定阈值,且缓存服务器会实时记录指定目录下批量缓存数据的数量。在接收到针对指定目录下批量处理缓存信息的更新请求时,先判断该指定目录下的批量缓存信息的数量是否超过了其预定阈值,如果是,按照第一更新方式处理,即并不是在接收到对该指定目录下批量缓存信息处理的更新请求时,就对该批量缓存信息进行更新处理,而是会在预定时间进行批量缓存信息的更新处理。例如,可以选用凌晨负载较低时进行批量缓存信息的更新处理。在预定时间,在进行对该批量缓存信息进行更新时,会先确定哪些已经按照更新类型进行了更新,哪些还未按照更新类型进行更新。并将未进行更新的缓存信息,按照更新类型进行更新。该指定目录下的批量缓存信息的数量未超过其预定阈值,则对该指定目录下的批量缓存信息进行批量处理。如果接收的更新请求是针对单一文件的缓存信息的,缓存服务器在接收到更新请求时,就对该单一文件的缓存信息进行更新。
在第一更新方式中,缓存服务器可以通过记录表的方式记录更新请求中更新类型和更新请求时间,并以规则表达式的形式记录需更新的批量缓存信息,例如以正则表达式的形式记录需更新的批量缓存信息。这样,可以使得缓存数据库在处理更新请求时,便于找到所有需要更新处理的缓存信息,节省处理时间和缓存数据库的压力。
在第一更新方式中,若在预定时间之前,对相同批量缓存信息提交了多次 更新任务,缓存服务器将最后一次更新请求作为最终的更新任务,并记录接收更新请求时间。例如,源站向缓存服务器发送了对指定目录下的*.png批量缓存文件的删除任务,又在预定时间前,向缓存服务器发送了对该指定目录下的*.png批量缓存信息置过期任务,即对相同批量缓存信息强制置过期,缓存服务器记录对该批量缓存信息处理任务为置过期,并记录置过期的任务接收的更新请求时间。
在本申请中,缓存数据库针对其缓存的缓存信息,按照不同的指定目录,对指定目录下的批量缓存信息进行实时数量统计。在收到某一指定目录下的批量缓存信息的更新请求时,将实时统计的数量与预设阈值进行比较。根据比较结果采用不同的处理方式。
通过这样的处理方式,可以高效快速的进行缓存的批量更新,尽可能降低回源压力,同时保障缓存服务稳定正常的进行是本申请的目标。对于批量更新资源,根据批量更新资源的数量,采用不同的策略,实用性更强,效率更高。例如,对于指定目录下缓存信息数量较少的场景,即小于预设阈值时,可以直接针对批量缓存信息进行更新,而不需要通过记录表的形式对该更新请求进行维护,需要更新时,也无需查询记录表。这样,减少了查询记录表、判断更新类型和更新请求时间的处理,可以直接从缓存信息表中找到对应指定目录下的批量缓存信息,进行更新,方便简单。此外,对于指定目录下缓存信息数量较少的场景,即小于预设阈值时,直接从缓存信息表中找到指定目录下的批量缓存信息进行更新操作,可以保证缓存的正常服务不受影响,同时较少的批量缓存信息同时回源也不会对源站造成较大的影响。在这样的前提下,可以快速完成批量更新任务,无需等到预定时间进行批量处理,也减少了预定时间对于批量缓存信息的处理压力。
本申请所提供的缓存信息的更新方法中,还可以包括:在缓存服务器中以多级索引的方式存储缓存信息。例如可以以域名作为父目录,并将该域名下的对应的缓存信息对应存储到该索引子目录下。如图2所示。在图2中示例性的示出了一种以域名为作为索引的存储方式。域名A对应有5个缓存信息a1,a2,a3,a4和a5,对应存储在域名A所在的目录下。域名B对用有3个缓存信息b1,b2和b3,对应存储在域名B所在的目录下。域名C对用有4个缓存信息 c1,c2,c3和c4,对应存储在域名C所在的目录下。
在执行步骤104时,可以通过多级索引的方式确定需更新的批量缓存信息。例如,在更新请求中需要对批量缓存信息c1,c2,c3和c4进行更新,可以确定批量缓存信息c1,c2,c3和c4存储在域名C目录,在查询时,可以直接锁定域名C目录,进而确定C目录下的批量缓存信息。
通过多级索引的方式对缓存信息进行缓存,以便于在处理以及推送时进行查找并进行处理和推送。而不需要像传统模式下的需要以遍历的方式对所有缓存信息进行查找并进行处理。
本申请所提供的缓存信息方法中,还可以包括:标识不同文本格式的同一缓存信息。标识方式可以根据需要设定,例如以字符串且首位相同方式对不同文本格式的同一缓存信息进行标识,例如对某一缓存信息的压缩版本用1a来标识,对该缓存信息的非压缩版本用1b来标识。
在根据所确定的更新方式,处理缓存信息之前,还可以通过标识确定所有文本格式的需处理的缓存信息。例如,需处理的缓存信息c1的压缩版本标识为1a,非压缩版本标识为1b,那么可以根据标识,确定需更新的缓存信息c1包括两种文本格式,压缩版本和非压缩版本。在根据所确定的处理方式,处理缓存信息时,对缓存信息c1的两种文本格式的缓存信息c1均进行处理。
通过标记不同文本格式的同一缓存信息的方式,对同一缓存信息的不同版本格式的存储状态进行标识,例如对压缩版本和非压缩版本进行标识,以便于在处理和推送时,同时将所有不同文本格式的同一缓存信息进行处理。
下面结合一个具体的示例详细说明本申请所提供的技术方案:
在缓存服务器的指定目录a.com下,共有三个文件1.png,2.png,3.png。最近处理时间为2019年8月9日10:00。
源站在2019年8月10日13:00向缓存服务发送指定目录a.com下所有.png文件的置过期请求。在接收了置过期请求后,缓存服务器判断该更新请求是批量置过期请求,判断批量缓存信息的数量是否大于预设阈值。上述批量缓存信息个数为3个,如果预设阈值为2个。批量缓存信息的数量大于预设阈值。缓存服务器记录批量缓存信息更新类型,批量置过期,和更新请求的接收时间TG 为2019年8月10日13:00,并以规则表达式的方式指定所有以.png结尾的文件,以做批量处理,例如以*.png的方式指定。给定时间可以是由缓存服务器设定的任何时间,例如,可以选用凌晨负载较低时进行。
源站又在2019年8月10日15:00,再次向缓存服务器发送针对该批量缓存信息进行批量删除的请求,即将a.com下所有以.png结尾的文件全部删除。缓存服务器存储该更新请求,并记录该更新请求的接收时间TG为2019年8月10日15:00。此时,针对该指定目录下的批量更新方式为批量删除。
客户端在2019年8月10日16:00,向缓存服务器发送a.com/1.png的访问请求,缓存服务器接收到访问请求后,确定上述批量缓存信息删除的预设处理方式中有针对该缓存信息的预设处理方式,判断预设处理方式的更新请求时间是否晚于该缓存信息的最近处理时间,发现预设处理方式的更新请求时间2019年8月9日15:00晚于缓存信息的最近处理时间2019年8月9日10:00,缓存服务器将该资源即a.com/1.png删除,向目标服务器,例如源站,发送重新获取该资源的请求,将目标服务器返回的资源的缓存信息缓存并记录该缓存数据的最近处理时间为2019年8月10日16:00。同时,将更新后的缓存信息推送至客户端。
经上述处理后,缓存服务器中,a.com/1.png的最近处理时间是2019年8月10日16:00,a.com/2.png和a.com/3.png的最近处理时间是2019年8月10日13:00。
在给定时间,凌晨2019年8月11日凌晨0:00,缓存服务器对a.com/1.png,a.com/2.png和a.com/3.png进行预定处理操作。确定未按照更新类型更新的缓存信息,并按照更新类型更新。其中,a.com/2.png和a.com/3.png未按照更新类型进行更新,缓存服务器删除a.com/2.png和a.com/3.png缓存信息,完成源站发送的批量删除的请求。
在本申请的另一个示例中,在缓存服务器的指定目录a.com下,共有三个文件1.png,2.png,3.png。最近处理时间为2019年8月9日10:00。
源站在2019年8月10日13:00向缓存服务发送指定目录a.com下所有文件的批量置过期请求。在批量置过期请求中,批量处理以正则表达式的方式指定所有以.png结尾的文件,以做批量处理,例如以*.png的方式指定。缓存服务 器接收该更新请求后,判断批量缓存信息的数量是否大于预设阈值。上述批量缓存信息个数为3个,如果预设阈值为5个。批量缓存信息的数量小于预设阈值。缓存服务器直接从缓存信息表中找到指定目录a.com下所有缓存信息,即三个文件1.png,2.png,3.png的缓存信息,将其进行置过期处理,完成源站发送的批量置过期的请求。
本申请还提供了一种缓存信息的处理装置,如图3所示,图3为根据一示例性实施例示出的一种缓存信息的更新装置,包括:接收模块,被设置为接收缓存信息的更新请求,确定模量,被设置为根据所述更新请求中指示的需更新的缓存信息的数量确定更新处理方式;更新模块,被设置为根据确定的更新处理方式更新所述需更新的缓存信息。
其中,确定模块还被设置为,判断所述更新请求中指示的需更新的缓存信息是否为批量缓存信息,如果是,判断需更新的批量缓存信息的数量是否大于预设阈值,如果是,更新处理方式为第一更新处理方式;如果不是,更新处理方式为第二更新处理方式。
更新模块被设置为:当更新处理方式为第一更新处理方式时,记录更新类型和更新请求时间;在预定时间,确定所述批量缓存信息中未按照更新类型更新的缓存信息,并按照更新类型更新;或者
当更新处理方式为第二更新处理方式时,根据更新类型更新需更新的批量缓存信息。
更新装置还包括存储模块,被设置为对指定目录下的缓存信息进行数量统计。
存储模块还被设置为,以多级索引的方式存储缓存信息。
更新模块还被设置为:根据更新请求,以多级索引的方式确定需更新的缓存信息。
更新装置还包括标识模块,被设置为标识不同文本格式的同一缓存信息。
标识模块还被设置为,在根据确定的更新处理方式更新所述需更新的缓存信息之前,通过所述标识确定所有文本格式的所述缓存信息;更新模块还被设置为:更新所有文本格式的所述需更新的缓存信息。
其中,更新模块还被设置为:当更新处理方式为第一更新处理方式时,如果接收到多个对相同批量缓存信息的更新请求,记录最后一次更新请求中的更新类型和更新请求时间,在预定时间,按照最后一次更新请求中的更新类型更新批量缓存信息中未按照更新类型更新的缓存信息。
本发明实施例的方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本发明实施例的缓存信息的更新方法中的单元模块可以根据实际需要进行合并、划分和删减。
本发明实施例还提供一种计算机可读存储介质,其上存储有计算机程序,其中,计算机程序被执行时实现如上述所述的缓存信息的更新方法的步骤。关于上述计算机程序被执行时涉及的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图4是根据一示例性实施例示出的一种用于缓存信息更新的计算机设备400的框图。例如,计算机设备400可以被提供为一服务器。参照图4,计算机设备400包括处理器401,处理器的个数可以根据需要设置为一个或者多个。计算机设备400还包括存储器402,用于存储可由处理器401的执行的指令,例如应用程序。存储器的个数可以根据需要设置一个或者多个。其存储的应用程序可以为一个或者多个。处理器401被设置为执行指令,以执行上述缓存信息的更新方法以及上述缓存信息的推送方法。
本领域技术人员应明白,本申请的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质,包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质等。此外,本领域普通技术人员公知的是,通信介质通常 包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
本申请是参照根据本发明实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的物品或者设备中还存在另外的相同要素。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请的意图也包含这些改动和变型在内。
工业实用性
本申请提供了一种缓存信息的处理方法和装置,其接收缓存信息的更新请求,根据更新请求,判断更新请求中预设更新方式是否为批量更新方式,如果是,根据需更新的批量缓存信息的数量确定更新处理方式,根据确定的更新处理方式更新需更新的批量缓存信息。本申请通过上述方法可以根据批量缓存信息的数量进行区别处理,尽可能地降低了回源的压力,同时保障缓存服务可以稳定正常的进行。

Claims (16)

  1. 一种缓存信息的更新方法,包括:
    接收缓存信息的更新请求,根据所述更新请求中指示的需更新的缓存信息的数量确定更新处理方式,根据确定的更新处理方式更新所述需更新的缓存信息。
  2. 如权利要求1所述的缓存信息的更新方法,其中,根据所述更新请求指示需更新的缓存信息的数量确定更新处理方式包括:
    判断所述更新请求中指示的需更新的缓存信息是否为批量缓存信息,如果是,判断需更新的批量缓存信息的数量是否大于预设阈值,如果是,更新处理方式为第一更新处理方式;如果不是,更新处理方式为第二更新处理方式。
  3. 如权利要求2所述的缓存信息的更新方法,其中,根据确定的更新处理方式更新所述需更新的批量缓存信息包括:
    当更新处理方式为第一更新处理方式时,记录更新类型和更新请求时间;在预定时间,确定所述批量缓存信息中未按照更新类型更新的缓存信息,并按照更新类型更新;或者
    当更新处理方式为第二更新处理方式时,根据更新类型更新需更新的批量缓存信息。
  4. 如权利要求1所述的更新方法,所述更新方法还包括:
    对指定目录下的缓存信息进行数量统计。
  5. 如权利要求1所述的更新方法,所述更新方法还包括:
    以多级索引的方式存储缓存信息;
    所述更新方法还包括:根据所述更新请求,以多级索引的方式确定需更新的缓存信息。
  6. 如权利要求1所述的更新方法,所述更新方法还包括:
    标识不同文本格式的同一缓存信息;
    在根据确定的更新处理方式更新所述需更新的缓存信息之前还包括,通过 所述标识确定所有文本格式的所述需更新的缓存信息;
    所述根据确定的更新处理方式更新所述需更新的缓存信息包括:更新所有文本格式的所述需更新的缓存信息。
  7. 如权利要求3所述的更新方法,其中,所述第一更新方式还包括:
    如果接收到多个对相同批量缓存信息的更新请求,记录最后一次更新请求中的更新类型和更新请求时间,在预定时间,按照最后一次更新请求中的更新类型更新批量缓存信息中未按照更新类型更新的缓存信息。
  8. 一种缓存信息的更新装置,包括:
    接收模块,被设置为接收缓存信息的更新请求,
    确定模量,被设置为根据所述更新请求中指示的需更新的缓存信息的数量确定更新处理方式;
    更新模块,被设置为根据确定的更新处理方式更新所述需更新的缓存信息。
  9. 如权利要求8所述的更新装置,其中,所述确定模块被设置为,
    判断所述更新请求中指示的需更新的缓存信息是否为批量缓存信息,如果是,判断需更新的批量缓存信息的数量是否大于预设阈值,如果是,更新处理方式为第一更新处理方式;如果不是,更新处理方式为第二更新处理方式。
  10. 如权利要求9所述的更新装置,其中,所述更新模块被设置为:
    当更新处理方式为第一更新处理方式时,记录更新类型和更新请求时间;在预定时间,确定所述批量缓存信息中未按照更新类型更新的缓存信息,并按照更新类型更新;或者
    当更新处理方式为第二更新处理方式时,根据更新类型更新需更新的批量缓存信息。
  11. 如权利要求8所述的更新装置,所述更新装置还包括:
    存储模块,被设置为对指定目录下的缓存信息进行数量统计。
  12. 如权利要求8所述的更新装置,其中,
    所述存储模块还被设置为:以多级索引的方式存储缓存信息;
    所述更新模块还被设置为:根据更新请求,以多级索引的方式确定需更新 的缓存信息。
  13. 如权利要求8所述的更新装置,所述更新装置还包括:
    标识模块,被设置为标识不同文本格式的同一缓存信息;
    所述标识模块还被设置为,在根据确定的更新处理方式更新所述需更新的缓存信息之前,通过所述标识确定所有文本格式的所述缓存信息;
    所述更新模块还被设置为:更新所有文本格式的所述需更新的缓存信息。
  14. 如权利要求10所述的更新装置,其中,所述更新模块还被设置为:
    当更新处理方式为第一更新处理方式时,如果接收到多个对相同批量缓存信息的更新请求,记录最后一次更新请求中的更新类型和更新请求时间,在预定时间,按照最后一次更新请求中的更新类型更新批量缓存信息中未按照更新类型更新的缓存信息。
  15. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现权利要求1至7中任意一项所述方法的步骤。
  16. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至7中任意一项所述方法的步骤。
PCT/CN2020/111441 2019-08-30 2020-08-26 一种缓存信息的更新方法、装置、设备及介质 WO2021037072A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/637,758 US11853229B2 (en) 2019-08-30 2020-08-26 Method and apparatus for updating cached information, device, and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910818157.8A CN112448979B (zh) 2019-08-30 2019-08-30 一种缓存信息的更新方法、装置及介质
CN201910818157.8 2019-08-30

Publications (1)

Publication Number Publication Date
WO2021037072A1 true WO2021037072A1 (zh) 2021-03-04

Family

ID=74684544

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111441 WO2021037072A1 (zh) 2019-08-30 2020-08-26 一种缓存信息的更新方法、装置、设备及介质

Country Status (3)

Country Link
US (1) US11853229B2 (zh)
CN (1) CN112448979B (zh)
WO (1) WO2021037072A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112738148B (zh) * 2019-10-28 2024-05-14 中兴通讯股份有限公司 缓存内容的批量删除方法、装置、设备和可读存储介质
US11438433B1 (en) 2021-11-04 2022-09-06 Disney Enterprises, Inc. Progressive object refreshes in content delivery networks

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2445149A1 (en) * 2010-10-25 2012-04-25 Research in Motion Limited System and method for enabling applications to communicate using a peer-to-peer (P2P) system
CN102855293A (zh) * 2012-08-10 2013-01-02 广东电网公司电力科学研究院 一种电动汽车及充换电设施系统海量数据处理方法
CN103747484A (zh) * 2014-01-28 2014-04-23 大唐移动通信设备有限公司 一种rim流程系统信息处理方法和服务节点设备
CN105868234A (zh) * 2015-12-07 2016-08-17 乐视云计算有限公司 缓存数据的更新方法及装置
WO2016177283A1 (zh) * 2015-05-06 2016-11-10 阿里巴巴集团控股有限公司 缓存目录刷新方法和装置
CN106844507A (zh) * 2016-12-27 2017-06-13 星环信息科技(上海)有限公司 一种数据批处理的方法及设备

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665224B1 (en) * 2002-05-22 2003-12-16 Infineon Technologies Ag Partial refresh for synchronous dynamic random access memory (SDRAM) circuits
US7389393B1 (en) * 2004-10-21 2008-06-17 Symantec Operating Corporation System and method for write forwarding in a storage environment employing distributed virtualization
JP5238432B2 (ja) * 2008-09-26 2013-07-17 株式会社東芝 メタデータ収集装置、ならびにその方法およびプログラム
KR101977575B1 (ko) * 2012-09-28 2019-05-13 삼성전자 주식회사 디렉토리 엔트리 조회 장치, 그 방법 및 디렉토리 엔트리 조회 프로그램이 기록된 기록 매체
CN103236989B (zh) * 2013-04-25 2015-12-02 青岛海信传媒网络技术有限公司 一种内容分发网络中的缓存控制方法、设备及系统
CN109005056B (zh) * 2018-07-16 2020-06-23 网宿科技股份有限公司 基于cdn应用的存储容量评估方法和装置
CN109299087A (zh) * 2018-08-14 2019-02-01 中国平安财产保险股份有限公司 数据缓存方法、装置、计算机设备及存储介质
CN110069386A (zh) * 2019-04-29 2019-07-30 深圳市网心科技有限公司 一种运算终端数据处理方法、运算终端、系统及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2445149A1 (en) * 2010-10-25 2012-04-25 Research in Motion Limited System and method for enabling applications to communicate using a peer-to-peer (P2P) system
CN102855293A (zh) * 2012-08-10 2013-01-02 广东电网公司电力科学研究院 一种电动汽车及充换电设施系统海量数据处理方法
CN103747484A (zh) * 2014-01-28 2014-04-23 大唐移动通信设备有限公司 一种rim流程系统信息处理方法和服务节点设备
WO2016177283A1 (zh) * 2015-05-06 2016-11-10 阿里巴巴集团控股有限公司 缓存目录刷新方法和装置
CN105868234A (zh) * 2015-12-07 2016-08-17 乐视云计算有限公司 缓存数据的更新方法及装置
CN106844507A (zh) * 2016-12-27 2017-06-13 星环信息科技(上海)有限公司 一种数据批处理的方法及设备

Also Published As

Publication number Publication date
CN112448979B (zh) 2022-09-13
US20220283957A1 (en) 2022-09-08
CN112448979A (zh) 2021-03-05
US11853229B2 (en) 2023-12-26

Similar Documents

Publication Publication Date Title
US10958752B2 (en) Providing access to managed content
US8396938B2 (en) Providing direct access to distributed managed content
CN102629247B (zh) 一种数据处理方法、装置和系统
CN111198856B (zh) 文件管理方法、装置、计算机设备和存储介质
CN108614837B (zh) 文件存储和检索的方法及装置
WO2021037072A1 (zh) 一种缓存信息的更新方法、装置、设备及介质
US11507277B2 (en) Key value store using progress verification
CN111046041B (zh) 数据处理方法和装置、存储介质及处理器
WO2020125630A1 (zh) 文件读取
CN104516974A (zh) 一种文件系统目录项的管理方法及装置
US20180276267A1 (en) Methods and system for efficiently performing eventual and transactional edits on distributed metadata in an object storage system
US11080239B2 (en) Key value store using generation markers
US10241927B2 (en) Linked-list-based method and device for application caching management
WO2020192663A1 (zh) 一种数据管理方法及相关设备
CN111190861B (zh) 热点文件管理方法、服务器及计算机可读存储介质
US8082334B1 (en) Providing direct access to managed content
CN112445986B (zh) 一种缓存信息的更新方法、推送方法、装置及介质
KR101299555B1 (ko) 해시 함수 기반의 인덱스를 이용한 텍스트 검색 장치 및 방법
US10037155B2 (en) Preventing write amplification during frequent data updates
US11726979B2 (en) Determining a chronological order of transactions executed in relation to an object stored in a storage system
CN101872356B (zh) 一种内存数据库处理性能的方法与系统
WO2021017655A1 (zh) 获取索引节点号的方法、装置、计算设备和存储介质
CN112445986A (zh) 一种缓存信息的更新方法、推送方法、装置及介质
CN114036191A (zh) 基于数据库数据自动缓存的高效开发查询方法及系统
CN117667838A (zh) 一种文件记录管理方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20855978

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20855978

Country of ref document: EP

Kind code of ref document: A1