Method, system and device for managing multi-cluster index, storage medium

By introducing a scheduler and database management system into multiple Elasticsearch clusters, unified management and automated operation across clusters are achieved, solving the problem of low management efficiency in existing technologies and improving the efficiency and performance of index lifecycle management.

CN117472907BActive Publication Date: 2026-11-24CHINA CONSTRUCTION BANK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311483200.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-08
Publication Date
2026-11-24
Estimated Expiration
2043-11-08

AI Technical Summary

Technical Problem

Existing technologies cannot effectively manage the index lifecycle of multiple Elasticsearch (ES) clusters, resulting in cumbersome operations, limited performance, complex configuration, lack of intelligence and automation, and poor scalability.

Method used

The scheduler retrieves index lists and configuration information of multiple clusters from the database, determines the target cluster based on this information, and manages it, thereby achieving unified management and automated operation across clusters and introducing concurrency processing and performance optimization mechanisms.

Benefits of technology

It improves the efficiency and scalability of multi-ES cluster index management, simplifies the operation process, reduces manual intervention, and meets the performance requirements of large-scale data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117472907B_ABST
    Figure CN117472907B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, apparatus, storage medium, and electronic device for managing multi-cluster indexes. The method includes: obtaining an index list of multiple clusters and configuration information for each index in the index list from a database; determining target clusters to be managed within the multiple clusters based on the configuration information; and managing target indexes of the target clusters based on management requirements included in the configuration information. This invention solves the problem of low efficiency in managing cluster indexes in related technologies, thereby improving the efficiency of managing cluster indexes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communications, and more specifically, to a method, system, apparatus, storage medium, and electronic device for managing multi-cluster indexes. Background Technology

[0002] Among related technologies, existing multi-ES cluster index lifecycle management technologies have some shortcomings and challenges when dealing with large-scale datasets, which need to be addressed:

[0003] 1. Lack of unified management: Existing technologies typically cannot provide a unified method for managing the index lifecycle across multiple Elasticsearch clusters, leading to tedious manual configuration and management by operators on different clusters.

[0004] II. Performance Limitations: When processing large-scale datasets, existing technologies may face performance bottlenecks, resulting in slow processing speeds that cannot meet business needs.

[0005] Third, complex configuration: Existing technologies are complex to configure, requiring operators to write complex rules and scripts, and are not easy to maintain and extend, which reduces the ease of use and scalability of the system.

[0006] This indicates that the relevant technologies suffer from low efficiency in managing multiple cluster indexes.

[0007] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention

[0008] This invention provides a method, system, apparatus, storage medium, and electronic device for managing multi-cluster indexes, in order to at least solve the problem of low efficiency in managing multi-cluster indexes in related technologies.

[0009] According to an embodiment of the present invention, a method for managing multi-cluster indexes is provided, comprising: obtaining an index list of multiple clusters and configuration information of each index included in the index list from a database; determining a target cluster to be managed among the multiple clusters based on the configuration information; and managing the target index of the target cluster based on the management requirements included in the configuration information.

[0010] According to another embodiment of the present invention, a multi-cluster index management system is provided, comprising: multiple clusters, each of the multiple clusters storing an index and document data corresponding to the index; a database for storing an index list of the multiple clusters and configuration information of the indexes; and a scheduler connected to the multiple clusters and the database, configured to obtain an index list of the multiple clusters and configuration information of each index included in the index list from the database, determine a target cluster to be managed among the multiple clusters based on the configuration information, and manage the target index of the target cluster based on the management requirements included in the configuration information.

[0011] According to another embodiment of the present invention, a multi-cluster index management device is provided, comprising: an acquisition module, configured to acquire an index list of multiple clusters and configuration information of each index included in the index list from a database; a determination module, configured to determine a target cluster to be managed among the multiple clusters based on the configuration information; and a management module, configured to manage the target index of the target cluster based on the management requirements included in the configuration information.

