A monitoring method and device for a cache cluster

By saving data in the cache cluster and creating monitoring events to monitor its failure, the problem of long recovery time for data loss in the cache cluster is solved, timely data recovery and normal operation of the business system are achieved, and the user experience is improved.

CN115190125BActive Publication Date: 2024-09-20JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210735890.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2024-09-20
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

The existing cache cluster processing mechanism cannot restore the lost data of the business system in time, resulting in long recovery time and affecting the use of the business system and user experience.

Method used

By saving the data to be monitored in the cache cluster to the database, creating monitoring events for these data, and monitoring its failure, if the data fails, it is obtained from the database and re-saved to the cache cluster to ensure timely recovery of the data.

Benefits of technology

It achieves timely recovery of cache cluster data, reduces recovery time, reduces the impact on the business system, ensures that the business system can handle business requests normally, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115190125B
    Figure CN115190125B
Patent Text Reader

Abstract

The present invention discloses a monitoring method and device for a cache cluster, and relates to the field of computer technology. A specific implementation of the method includes: saving the data to be monitored in the cache cluster to a database; creating a monitoring event for the data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; when the monitoring result of the monitoring event is that the data to be monitored is invalid, obtaining the data to be monitored from the database, and saving the data to be monitored to the cache cluster. This implementation can timely restore the data lost by the business system, reduce the time spent on restoring the business system, reduce the impact on the use of the business system, ensure that the business system can normally process business requests, and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a monitoring method and device for a cache cluster. Background Art

[0002] When implementing a business system, the business cache core configuration data of the business system needs to be saved in the cache cluster. When a large number of write operations occur in the business operations of some business systems in the cache cluster, exceeding the upper limit of the cache cluster memory usage, the memory elimination mechanism will be triggered and some business cache core configuration data will be deleted; when an error occurs in the cache cluster, some business cache core configuration data will be lost. The current method for handling the loss of business cache core configuration data is to rely on R&D personnel to manually rewrite the business cache core configuration data to the cache cluster to restore the use of the business system.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] The existing cache cluster processing mechanism cannot restore the lost data of the business system in time. It takes a long time to restore the business system, which affects the use of the business system, causing the business system to be unable to process business requests normally, affecting the user experience. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a monitoring method and device for a cache cluster, which can promptly restore lost data of a business system, reduce the time spent on restoring the business system, reduce the impact on the use of the business system, ensure that the business system can process business requests normally, and improve user experience.

[0006] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for monitoring a cache cluster is provided.

[0007] A monitoring method for a cache cluster comprises: saving data to be monitored in the cache cluster to a database; creating a monitoring event for the data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; and obtaining the data to be monitored from the database and saving the data to be monitored in the cache cluster when the monitoring result of the monitoring event is that the data to be monitored is invalid.

[0008] Optionally, saving the data to be monitored in the cache cluster to a database includes: saving the data to be monitored in the cache cluster to the database in a preset data format according to a data structure type of the data to be monitored.

[0009] Optionally, creating a monitoring event for the data to be monitored in the cache cluster includes: creating a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, credential information required to access the cache cluster, the type of the monitoring event and the data identifier of the data to be monitored.

[0010] Optionally, in the case where the type of the monitoring event is an invalidation event subscription, the monitoring of the cache cluster through the monitoring event includes: creating an invalidation event listener for the cache cluster based on the data identifier of the data to be monitored, and monitoring the cache cluster according to the invalidation event listener; wherein, if the invalidation event listener listens to an invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.

[0011] Optionally, in the case where the type of the monitoring event is scheduled task polling, the monitoring event also includes a polling frequency, and the monitoring of the cache cluster through the monitoring event includes: according to the data identifier of the data to be monitored, querying the data to be monitored from the cache cluster according to the polling frequency through a unified scheduling platform to monitor the cache cluster; wherein, if the data to be monitored is not queried, the monitoring result of the monitoring event is that the data to be monitored is invalid.

[0012] Optionally, obtaining the data to be monitored from the database and saving the data to be monitored in the cache cluster includes: obtaining the data to be monitored from the database by calling a cache application program interface, and saving the data to be monitored in the cache cluster.

[0013] Optionally, the monitoring event also includes a monitoring personnel, and after the data to be monitored is saved in the cache cluster, it also includes: sending an alarm notification of the invalidation of the data to be monitored to the monitoring personnel, so that the monitoring personnel can investigate the cause of the invalidation of the data to be monitored.

[0014] According to another aspect of an embodiment of the present invention, a monitoring device for a cache cluster is provided.

