Cache management method and device and electronic equipment

By encapsulating and calling the standard cache management interface in the microservice scenario, and using the registration center to dynamically obtain and operate caches, the problem of unified cache management and monitoring in the microservice scenario is solved, and the automation of cache updates and system stability is achieved. .

CN119025562APending Publication Date: 2024-11-26SUNSHINE PROPERTY & CASUALTY INSURANCE CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411098436.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In microservice scenarios, it is difficult to uniformly manage and monitor caches at all levels, especially cache update operations often require manual cache update commands, which poses operational risks.

Method used

The standard cache management interface of each microservice in the microservice cluster is encapsulated through the framework's underlying layer, and the registration information of each microservice is generated and called, and the registration center is used to dynamically obtain and operate caches to realize hundreds of microservice clusters and multiple cache instances. unified cached data management and monitoring.

Benefits of technology

It realizes the automation of cache update operations, reduces operational risks, and improves system stability and operation and maintenance efficiency, and can manage and monitor caches at all levels in a unified manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025562A_ABST
    Figure CN119025562A_ABST
Patent Text Reader

Abstract

The invention provides a cache management method and apparatus, and an electronic device. The method comprises the steps of packaging a standard cache management interface corresponding to each micro-service in a micro-service cluster through a framework bottom layer; according to each standard cache management interface, generating registration information corresponding to each micro-service; and obtaining registration information corresponding to each micro-service, and calling a standard cache management interface in each piece of registration information to operate the cache of the corresponding micro-service. According to the mode, the standard cache management interface is packaged through the framework bottom layer, the registration information corresponding to each micro-service is dynamically obtained through the registration center, and the standard cache management interface in each piece of registration information is called to operate the cache of the corresponding micro-service; uniform cache data management and monitoring of hundreds of micro-service clusters and multiple cache instances can be realized, and system stability and operation and maintenance efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cache management technology, and in particular to a cache management method, device and electronic equipment. Background Art

[0002] In order to improve the efficiency of various query and retrieval functions, business systems will introduce different types of cache implementations based on the characteristics of cached data. In microservice scenarios, it is difficult to uniformly manage and monitor caches at all levels, especially cache update operations, which often require manual execution of cache update commands, posing operational risks. Summary of the invention

[0003] The purpose of the present invention is to provide a cache management method, device and electronic device to achieve unified cache data management and monitoring of hundreds of microservice clusters and multiple cache instances, thereby improving system stability and operation and maintenance efficiency.

[0004] The present invention provides a cache management method, the method comprising:

[0005] Encapsulate the standard cache management interface corresponding to each microservice in the microservice cluster through the underlying framework;

[0006] Generate registration information corresponding to each microservice according to each standard cache management interface;

[0007] Get the registration information corresponding to each microservice, and call the standard cache management interface in each registration information to operate the cache of the corresponding microservice.

[0008] Furthermore, the steps of encapsulating the standard cache management interface corresponding to each microservice in the microservice cluster through the bottom layer of the framework include:

[0009] Read cache information of each microservice from the configuration center;

[0010] Generate a cache instance of the corresponding microservice based on each cache information;

[0011] Inject each cache instance into the standard cache management interface of the corresponding microservice in the microservice cluster.

[0012] Furthermore, the step of generating a cache instance of a corresponding microservice according to each cache information includes:

[0013] Get the cache type from each cache information and create a connection pool corresponding to the cache type;

[0014] Instantiate the connection pool corresponding to the cache type to generate the cache instance of the corresponding microservice.

[0015] Furthermore, according to each standard cache management interface, the step of generating registration information corresponding to each microservice includes:

[0016] Get the name and address of each cache instance;

[0017] Generate registration information corresponding to each microservice based on each standard cache management interface, as well as each name and address.

[0018] Furthermore, the steps of generating registration information corresponding to each microservice according to each standard cache management interface, and each name and address include:

[0019] Register the mapping relationship between the name of each cache instance and the corresponding address and standard cache management interface to the registration center to generate registration information corresponding to each microservice through the registration center.

[0020] Further, the steps of obtaining registration information corresponding to each microservice and calling a standard cache management interface in each registration information to operate the cache of the corresponding microservice include:

[0021] Get the registration information corresponding to each microservice and call the standard cache management interface in each registration information;

[0022] Based on the preset call function and each standard cache management interface, obtain the cache instance of each microservice and display it on the page;

[0023] Based on each standard cache management interface, operate the cache of the corresponding microservice.

[0024] Further, the standard cache management interface includes a first interface; based on each standard cache management interface, the steps of operating the cache of the corresponding microservice include:

[0025] Based on the first interface corresponding to each standard cache management interface, update the cache of the corresponding microservice.

[0026] The present invention provides a cache management device, the device comprising:

[0027] The encapsulation module is used to encapsulate the standard cache management interface corresponding to each microservice in the microservice cluster through the underlying framework;

[0028] The generation module is used to generate registration information corresponding to each microservice according to each standard cache management interface;

[0029] The operation module is used to obtain the registration information corresponding to each microservice and call the standard cache management interface in each registration information to operate the cache of the corresponding microservice.

[0030] An electronic device provided by the present invention comprises a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor executes the computer program, the steps of any one of the above cache management methods are implemented.

[0031] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above cache management methods are executed.

[0032] The cache management method, device and electronic device provided by the present invention include: encapsulating the standard cache management interface corresponding to each microservice in the microservice cluster through the bottom layer of the framework; generating registration information corresponding to each microservice according to each standard cache management interface; obtaining the registration information corresponding to each microservice, and calling the standard cache management interface in each registration information to operate the cache of the corresponding microservice. In this way, the standard cache management interface is encapsulated through the bottom layer of the framework, and the registration information corresponding to each microservice is dynamically obtained through the registration center, and the standard cache management interface in each registration information is called to operate the cache of the corresponding microservice. It can realize the unified cache data management and monitoring of hundreds of microservice clusters and multiple cache instances, and improve the system stability and operation and maintenance efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 A flowchart of a cache management method provided by an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of a cache management process provided by an embodiment of the present invention;

[0036] Figure 3 A flowchart of another cache management method provided by an embodiment of the present invention;

[0037] Figure 4 A schematic diagram of a program code for introducing a saab cache module into a business system provided by an embodiment of the present invention;

[0038] Figure 5 A schematic diagram of a program code for adding a microservice IP address in a configuration center provided by an embodiment of the present invention;

[0039] Figure 6A schematic diagram of a program code for adding a cache type to a selected microservice in a configuration center provided by an embodiment of the present invention;

[0040] Figure 7 A schematic diagram of a program code for operating a cache using ICacheManager provided in an embodiment of the present invention;

[0041] Figure 8 A schematic diagram of another cache management process provided by an embodiment of the present invention;

[0042] Fig. 9 A schematic structural diagram of an air pump driving device provided by an embodiment of the present invention;

[0043] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] In order to improve the efficiency of various query and retrieval functions, business systems will introduce different types of cache implementations based on the characteristics of cached data. In microservice scenarios, it is difficult to uniformly manage and monitor caches at all levels, especially cache update operations, which often require manual execution of cache update commands, posing operational risks.

[0046] Based on this, the embodiments of the present invention provide a cache management method, device and electronic device, which can be applied to application scenarios that require automatic cache management.

[0047] To facilitate understanding of this embodiment, a cache management method disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:

[0048] Step S102, encapsulating the standard cache management interface corresponding to each microservice in the microservice cluster through the bottom layer of the framework.

[0049] Step S104: Generate registration information corresponding to each microservice according to each standard cache management interface.

[0050] Step S106, obtaining registration information corresponding to each microservice, and calling the standard cache management interface in each registration information to operate the cache of the corresponding microservice.

[0051] Cache is very important in a business system, and a common scenario is to store data with a high call frequency. In actual implementation, this application can be applied to a lightweight cache management platform that can achieve front-end and back-end separation developed using the self-developed SAAB3 development platform, so as to achieve cache management through the cache management platform, specifically, through the framework bottom encapsulation interface of the cache management platform.

[0052] In the specific implementation process, please refer to Figure 2 The schematic diagram of a cache management process shown in the figure shows that the components involved in the entire cache management are divided into three roles: cache management platform (manager), service cluster (managed), and Eureka (registration center), where Eureka1 and Eurek2 can respectively represent the registration information corresponding to a microservice. The service cluster can include multiple microservices, each of which can be bound to a corresponding ICacheManager (standard cache management interface). Each microservice exposes the standard cache management interface through the underlying framework, so the cache management platform can encapsulate the standard cache management interface corresponding to each microservice in the microservice cluster through the underlying framework.

[0053] In fact, the information of each microservice in the service cluster (including specific IP and port) is stored in the registration center; therefore, the cache management platform can obtain the information of each microservice in the service cluster through Eureka, so that the management platform can call the standard cache management interface (equivalent to the port corresponding to the information of each microservice mentioned above) to operate the cache (the cache management platform provides a management page).