[0012] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0013] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0014] This invention retrieves an index list of multiple clusters and configuration information for each index in the index list from a database; determines the target clusters to be managed among the multiple clusters based on the configuration information; and manages the target indexes of the target clusters according to the management requirements included in the configuration information. Since the database can store an index list of multiple clusters and configuration information for each index in the index list, unified management of multiple clusters is achieved. Because the configuration information includes management requirements, the indexes of the target clusters can be managed according to these requirements, improving management efficiency. Therefore, this invention solves the problem of low efficiency in managing cluster indexes in related technologies, achieving the effect of improving the efficiency of managing cluster indexes. Attached Figure Description

[0015] Figure 1This is a hardware structure block diagram of a mobile terminal for a multi-cluster index management method according to an embodiment of the present invention.

[0016] Figure 2 This is a flowchart of a multi-cluster index management method according to an embodiment of the present invention;

[0017] Figure 3 This is a schematic diagram of the management system structure for a multi-cluster index according to an embodiment of the present invention;

[0018] Figure 4 This is a structural block diagram of a multi-cluster index management device according to an embodiment of the present invention. Detailed Implementation

[0019] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0021] Elasticsearch (ES) is used in the backend data processing. In these applications, the ever-increasing data volume and unique data processing methods often generate hundreds of millions of records. This massive amount of data consumes a large amount of disk storage space and system resources, severely degrading cluster performance and even causing system crashes. Therefore, ES systems often need to manage data storage and periodically delete old data to ensure the performance and stability of the ES system. With the widespread development of big data applications, enterprises are increasingly facing the challenge of handling massive amounts of data. When dealing with massive amounts of data, using multiple Elasticsearch (ES) clusters for index management has become a common solution. For the lifecycle management of ES indexes, the ES lifecycle management API and the Curator tool can be used.

[0022] Elasticsearch's lifecycle management API allows users to define index lifecycle policies, such as time-based expiration and deletion. Configuring lifecycle policies enables automated management of index lifecycles, reducing the workload for operators. However, the current lifecycle management API primarily focuses on index management within a single Elasticsearch cluster and does not provide a unified management method across multiple Elasticsearch clusters.

[0023] Curator is a popular open-source tool for managing and maintaining Elasticsearch (ES) clusters. It offers features such as index snapshots and cleanup, and shard management. However, Curator primarily focuses on managing a single ES cluster, and its application in managing the index lifecycle across multiple ES clusters presents some limitations and challenges.

[0024] Among related technologies, the following drawbacks exist in the management of index lifecycles across multiple Elasticsearch clusters:

[0025] 1. Lack of unified management: Existing technologies typically cannot provide a unified method for managing the index lifecycle across multiple Elasticsearch clusters. Operators need to manually configure and manage indexes on different clusters, leading to cumbersome operations, a high risk of errors, and increased workload.

[0026] II. Limited Performance: Existing technologies may face performance bottlenecks when dealing with large-scale datasets. Due to the inability to perform concurrent processing or optimization, processing speed is slow and cannot meet real-time business needs.

[0027] Third, complex configuration: The configuration process of existing technologies is complex, requiring operators to write complex rules and scripts. This increases the risk of configuration errors and also increases the difficulty of system management and maintenance.

[0028] Fourth, lack of intelligence and automation: Most existing technologies require operators to manually perform index lifecycle management tasks. They lack intelligent decision-making mechanisms and cannot automatically execute indexing operations based on specific conditions or rules.

[0029] 5. Lack of Scalability: Existing technologies may lack good scalability when handling large-scale datasets. As the amount of data increases, existing technologies may not be able to effectively handle and manage a large number of indexes.

[0030] In summary, the relevant technologies have drawbacks in multi-ES cluster index lifecycle management, including a lack of unified management, performance limitations, complex configuration, lack of intelligence and automation, and poor scalability.

[0031] In view of the above-mentioned problems existing in the related technologies, the following embodiments are proposed.

[0032] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a multi-cluster index management method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0033] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the multi-cluster index management method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0034] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0035] This embodiment provides a method for managing multi-cluster indexes. Figure 2 This is a flowchart of a multi-cluster index management method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0036] Step S202: Obtain from the database an index list of multiple clusters and configuration information for each index included in the index list;