[0015] A monitoring device for a cache cluster comprises: a monitored data saving module, used for saving the monitored data in the cache cluster to a database; a monitoring event creation module, used for creating a monitoring event for the monitored data in the cache cluster, and monitoring the cache cluster through the monitoring event; and a monitored data invalidation processing module, used for obtaining the monitored data from the database and saving the monitored data in the cache cluster when the monitoring result of the monitoring event is that the monitored data is invalid.

[0016] Optionally, the module for storing data to be monitored is further used for: storing the data to be monitored in the cache cluster to the database in a preset data format according to the data structure type of the data to be monitored.

[0017] Optionally, the monitoring event creation module is further used to create a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, credential information required to access the cache cluster, the type of the monitoring event and the data identifier of the data to be monitored.

[0018] Optionally, in the case where the type of the monitoring event is an invalidation event subscription, the monitoring event creation module is also used to: create an invalidation event listener for the cache cluster based on the data identifier of the data to be monitored, and monitor the cache cluster according to the invalidation event listener; wherein, if the invalidation event listener listens to the invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.

[0019] Optionally, when the type of the monitoring event is a scheduled task polling, the monitoring event also includes a polling frequency, and the monitoring event creation module is also used to: according to the data identifier of the data to be monitored, query the data to be monitored from the cache cluster through a unified scheduling platform according to the polling frequency to monitor the cache cluster; wherein, if the data to be monitored is not queried, the monitoring result of the monitoring event is that the data to be monitored is invalid.

[0020] Optionally, the monitored data invalidation processing module is further used to: obtain the monitored data from the database by calling a cache application program interface, and save the monitored data in the cache cluster.

[0021] Optionally, it further includes an alarm module, which is used to send an alarm notification of the failure of the data to be monitored to the monitoring personnel, so that the monitoring personnel can investigate the cause of the failure of the data to be monitored.

[0022] According to yet another aspect of the embodiments of the present invention, an electronic device is provided.

[0023] An electronic device includes: one or more processors; and a memory for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the cache cluster monitoring method provided in an embodiment of the present invention.

[0024] According to yet another aspect of an embodiment of the present invention, a computer readable medium is provided.

[0025] A computer-readable medium stores a computer program, and when the computer program is executed by a processor, the method for monitoring a cache cluster provided in an embodiment of the present invention is implemented.

[0026] An embodiment of the above invention has the following advantages or beneficial effects: by saving the data to be monitored in the cache cluster to the database; creating monitoring events for the data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring events; when the monitoring result of the monitoring event is that the data to be monitored is invalid, the data to be monitored is obtained from the database, and the data to be monitored is saved in the cache cluster. The technical solution can timely restore the lost data of the business system, reduce the time spent on restoring the business system, reduce the impact on the use of the business system, ensure that the business system can process business requests normally, and improve user experience.

[0027] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0029] Figure 1 is a schematic diagram of main steps of a method for monitoring a cache cluster according to an embodiment of the present invention;

[0030] Figure 2 is a flow chart of a method for monitoring a cache cluster according to an embodiment of the present invention;

[0031] Figure 3 is a schematic diagram of main modules of a monitoring device for a cache cluster according to an embodiment of the present invention;

[0032] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0033] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0035] The existing cache cluster processing mechanism may cause the loss of the core configuration of the business cache when clearing the cache. The possible reasons for the loss of the core configuration of the business cache are as follows:

[0036] 1. The cache cluster was not isolated at the beginning of the business system design;

[0037] 2. No reasonable estimate was made for the growth trend of business data. As the business developed rapidly, the cache cluster resources were insufficient, and the cache cluster triggered the memory elimination mechanism.

[0038] 3. The current memory elimination strategies of cache clusters are all aimed at the periodic recycling of stored data, and it is impossible to specify elimination strategies according to the needs of the business itself.

[0039] The current method for dealing with the loss of business cache core configuration relies on R&D to manually refresh the cache, that is, re-write the business cache core configuration into the cache cluster. This will result in the inability to restore the lost data of the business system in a timely manner, and the time spent on restoring the business system will be long, affecting the use of the business system, causing the business system to be unable to process business requests normally, affecting the user experience.

[0040] In order to solve the above-mentioned technical problems existing in the prior art, the present invention provides a monitoring method for a cache cluster, which monitors the cache cluster by using a monitoring system. Specifically, the monitoring system management end accesses the business system based on the identification of the business system, and configures monitoring personnel for the business system. The monitoring personnel can receive alarm messages and operation monitoring task configuration information to ensure the safe and standardized use of the business core configuration monitoring task configuration. After the business system is accessed, the relevant information of the business system is saved in the database of the management end, so as to create a monitoring task for the business cache core configuration data of the accessed business system.