[0054] The above method implements a lightweight cache management platform with separated front-end and back-end based on the self-developed SAAB3 development platform. It encapsulates the standard cache management interface through the bottom layer of the framework, and dynamically obtains the interface information corresponding to each microservice through the registration center. According to actual needs and each interface information, the corresponding interface can be called to manage the cache in the corresponding microservice, so that the cache update operation can often be executed automatically without the need to manually execute the cache update command, reducing operational risks, and can also realize the unified cache data management and monitoring of hundreds of microservice clusters and multiple cache instances (that is, in the microservice scenario, caches at all levels can be uniformly managed and monitored).

[0055] The cache management method provided in the above embodiment includes: encapsulating the standard cache management interface corresponding to each microservice in the microservice cluster through the bottom layer of the framework; generating registration information corresponding to each microservice according to each standard cache management interface; obtaining the registration information corresponding to each microservice, and calling the standard cache management interface in each registration information to operate the cache of the corresponding microservice. In this way, the standard cache management interface is encapsulated through the bottom layer of the framework, and the registration information corresponding to each microservice is dynamically obtained through the registration center, and the standard cache management interface in each registration information is called to operate the cache of the corresponding microservice. It can realize the unified cache data management and monitoring of hundreds of microservice clusters and multiple cache instances, and improve the system stability and operation and maintenance efficiency.

[0056] The embodiment of the present invention also provides another cache management method, which is implemented on the basis of the method in the above embodiment; Figure 3 As shown, the method comprises the following steps:

[0057] Step S202: read cache information of each microservice from the configuration center.

[0058] Step S204: Generate a cache instance of the corresponding microservice according to each cache information.

[0059] Specifically, the above step S204 can be implemented by following the steps 1 to 2:

[0060] Step 1: Get the cache type from each cache information and create a connection pool corresponding to the cache type.

[0061] Step 2: Instantiate the connection pool corresponding to the cache type to generate the cache instance of the corresponding microservice.

[0062] In the specific implementation process, the cache module of saab (development platform) (equivalent to the above-mentioned cache management platform) can be introduced into the project (microservice) in the business system; the specific program code can be as follows Figure 4 shown.

[0063] Then you can select the microservice to be configured. Specifically, you can add the microservice IP address in the configuration center. The program code can be as follows Figure 5 As shown in the figure, the configuration center is an independent system and a common component of the microservice architecture, which can provide service configuration capabilities.

[0064] Then add cache type configuration for the selected microservice in the configuration center. In actual implementation, a microservice can be configured with multiple cache types (such as Redis, SSDB, Caffeine, etc.), or only one cache type can be configured. Figure 6 The figure shows a schematic diagram of using Redis as a cache type.

[0065] Start the project and read the cache type from the configuration center through ICacheManager. Redis is configured in the case, so you can instantiate the Redis connection pool (initialize the Redis client link), read the Redis configuration in the project, and generate the corresponding cache instance (the cache instance only includes the Redis cache). If the cache type is configured with Redis and SSDB, you can also instantiate the Redis connection pool and SSDB connection pool, read the Redis configuration and SSDB configuration in the project, and generate the corresponding cache instance (the cache instance includes both Redis cache and SSDB cache).

[0066] Step S206: inject each cache instance into the standard cache management interface of the corresponding microservice in the microservice cluster.

[0067] Step S208, obtaining the name and address of each cache instance.

[0068] Step S210, generating registration information corresponding to each microservice according to each standard cache management interface, and each name and address.

[0069] In the specific implementation process, the fully qualified name of the object corresponding to the cache (which can be understood as a microservice) can be configured in the configuration center, and the object instance (that is, the cache instance) can be obtained by using reflection technology. The name of each cache instance can be understood as the fully qualified name of the corresponding cache object, and the address of each cache instance can be understood as the address of the corresponding cache object (that is, the microservice).

[0070] Specifically, the mapping relationship between the name of each cache instance and the corresponding address and the standard cache management interface can be registered in the registration center, so as to generate registration information corresponding to each microservice through the registration center.

[0071] Therefore, each of the above standard cache management interfaces may correspond to a cache instance (that is, the standard cache management interface corresponding to each microservice may correspond to the cache instance corresponding to the microservice).

[0072] Step S212, obtaining registration information corresponding to each microservice, and calling the standard cache management interface in each registration information.

[0073] Step S214, based on the preset calling function and each standard cache management interface, obtain the cache instance of each microservice and display it on a page.

[0074] The above preset calling function generally adopts the getCache function. In fact, by calling the getCache function and the standard cache management interface of each microservice, the cache instance corresponding to each standard cache management interface can be queried.