[0037] Step S204: Based on the configuration information, determine the target clusters to be managed included in the multiple clusters;

[0038] Step S206: Manage the target index of the target cluster based on the management requirements included in the configuration information.

[0039] In the above embodiments, the cluster can be an Elasticsearch cluster. Elasticsearch is an open-source distributed search and analytics engine built on top of the Apache Lucene library. It is widely used for real-time data indexing, search, and analysis, and is suitable for handling large amounts of variable data. In Elasticsearch, an index is a logically related collection of documents. It is similar to a table in a traditional database, but in Elasticsearch, indexes are more flexible and free, allowing for dynamic creation of fields and full-text search.

[0040] In the above embodiments, the execution entity of the multi-cluster index management method can be a scheduler. The multi-cluster index management method can be applied to a multi-cluster index management system, which can include multiple clusters, a scheduler, and a database. The scheduler connects to the database and can obtain a list of indexes for multiple clusters and configuration information for each index in the list. The configuration information can include the index creation date, index management requirements, and the timing for index management. Index management requirements can include cross-cluster replication information and index modification information. The timing for index management can include the index retention period and the index management timing. Based on the management requirements included in the configuration information, the indexes of the target cluster can be managed when the designated management timing is reached.

[0041] In the above embodiments, a schematic diagram of the management system architecture for the multi-cluster index can be found in the appendix. Figure 3 ,like Figure 3 As shown, the management system for a multi-cluster index may also include an index management unit. The index management unit corresponds to... Figure 3 The index management unit supports index definition, maintenance, and deletion. Specifically, it allows cluster administrators to manage multiple Elasticsearch cluster indexes in a one-stop manner, including index creation, defining index templates, defining index retention periods, modifying indexes, deleting indexes, and replicating indexes across clusters.

[0042] For multiple Elasticsearch clusters distributed across data centers in different regions, a multi-cluster index management system provides convenient management. Furthermore, this system supports different versions of Elasticsearch clusters, shielding administrators from the differences between versions and simplifying management. In other words, the clusters within multiple systems can be of the same or different versions.

[0043] The scheduler unit connects to the Elasticsearch cluster and obtains Elasticsearch indexes and document data via network protocols. It retrieves the cluster index list and retention periods from the database, and uses scheduled tasks to periodically poll for indexes that meet cleanup criteria, then cleans those indexes accordingly.

[0044] The scheduler also supports cross-cluster replication of indexes. For indexes with replication tasks set up, data replication from the source cluster to the target cluster is automatically initiated when conditions are met. During replication, it also supports detecting cluster load and dynamically adjusting the replication rate based on the cluster load level, thereby ensuring the stability of other services.

[0045] The database is used to store metadata, operation data, and some configuration data generated during the index lifecycle management process, including configuration data for data centers, ES clusters, and indexes, scheduling job history records, administrator login and operation records, ES cluster version differences, and other metadata.

[0046] The cross-ES cluster index lifecycle management method encapsulates and abstracts ES cluster operations, which can automatically replicate indexes and data between multiple different ES clusters, and can also periodically clean up old index data.

[0047] This invention retrieves an index list of multiple clusters and configuration information for each index in the index list from a database; determines the target clusters to be managed among the multiple clusters based on the configuration information; and manages the target indexes of the target clusters according to the management requirements included in the configuration information. Since the database can store an index list of multiple clusters and configuration information for each index in the index list, unified management of multiple clusters is achieved. Because the configuration information includes management requirements, the indexes of the target clusters can be managed according to these requirements, improving management efficiency. Therefore, this invention solves the problem of low efficiency in managing cluster indexes in related technologies, achieving the effect of improving the efficiency of managing cluster indexes.

