Memory cache service node analysis method, device and server

By analyzing Redis service nodes, RDB backup files are generated and parsed, and node analysis results are provided to assist users in splitting large keys. This solves the query timeout problem caused by large keys and reduces the difficulty and dependency of splitting.

CN114356579BActive Publication Date: 2025-01-21BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210027902.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-11
Publication Date
2025-01-21
Estimated Expiration
2042-01-11

AI Technical Summary

Technical Problem

When using Redis, users may encounter query timeout problems caused by large keys. The existing technology requires users to manually split large keys, but this process depends on user experience and is difficult.

Method used

Provides an analysis method for memory cache service nodes. By receiving node analysis requests, it determines the target data node from the data nodes of the memory cache service, generates an RDB backup file, parses it, obtains the node analysis results, and finally sends the results. Go to the designated associated terminal to assist users in splitting large keys.

Benefits of technology

The node analysis results assist users in splitting large keys, which significantly reduces the dependence and difficulty of splitting large keys on user experience and avoids the problem of query timeout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356579B_ABST
    Figure CN114356579B_ABST
Patent Text Reader

Abstract

The present invention provides an analysis method, device and server for a memory cache service node, including: if a node analysis request for a memory cache service is received, a target data node to be analyzed is determined from at least one data node included in the memory cache service; wherein each data node includes one or more key-value data objects; an RDB backup file corresponding to the target data node is generated; a parsing operation is performed on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result at least includes statistical information of the target key-value data object in the target data node; and the node analysis result is sent to a designated associated terminal to provide the node analysis result through a graphical user interface of the designated associated terminal. The present invention can effectively assist users in splitting large keys through node analysis results, significantly reducing the dependence of splitting large keys on user experience and the difficulty of splitting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and in particular to an analysis method, device and server for a memory cache service node. Background Art

[0002] When using Redis (Remote Dictionary Server), users may generate large keys. When users query the data corresponding to the large keys, the amount of data to be queried will be large, and may even cause query timeouts, seriously affecting the user experience. Currently, users are usually required to manually split large keys to avoid query timeouts. However, the process of splitting large keys is relatively dependent on user experience, which makes it difficult to split large keys. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide an analysis method, device and server for a memory cache service node, which can effectively assist users in splitting large keys through node analysis results, significantly reducing the dependence of splitting large keys on user experience and the difficulty of splitting.

[0004] In the first aspect, an embodiment of the present invention provides an analysis method for a memory cache service node, comprising: if a node analysis request for a memory cache service is received, determining a target data node to be analyzed from at least one data node included in the memory cache service; wherein each of the data nodes includes one or more key-value data objects; generating an RDB backup file corresponding to the target data node; performing a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result includes at least statistical information of the target key-value data object in the target data node; and sending the node analysis result to a designated associated terminal to provide the node analysis result through the graphical user interface of the designated associated terminal.

[0005] In one embodiment, the method is applied to a server, the memory cache service is deployed on the server, and the memory cache service includes a master Redis service and a slave Redis service; the step of determining the target data node to be analyzed from at least one data node included in the memory cache service includes: determining the target data node to be analyzed from at least one data node included in the slave Redis service.

[0006] In one embodiment, the server is further deployed with a trove service component and a management service component; the step of generating the RDB backup file corresponding to the target data node includes: if the trove service component receives a node backup request, sending a backup instruction to the slave Redis service through the management service component to perform a backup operation on the target data node, and obtaining the RDB backup file corresponding to the target data node.

[0007] In one embodiment, the step of performing a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node includes: calling a parsing tool through the management service component, and using the parsing tool to perform a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result includes quantity information, occupancy information, distribution information and expiration information of the target key-value data object, and the target key-value data object includes a key-value data object that meets preset conditions, and the preset conditions include element quantity conditions and / or memory conditions.

[0008] In one embodiment, the server is also deployed with a data transmission service component; the step of sending the node analysis result to the designated associated terminal includes: saving the node analysis result to a designated storage path; using the data transmission service component to read the node analysis result from the designated storage path; using the data transmission service component to associate the node analysis result with the node information and upload it to the designated associated terminal, and deleting the node analysis result stored in the designated storage path.

[0009] In one embodiment, the designated associated terminal is deployed with a search service component; the step of providing the node analysis result through the graphical user interface of the designated associated terminal includes: receiving a query request through the search service component, and searching for the node analysis result based on the node information carried by the query request, so as to provide the node analysis result through the graphical user interface of the designated associated terminal.