[0075] Step S216: Based on each standard cache management interface, operate the cache of the corresponding microservice.

[0076] In the specific implementation process, the standard cache management interface corresponding to each microservice may include multiple operation interfaces, such as add, delete, modify and other API interfaces.

[0077] The cache management system (also known as the cache management platform) first calls the registration center to obtain the service list, and then calls the standard interface of each node to obtain the list of all caches and provide a page display. Users can use ICacheManager in the cache management system to operate the cache, query, update, delete, and other operations on the cache of each business system. The specific program code can be as follows Figure 7 shown.

[0078] In actual implementation, assuming that the standard cache management interface includes a first interface (ie, an update interface), the cache of the corresponding microservice can be updated through the first interface corresponding to each standard cache management interface.

[0079] Common cache components are generally divided into JVM heap cache and middleware cache according to their usage, and centralized management is implemented for these two types of cache.

[0080] (1) JVM heap cache visualization and cache cleaning:

[0081] Strictly speaking, it is an object in memory, but it is often used in caching scenarios, so it is called JVM heap cache. Since the heap cache is scattered in the JVM memory of each node, in the microservice scenario, a single microservice has multiple nodes and can only be cleaned up by restarting the service. We configure the fully qualified name of the object corresponding to the cache in the configuration center, use reflection technology to obtain the object instance, and expose the management interface in the underlying framework to provide a single node's heap cache cleanup. When the cache management tool manages the cache, it first obtains the application list through the registration center, and then calls the management interface of each node in turn to implement cache management.

[0082] (2) Middleware cache visualization and cleaning:

[0083] The characteristics of middleware cache are that it has a wide variety of types. By encapsulating common cache middleware such as Redis and SSDB, a unified access portal is implemented and a unified management interface is provided. The cache management platform implements cache management through a unified interface.

[0084] For a better understanding of the above embodiments, please refer to Figure 8Another schematic diagram of the cache management process is shown. After the project is started, the cache module introduced into the project can read information from the configuration center and obtain the cache type based on the read information. Taking the cache type as redis as an example, a Redis connection pool can be created afterwards. The Redis connection pool is encapsulated as a cache instance, and the instance is injected into ICacheManager (standard cache management interface). The service is registered to Eureka (registration center). If you want to query the cache, you can call the getCache function to call the corresponding interface. If you want to update the cache, you can call the exposed interface.

[0085] The cache management method provided in the above embodiment can realize unified management and monitoring of centralized and distributed cache instances such as Redis, SSDB, and Caffeine, and improve system stability and operation and maintenance efficiency. It can realize unified cache data management and monitoring of hundreds of microservice clusters and multiple cache instances.

[0086] The embodiment of the present invention also provides a cache management device, such as Fig. 9 As shown, the device includes: an encapsulation module 90, which is used to encapsulate the standard cache management interface corresponding to each microservice in the microservice cluster through the bottom layer of the framework; a generation module 91, which is used to generate registration information corresponding to each microservice according to each standard cache management interface; an operation module 92, which is used to obtain the registration information corresponding to each microservice, and call the standard cache management interface in each registration information to operate the cache of the corresponding microservice.

[0087] The cache management device includes: encapsulating the standard cache management interface corresponding to each microservice in the microservice cluster through the bottom layer of the framework; generating registration information corresponding to each microservice according to each standard cache management interface; obtaining the registration information corresponding to each microservice, and calling the standard cache management interface in each registration information to operate the cache of the corresponding microservice. The device encapsulates the standard cache management interface through the bottom layer of the framework, and dynamically obtains the registration information corresponding to each microservice through the registration center, and calls the standard cache management interface in each registration information to operate the cache of the corresponding microservice. It can realize the unified cache data management and monitoring of hundreds of microservice clusters and multiple cache instances, and improve the system stability and operation and maintenance efficiency.

[0088] Furthermore, the encapsulation module is also used to:

[0089] Read cache information of each microservice from the configuration center;

[0090] Generate a cache instance of the corresponding microservice based on each cache information;

[0091] Inject each cache instance into the standard cache management interface of the corresponding microservice in the microservice cluster.

[0092] Furthermore, the encapsulation module is also used to:

[0093] Get the cache type from each cache information and create a connection pool corresponding to the cache type;

[0094] Instantiate the connection pool corresponding to the cache type to generate the cache instance of the corresponding microservice.

[0095] Furthermore, according to each standard cache management interface, the step of generating registration information corresponding to each microservice includes:

[0096] Get the name and address of each cache instance;

