Mail-triggered intelligent cache cleaning method, device, equipment and medium
By monitoring and parsing emails to obtain cache identifiers and types, matching them with interfaces, and processing them asynchronously, the cumbersome cache cleanup process in the insurance business system is solved, improving the flexibility and efficiency of cache cleanup.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PING AN PROPERTY INSURANCE CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-12
AI Technical Summary
The existing insurance business system has a cumbersome cache clearing process, insufficient response time, and difficulty in handling a large number of cache clearing needs.
By monitoring a dedicated cache cleanup email address, parsing cache cleanup request emails, obtaining cache identifiers and types, matching the target cleanup interface, and assigning tasks to a distributed task queue for asynchronous processing.
It improves the flexibility, automation, and response time of cache cleanup, enabling it to efficiently handle a large number of cache cleanup needs and reduce manual intervention.
Smart Images

Figure CN122195878A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to an intelligent cache clearing method, apparatus, device, and medium based on email triggering. Background Technology
[0002] In the financial and insurance sector, insurance business systems typically need to interact with third-party systems (such as identity authentication systems, credit scoring systems, payment systems, or information service providers) by calling specific API interfaces when processing insurance transactions. To reduce unnecessary interface calls, insurance business systems employ caching mechanisms to cache frequently used insurance-related data. However, as the amount of cached data increases, the need for cache cleanup also grows. Currently, the cache cleanup process involves insurance agents proactively notifying technical personnel for manual cleanup when they discover inaccurate or outdated cached data. This process is cumbersome, lacks timely response, is inefficient, and struggles to handle large volumes of cache cleanup requests. Summary of the Invention
[0003] This invention provides an intelligent cache cleaning method, apparatus, device, and medium based on email triggering, aiming to solve the technical problems of existing cache cleaning processes being cumbersome, having insufficient response time, being inefficient, and being unable to cope with a large number of cache cleaning needs.
[0004] Firstly, an email-triggered intelligent cache cleanup method is provided, including: Upon detecting that a cache cleanup request email has been received in the dedicated cache cleanup mailbox, the cache cleanup request email is parsed to obtain the cache identifier and cache type; The target cache cleanup task is determined based on the cache identifier; Based on the cache type, match the target cleanup interface from the preset cleanup interface mapping table; The target cache cleanup task is assigned to the distributed task queue of the target cleanup interface for asynchronous cleanup processing.
[0005] Secondly, an email-triggered intelligent cache cleanup device is provided, including: The email parsing module is used to parse the cache cleanup request email when it is detected that a dedicated cache cleanup mailbox has received a cache cleanup request email, so as to obtain the cache identifier and cache type. The task determination module is used to determine the target cache cleanup task based on the cache identifier; The interface matching module is used to match the target cleanup interface from a preset cleanup interface mapping table according to the cache type; The cache cleanup module is used to allocate the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing.
[0006] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described email-triggered intelligent cache clearing method.
[0007] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described email-triggered intelligent cache clearing method.
[0008] In the above-mentioned intelligent cache cleanup method, device, equipment, and medium based on email triggering, when a cache cleanup request email is received in the dedicated cache cleanup mailbox, the cache cleanup request email is parsed to obtain the cache identifier and cache type; the target cache cleanup task is determined based on the cache identifier; the target cleanup interface is matched from the preset cleanup interface mapping table based on the cache type; and the target cache cleanup task is assigned to the distributed task queue of the target cleanup interface for asynchronous cleanup processing. In this way, on the one hand, receiving cache cleanup request emails through a dedicated cache cleanup email address not only ensures the reliability of these emails but also guarantees timely responses. On the other hand, parsing these emails to obtain cache identifiers and cache types provides crucial and accurate information for cache cleanup. This allows for the identification of target cache cleanup tasks based on the cache identifier and the selection of appropriate target cleanup interfaces based on the cache type. This effectively prevents accidental cleanup and ensures that target cache cleanup tasks are executed automatically using the correct cleanup methods or strategies, making cache cleanup more flexible, efficient, and controllable. Furthermore, distributing target cache cleanup tasks to a distributed task queue of the target cleanup interface for asynchronous cleanup processing significantly improves the concurrency and response speed of cache cleanup. Therefore, this approach simplifies the cache cleanup process, reduces manual intervention, and enhances the flexibility, automation, response timeliness, and efficiency of cache cleanup, enabling more efficient handling of large-scale cache cleanup demands. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a flowchart illustrating an email-triggered intelligent cache cleanup method according to an embodiment of the present invention; Figure 2 This is another flowchart illustrating an email-triggered intelligent cache cleanup method in one embodiment of the present invention; Figure 3 yes Figure 1 A schematic diagram of a specific implementation method for step S20; Figure 4 This is a schematic diagram of a smart cache cleaning device based on email triggering in one embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] The email-triggered intelligent cache cleanup method provided in this invention can be applied to the server. When the server detects that a cache cleanup request email has been received in a dedicated cache cleanup mailbox, it can parse the cache cleanup request email to obtain the cache identifier and cache type; determine the target cache cleanup task based on the cache identifier; match the target cleanup interface from a preset cleanup interface mapping table based on the cache type; and allocate the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing. In this way, on the one hand, receiving cache cleanup request emails through a dedicated cache cleanup email address not only ensures the reliability of these emails but also guarantees timely responses. On the other hand, parsing these emails to obtain cache identifiers and cache types provides crucial and accurate information for cache cleanup. This allows for the identification of target cache cleanup tasks based on the cache identifier and the selection of appropriate target cleanup interfaces based on the cache type. This effectively prevents erroneous cleanup and ensures that target cache cleanup tasks are executed automatically using the correct cleanup methods or strategies, making cache cleanup more flexible, efficient, and controllable. Furthermore, distributing target cache cleanup tasks to a distributed task queue of the target cleanup interface for asynchronous cleanup significantly improves the concurrency and response speed of cache cleanup. Therefore, this approach simplifies the cache cleanup process, reduces manual intervention, and improves the flexibility, automation, response timeliness, and efficiency of cache cleanup, enabling more efficient handling of large-scale cache cleanup demands. The server-side can be implemented using a standalone server or a server cluster composed of multiple servers. The intelligent cache cleanup method provided in this embodiment can also be implemented as software running on the server side, such as applications that implement the intelligent cache cleanup method, but is not limited to this form. The present invention will now be described in detail through specific embodiments.
[0013] Please see Figure 1 As shown, Figure 1 A flowchart illustrating an email-triggered intelligent cache cleanup method provided in an embodiment of the present invention includes the following steps: S10: Upon detecting that a cache cleanup request email has been received in the dedicated cache cleanup mailbox, the cache cleanup request email is parsed and processed to obtain the cache identifier and cache type.
[0014] The email-triggered intelligent cache cleanup method provided by this invention can be applied to cache cleanup scenarios in insurance business systems. By introducing an email-triggered intelligent cleanup mechanism, the cache cleanup process of insurance business systems is simplified, manual intervention is reduced, and the response timeliness and efficiency of cache cleanup are improved, enabling more efficient handling of large cache cleanup demands.
[0015] In some embodiments, please refer to Figure 2 The steps preceding S10 may also include: S50: Establish a dedicated cache cleanup mailbox, which is configured with an anti-spam mechanism; S60: Monitors a dedicated cache cleanup mailbox via the IMAP4 protocol.
[0016] For step S50, a dedicated cache cleanup email address is established as the sole channel for receiving all cache cleanup requests. This is used to centrally manage all cache cleanup requests and ensure that all cache cleanup requests are submitted through this single channel, avoiding confusion and duplicate processing caused by multiple channels.
[0017] Anti-spam mechanisms can be configured for a dedicated cache cleanup mailbox, ensuring that only legitimate and reliable emails reach it, thus guaranteeing the reliability of cache cleanup request emails. Specifically, the anti-spam mechanism can be an SPF (Sender Policy Framework) mechanism or a DKIM (DomainKeysIdentified Mail) mechanism. The dedicated cache cleanup mailbox uses the SPF mechanism to verify the sender's legitimacy, triggering rejection if the sender is illegitimate, ensuring that the dedicated cache cleanup mailbox only receives cache cleanup request emails from legitimate senders. Alternatively, the dedicated cache cleanup mailbox uses the DKIM mechanism to verify whether cache cleanup request emails have been tampered with in transit, ensuring the reliability of cache cleanup request emails, so that only reliable cache cleanup request emails reach the dedicated cache cleanup mailbox.
[0018] In some embodiments, after step S50, access permissions for the dedicated cache cleanup mailbox can be isolated through a preset authentication mechanism.
[0019] The default authentication mechanism can be OAuth 2.0. OAuth 2.0 is an authorization framework designed to allow users to grant applications access to their resources (such as email addresses) on a service provider (such as Google, Facebook, GitHub, etc.) without revealing their login credentials (such as usernames and passwords) to the application. The core goal of OAuth 2.0 is to provide a secure authorization method that avoids exposing users' sensitive information and makes the resource access process more flexible and granular.
[0020] By using the OAuth 2.0 authentication mechanism, it is possible to ensure that only authorized users (such as technical personnel responsible for cache cleanup) or applications implementing intelligent cache cleanup methods are allowed to access the dedicated cache cleanup email address. This allows for more secure and granular control over access permissions to the dedicated cache cleanup email address, ensuring that users or applications implementing intelligent cache cleanup methods can only access the content they are authorized to access. This achieves access permission isolation, avoids permission abuse or leakage, and thus ensures the security of cache cleanup request emails and cache cleanup tasks.
[0021] The default authentication mechanism can also be OpenID Connect (OIDC), which is an identity authentication layer based on OAuth 2.0. It adds authentication functionality to OAuth 2.0, allowing only authenticated users or applications to access the mailbox.
[0022] By using the OpenID Connect authentication mechanism, it is possible to ensure that only verified users (such as technicians responsible for cache cleanup) or applications implementing intelligent cache cleanup methods can access the cache cleanup mailbox, thus achieving a high level of security and flexible access control for the dedicated cache cleanup mailbox.
[0023] For step S60, the dedicated cache cleanup mailbox is monitored in real time via the IMAP4 (Internet Message Access Protocol version 4) protocol so that it can respond promptly once it receives a cache cleanup request email.
[0024] For step S10, if a cache cleanup request email is received in the dedicated cache cleanup mailbox, the cache cleanup request email is parsed and processed to obtain the cache identifier and cache type.
[0025] A cache identifier is a key value or label used to uniquely identify cached data. It typically acts as an index or key to quickly distinguish and locate different cached data stored in the cache repository. Examples of cache identifiers include vehicle identification number (VIN), policy number, and insurance product number.
[0026] Cache type refers to the kind or category of cached data stored in the cache library. Cache data can be categorized according to application scenarios, business needs, or data attributes. Each cache type represents a specific business function or data category, which in turn determines how to manage and clean up this cached data. Examples of cache types include: User data cache: Stores users' basic information, login status, preference settings, etc.
[0027] Product information cache: Stores basic product information, inventory quantity, price, etc.
[0028] Auto insurance data cache: Stores data related to auto insurance, such as vehicle identification number (VIN), vehicle owner information, policy number, and premium.
[0029] Agricultural insurance data cache: Stores meteorological data related to agricultural insurance.
[0030] Session cache: Stores user session information, typically used to maintain login status, etc.
[0031] Therefore, cache type plays a very important role in helping to effectively manage and clean up cached data.
[0032] In step S10 of some embodiments, parsing the cache cleanup request email to obtain the cache identifier and cache type may involve parsing the subject or body content of the cache cleanup request email using a regular expression engine, and extracting the cache identifier and cache type from the subject or body content.
[0033] In step S10, the subject or body of the cache cleanup request email can be parsed using regular expressions in the regular expression engine, thereby extracting the cache identifier and cache type from the subject or body. The design of the regular expression is determined by the structure of the email content, and typically a pattern is defined to identify the identifier.
[0034] For example, suppose the subject or body of the cache cleanup request email is: Subject: CLR@CarInsurance#123456 The message reads: "Please clear the data cache related to car insurance, identifier 123456."
[0035] You can use regular expressions to match the following: Cache type: CLR@(\w+) (Captures words prefixed with "CLR@" followed by one or more letters / numbers, i.e., cache type).
[0036] Cache identifier: #(\w+) (captures the combination of letters or numbers following the "#" symbol, i.e., the cache identifier).
[0037] The cache identifier "123456" and the cache type "CarInsurance" are then extracted using regular expressions.
[0038] In this way, the regular expression engine can efficiently and accurately extract cache identifiers and cache types, providing an important and accurate basis for subsequent cache cleanup.
[0039] S20: Determine the target cache cleanup task based on the cache identifier.
[0040] For S20, the target cache cleanup task is quickly and automatically identified based on the cache identifier.
[0041] In some embodiments, please refer to Figure 3 Step S20 may include, but is not limited to, the following steps: S21: Compare the cache identifier with the cache library; S22: Based on the mapping relationship between preset cache identifiers and cache cleanup tasks in the cache library, determine the cache cleanup task mapped to the preset cache identifier that is consistent with the cache identifier; S23: Select the identified cache cleanup task as the target cache cleanup task.
[0042] For steps S21-S23, each cache cleanup task typically includes multiple attributes, such as cache type, cleanup method, and cleanup target. For example, a cache cleanup task related to car insurance might involve car insurance-related data and configurations. A mapping relationship between cache cleanup tasks and preset cache identifiers can be pre-established in the cache library. This mapping relationship can be a configuration file or a memory-mapped structure, for example: Preset cache identifier: VIN 123456 → Cache cleanup task: Clean up vehicle insurance cache; Preset cache identifier: Policy number 789012 → Cache cleanup task: Clean up agricultural insurance cache, etc.
[0043] The extracted cache identifier can be compared with the cache library to find a preset cache identifier that matches the extracted cache identifier. Then, based on the mapping relationship between the preset cache identifier and the cache cleanup task, the cache cleanup task corresponding to the preset cache identifier that matches the cache identifier can be determined. This determined cache cleanup task is the target cache cleanup task. For example, by searching the cache library using the extracted cache identifier 123456, the corresponding cleanup task is found: clean up the car insurance cache related to vehicle identification number 123456.
[0044] The above method enables the target cache cleanup task to be located quickly and automatically, ensuring the accuracy of subsequent cache cleanup objects and preventing accidental cleanup.
[0045] S30: Match the target cleanup interface from the preset cleanup interface mapping table according to the cache type.
[0046] For step S30, a cleanup interface mapping table can be pre-established to associate each cache type covered by the cache library with its corresponding cleanup interface. These cleanup interfaces (which can also be understood as the specific methods or strategies for cleanup tasks) are pre-developed and define the rules and operations for how to clean up a certain type of cache data. For example: The cleanup interface for user data cache types needs to clear the user's login session information and update the user's status; The cleanup interface for product information cache types requires deleting the data cache for specific products. The cleanup interface for vehicle insurance data cache types requires deleting the vehicle identification number (VIN) cache. The cleanup interface for agricultural insurance data cache types requires deleting weather data cache within a specific time period, etc.
[0047] The cleanup interface mapping table binds each cache type covered by the cache library to its corresponding cleanup interface, for example: Cache type: UserDataCache → Clear interface: clearUserDataCache; Cache type: ProductCache → Clear ProductCache; Cache type: CarInsuranceCache → Cleanup interface: clearCarInsuranceCache; Cache type: SessionCache → Cleanup interface: clearSessionCache, etc.
[0048] Based on this, a target cleanup interface is selected for the extracted cache type from the preset cleanup interface mapping table, ensuring that the correct cleanup method or strategy is selected when processing the target cache cleanup task, thereby making cache cleanup more flexible, efficient and controllable.
[0049] S40: Assign the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing.
[0050] For step S40, the target cleanup interface can be integrated with message queue technologies such as RabbitMQ or Kafka, thereby publishing cache cleanup tasks as messages to the distributed task queue of the target cleanup interface. In this way, cache cleanup tasks will be processed asynchronously, and the target cleanup interface will consume cache cleanup tasks from the distributed queue and execute the corresponding cache cleanup operations.
[0051] In this way, asynchronous processing of cache cleanup tasks is achieved, which greatly improves the concurrency and response speed of cache cleanup. Furthermore, it ensures that cache cleanup tasks are processed without needing to concern oneself with the specific implementation details and processing progress of cache cleanup.
[0052] In some embodiments, before step S30, risk detection may be performed on the target cache cleanup task; if the target cache cleanup task is detected to be high-risk, an approval mechanism is triggered to conduct compliance approval of the target cache cleanup task; if the target cache cleanup task passes the compliance approval, step 30 is executed.
[0053] Before step S30, to avoid the risk of accidentally clearing cached data, risk detection can be performed on the target cache clearing task. For example, it can be detected whether the target cache clearing task involves sensitive data. If the target cache clearing task involves sensitive data, an approval mechanism is automatically triggered and the process is transferred to the approval node, requiring the relevant person in charge to confirm whether to execute the target cache clearing task. Once the approval is approved, the clearing operation will be executed, such as deleting or invalidating the relevant cached data of the cache clearing task, thereby ensuring the compliance and security of the execution of the target cache clearing task.
[0054] In some embodiments, after step S40, a cleanup end-to-end audit log can also be generated.
[0055] Throughout the cleanup process, relevant operation logs can be recorded to ensure the traceability of the task execution. For example, this includes recording which cached data was cleaned, who performed the operation, and the execution time. This not only aids in subsequent auditing but also ensures the compliance and security of the task execution.
[0056] After step S40 in some embodiments, a structured feedback email indicating cache cleanup completion can be generated if the target cache cleanup task is completed; if the number of failures of the target cache cleanup task exceeds a preset threshold, a circuit breaker mechanism can be triggered to terminate the target cache cleanup task and generate a structured feedback email indicating cache cleanup failure; and a structured feedback email indicating cache cleanup completion or cache cleanup failure can be returned via the SMTP protocol.
[0057] After step S40, if the target cleanup interface successfully completes the target cache cleanup task, a structured feedback email indicating cache cleanup completion is generated. This structured feedback email may include the following: Task ID: Facilitates tracking and backtracking.
[0058] Execution status: Successful, indicating a successful cleanup result.
[0059] Clean up the end-to-end audit log summary: record details of major operations, etc.
[0060] If the target cleanup interface fails to execute the target cache cleanup task, a circuit breaker mechanism will be triggered when the number of consecutive failures exceeds a preset threshold. This will automatically suspend the execution of the target cache cleanup task to prevent further impact due to the abnormality of the target cleanup interface. A structured feedback email regarding the cache cleanup failure will also be generated. The structured feedback email regarding the cache cleanup failure may include the following: Task ID: Facilitates tracking and backtracking.
[0061] Execution status: Failed, explicitly clean up the failure result.
[0062] Clean up the end-to-end audit log summary: Record the details of major operations and provide troubleshooting information.
[0063] Manual intervention alarm prompt: Automatically alerts technicians to intervene.
[0064] Afterwards, a structured feedback email indicating that cache clearing has been completed or failed is returned via the SMTP protocol (email sending protocol), ensuring that relevant personnel are informed of the task status in a timely manner, thereby enhancing the transparency of task execution and the speed of problem response.
[0065] As can be seen, the above solution introduces an email-triggered automated cleanup mechanism, utilizing email monitoring and parsing, task queue processing, and structured feedback to enable cache cleanup to be performed quickly without manual intervention, while ensuring security and traceability.
[0066] The email-triggered intelligent cache cleanup method provided in the above embodiments, upon detecting that a cache cleanup request email has been received in a dedicated cache cleanup mailbox, parses the cache cleanup request email to obtain a cache identifier and cache type; determines the target cache cleanup task based on the cache identifier; matches the target cleanup interface from a preset cleanup interface mapping table based on the cache type; and assigns the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing. In this way, on the one hand, receiving cache cleanup request emails through a dedicated cache cleanup mailbox not only ensures the reliability of the cache cleanup request emails but also ensures timely responses; on the other hand, parsing the cache cleanup request emails to obtain the cache identifier and cache type provides important and accurate information for cache cleanup, enabling the identification of the target cache cleanup task based on the cache identifier and the selection of the appropriate target cleanup interface based on the cache type. This not only effectively prevents erroneous cleanup but also ensures that the target cache cleanup task is automatically executed with the correct cleanup method or strategy, making cache cleanup more flexible, efficient, and controllable; furthermore, by assigning the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing, the concurrency capability and response speed of cache cleanup can be greatly improved. This simplifies the cache cleanup process, reduces manual intervention, and improves the flexibility, automation, response timeliness, and efficiency of cache cleanup, enabling it to handle large cache cleanup demands more efficiently.
[0067] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0068] It should be noted that the software tools or components not belonging to our company that appear in the embodiments of this invention are merely illustrative examples and do not represent actual use.
[0069] In one embodiment, an email-triggered intelligent cache cleaning device is provided, which corresponds one-to-one with the email-triggered intelligent cache cleaning method described in the above embodiments. For example... Figure 4 As shown, the email-triggered intelligent cache cleanup device includes an email parsing module 101, a task determination module 102, an interface matching module 103, and a cache cleanup module 104. Detailed descriptions of each functional module are as follows: The email parsing module 101 is used to parse the cache cleanup request email when it is detected that the dedicated cache cleanup mailbox has received a cache cleanup request email, and to obtain the cache identifier and cache type. Task determination module 102 is used to determine the target cache cleanup task based on the cache identifier; The interface matching module 103 is used to match a target cleanup interface from a preset cleanup interface mapping table according to the cache type. The cache cleanup module 104 is used to allocate the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing.
[0070] In one embodiment, the email parsing module 101 is specifically used for: The subject or body content of the cache cleanup request email is parsed using a regular expression engine; and... Extract the cache identifier and the cache type from the topic or the text content.
[0071] In one embodiment, the task determination module 102 is specifically used for: The cache identifier is compared with the cache library; Based on the mapping relationship between preset cache identifiers and cache cleanup tasks in the cache library, determine the cache cleanup task mapped to the preset cache identifier that is consistent with the cache identifier; The identified cache cleanup task is taken as the target cache cleanup task.
[0072] In one embodiment, the email-triggered smart cache cleanup device further includes a compliance approval module, which is used for: Perform risk detection on the target cache cleanup task; If the target cache cleanup task is detected to be high-risk, an approval mechanism is triggered to conduct compliance approval for the target cache cleanup task; If the target cache cleanup task passes compliance approval, the step of allocating the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing is executed.
[0073] In one embodiment, the email-triggered intelligent cache cleanup device further includes a mailbox creation module, which is used for: Establish the dedicated cache cleanup mailbox, wherein the dedicated cache cleanup mailbox is configured with an anti-spam mechanism; The dedicated cache cleanup mailbox is monitored using the IMAP4 protocol.
[0074] In one embodiment, the email-triggered intelligent cache cleanup device further includes a permission isolation module, which is used for: Access permissions for the dedicated cache cleanup email address are isolated through a preset authentication mechanism.
[0075] In one embodiment, the email-triggered intelligent cache cleanup device further includes a cleanup feedback module, which is used to: Upon completion of the target cache cleanup task, a structured feedback email indicating that cache cleanup is complete is generated. If the number of failures of the target cache cleanup task exceeds a preset threshold, a circuit breaker mechanism is triggered to terminate the target cache cleanup task and generate a structured feedback email indicating cache cleanup failure. The system returns a structured feedback email indicating whether the cache cleanup is complete or fails via the SMTP protocol.
[0076] This invention provides an email-triggered intelligent cache cleanup device. Firstly, it receives cache cleanup request emails through a dedicated cache cleanup mailbox, ensuring both the reliability and timely response of these emails. Secondly, by parsing these emails, cache identifiers and cache types are obtained, providing crucial and accurate information for cache cleanup. This allows for the identification of target cache cleanup tasks based on the cache identifier and the selection of appropriate target cleanup interfaces based on the cache type. This effectively prevents erroneous cleanup and ensures that target cache cleanup tasks are automatically executed using the correct cleanup methods or strategies, making cache cleanup more flexible, efficient, and controllable. Thirdly, by allocating target cache cleanup tasks to a distributed task queue of the target cleanup interface for asynchronous cleanup, the concurrency and response speed of cache cleanup are significantly improved. Therefore, this invention simplifies the cache cleanup process, reduces manual intervention, and improves the flexibility, automation, response timeliness, and efficiency of cache cleanup, enabling more efficient handling of large-scale cache cleanup demands.
[0077] Specific limitations regarding the email-triggered intelligent cache cleanup device can be found in the limitations of the email-triggered intelligent cache cleanup method described above, and will not be repeated here. Each module in the aforementioned email-triggered intelligent cache cleanup device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0078] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a mail-triggered intelligent cache cleanup method on the server side.
[0079] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Upon detecting that a cache cleanup request email has been received in the dedicated cache cleanup mailbox, the cache cleanup request email is parsed to obtain the cache identifier and cache type; The target cache cleanup task is determined based on the cache identifier; Based on the cache type, match the target cleanup interface from the preset cleanup interface mapping table; The target cache cleanup task is assigned to the distributed task queue of the target cleanup interface for asynchronous cleanup processing.
[0080] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Upon detecting that a cache cleanup request email has been received in the dedicated cache cleanup mailbox, the cache cleanup request email is parsed to obtain the cache identifier and cache type; The target cache cleanup task is determined based on the cache identifier; Based on the cache type, match the target cleanup interface from the preset cleanup interface mapping table; The target cache cleanup task is assigned to the distributed task queue of the target cleanup interface for asynchronous cleanup processing.
[0081] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0082] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0083] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0084] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A smart cache clearing method based on email triggering, characterized in that, include: Upon detecting that a cache cleanup request email has been received in the dedicated cache cleanup mailbox, the cache cleanup request email is parsed to obtain the cache identifier and cache type; The target cache cleanup task is determined based on the cache identifier; Based on the cache type, match the target cleanup interface from the preset cleanup interface mapping table; The target cache cleanup task is assigned to the distributed task queue of the target cleanup interface for asynchronous cleanup processing.
2. The email-triggered intelligent cache cleanup method as described in claim 1, characterized in that, The process of parsing the cache cleanup request email to obtain the cache identifier and cache type includes: The subject or body content of the cache cleanup request email is parsed using a regular expression engine; and... Extract the cache identifier and the cache type from the topic or the text content.
3. The email-triggered intelligent cache cleanup method as described in claim 1, characterized in that, The step of determining the target cache cleanup task based on the cache identifier includes: The cache identifier is compared with the cache library; Based on the mapping relationship between preset cache identifiers and cache cleanup tasks in the cache library, determine the cache cleanup task mapped to the preset cache identifier that is consistent with the cache identifier; The identified cache cleanup task is taken as the target cache cleanup task.
4. The email-triggered intelligent cache clearing method as described in claim 1, characterized in that, After matching the target cleanup interface from the preset cleanup interface mapping table according to the cache type, the process further includes: Perform risk detection on the target cache cleanup task; If the target cache cleanup task is detected to be high-risk, an approval mechanism is triggered to conduct compliance approval for the target cache cleanup task; If the target cache cleanup task passes compliance approval, the step of allocating the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing is executed.
5. The email-triggered intelligent cache cleanup method as described in claim 1, characterized in that, Before parsing the cache cleanup request email to obtain the cache identifier and cache type upon detecting that the dedicated cache cleanup mailbox has received such an email, the process further includes: Establish the dedicated cache cleanup mailbox, wherein the dedicated cache cleanup mailbox is configured with an anti-spam mechanism; The dedicated cache cleanup mailbox is monitored using the IMAP4 protocol.
6. The email-triggered intelligent cache clearing method as described in any one of claims 1 to 5, characterized in that, After establishing the dedicated cache cleanup mailbox, the following is also included: Access permissions for the dedicated cache cleanup email address are isolated through a preset authentication mechanism.
7. The email-triggered intelligent cache clearing method as described in any one of claims 1 to 5, characterized in that, After assigning the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing, the method further includes: Upon completion of the target cache cleanup task, a structured feedback email indicating that cache cleanup is complete is generated. If the number of failures of the target cache cleanup task exceeds a preset threshold, a circuit breaker mechanism is triggered to terminate the target cache cleanup task and generate a structured feedback email indicating cache cleanup failure. The system returns a structured feedback email indicating whether the cache cleanup is complete or fails via the SMTP protocol.
8. A smart cache clearing device based on email triggering, characterized in that, include: The email parsing module is used to parse the cache cleanup request email when it is detected that a dedicated cache cleanup mailbox has received a cache cleanup request email, so as to obtain the cache identifier and cache type. The task determination module is used to determine the target cache cleanup task based on the cache identifier; The interface matching module is used to match the target cleanup interface from a preset cleanup interface mapping table according to the cache type; The cache cleanup module is used to allocate the target cache cleanup task to the distributed task queue of the target cleanup interface for asynchronous cleanup processing.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the email-triggered intelligent cache cleanup method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the email-triggered intelligent cache cleanup method as described in any one of claims 1 to 7.