[0048] In an exemplary embodiment, determining the target cluster to be managed among multiple clusters based on the configuration information includes: determining the index retention period included in each of the configuration information; determining the first index corresponding to the expired index period included in the index retention period; and determining the cluster corresponding to the first index as the target cluster. In this embodiment, a list of cluster indexes and their index retention periods can be obtained from a database. A scheduled task set by the scheduler periodically polls for indexes that meet the cleanup conditions and cleans them up. The indexes that meet the cleanup conditions are those whose index retention periods have expired. The target cluster corresponding to this index can be determined, and the index can be cleared from the target cluster.

[0049] In an exemplary embodiment, determining the target cluster to be managed among the multiple clusters based on the configuration information includes: determining the index management timing included in each of the configuration information; determining a second index that has reached its index management timing, which is included in the index management timing; and determining the cluster corresponding to the second index as the target cluster. In this embodiment, the configuration information may also include the index management timing. The index management timing can be a management time; determining the second index that has reached its index management timing; and determining the cluster corresponding to the second index as the target cluster. When the index management timing of the target cluster arrives, the indexes in the target cluster can be managed. Management may include modification, replication, etc.

[0050] In an exemplary embodiment, managing the target index of the target cluster based on the management requirements included in the configuration information includes at least one of the following: if the management requirements include a clear index operation, clearing the target index and the corresponding document data in the target cluster; if the management requirements include a modify index operation, modifying the target index and the corresponding document data based on the modification information included in the configuration information; if the management requirements include a copy index operation, copying the target index and the corresponding document data based on the copy information included in the configuration information. In this embodiment, when the management requirement is to clear the index, the target index and the corresponding document data in the target cluster can be cleared. When the management requirement is to modify the index, the modification information can be determined from the configuration information, and the updated content in the modification information can be used to replace the content to be replaced in the document data corresponding to the target index. When the management requirement is to copy the index, the copy information included in the configuration information can be determined. The copy information may include the receiving cluster and the data to be copied. The index can be copied according to the copy information.

[0051] In one exemplary embodiment, copying the target index and the corresponding document data based on the copying information included in the configuration information includes: determining copyable data from the document data based on the copying information; and receiving a receiving cluster to receive the copyable data; and copying the copyable data and the target index to the receiving cluster. In this embodiment, the copying information may instruct the copying data and the receiving cluster to copy the copyable data and the target index to the receiving cluster to back up the target index. The copyable data may be all the data in the document data or a portion of the document data.

[0052] In one exemplary embodiment, copying the replicated data and the target index to the receiving cluster includes: determining the load information of the receiving cluster; determining the replication rate for copying the replicated data based on the load information; and copying the replicated data and the target index to the receiving cluster according to the replication rate. In this embodiment, during the replication process, it is also supported to detect the cluster's load and dynamically adjust the replication rate according to the cluster load level, thereby ensuring the stability of other services.

[0053] In one exemplary embodiment, the method further includes: obtaining index creation information from the database, wherein the index creation information includes a creation cluster for creating the index; and creating an index in the creation cluster according to the index creation information. In this embodiment, the index management unit of the multi-cluster index management system can also create indexes within the clusters. When creating an index, the index creation information can be stored in the database, and the scheduler can obtain the index creation information from the database. The index creation information may include a creation cluster for creating the index. The scheduler can create the index in the creation cluster according to the creation information when the creation timing included in the creation information is reached. The creation information may include index configuration information.

[0054] In the foregoing embodiments, the multi-cluster index management method is applicable to the index lifecycle management of multiple Elasticsearch clusters, enabling unified management and monitoring of indexes across multiple Elasticsearch clusters. Automated index management is achieved through the definition of flexible policies and task scheduling. Concurrency processing and performance optimization mechanisms are introduced to improve the efficiency and throughput of index lifecycle management.

[0055] In the foregoing embodiments, the present invention can achieve the following effects:

[0056] First, it achieves unified and centralized control over the index lifecycle management of multiple Elasticsearch clusters.

[0057] Second, an automated index management strategy and task scheduling were introduced, which reduced the workload of operators.

[0058] Third, it supports the processing of large-scale datasets and improves performance through concurrent processing.

[0059] Fourth, it is highly scalable and easy to configure and use.

