CN114691611A - Directory refreshing processing method and device, electronic equipment and storage medium - Google Patents

Directory refreshing processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114691611A
CN114691611A CN202210255229.4A CN202210255229A CN114691611A CN 114691611 A CN114691611 A CN 114691611A CN 202210255229 A CN202210255229 A CN 202210255229A CN 114691611 A CN114691611 A CN 114691611A
Authority
CN
China
Prior art keywords
directory
resource
request
condition
target
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
CN202210255229.4A
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202210255229.4A priority Critical patent/CN114691611A/en
Publication of CN114691611A publication Critical patent/CN114691611A/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/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Abstract

The application provides a directory refreshing processing method and device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring a first directory refreshing request; under the condition that the first directory refreshing request meets the deleting condition, operating the resources stored on the cache equipment and belonging to the target directory so that the cache equipment can not respond to the resource request of the user terminal by using the resources belonging to the target directory; under the condition that a first target resource requested by a resource request of a user terminal belongs to resources in the target directory, acquiring a second target resource matched with the resource request from a source station; and sending the second target resource to the user terminal. By the method and the device, the problem that in the prior art, under the condition that the historical cache resources under the directory are not accessed and updated for a long time, the old resources are provided when the user terminal requests the resources under the directory again after the directory is deleted is solved.

Description