[0097] Generate registration information corresponding to each microservice based on each standard cache management interface, as well as each name and address.

[0098] Furthermore, the generation module is also used to:

[0099] Register the mapping relationship between the name of each cache instance and the corresponding address and standard cache management interface to the registration center to generate registration information corresponding to each microservice through the registration center.

[0100] Furthermore, the operation module is also used to:

[0101] Get the registration information corresponding to each microservice and call the standard cache management interface in each registration information;

[0102] Based on the preset call function and each standard cache management interface, obtain the cache instance of each microservice and display it on the page;

[0103] Based on each standard cache management interface, operate the cache of the corresponding microservice.

[0104] Further, the standard cache management interface includes a first interface; the operation module is further used for:

[0105] Based on the first interface corresponding to each standard cache management interface, update the cache of the corresponding microservice.

[0106] The cache management device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned cache management method embodiment. For the embodiment of the cache management device, reference may be made to the corresponding contents in the aforementioned cache management method embodiment.

[0107] The embodiment of the present invention further provides an electronic device, see Fig.10As shown, the electronic device includes a processor 130 and a memory 131 , wherein the memory 131 stores machine executable instructions that can be executed by the processor 130 , and the processor 130 executes the machine executable instructions to implement the above cache management method.

[0108] Further, Fig.10 The electronic device shown further includes a bus 132 and a communication interface 133 , and the processor 130 , the communication interface 133 and the memory 131 are connected via the bus 132 .

[0109] The memory 131 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 133 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 132 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0110] The processor 130 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 130. The above processor 130 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131 and completes the steps of the method of the above embodiment in combination with its hardware.

[0111] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned cache management method. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0112] The cache management method, device and electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0113] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A cache management method, characterized in that: The method comprises: Encapsulate the standard cache management interface corresponding to each microservice in the microservice cluster through the underlying framework; Generate registration information corresponding to each of the microservices according to each of the standard cache management interfaces; The registration information corresponding to each of the microservices is obtained, and the standard cache management interface in each of the registration information is called to operate the cache of the corresponding microservice.

2. The method according to claim 1, characterized in that: The steps of encapsulating the standard cache management interface corresponding to each microservice in the microservice cluster through the underlying framework include: Read cache information of each microservice from the configuration center; Generate a corresponding cache instance of the microservice according to each cache information; Inject each of the cache instances into the standard cache management interface of the corresponding microservice in the microservice cluster.

3. The method according to claim 2, characterized in that The step of generating a corresponding cache instance of the microservice according to each cache information includes: Obtaining a cache type from each cache information, and creating a connection pool corresponding to the cache type; Instantiate the connection pool corresponding to the cache type to generate a corresponding cache instance of the microservice.

4. The method according to claim 3, characterized in that According to each of the standard cache management interfaces, the step of generating registration information corresponding to each of the microservices includes: Obtaining the name and address of each of the cache instances; Registration information corresponding to each of the microservices is generated according to each of the standard cache management interfaces, and each of the names and addresses.

5. The method according to claim 4, characterized in that The step of generating registration information corresponding to each of the microservices according to each of the standard cache management interfaces, and each of the names and addresses includes: The mapping relationship between the name of each cache instance and the corresponding address and the standard cache management interface is registered in the registration center, so as to generate registration information corresponding to each microservice through the registration center.

6. The method according to claim 4, characterized in that The steps of obtaining registration information corresponding to each of the microservices and calling the standard cache management interface in each of the registration information to operate the cache of the corresponding microservice include: Obtain registration information corresponding to each of the microservices, and call the standard cache management interface in each of the registration information; Based on the preset calling function and each of the standard cache management interfaces, a cache instance of each of the microservices is obtained and displayed on a page; Based on each of the standard cache management interfaces, operate the cache of the corresponding microservice.

7. The method according to claim 4, characterized in that The standard cache management interface includes a first interface; Based on each of the standard cache management interfaces, the steps of operating the cache of the corresponding microservice include: Based on the first interface corresponding to each of the standard cache management interfaces, the cache of the corresponding microservice is updated.

8. A cache management device, characterized in that: The device comprises: The encapsulation module is used to encapsulate the standard cache management interface corresponding to each microservice in the microservice cluster through the underlying framework; A generation module, used to generate registration information corresponding to each of the microservices according to each of the standard cache management interfaces; The operation module is used to obtain the registration information corresponding to each of the microservices and call the standard cache management interface in each of the registration information to operate the cache of the corresponding microservice.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the steps of the cache management method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the cache management method according to any one of claims 1 to 7 are executed.