[0060] This embodiment also provides a multi-cluster index management system, including: multiple clusters, each of the multiple clusters storing an index and document data corresponding to the index;

[0061] A database for storing an index list of multiple indexes of the cluster and configuration information of the indexes;

[0062] A scheduler, connected to multiple clusters and the database, is used to obtain an index list of multiple clusters and configuration information of each index included in the index list from the database, determine the target clusters to be managed among the multiple clusters based on the configuration information, and manage the target indexes of the target clusters based on the management requirements included in the configuration information.

[0063] In the above embodiments, the cluster can be an Elasticsearch cluster. Elasticsearch is an open-source distributed search and analytics engine built on top of the Apache Lucene library. It is widely used for real-time data indexing, search, and analysis, and is suitable for handling large amounts of variable data. In Elasticsearch, an index is a logically related collection of documents. It is similar to a table in a traditional database, but in Elasticsearch, indexes are more flexible and free, allowing for dynamic creation of fields and full-text search.

[0064] In the above embodiments, the execution entity of the multi-cluster index management method can be a scheduler. The multi-cluster index management method can be applied to a multi-cluster index management system, which can include multiple clusters, a scheduler, and a database. The scheduler connects to the database and can obtain a list of indexes for multiple clusters and configuration information for each index in the list. The configuration information can include the index creation date, index management requirements, and the timing for index management. Index management requirements can include cross-cluster replication information and index modification information. The timing for index management can include the index retention period and the index management timing. Based on the management requirements included in the configuration information, the indexes of the target cluster can be managed when the designated management timing is reached.

[0065] In the above embodiments, a schematic diagram of the management system architecture for the multi-cluster index can be found in the appendix. Figure 3 ,like Figure 3 As shown, the management system for a multi-cluster index may also include an index management unit. The index management unit corresponds to... Figure 3 The index management unit supports index definition, maintenance, and deletion. Specifically, it allows cluster administrators to manage multiple Elasticsearch cluster indexes in a one-stop manner, including index creation, defining index templates, defining index retention periods, modifying indexes, deleting indexes, and replicating indexes across clusters.

[0066] For multiple Elasticsearch clusters distributed across data centers in different regions, a multi-cluster index management system provides convenient management. Furthermore, this system supports different versions of Elasticsearch clusters, shielding administrators from the differences between versions and simplifying management. In other words, the clusters within multiple systems can be of the same or different versions.

[0067] The scheduler unit connects to the Elasticsearch cluster and obtains Elasticsearch indexes and document data via network protocols. It retrieves the cluster index list and retention periods from the database, and uses scheduled tasks to periodically poll for indexes that meet cleanup criteria, then cleans those indexes accordingly.

[0068] The scheduler also supports cross-cluster replication of indexes. For indexes with replication tasks set up, data replication from the source cluster to the target cluster is automatically initiated when conditions are met. During replication, it also supports detecting cluster load and dynamically adjusting the replication rate based on the cluster load level, thereby ensuring the stability of other services.

[0069] The database is used to store metadata, operation data, and some configuration data generated during the index lifecycle management process, including configuration data for data centers, ES clusters, and indexes, scheduling job history records, administrator login and operation records, ES cluster version differences, and other metadata.

[0070] The cross-ES cluster index lifecycle management method encapsulates and abstracts ES cluster operations, which can automatically replicate indexes and data between multiple different ES clusters, and can also periodically clean up old index data.

[0071] This invention retrieves an index list of multiple clusters and configuration information for each index in the index list from a database; determines the target clusters to be managed among the multiple clusters based on the configuration information; and manages the target indexes of the target clusters according to the management requirements included in the configuration information. Since the database can store an index list of multiple clusters and configuration information for each index in the index list, unified management of multiple clusters is achieved. Because the configuration information includes management requirements, the indexes of the target clusters can be managed according to these requirements, improving management efficiency. Therefore, this invention solves the problem of low efficiency in managing cluster indexes in related technologies, achieving the effect of improving the efficiency of managing cluster indexes.