[0010] In one implementation, the node information includes a service identifier of the memory cache service, a node identifier of the target data node, an instance identifier of the target data node, and a creation time of the RDB backup file.

[0011] In a second aspect, an embodiment of the present invention further provides an analysis device for a memory cache service node, comprising: a node determination module, for determining a target data node to be analyzed from at least one data node included in the memory cache service if a node analysis request for the memory cache service is received; wherein each of the data nodes includes one or more key-value data objects; a file generation module, for generating an RDB backup file corresponding to the target data node; an analysis module, for performing a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result includes at least statistical information of the target key-value data object in the target data node; and a sending module, for sending the node analysis result to a designated associated terminal, so as to provide the node analysis result through the graphical user interface of the designated associated terminal.

[0012] In a third aspect, an embodiment of the present invention further provides a server, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any one of the methods provided in the first aspect.

[0013] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium 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 any one of the methods provided in the first aspect.

[0014] An analysis method, device and server for a memory cache service node provided by an embodiment of the present invention, if a node analysis request for a memory cache service is received, a target data node to be analyzed is determined from at least one data node (including one or more key-value data objects) contained in the memory cache service, and an RDB backup file corresponding to the target data node is generated, and a node analysis result corresponding to the target data node (including at least statistical information of the target key-value data object in the target data node) is obtained by performing a parsing operation on the RDB backup file, and finally the node analysis result is sent to a designated associated terminal to provide the node analysis result through a graphical user interface of the designated associated terminal. The above method can determine the target data node and generate a corresponding RDB backup file when a node analysis request is received, and then perform a parsing operation on the RDB backup file to obtain a node analysis result containing statistical information of the target key-value data object, and send the node analysis result to the designated associated terminal for display, which can effectively assist users in splitting the target key-value data object through the node analysis result, significantly reducing the dependence of splitting the target key-value data object on user experience and the difficulty of splitting.

[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] 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.

[0018] Figure 1 A schematic diagram of a flow chart of a method for analyzing a memory cache service node provided by an embodiment of the present invention;

[0019] Figure 2 A schematic diagram of a framework of an analysis method for a memory cache service node provided by an embodiment of the present invention;

[0020] Figure 3 A schematic flow chart of another method for analyzing a memory cache service node provided by an embodiment of the present invention;

[0021] Figure 4 A schematic flow chart of another method for analyzing a memory cache service node provided by an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of the structure of an analysis device for a memory cache service node provided by an embodiment of the present invention;

[0023] Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not 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.

[0025] At present, the process of splitting large keys is more dependent on user experience, which makes it difficult to split large keys. Based on this, the present invention provides an analysis method, device and server for a memory cache service node, which can effectively assist users in splitting large keys through node analysis results, and significantly reduce the dependence of splitting large keys on user experience and the difficulty of splitting.

[0026] To facilitate understanding of this embodiment, firstly, a method for analyzing a memory cache service node disclosed in an embodiment of the present invention is described in detail. Figure 1 The flowchart of a method for analyzing a memory cache service node is shown, and the method mainly includes the following steps S102 to S108:

[0027] Step S102, if a node analysis request for the memory cache service is received, determine the target data node to be analyzed from at least one data node included in the memory cache service. Each data node includes one or more key-value data objects (also referred to as keys). In actual applications, if the memory cache service adopts a master-slave mode, it can be determined whether there is a large key in the data nodes included in the Redis service, and the data node with the large key is determined as the target data node; if the memory cache service adopts a cluster mode, it will be determined whether each data node has a large key, and the data nodes with the large key are all determined as target data nodes.

[0028] Step S104, generating an RDB (Relational Database) backup file corresponding to the target data node. In one implementation, the trove service component may call a slave node to generate an RDB backup file corresponding to the target data node.

[0029] Step S106, performing a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node. The node analysis result includes at least statistical information of the target key-value data object in the target data node, and the target key-value data object (also referred to as a big key) includes a key-value data object that meets a preset condition, and the preset condition includes an element quantity condition and / or a memory condition. For example, when the number of elements contained in the key-value data object is greater than a quantity threshold, it is determined that the key-value data object meets the preset condition, and the key-value data object is determined to be a target key-value data object, or when the memory of the key-value data object is greater than a memory threshold, it is determined that the key-value data object meets the preset condition, and the key-value data object is determined to be a target key-value data object. The above-mentioned statistical information may include the quantity information, occupancy information, distribution information and expiration information of the target key-value data object. In one embodiment, the management service (Guestagent) component can be used to perform a parsing operation on the RDB backup file to obtain statistical information of each target key-value data object in the target data node.