Directory refreshing processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing directory refresh, an electronic device, and a storage medium.
Background
When the user submits the directory for refreshing, the directory is issued to all CACHE devices, and all directories are maintained in the memory by using a dictionary tree mode. When the user accesses the cached resource again, the CACHE equipment firstly matches the requested resource with the dictionary tree in the memory, and if the matching is successful, the CACHE equipment returns to the source to obtain the updated resource again; if the matching fails, the resources in the cache can be continuously used, and the resources are directly sent to the user. But the directory refresh is passive refresh, i.e. refresh needs to be triggered by user request; that is, the directory needs to exist for a long time, if the existence time of the directory is short, the history cache resource under the directory is not updated due to long-time non-access, and the old resource is given by accessing the resource after the directory is deleted. In addition, the dictionary tree organization mode occupies more memory, and when the directory is more and more, a large amount of memory consumption is caused, and other services on the CACHE server are influenced. In order to ensure that the consumed memory of the dictionary tree is controllable, the number of directory refreshes submitted by customers is strictly controlled, so that the user requirements cannot be met.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for processing directory refresh, an electronic device, and a storage medium, which solve the problem in the prior art that a history cache resource in a directory is not accessed and updated for a long time, which may cause an old resource to be provided when a user terminal requests a resource in the directory again after the directory is deleted. The specific technical scheme is as follows:
in a first aspect of this embodiment, a method for processing directory refresh is provided, where the method includes: acquiring a first directory refreshing request, wherein the first directory refreshing request is used for indicating that resources in cache equipment which belong to a target directory are refreshed; under the condition that the first directory refreshing request meets the deleting condition, operating the resources stored on the cache equipment and belonging to the target directory so that the cache equipment can not respond to the resource request of the user terminal by using the resources belonging to the target directory; under the condition that a first target resource requested by a resource request of a user terminal belongs to resources in the target directory, acquiring a second target resource matched with the resource request from a source station; and sending the second target resource to the user terminal.
In a second aspect of this application, there is also provided a processing apparatus for directory refresh, including: the system comprises a first obtaining module, a first updating module and a second obtaining module, wherein the first obtaining module is used for obtaining a first directory updating request, and the first directory updating request is used for indicating that resources in cache equipment under a target directory are updated; the processing module is used for operating the resources stored in the cache equipment and belonging to the target directory under the condition that the first directory refreshing request meets the deleting condition, so that the cache equipment can not respond to the resource request of the user terminal by using the resources belonging to the target directory; a second obtaining module, configured to obtain, from a source station, a second target resource matching a resource request of a user terminal when a first target resource requested by the resource request belongs to a resource in the target directory; and the sending module is used for sending the second target resource to the user terminal.
In a third aspect of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; a memory for storing a computer program; a processor for implementing the method steps of the first aspect when executing the program stored in the memory.
In a fourth aspect implemented by the present application, there is also provided a computer-readable storage medium having stored therein instructions which, when run on a computer, implement the method steps of the first aspect.
In the embodiment of the application, after the obtained first directory refresh request meets the deletion condition, the resource stored in the cache device and belonging to the target directory is operated, so that the cache device cannot respond to the resource request of the user terminal by using the resource belonging to the target directory, therefore, when the user terminal requests the resource belonging to the target directory, the latest resource can be directly obtained from the source station instead of obtaining the corresponding old resource from the cache device, and the latest resource can be sent to the user terminal, so that the user terminal can obtain the latest resource from the source station, and the problem that the old resource is given when the user terminal requests the resource belonging to the directory after the directory is deleted under the condition that the historical cache resource in the directory is not accessed and updated for a long time in the prior art is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a schematic diagram of a hardware environment of a directory refresh processing method according to an embodiment of the present application
FIG. 2 is a flowchart of a processing method for directory refresh in the embodiment of the present application;
FIG. 3 is a schematic structural diagram of a processing apparatus for directory refresh in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present application.
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.
In the following description, suffixes such as "module", "unit" used to indicate elements are used only for facilitating the explanation of the present application and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
Firstly, relevant terms in the embodiments of the present application are explained correspondingly;
and (3) directory refreshing: resources (URI) on the Web are organized according to directories, and when a plurality of resources in a certain directory are changed simultaneously, in order to reduce the number of URLs submitted for refreshing, 1 directory containing changed resources can be directly submitted, and a CDN (Content Delivery Network) can re-source and acquire cached resources in the directory, which is called directory refreshing.
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. The embodiment of the application provides a processing method for directory refreshing, which can be applied to a processing system for directory refreshing shown in fig. 1, where the system includes a CDN (Content Delivery Network, short for Content Delivery Network) source station, multiple CDN cache servers (cache devices, which may also be referred to as CDN nodes), and a user terminal, where the source station is a core in a CDN Network, and each CDN cache server obtains a file from the source station to be cached locally, and distributes the file to the user terminal when the user terminal requests it. As shown in fig. 1, the source station is connected to each CDN cache server through a network, and the user terminal may use a CDN cache server (typically a local CDN cache server) adapted to the source station through the network, where the network includes but is not limited to: the user terminal is not limited to a PC, a mobile phone, a tablet computer, etc.
The directory refresh method in the embodiment of the present application may be executed by a CDN cache server, and as shown in fig. 2, the directory refresh processing method in the embodiment of the present application includes the following steps:
step 202, obtaining a first directory refresh request, wherein the first directory refresh request is used for indicating to refresh resources belonging to a target directory in a cache device;
step 204, under the condition that the first directory refresh request meets the deletion condition, operating the resources stored in the cache device and belonging to the target directory, so that the cache device cannot respond to the resource request of the user terminal by using the resources belonging to the target directory;
step 206, under the condition that the first target resource requested by the resource request of the user terminal belongs to the resource in the target directory, acquiring a second target resource matched with the resource request from the source station;
and step 208, sending the second target resource to the user terminal.
Through the above steps 202 to 208, after the obtained first directory refresh request meets the deletion condition, the resource stored in the cache device under the target directory is operated, so that the cache device cannot respond to the resource request of the user terminal by using the resource under the target directory, therefore, when the user terminal requests the resource under the target directory, the latest resource is directly obtained from the source station, instead of obtaining the corresponding old resource from the cache device, and the latest resource can be sent to the user terminal, which ensures that the user terminal can obtain the latest resource from the source station, thereby solving the problem that the old resource is given when the user terminal requests the resource under the directory again after the directory is deleted under the condition that the historical cache resource under the directory is not accessed and updated for a long time in the prior art.
In this embodiment of the application, regarding the manner of operating the resource belonging to the target directory and stored on the cache device when the first directory refresh request in step 204 meets the deletion condition, the method may further include:
mode 1) deleting the resources belonging to the target directory on the cache device under the condition that the first directory refreshing request meets the deleting condition;
mode 2) under the condition that the first directory refreshing request meets the deleting condition, the resource belonging to the target directory on the cache device is set to be in an expired state.
By means of the above-mentioned mode 1) and mode 2), when the first directory refresh request meets the deletion condition, the resource in the target directory on the cache device is deleted or the resource in the target directory on the cache device is set to be in an expired state, that is, the cache device can delete or set the resource in the target directory to be unavailable (in the expired state), and when the user terminal requests the resource in the target directory, the user terminal can directly obtain the resource from the source station instead of obtaining the corresponding resource from the cache device, thereby ensuring that the user terminal can obtain the latest resource.
Further, in this embodiment of the present application, the meeting of the first directory refresh request with the deletion condition may include:
1) determining that the first directory refresh request meets a deletion condition under the condition that the storage duration of the first directory refresh request reaches a first duration;
it can be seen that each directory refresh request has a corresponding storage duration in the memory structure, and the storage duration may be set according to actual requirements, for example, the storage duration may be related to a refresh resource corresponding to the directory refresh request, or the storage duration is set in advance by the device that initiates the request when sending the refresh request. Whether the directory refreshing request meets the deleting condition can be determined through comparison of the storage duration and the first duration, namely, under the condition that the storage duration of the first directory refreshing request reaches the first duration, the first directory refreshing request meets the deleting condition is determined, and then resources stored on the cache device and belonging to the target directory are operated, so that the cache device cannot respond to the resource request of the user terminal by using the resources belonging to the target directory, and passive refreshing of the storage duration according to the directory refreshing request is achieved.
In the related technology, after a user terminal submits a directory refreshing request, the directory refreshing request is inserted into a data structure (a dictionary tree or an optimized dictionary tree structure) in a memory, then the refreshing of a response client is successful, the request of a netizen is matched with the data structure in the memory, and if the matching is successful, the request returns to the source to obtain updated resources again; and if the matching fails, directly responding the resources in the cache equipment to the user terminal. Therefore, in the case of passive refresh in the embodiment of the present application, even if matching fails, the updated resource can be acquired again.
2) And under the condition that the first directory refresh request is extracted, determining that the first directory refresh request meets a deletion condition, wherein the directory refresh request stored in the cache device is extracted by the cache device at intervals of a second duration, and the directory refresh request stored in the cache device waits to be extracted by the cache device according to the stored time sequence.
It can be seen that, in addition to the first directory refresh request itself having a storage duration, in the embodiment of the present application, the directory refresh request may also be extracted by the cache device at intervals of a second duration. The storage time sequence of the directory refresh request is extracted, for example, there are a directory refresh request a, a directory refresh request B, a directory refresh request C, and a directory refresh request D at present, and the storage time of the four directory refresh requests is sequentially that the directory refresh request a is earlier than the directory refresh request C, the directory refresh request C is earlier than the directory refresh request B, and the directory refresh request B is earlier than the directory refresh request D. Therefore, the cache device may extract one directory refresh request every second duration, that is, extract the directory refresh request a first, then extract the directory refresh request C, then extract the directory refresh request B, and finally extract the directory refresh request D. Of course, if there are other directory refresh requests stored in the memory structure during the fetching process, the fetching can be performed according to the above-described manner.
It can be seen that, in the embodiment of the present application, it may be determined that the first directory refresh request satisfies the deletion condition by setting a storage duration of the first directory refresh request and an interval duration at which the cache device extracts the directory refresh request, and in addition, the first duration and the second duration may be set correspondingly according to actual requirements.
In an optional implementation manner of the embodiment of the present application, after obtaining the first directory refresh request referred to in step 202, the method of the embodiment of the present application may further include: step 203, storing the first directory refresh request in a memory of the cache device;
in a specific example, the first directory refresh request may be maintained in the memory of the cache device in a manner that optimizes the post-class treemap structure in a manner of a treemap. Taking the dictionary tree mode of storing in the memory as an example, firstly, the dictionary tree regards character strings as character sequences, a tree structure from top to bottom is constructed according to the sequence of the character sequences in the character strings, and each edge in the tree structure corresponds to one character. The character strings stored in the dictionary tree are regarded as a path from a root node to a certain node, the end of a word corresponding to the node is marked on a terminal node, the character strings correspond to the directory refreshing request, the directory refreshing request can be converted into the corresponding character strings, and therefore the character strings can be stored in the dictionary tree in the memory structure.
After the operating the resource belonging to the target directory and stored in the cache device in the case that the first directory refresh request meets the deletion condition in step 204, the method of the embodiment of the present application further includes: in step 205, the first directory refresh request is deleted from the memory of the cache device.
After the first directory refresh request meets the deletion condition, the resources stored in the cache device and belonging to the target directory can be operated, so that the cache device cannot respond to the resource request of the user terminal by using the resources belonging to the target directory, that is, all resource refresh in the target directory corresponding to the directory refresh request is completed, therefore, the target directory can be deleted from the memory data structure of the cache device, and further, the memory is ensured to store only a small amount of unprocessed directory refresh requests in a short time, thereby reducing the memory consumption.
In an optional implementation manner of the embodiment of the present application, the method of the embodiment of the present application may further include: step 210, writing identification information corresponding to the created resource into a first file under the condition that the cache device creates the resource; inserting the first file into the second file; wherein the second file is used for maintaining cached resources of the caching device;
it should be noted that the identification information may be a URL (Uniform Resource Locator) or other identification that can be used to identify a Resource in a specific example, the first file may be a file stored in advance on a disk, the first file may be inserted into a second file after the identification information is written into the first file, and the second file may be a db file or other file that can maintain resources of a cache device in a specific example, and the resources on the cache device are maintained based on the first file in the db file.
Based on the foregoing step 210, regarding the manner of operating the resource belonging to the target directory and stored on the cache device when the first directory refresh request in step 204 in the embodiment of the present application satisfies the deletion condition, the method may further include: and under the condition that the first directory refreshing request meets the deleting condition, determining the resources which are stored on the cache device and belong to the target directory according to the second file, and operating the resources which belong to the target directory.
Because the second file includes the first file and the identification information of the resource is written in the first file, the resource stored on the cache device and belonging to the target directory can be determined according to the second file in the embodiment of the present application.
In an optional implementation manner of the embodiment of the present application, based on the first document and the second document, the method steps in the embodiment of the present application may further include:
step 212, comparing the resources maintained by the second file with the resources stored in the cache device;
in step 214, in the case that the first resource exists in the resources maintained by the second file, the identification information corresponding to the first resource is deleted from the second file, where the first resource is not stored in the cache device.
As can be seen from the foregoing step 212 and step 214, if the resource maintained by the second file is not stored in the cache device, the identification information corresponding to the resource is deleted from the second file, so that the second file is slimmed, and the validity of the resource maintained by the second file is ensured. Taking the second file as a db file as an example, in a low-peak flow period, checking each resource in the db file to see whether the resource is still cached in the caching device, and if the resource is not cached (no access is performed after refreshing), deleting the URL corresponding to the resource from the ordered db file, thereby ensuring that the resources in the db file are all valid records and preventing the db file from being larger and larger due to accumulation of invalid records.
Corresponding to fig. 2, an embodiment of the present application further provides a processing apparatus for directory refresh, as shown in fig. 3, the apparatus includes:
a first obtaining module 32, configured to obtain a first directory refresh request, where the first directory refresh request is used to instruct to refresh a resource in the cache device that belongs to the target directory;
the processing module 34 is configured to, when the first directory refresh request meets the deletion condition, operate the resource stored in the cache device and belonging to the target directory, so that the cache device cannot respond to the resource request of the user terminal by using the resource belonging to the target directory;
a second obtaining module 36, configured to obtain, from the source station, a second target resource matching the resource request when the first target resource requested by the resource request received from the user terminal belongs to a resource in the target directory;
and a sending module 38, configured to send the second target resource to the user terminal.
By the device, after the obtained first directory refresh request meets the deletion condition, the resource stored in the cache device and belonging to the target directory is operated, so that the cache device cannot respond to the resource request of the user terminal by using the resource belonging to the target directory, therefore, when the user terminal requests the resource belonging to the target directory, the latest resource can be directly obtained from the source station instead of obtaining the corresponding old resource from the cache device, and the latest resource can be sent to the user terminal, so that the user terminal can obtain the latest resource from the source station, and the problem that the old resource is given when the user terminal requests the resource belonging to the directory after the directory is deleted under the condition that the historical cache resource in the directory is not accessed and updated for a long time in the prior art is solved.
Optionally, the processing module 34 in this embodiment of the present application further includes: and the deleting unit is used for deleting the resources belonging to the target directory on the cache device under the condition that the first directory refreshing request meets the deleting condition.
Optionally, the processing module 34 in this embodiment may further include: and the setting unit is used for setting the resources belonging to the target directory on the cache device to be in an expired state under the condition that the first directory refreshing request meets the deleting condition.
Optionally, the apparatus in this embodiment of the present application may further include: the storage module is used for storing the first directory refreshing request in a memory of the cache device after the first directory refreshing request is acquired; and the first deleting module is used for deleting the first directory refresh request from the memory of the cache device after operating the resources which are stored on the cache device and belong to the target directory under the condition that the first directory refresh request meets the deleting condition.
Optionally, the apparatus in this embodiment of the present application may further include: the writing module is used for writing the identification information corresponding to the created resource into a first file under the condition that the cache equipment creates the resource; the inserting module is used for inserting the first file into the second file; wherein the second file is used for maintaining cached resources of the caching device;
based on this, the processing module 34 in the embodiment of the present application may further include: and the processing unit is used for determining the resources which are stored on the cache equipment and belong to the target directory according to the second file and operating the resources which belong to the target directory under the condition that the first directory refreshing request meets the deleting condition.
Optionally, the apparatus in this embodiment of the present application may further include: the comparison module is used for comparing the resources maintained by the second file with the resources stored in the cache equipment; and the second deleting module is used for deleting the identification information corresponding to the first resource from the second file under the condition that the first resource exists in the resources maintained by the second file, wherein the first resource is not stored in the cache device.
Optionally, the apparatus in this embodiment of the present application may further include: the first determining module is used for determining that the first directory refreshing request meets the deleting condition under the condition that the storage duration of the first directory refreshing request reaches a first duration before the resources which are stored on the cache device and belong to the target directory are operated; alternatively, the first and second electrodes may be,
the first determining module is used for determining that the first directory refresh request meets the deletion condition under the condition that the first directory refresh request is extracted, wherein the cache device extracts the directory refresh requests stored in the cache device at intervals of a second duration, and the directory refresh requests stored in the cache device wait to be extracted by the cache device according to the stored time sequence.
The embodiment of the present application further provides an electronic device, as shown in fig. 4, which includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401, when configured to execute the program stored in the memory 403, implements the method steps in fig. 1, and the functions of the method steps are the same as those of the method steps in fig. 1, which are not described herein again.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the directory refresh processing method in any one of the above embodiments.
In yet another embodiment provided by the present application, there is further provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the processing method for directory refresh described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, 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 process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (10)