[0041] Figure 1 It is a schematic diagram of main steps of a method for monitoring a cache cluster according to an embodiment of the present invention.

[0042] like Figure 1 As shown, a method for monitoring a cache cluster according to an embodiment of the present invention mainly includes the following steps S101 to S103.

[0043] Step S101: Save the data to be monitored in the cache cluster to the database.

[0044] Saving the data to be monitored in the cache cluster to the database may include: saving the data to be monitored in the cache cluster to the database in a preset data format according to the data structure type of the data to be monitored.

[0045] Step S102: creating a monitoring event for the data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event.

[0046] Creating a monitoring event for the data to be monitored in the cache cluster may include: creating a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required to access the cache cluster, the type of the monitoring event, and the data identifier of the data to be monitored. The type of the monitoring event may be an invalidation event subscription or a scheduled task polling.

[0047] In one embodiment, the data to be monitored in the cache cluster is saved to a database, and a monitoring event is created for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required to access the cache cluster, the type of monitoring event, and the data identifier of the data to be monitored. Specifically, the data to be monitored may be the business cache core configuration data of the business system. In the management end of the embodiment of the present invention, the business system is accessed based on the identifier of the business system, and monitoring personnel are configured for the business system. The monitoring personnel can receive alarm messages and operation monitoring task configuration information to ensure the safe and standardized use of the business core configuration monitoring task configuration. After the business system is accessed, the relevant information of the business system is saved in the MYSQL (a relational database management system) database of the management end. In the management end of the embodiment of the present invention, a monitoring task is created, the business system to which the data to be monitored belongs is selected, the access address of the cache cluster corresponding to the business system and the credential information required to access the cache cluster (such as account number, password, token, etc.) are configured, and the data to be monitored in the cache cluster is written into the database in JSON (a lightweight data exchange format) format according to the data structure type of the data to be monitored, that is, the key (data identifier of the data to be monitored) and value (data value of the data to be monitored) of the data to be monitored are filled in the monitoring task, the type of monitoring event (failure event subscription or scheduled task polling) is selected, and the basic configuration description information of the monitoring event is filled in, thereby completing the creation of the monitoring task and saving the monitoring task to the database. Among them, the basic configuration description information may include the business line to which the data to be monitored belongs, the application and impact of the data to be monitored, the name of the cache cluster, etc., to facilitate later operation and maintenance. The data structure type of the data to be monitored can be String, List, Hash, Set, etc.

[0048] In one embodiment, before creating a monitoring event of the invalidation event subscription type, it is necessary to determine whether the invalidation event notification-related configuration of the cache cluster corresponding to the data to be monitored is in a state that allows the listener to monitor.

[0049] In one embodiment, when the type of monitoring event is an invalidation event subscription, monitoring the cache cluster through monitoring events may include: creating an invalidation event listener for the cache cluster based on the data identifier of the data to be monitored, and monitoring the cache cluster according to the invalidation event listener; wherein, if the invalidation event listener listens to the invalidation message of the data to be monitored, the monitoring result of the monitoring event is the invalidation of the data to be monitored. Specifically, when the type of monitoring event is an invalidation event subscription, the management end creates an invalidation event listener for the cache cluster based on the key of the data to be monitored, and subscribes to the expired invalidation message of the key. When the invalidation event listener listens to the invalidation message of the data to be monitored, the monitoring result of the monitoring event is the invalidation of the data to be monitored.

[0050] In one embodiment, when the type of monitoring event is scheduled task polling, the monitoring event also includes a polling frequency, and monitoring the cache cluster through monitoring events may include: querying the data to be monitored from the cache cluster according to the polling frequency through a unified scheduling platform according to the data identifier of the data to be monitored, so as to monitor the cache cluster; wherein, if the data to be monitored is not found, the monitoring result of the monitoring event is that the data to be monitored is invalid. Specifically, when the type of monitoring event is an invalidation event subscription, the management end queries the data to be monitored from the cache cluster according to the polling frequency through a unified scheduling platform at regular intervals, and when the key or value of the data to be monitored is not found, the monitoring result of the monitoring event is that the data to be monitored is invalid.

[0051] Step S103: when the monitoring result of the monitoring event is that the data to be monitored is invalid, the data to be monitored is obtained from the database, and the data to be monitored is saved in the cache cluster.

[0052] In one embodiment, obtaining the data to be monitored from the database and saving the data to be monitored in the cache cluster may include: obtaining the data to be monitored from the database by calling a cache application program interface, and saving the data to be monitored in the cache cluster. Specifically, when the monitoring result of the monitoring event is that the data to be monitored is invalid, the cache API (i.e., cache application program interface) is automatically called to obtain the key and value of the data to be monitored from the database and write them into the cache cluster.