[0072] In an exemplary embodiment, the multi-cluster index management system further includes an index management unit connected to the database, configured to convert management information included in received index management instructions into configuration information, and store the configuration information in the cluster information of the cluster corresponding to the index management instructions included in the database. In this embodiment, a user can input index management instructions through the control interface of the multi-cluster index management system. The index management instructions include management information, including the target cluster to be managed, the indexes of the target cluster, management requirements, and management information. Management requirements may include modification, creation, deletion, etc. The management information may also include management timing, including index retention period, index management timing, index creation timing, etc. When the management requirement is to clear the index, the target index and the corresponding document data in the target cluster can be cleared. When the management requirement is to modify the index, the management information may also include modification information, such as update content and content to be replaced. The modification information can be determined from the configuration information, and the update content in the modification information can be used to replace the content to be replaced in the document data corresponding to the target index. When the management requirement is to perform an index replication operation, the management information can include replication information, which may include the receiving cluster and the data to be replicated. The index can be replicated based on the replication information.

[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0074] This embodiment also provides a multi-cluster index management device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0075] Figure 4 This is a structural block diagram of a multi-cluster index management device according to an embodiment of the present invention, such as... Figure 4 As shown, the device includes:

[0076] The acquisition module 42 is used to obtain an index list of multiple clusters and configuration information of each index included in the index list from the database;

[0077] The determination module 44 is used to determine the target cluster to be managed among the multiple clusters based on the configuration information;

[0078] The management module 46 is used to manage the target index of the target cluster based on the management requirements included in the configuration information.

[0079] In an exemplary embodiment, the determining module 44 can determine the target cluster to be managed among the multiple clusters based on the configuration information in the following manner: determining the index retention period included in each of the configuration information; determining the first index corresponding to the expiration index period included in the index retention period; and determining the cluster corresponding to the first index as the target cluster.

[0080] In an exemplary embodiment, the determining module 44 can determine the target cluster to be managed among the multiple clusters based on the configuration information in the following manner: determining the index management timing included in each of the configuration information; determining the second index that has reached the index management timing included in the index management timing; and determining the cluster corresponding to the second index as the target cluster.

[0081] In an exemplary embodiment, the management module 46 can manage the target index of the target cluster based on the management requirements included in the configuration information by at least one of the following: if the management requirements include a clear index operation, clear the target index and the document data corresponding to the target index in the target cluster; if the management requirements include a modify index operation, modify the target index and the document data corresponding to the target index based on the modification information included in the configuration information; if the management requirements include a copy index operation, copy the target index and the document data corresponding to the target index based on the copy information included in the configuration information.

[0082] In an exemplary embodiment, the management module 46 can replicate the target index and the document data corresponding to the target index based on the replication information included in the configuration information by: determining the replicated data from the document data based on the replication information; and receiving the replicated data into a receiving cluster; and replicating the replicated data and the target index into the receiving cluster.

[0083] In an exemplary embodiment, the management module 46 may replicate the copied data and the target index to the receiving cluster by: determining the load information of the receiving cluster; determining the replication rate of the copied data based on the load information; and replicating the copied data and the target index to the receiving cluster according to the replication rate.

[0084] In one exemplary embodiment, the apparatus can also be used to obtain index creation information from the database, wherein the index creation information includes a creation cluster for creating an index; and an index is created in the creation cluster according to the index creation information.

[0085] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0086] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0087] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0088] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0089] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0090] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0091] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0092] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for managing multi-cluster indexes, characterized in that, include: Retrieve a list of indexes for multiple clusters from the database, along with configuration information for each index included in the list; Based on the configuration information, the target clusters to be managed among the multiple clusters are determined; The target index of the target cluster is managed based on the management requirements included in the configuration information; Managing the target index of the target cluster based on the management requirements included in the configuration information includes: when the management requirements include an index copying operation, copying the target index and the document data corresponding to the target index based on the copying information included in the configuration information; Copying the target index and the corresponding document data based on the copying information included in the configuration information includes: determining copying data from the document data based on the copying information; and receiving a receiving cluster to receive the copying data; determining the load information of the receiving cluster; determining the copying rate for copying the copying data based on the load information; and copying the copying data and the target index to the receiving cluster according to the copying rate, wherein the copying rate supports dynamic adjustment.