[0030] Step S108, sending the node analysis result to the designated associated terminal, so as to provide the node analysis result through the graphical user interface of the designated associated terminal. The designated associated terminal may also be referred to as a control terminal, and may include devices such as a personal computer, a smart phone, and a tablet computer. In one embodiment, the node analysis result may be first saved to a designated storage path, and when the designated associated terminal receives the node analysis result, the node analysis result stored in the designated storage path may be deleted, and the user may search for the desired node analysis result through the designated associated terminal, and display the node analysis result through the graphical user interface of the designated associated terminal.

[0031] The analysis method of the above-mentioned memory cache service node provided by the embodiment of the present invention can determine the target data node and generate a corresponding RDB backup file when receiving a node analysis request, and then perform a parsing operation on the RDB backup file to obtain a node analysis result containing statistical information of the target key-value data object, and send the node analysis result to a designated associated terminal for display. The node analysis result can effectively assist the user in splitting the target key-value data object, thereby significantly reducing the dependence of splitting the target key-value data object on user experience and the difficulty of splitting.

[0032] To facilitate understanding of the above embodiments, the present invention also provides Figure 2 A schematic diagram of a framework of an analysis method for a memory cache service node is shown. Figure 2It shows that a VIP (Virtual IP Address) corresponds to multiple proxy servers, each of which can provide Redis services. The VIP is used to provide a load balancing LB (Load Balance) function for the proxy servers.

[0033] In one embodiment, the above method is applied to a server, and the Redis service is deployed on the server. The memory cache service includes a master Redis service and a slave Redis service. The master Redis service is mainly used to provide read and write services to the outside world, and the slave Redis service is used to synchronize data from the master Redis service in a timely manner. Considering that the pressure of the slave Redis service is relatively small, when executing the step of determining the target data node to be analyzed from at least one data node included in the memory cache service, the target data node to be analyzed can be determined from at least one data node included in the slave Redis service. In one embodiment, a control corresponding to the cache analysis function can be provided through a graphical user interface of a specified terminal device, and a specified terminal device generates and sends a node analysis request to the server in response to an operation on the control. The server will determine whether there is a large key that meets the above preset conditions in the key contained in each data node. When a data node contains one or more large keys, the data node is determined as a target data node.

[0034] In one embodiment, the server is also deployed with a trove service component and a management service (Guestagent) component. Based on this, an embodiment of the present invention provides an implementation method for generating an RDB backup file corresponding to a target data node. If the trove service component receives a node backup request, a backup instruction is sent to the slave Redis service through the management service component to perform a backup operation on the target data node and obtain the RDB backup file corresponding to the target data node. Among them, the backup instruction can be a bgsave instruction. In actual application, considering that the pressure of the slave Redis service is relatively small, an RDB backup file can be generated based on the slave Redis service. Specifically, the trove service component stores the correspondence between the master Redis service and the slave Redis service, and the Guestagent component generates an RDB backup file by sending a bgsave instruction to the slave Redis service.

[0035] The embodiment of the present invention also provides an application example of generating an RDB backup file corresponding to a target data node, see Figure 3 The flowchart of another method for analyzing a memory cache service node is shown, and the method mainly includes the following steps S302 to S308:

[0036] Step S302: The designated terminal device responds to the operation on the cache analysis function control and sends a node analysis request to the server.

[0037] Step S304: the server selects a target data node.

[0038] Step S306: the trove service component requests to generate an RDB backup file corresponding to the target data node.

[0039] Step S308: The Guestagent component calls the slave node to send a bgsave instruction to generate an RDB backup file.

[0040] The embodiment of the present invention also provides an implementation method of performing a parsing operation on an RDB backup file to obtain a node analysis result corresponding to a target data node. The parsing tool can be called through a management service component, and the parsing tool can be used to perform a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node. Exemplarily, the node analysis result may include the following information: used memory, used memory ratio, key number, expired key number, expired key number ratio, expired key occupied memory, expired key occupied memory ratio, never expired key number, never expired key occupied memory. The node analysis result may also include the following information: the number of keys of each type, the memory occupied by each type of key, and the memory occupied ratio of each type of key, wherein the key type may include string type, list type, hash type, set type, and zset type. In addition, the node analysis result may also include the following information: the key with the number of elements in the top 100, the key with the memory size in the top 100, and the memory occupancy, encoding, number of elements, expiration time, db (data base, database) and the like of each key in the top 100 keys can be further counted.