[0053] In one embodiment, the monitoring event also includes monitoring personnel. After the monitored data is saved in the cache cluster, it can also include: sending an alarm notification of the invalidation of the monitored data to the monitoring personnel, so that the monitoring personnel can check the invalidation reason of the monitored data. Specifically, after the invalidated monitored data is rewritten into the cache cluster, the management end sends the alarm notification of the invalidation of the monitored data to the monitoring personnel of the corresponding business system. The alarm notification can be sent by email notification or SMS notification, prompting the monitoring personnel to promptly check the invalidation reason of the monitored data and solve the problem as soon as possible to avoid affecting the normal request of the business.

[0054] Figure 2 It is a flowchart of a method for monitoring a cache cluster according to an embodiment of the present invention.

[0055] like Figure 2 As shown, in one embodiment, a monitoring event of the data to be monitored is created by the management end, the data to be monitored is backed up in a database, and the monitoring event is executed by creating an event listener or task scheduling to monitor whether the data to be monitored in the cache cluster is invalid. When the management end receives a notification that the identifier (i.e., key) of the monitoring data is invalid, the management end reads the data to be monitored from the database and rewrites it into the cache cluster.

[0056] Figure 3 It is a schematic diagram of main modules of a monitoring device for a cache cluster according to an embodiment of the present invention.

[0057] like Figure 3 As shown, a monitoring device 300 for a cache cluster according to an embodiment of the present invention mainly includes: a to-be-monitored data storage module 301 , a monitoring event creation module 302 , and a to-be-monitored data invalidation processing module 303 .

[0058] The to-be-monitored data saving module 301 is used to save the to-be-monitored data in the cache cluster to a database.

[0059] The monitoring event creation module 302 is used to create a monitoring event for the data to be monitored in the cache cluster, and monitor the cache cluster through the monitoring event.

[0060] The to-be-monitored data invalidation processing module 303 is used to obtain the to-be-monitored data from the database and save the to-be-monitored data in the cache cluster when the monitoring result of the monitoring event is that the to-be-monitored data is invalid.

[0061] In one embodiment, the to-be-monitored data saving module 301 is specifically used to: save the to-be-monitored data in the cache cluster to the database in a preset data format according to the data structure type of the to-be-monitored data.

[0062] In one embodiment, the monitoring event creation module 302 is specifically used to create a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster, the credential information required to access the cache cluster, the type of the monitoring event and the data identifier of the data to be monitored.

[0063] In one embodiment, when the type of monitoring event is an invalidation event subscription, the monitoring event creation module 302 is specifically used to: create an invalidation event listener for the cache cluster based on the data identifier of the data to be monitored, and monitor the cache cluster according to the invalidation event listener; wherein, if the invalidation event listener listens to the invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.

[0064] In one embodiment, when the type of monitoring event is scheduled task polling, the monitoring event also includes a polling frequency, and the monitoring event creation module 302 is specifically used to: query the data to be monitored from the cache cluster according to the polling frequency through a unified scheduling platform according to the data identifier of the data to be monitored, so as to monitor the cache cluster; wherein, if the data to be monitored is not queried, the monitoring result of the monitoring event is that the data to be monitored is invalid.

[0065] In one embodiment, the monitored data invalidation processing module 303 is specifically used to obtain the monitored data from the database by calling the cache application program interface, and save the monitored data to the cache cluster.

[0066] In one embodiment, an alarm module (not shown in the figure) may also be included, which is used to send an alarm notification of the failure of the monitored data to the monitoring personnel, so that the monitoring personnel can check the failure cause of the monitored data.

[0067] In addition, the specific implementation content of the monitoring device of the cache cluster in the embodiment of the present invention has been described in detail in the above cache cluster monitoring method, so the repeated content will not be described again here.

[0068] Figure 4 An exemplary system architecture 400 is shown to which the method for monitoring a cache cluster or the apparatus for monitoring a cache cluster according to the embodiments of the present invention can be applied.

[0069] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0070] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0071] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0072] The server 405 may be a server that provides various services, such as a background management server (only an example) that supports shopping websites browsed by users using terminal devices 401, 402, and 403. The background management server may store the data to be monitored in the cache cluster to a database for the received data such as the monitoring request of the cache cluster; create a monitoring event for the data to be monitored in the cache cluster, and monitor the cache cluster through the monitoring event; when the monitoring result of the monitoring event is that the data to be monitored is invalid, obtain the data to be monitored from the database, save the data to be monitored to the cache cluster, and other processing, and feed back the processing result (such as the monitoring result of the cache cluster - only an example) to the terminal device.