2. The method for managing multi-cluster indexes according to claim 1, characterized in that, Based on the configuration information, the target clusters to be managed among the multiple clusters are determined to include: Determine the index retention period included in each of the configuration information; Determine the first index corresponding to the expiration index period included in the index retention period; The cluster corresponding to the first index is determined as the target cluster.

3. The method for managing multi-cluster indexes according to claim 1, characterized in that, Based on the configuration information, the target clusters to be managed among the multiple clusters are determined to include: Determine the timing of index management included in each of the configuration information; Determine the second index that has reached the index management timeframe, which is included in the index management timeframe. The cluster corresponding to the second index is determined as the target cluster.

4. The method for managing multi-cluster indexes according to claim 1, characterized in that, Managing the target index of the target cluster based on the management requirements included in the configuration information includes at least one of the following: If the management requirements include an index clearing operation, the target index and the document data corresponding to the target index in the target cluster shall be cleared. If the management requirements include an index modification operation, the target index and the document data corresponding to the target index are modified based on the modification information included in the configuration information.

5. The method for managing multi-cluster indexes according to claim 1, characterized in that, The method further includes: Obtain index creation information from the database, wherein the index creation information includes a creation cluster used to create the index; In the cluster creation process, an index is created according to the index creation information.

6. A management system for multi-cluster indexes, characterized in that, include: Multiple clusters, each of the multiple clusters storing an index and document data corresponding to the index; A database for storing an index list of multiple indexes of the cluster and configuration information of the indexes; A scheduler, which is connected to multiple clusters and to the database, is used to obtain an index list of multiple clusters and configuration information of each index included in the index list from the database, determine the target clusters to be managed among the multiple clusters based on the configuration information, and manage the target indexes of the target clusters based on the management requirements included in the configuration information. The scheduler manages the target index of the target cluster based on the management requirements included in the configuration information in the following way: when the management requirements include an index replication operation, the scheduler replicates the target index and the document data corresponding to the target index based on the replication information included in the configuration information. The scheduler replicates the target index and the corresponding document data based on the replication information included in the configuration information in the following manner: determining the replicated data from the document data based on the replication information; and receiving the replicated data from a receiving cluster; Determine the load information of the receiving cluster; The replication rate for copying the data is determined based on the load information; the data and the target index are then copied to the receiving cluster according to the replication rate.

7. The management system for multi-cluster indexes according to claim 6, characterized in that, The multi-cluster index management system further includes an index management unit, which is connected to the database and is used to convert the management information included in the received index management instructions into configuration information, and store the configuration information in the cluster information of the cluster corresponding to the index management instructions included in the database.

8. A management device for a multi-cluster index, characterized in that, include: The acquisition module is used to obtain a list of indexes for multiple clusters from the database, as well as the configuration information of each index included in the list of indexes; The determination module is used to determine the target cluster to be managed among the multiple clusters based on the configuration information; The management module is used to manage the target index of the target cluster based on the management requirements included in the configuration information; The management module manages the target index of the target cluster based on the management requirements included in the configuration information in the following way: when the management requirements include an index copying operation, the target index and the document data corresponding to the target index are copied based on the copying information included in the configuration information; The management module replicates the target index and the corresponding document data based on the replication information included in the configuration information in the following manner: determining the replicated data from the document data based on the replication information; and receiving the replicated data from a receiving cluster; Determine the load information of the receiving cluster; The replication rate for copying the data is determined based on the load information; the data and the target index are then copied to the receiving cluster according to the replication rate.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to perform the method described in any one of claims 1 to 5 when executed.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Index creating method and device, electronic equipment and storage medium

    CN113849701A

  • Data cluster management method and system, server and computer readable storage medium

    CN114372061A

  • Method and device for managing cluster index, medium and program product

    CN115934332A