1. A method for processing directory refreshing, comprising:
acquiring a first directory refreshing request, wherein the first directory refreshing request is used for indicating that resources in cache equipment which belong to a target directory are refreshed;
under the condition that the first directory refreshing request meets the deleting condition, operating the resources which are stored in the cache equipment and belong to the target directory so that the cache equipment can not respond to the resource request of the user terminal by using the resources which belong to the target directory;
under the condition that a first target resource requested by a resource request of a user terminal belongs to resources in the target directory, acquiring a second target resource matched with the resource request from a source station;
and sending the second target resource to the user terminal.
2. The method according to claim 1, wherein in a case that the first directory refresh request satisfies a deletion condition, performing an operation on a resource stored on a cache device under the target directory includes:
and deleting the resources belonging to the target directory on the cache device under the condition that the first directory refreshing request meets the deleting condition.
3. The method according to claim 1, wherein in a case that the first directory refresh request satisfies a deletion condition, performing an operation on a resource stored on a cache device under the target directory includes:
and under the condition that the first directory refreshing request meets the deleting condition, setting the resources belonging to the target directory on the cache device to be in an expired state.
4. The method of claim 1,
after obtaining the first directory refresh request, the method further comprises: storing the first directory refresh request in a memory of the cache device;
when the first directory refresh request satisfies the deletion condition, after operating the resource stored on the cache device and belonging to the target directory, the method further includes: and deleting the first directory refresh request from the memory of the cache device.
5. The method of claim 1,
the method further comprises the following steps: under the condition that the cache equipment creates the resource, writing identification information corresponding to the created resource into a first file; inserting the first file into a second file; wherein the second file is used to maintain the cached resources of the caching device;
when the first directory refresh request meets the deletion condition, operating the resources stored on the cache device and belonging to the target directory, including: and under the condition that the first directory refreshing request meets the deleting condition, determining the resources stored on the cache device and belonging to the target directory according to the second file, and operating the resources belonging to the target directory.
6. The method of claim 5, further comprising:
comparing the resources maintained by the second file with the resources stored in the cache device;
and deleting the identification information corresponding to the first resource from the second file under the condition that the first resource exists in the resources maintained by the second file, wherein the first resource is not stored in the cache device.
7. The method of claim 1, wherein prior to operating on resources stored on a caching device that belong under the target directory, the method further comprises:
determining that the first directory refreshing request meets a deleting condition under the condition that the storage duration of the first directory refreshing request reaches a first duration; alternatively, the first and second electrodes may be,
and under the condition that the first directory refresh request is extracted, determining that the first directory refresh request meets a deletion condition, wherein the cache device extracts the directory refresh requests stored in the cache device at a second time interval, and the directory refresh requests stored in the cache device wait to be extracted by the cache device according to the stored time sequence.
8. A directory refresh processing apparatus, comprising:
the system comprises a first obtaining module, a first updating module and a second obtaining module, wherein the first obtaining module is used for obtaining a first directory updating request, and the first directory updating request is used for indicating that resources in the cache device belong to a target directory are updated;
the processing module is used for operating the resources stored in the cache equipment and belonging to the target directory under the condition that the first directory refreshing request meets the deleting condition, so that the cache equipment can not respond to the resource request of the user terminal by using the resources belonging to the target directory;
a second obtaining module, configured to obtain, from a source station, a second target resource matching a resource request of a user terminal when a first target resource requested by the resource request belongs to a resource in the target directory;
and the sending module is used for sending the second target resource to the user terminal.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202210255229.4A 2022-03-15 2022-03-15 Directory refreshing processing method and device, electronic equipment and storage medium Pending CN114691611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210255229.4A CN114691611A (en) 2022-03-15 2022-03-15 Directory refreshing processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210255229.4A CN114691611A (en) 2022-03-15 2022-03-15 Directory refreshing processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114691611A true CN114691611A (en) 2022-07-01