[0041] In one embodiment, the server is also deployed with a data transmission service (Filebeat) component. Based on this, an embodiment of the present invention also provides an implementation method for sending node analysis results to a designated associated terminal: (1) saving the node analysis results to a designated storage path; (2) using the data transmission service component to read the node analysis results from the designated storage path; (3) using the data transmission service component to associate the node analysis results with the node information and upload them to the designated associated terminal, and delete the node analysis results stored in the designated storage path. In practical applications, considering that when the data node of the Redis service is analyzed again, the node analysis results will also be saved to the designated storage path. In order to avoid wasting storage resources of the designated storage path, the node analysis results in the designated storage path can be deleted when the designated associated terminal receives the node analysis results.

[0042] In addition, the above-mentioned designated associated terminal is deployed with a search service (Elasticsearch) component. In actual applications, the query request can be received through the search service component of the designated associated terminal, and the node analysis result can be found based on the node information carried in the query request, so as to provide the node analysis result through the graphical user interface of the designated associated terminal. Among them, the node information includes the service identifier of the memory cache service (Clusterid information), the node identifier of the target data node (Shardid information), the instance identifier of the target data node (Instanceid information), and the creation time of the RDB backup file (Rdbtime information).

[0043] The embodiment of the present invention also provides an application example of uploading node analysis results to the Elasticsearch component, see Figure 4 The flowchart of another method for analyzing a memory cache service node is shown, and the method mainly includes the following steps S402 to S406:

[0044] Step S402: The Guestagent component calls the RDB parsing tool to generate a node analysis result, and stores the node analysis result in a designated storage path.

[0045] Step S404, when the Filebeat component monitors that the node analysis result is stored in the specified storage path, the node analysis result is uploaded to the Elasticsearch component. The node analysis result carries the above node information.

[0046] Step S406, after the Filebeat component uploads the node analysis results, it calls the RDB parsing tool to delete the node analysis results stored in the specified storage path.

[0047] To sum up, the analysis method of the above-mentioned memory cache service node provided by the embodiment of the present invention analyzes the rdb backup file of the Redis service through the cache analysis function, which can quickly discover the large keys in the instance, assist users in understanding the key occupancy and distribution in the memory, key expiration time and other information, provide data support for the user's optimization operations, and help users avoid problems such as insufficient memory and performance degradation caused by Key tilt.

[0048] For the analysis method of the memory cache service node provided in the above embodiment, the embodiment of the present invention also provides an analysis device of the memory cache service node, see Figure 5 The schematic diagram of the structure of an analysis device of a memory cache service node shown in FIG. 1 mainly includes the following parts:

[0049] A node determination module 502 is configured to determine a target data node to be analyzed from at least one data node included in the memory cache service if a node analysis request for the memory cache service is received; wherein each data node includes one or more key-value data objects;

[0050] The file generation module 504 is used to generate an RDB backup file corresponding to the target data node;

[0051] The analysis module 506 is used to perform a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result at least includes statistical information of the target key-value data object in the target data node;

[0052] The sending module 508 is used to send the node analysis result to the designated associated terminal, so as to provide the node analysis result through the graphical user interface of the designated associated terminal.

[0053] The analysis device of the above-mentioned memory cache service node provided by the embodiment of the present invention can determine the target data node and generate a corresponding RDB backup file when receiving a node analysis request, and then perform a parsing operation on the RDB backup file to obtain a node analysis result containing statistical information of the target key-value data object, and send the node analysis result to a designated associated terminal for display. The node analysis result can effectively assist the user in splitting the target key-value data object, thereby significantly reducing the dependence of splitting the target key-value data object on user experience and the difficulty of splitting.

[0054] In one embodiment, the method is applied to a server, a memory cache service is deployed on the server, and the memory cache service includes a master Redis service and a slave Redis service; the node determination module 502 is also used to: determine a target data node to be analyzed from at least one data node included in the Redis service.

[0055] In one embodiment, the server is also deployed with a trove service component and a management service component; the file generation module 504 is also used for: if the trove service component receives a node backup request, sending a backup instruction to the slave Redis service through the management service component to perform a backup operation on the target data node and obtain the RDB backup file corresponding to the target data node.

[0056] In one embodiment, the analysis module 506 is also used to: call the parsing tool through the management service component, and use the parsing tool to perform a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result includes the quantity information, occupancy information, distribution information and expiration information of the target key-value data object, and the target key-value data object includes a key-value data object that meets preset conditions, and the preset conditions include element quantity conditions and / or memory conditions.