[0073] It should be noted that the monitoring method of the cache cluster provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the monitoring device of the cache cluster is generally disposed in the server 405 .

[0074] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0075] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 5 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0076] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0077] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0078] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0079] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0080] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0081] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a module for storing data to be monitored, a module for creating monitoring events, and a module for processing invalidation of data to be monitored. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the module for storing data to be monitored may also be described as a "module for storing the data to be monitored in the cache cluster to a database."

[0082] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: saving the data to be monitored in the cache cluster to a database; creating a monitoring event for the data to be monitored in the cache cluster, and monitoring the cache cluster through the monitoring event; when the monitoring result of the monitoring event is that the data to be monitored is invalid, obtaining the data to be monitored from the database, and saving the data to be monitored to the cache cluster.

[0083] According to the technical solution of the embodiment of the present invention, the data to be monitored in the cache cluster is saved to the database; a monitoring event is created for the data to be monitored in the cache cluster, and the cache cluster is monitored through the monitoring event; when the monitoring result of the monitoring event is that the data to be monitored is invalid, the data to be monitored is obtained from the database and saved to the cache cluster. The data lost by the business system can be restored in time, the time spent on restoring the business system can be reduced, the impact on the use of the business system can be reduced, and the business system can be guaranteed to process business requests normally, thereby improving the user experience.

[0084] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for monitoring a cache cluster, characterized in that: include: After the business system is connected, the data to be monitored in the cache cluster is saved to the database, and the data to be monitored is the business cache core configuration data of the business system; Creating a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster corresponding to the business system, the credential information required to access the cache cluster, the type of the monitoring event, and the data identifier of the data to be monitored, and monitoring the cache cluster through the monitoring event; When the monitoring result of the monitoring event is that the data to be monitored is invalid, obtaining the data to be monitored from the database, and saving the data to be monitored in the cache cluster; In the case where the type of the monitoring event is an invalidation event subscription, the monitoring of the cache cluster through the monitoring event includes: creating an invalidation event listener for the cache cluster based on the data identifier of the data to be monitored, and monitoring the cache cluster according to the invalidation event listener; wherein, if the invalidation event listener listens to an invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.

2. The method according to claim 1, characterized in that The step of saving the data to be monitored in the cache cluster to the database includes: The data to be monitored in the cache cluster is saved to the database in a preset data format according to the data structure type of the data to be monitored.

3. The method according to claim 1, characterized in that In the case where the type of the monitoring event is scheduled task polling, the monitoring event also includes a polling frequency, and monitoring the cache cluster through the monitoring event includes: According to the data identifier of the data to be monitored, querying the data to be monitored from the cache cluster according to the polling frequency through a unified scheduling platform to monitor the cache cluster; If the data to be monitored is not found, the monitoring result of the monitoring event is that the data to be monitored is invalid.

4. The method according to claim 1 or 3, characterized in that: The acquiring the data to be monitored from the database and storing the data to be monitored in the cache cluster includes: The data to be monitored is obtained from the database by calling a cache application program interface, and the data to be monitored is saved in the cache cluster.

5. The method according to claim 3, characterized in that: The monitoring event also includes a monitoring person, and after the data to be monitored is saved in the cache cluster, the method further includes: An alarm notification of the failure of the data to be monitored is sent to the monitoring personnel, so that the monitoring personnel can investigate the failure cause of the data to be monitored.

6. A monitoring device for a cache cluster, characterized in that: include: The monitored data storage module is used to save the monitored data in the cache cluster to the database after the business system is connected, wherein the monitored data is the business cache core configuration data of the business system; A monitoring event creation module, configured to create a monitoring event for the data to be monitored in the cache cluster according to the address of the cache cluster corresponding to the business system, the credential information required to access the cache cluster, the type of the monitoring event, and the data identifier of the data to be monitored, and monitor the cache cluster through the monitoring event; A to-be-monitored data failure processing module, used for obtaining the to-be-monitored data from the database and saving the to-be-monitored data in the cache cluster when the monitoring result of the monitoring event is that the to-be-monitored data is failed; In the case where the type of the monitoring event is an invalidation event subscription, the monitoring event creation module is further used to: create an invalidation event listener for the cache cluster based on the data identifier of the data to be monitored, and monitor the cache cluster according to the invalidation event listener; wherein, if the invalidation event listener listens to the invalidation message of the data to be monitored, the monitoring result of the monitoring event is that the data to be monitored is invalid.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.