Family

ID=82139995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210255229.4A Pending CN114691611A (en) 2022-03-15 2022-03-15 Directory refreshing processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114691611A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979025A (en) * 2022-04-13 2022-08-30 网宿科技股份有限公司 Resource refreshing method, device and equipment and readable storage medium
CN117435829A (en) * 2023-12-21 2024-01-23 杭州优云科技有限公司 Catalog preheating method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979025A (en) * 2022-04-13 2022-08-30 网宿科技股份有限公司 Resource refreshing method, device and equipment and readable storage medium
CN117435829A (en) * 2023-12-21 2024-01-23 杭州优云科技有限公司 Catalog preheating method and device
CN117435829B (en) * 2023-12-21 2024-03-22 杭州优云科技有限公司 Catalog preheating method and device

Similar Documents

Publication Publication Date Title
CN114691611A (en) Directory refreshing processing method and device, electronic equipment and storage medium
CN109450969B (en) Method and device for acquiring data from third-party data source server and server
US9864684B2 (en) Performing efficient cache invalidation
US10853425B2 (en) Systems and methods for managed asset distribution in a distributed heterogeneous storage environment
CN111046310A (en) Page processing method, device, server and computer readable storage medium
CN113886743B (en) Method, device and system for refreshing cache resources
CN107844488B (en) Data query method and device
CN111541561A (en) Microservice configuration information management system, microservice configuration information management method, microservice configuration information management server, and storage medium
CN110311975B (en) Data request processing method and device
CN111597259A (en) Data storage system, method, device, electronic equipment and storage medium
CN111382206A (en) Data storage method and device
WO2019041670A1 (en) Method, device and system for reducing frequency of functional page requests, and storage medium
CN109086414B (en) Method, apparatus and storage medium for searching blockchain data
CN112685211A (en) Error information display method and device, electronic equipment and medium
CN112437148A (en) Service request processing method and device, service server and system
US10417296B1 (en) Intelligent bookmarking with URL modification
CN115297085A (en) Domain name resolution updating method and device, electronic equipment and storage medium
CN113138943B (en) Method and device for processing request
CN112783842B (en) Log collection method and device
CN106790458B (en) Cross-local area network Memcache data sharing method and system
CN112181391A (en) Method and system capable of dynamically expanding data
CN110968267A (en) Data management method, device, server and system
CN116383537B (en) Page data preloading method, device, equipment and storage medium
CN113204554B (en) Method and device for realizing sparse writing of object storage system and electronic equipment
CN113362097B (en) User determination method and device

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