[0057] In one embodiment, the server is also deployed with a data transmission service component; the sending module 508 is also used to: save the node analysis results to a specified storage path; use the data transmission service component to read the node analysis results from the specified storage path; use the data transmission service component to associate the node analysis results and node information and upload them to a specified associated terminal, and delete the node analysis results stored in the specified storage path.

[0058] In one embodiment, the designated associated terminal is deployed with a search service component; the sending module 508 is also used to: receive a query request through the search service component, and search for a node analysis result based on the node information carried in the query request, so as to provide the node analysis result through the graphical user interface of the designated associated terminal.

[0059] In one implementation, the node information includes a service identifier of the memory cache service, a node identifier of the target data node, an instance identifier of the target data node, and a creation time of the RDB backup file.

[0060] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0061] An embodiment of the present invention provides a server. Specifically, the server includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the method described in any one of the above embodiments is executed.

[0062] Figure 6 A structural diagram of a server provided in an embodiment of the present invention, the server 100 includes: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected via the bus 62; the processor 60 is used to execute an executable module stored in the memory 61, such as a computer program.

[0063] The memory 61 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0064] The bus 62 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, Figure 6 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.

[0065] Among them, the memory 61 is used to store programs, and the processor 60 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 60 or implemented by the processor 60.

[0066] The processor 60 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 60. The above processor 60 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. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field 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 61, and the processor 60 reads the information in the memory 61 and completes the steps of the above method in combination with its hardware.

[0067] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and 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 referred to the previous method embodiments, which will not be repeated here.

[0068] 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.

[0069] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for analyzing a memory cache service node, characterized in that: include: If a node analysis request for a memory cache service is received, determine a target data node to be analyzed from at least one data node included in the memory cache service; wherein each of the data nodes includes one or more key-value data objects; Generate an RDB backup file corresponding to the target data node; Performing a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result at least includes statistical information of a target key-value data object in the target data node; The node analysis result is sent to a designated associated terminal, so as to provide the node analysis result through a graphical user interface of the designated associated terminal.

2. The method according to claim 1, characterized in that The method is applied to a server, the memory cache service is deployed on the server, and the memory cache service includes a master Redis service and a slave Redis service; The step of determining a target data node to be analyzed from at least one data node included in the memory cache service includes: A target data node to be analyzed is determined from at least one data node included in the slave Redis service.

3. The method according to claim 2, characterized in that The server is also deployed with trove service components and management service components; The step of generating the RDB backup file corresponding to the target data node includes: If the trove service component receives a node backup request, a backup instruction is sent to the slave Redis service through the management service component to perform a backup operation on the target data node and obtain an RDB backup file corresponding to the target data node.

4. The method according to claim 3, characterized in that: The step of performing a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node includes: A parsing tool is called through the management service component, and the parsing tool is used to perform a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result includes quantity information, occupancy information, distribution information and expiration information of the target key-value data object, and the target key-value data object includes a key-value data object that meets preset conditions, and the preset conditions include element quantity conditions and / or memory conditions.

5. The method according to claim 2, characterized in that: The server is also deployed with a data transmission service component; The step of sending the node analysis result to a designated associated terminal includes: Saving the node analysis results to a specified storage path; Using the data transmission service component to read the node analysis result from the designated storage path; The node analysis result and the node information are associated and uploaded to the designated associated terminal by using the data transmission service component, and the node analysis result stored in the designated storage path is deleted.

6. The method according to claim 5, characterized in that The designated associated terminal is deployed with a search service component; The step of providing the node analysis result through the graphical user interface of the designated associated terminal comprises: The query request is received through the search service component, and the node analysis result is searched based on the node information carried in the query request, so as to provide the node analysis result through the graphical user interface of the designated associated terminal.

7. The method according to claim 6, characterized in that The node information includes the service identifier of the memory cache service, the node identifier of the target data node, the instance identifier of the target data node, and the creation time of the RDB backup file.

8. An analysis device for a memory cache service node, characterized in that: include: A node determination module, configured to determine a target data node to be analyzed from at least one data node included in the memory cache service if a node analysis request for the memory cache service is received; wherein each of the data nodes includes one or more key-value data objects; A file generation module, used to generate an RDB backup file corresponding to the target data node; An analysis module, configured to perform a parsing operation on the RDB backup file to obtain a node analysis result corresponding to the target data node; wherein the node analysis result at least includes statistical information of a target key-value data object in the target data node; The sending module is used to send the node analysis result to a designated associated terminal, so as to provide the node analysis result through a graphical user interface of the designated associated terminal.

9. A server, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data migration method, agent node and database instance

    CN106055698A

  • Key value management system and method based on salt stack and Redis

    CN107688611A