Cache server inspection method, device, computer equipment and storage medium

By building templates of the current and historical operating information of cache servers and using large language models for health assessment, the inefficiency of existing inspection methods is solved, and an efficient and accurate automated inspection process is achieved.

CN120448236BActive Publication Date: 2025-09-30ASPIRE TECH (SHENZHEN) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510897754.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-09-30
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

Existing cache server inspection methods are inefficient and cannot meet the high-frequency, high-accuracy operation and maintenance requirements of large or multi-instance systems. In particular, inspection quality is difficult to guarantee in distributed Redis clusters and high-concurrency business pressure scenarios.

Method used

By obtaining the current and historical operating information of the cache server, building an initial prompt word template, combining it with a large language model to perform health assessments, and generating inspection results, an automated closed-loop inspection process is implemented.

Benefits of technology

It improves inspection efficiency and accuracy, generates more accurate inspection results, realizes automated server inspection process, and improves inspection quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448236B_ABST
    Figure CN120448236B_ABST
Patent Text Reader

Abstract

The present invention discloses a cache server inspection method, device, computer equipment and storage medium. The method includes: obtaining the current operation information and historical operation information of the cache server; constructing an initial prompt word template based on the historical operation information; adding the current operation information to the initial prompt word template to construct a target prompt word template; providing the target prompt word template to a preset large language model for health assessment processing to obtain a health assessment result; and generating a cache server inspection result based on the health assessment result. By combining the historical operation information and the current operation information to construct a dynamic target prompt word template, and providing the target prompt word template to the large language model for health assessment, a more accurate health assessment result is obtained, and then a more accurate inspection result can be generated based on the health assessment result, and an automated closed-loop server inspection process is realized, which can effectively improve the inspection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a cache server inspection method, device, computer equipment and storage medium. Background Art

[0002] With the widespread adoption of cloud computing and distributed systems, cache servers such as Redis, a high-performance in-memory key-value database, have been widely deployed in scenarios such as caching, message queuing, and real-time computing. However, current Redis health inspection and configuration tuning still rely primarily on manual operations or basic scripting tools. Existing methods typically collect configuration information and health data manually or through custom scripts, and then operations and maintenance personnel manually analyze and execute tuning commands or generate reports. This approach is not only inefficient and time-consuming, but also relies on empirical judgment, which can easily miss potential issues and fail to meet the high-frequency, high-accuracy operation and maintenance requirements of large-scale or multi-instance systems. Existing inspection methods are particularly low in efficiency and accuracy when used in distributed Redis clusters, multi-role instances (such as master-slave nodes), or scenarios with high concurrent workloads, making it difficult to ensure inspection quality.

[0003] Therefore, how to provide a cache server inspection method that effectively improves inspection efficiency and inspection accuracy, thereby ensuring inspection quality, has become an urgent problem to be solved. Summary of the Invention

[0004] Based on this, it is necessary to provide a cache server inspection method, device, computer equipment and storage medium to address the above technical problems, so as to solve the problems of low inspection efficiency and inspection accuracy of traditional methods.

[0005] A cache server inspection method,

[0006] Obtaining current and historical operating information of the cache server;

[0007] Building an initial prompt word template based on the historical operation information;

[0008] Adding the current running information to the initial prompt word template to construct a target prompt word template;

[0009] Providing the target prompt word template to a preset large language model for health assessment processing to obtain a health assessment result;

[0010] Based on the health assessment result, an inspection result of the cache server is generated.

[0011] Optionally, constructing an initial prompt word template based on the historical operation information includes:

[0012] Obtaining a preset initial weight list, wherein the initial weight list includes initial weight coefficients corresponding to the historical operation information;

[0013] Calculating a first historical health status score of the cache server based on the historical operation information and the corresponding initial weight coefficient;

[0014] Determining the first historical health status score and the corresponding calculation process as a first evaluation example;

[0015] Based on the first evaluation example, the initial prompt word template is constructed.

[0016] Optionally, constructing the initial prompt word template based on the first evaluation example includes:

[0017] Obtaining the business scenario of the cache server;

[0018] Adjusting the initial weight coefficient based on the business scenario to obtain a target weight list, wherein the target weight list includes target weight coefficients corresponding to the historical operation information;

[0019] Calculating a second historical health status score of the cache server based on the historical operation information and the corresponding target weight coefficient;

[0020] Determining the second historical health status score and the corresponding calculation process as a second evaluation example;

[0021] Based on the first evaluation example and the second evaluation example, the initial prompt word template is constructed.

[0022] Optionally, generating an inspection result of the cache server based on the health assessment result includes:

[0023] Obtaining current configuration information of the cache server;

[0024] The inspection result is generated based on the current configuration information and the health assessment result.

[0025] Optionally, generating the inspection result based on the current configuration information and the health assessment result includes:

[0026] Extracting key indicators from the current operation information;

[0027] Determining an optimization analysis corresponding to the current configuration information based on the key indicators;

[0028] Based on the current configuration information, the health assessment result, the key indicators, and the optimization analysis, an inspection report of the cache server is generated as the inspection result.

[0029] Optionally, the optimization analysis includes potential problems and optimization suggestions, and the method further includes:

[0030] Based on the optimization suggestions, generating optimization commands corresponding to the potential problems;

[0031] The current configuration information of the cache server is optimized based on the optimization command to obtain an optimized cache server.

[0032] A cache server inspection device, comprising:

[0033] A first acquisition module is used to obtain the current operation information and historical operation information of the cache server;

[0034] A first construction module is configured to construct an initial prompt word template based on the historical operation information;

[0035] A first adding module is used to add the current operation information to the initial prompt word template to construct a target prompt word template;

[0036] A first evaluation module is configured to provide the target prompt word template to a preset large language model for health evaluation processing to obtain a health evaluation result;

[0037] The first generating module is configured to generate an inspection result of the cache server based on the health assessment result.

[0038] The first building block includes:

[0039] A first acquisition submodule is configured to acquire a preset initial weight list, wherein the initial weight list includes initial weight coefficients corresponding to the historical operation information;

[0040] A first calculation submodule is configured to calculate a first historical health status score of the cache server based on the historical operation information and the corresponding initial weight coefficient;

[0041] a first determining submodule, configured to determine the first historical health status score and the corresponding calculation process as a first evaluation example;

[0042] The first construction submodule is configured to construct the initial prompt word template based on the first evaluation example.

[0043] A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the cache server inspection method is implemented.

[0044] A readable storage medium stores computer-readable instructions, which implement the cache server inspection method when executed by a processor.

[0045] The cache server inspection method, apparatus, computer equipment, and storage medium described above include: obtaining current and historical operating information of the cache server; constructing an initial prompt word template based on the historical operating information; adding the current operating information to the initial prompt word template to construct a target prompt word template; providing the target prompt word template to a preset large language model for health assessment processing to obtain a health assessment result; and generating an inspection result of the cache server based on the health assessment result. By combining historical and current operating information to construct a dynamic target prompt word template, and providing the target prompt word template to the large language model for health assessment, a more accurate health assessment result is obtained, and then a more accurate inspection result can be generated based on the health assessment result, and an automated closed-loop server inspection process is implemented, which can effectively improve inspection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0047] Figure 1 This is a flow chart of a cache server inspection method provided by an embodiment of the present invention;

[0048] Figure 2 This is a flow chart of another cache server inspection method provided by an embodiment of the present invention;

[0049] Figure 3 This is a schematic structural diagram of a cache server inspection device provided by an embodiment of the present invention;

[0050] Figure 4 It is a schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0052] In one embodiment, if Figure 1 As shown, a cache server inspection method is provided, comprising the following steps:

[0053] 101. Obtain the current operation information and historical operation information of the cache server.

[0054] In an embodiment of the present invention, the above-mentioned cache server inspection method can be applied to a server management platform, and the above-mentioned server management platform can be constructed by a server or a server cluster. The above-mentioned server or server cluster can be any electronic device with functions such as data analysis, data processing, data transmission, and data storage.

[0055] The above-mentioned cache server refers to a server node that provides high-speed data access capabilities and is used to cache intermediate calculation results or hot data. Typical implementations include Redis servers, Memcached servers, Ehcache servers, etc., running on cloud platforms, cluster environments or edge nodes.

[0056] The above-mentioned current operation information refers to the collection of operational status indicators collected by the server in real time. Specifically, this can be achieved through key performance indicators such as memory usage, number of connections, hit rate, and response latency. It is used to reflect the server's current operating load and health status. Historical operation information refers to the collection of operational data accumulated by the server over a historical period. Specifically, this can be achieved through performance indicator logs, fault records, and configuration change records from the past thirty days. This is used to establish a baseline reference for the server's normal operating status.

[0057] The above-mentioned current operation information refers to the set of operation status indicators collected from the cache server in real time, including but not limited to memory usage, number of connections, hit rate, response delay, etc. Among them, the memory usage rate indicates the ratio between the current memory occupied by the cache process and the configured upper limit; the number of connections indicates the number of clients currently connected to the cache service; the hit rate indicates the ratio between the number of cache read hits and the total number of read requests, which is used to evaluate the effectiveness of the cache; the response delay indicates the time required for the cache server to return the result after the client request is issued, reflecting the performance.

[0058] The above-mentioned historical operation information corresponds to the above-mentioned current operation information and may also include, but is not limited to, memory usage, number of connections, hit rate, response latency, etc. The above-mentioned historical operation information may be operation information generated by the cache server before the current operation information. That is, the historical operation information was generated before the current operation information. The above-mentioned historical operation information may be information collected at a certain historical moment, or it may be a collection of operation information accumulated over a past period (such as the past 30 days).

[0059] The above-mentioned current operation information or historical operation information can be obtained by calling a plug-in tool. For example, the above-mentioned cache server can be a Redis server, and can be obtained by using the INFO command of the Redis server.

[0060] Before obtaining the current and historical operating information of the cache server, you can first complete the information configuration and task triggering process of the Redis server. Specifically, the server management platform can provide an interface for users to input or automatically obtain the connection information of the target Redis server. The connection information includes but is not limited to the server IP address, service port number, and authentication password. The IP address is used to uniquely identify the network location of the target Redis instance, the port number is used to specify the communication port that the Redis service listens on, and the password is used to verify the access rights between the client and the Redis service to ensure data security. This information configuration process can be entered manually by the user, or it can be automatically filled in by scanning the host list, accessing the configuration center, or through an automatic discovery mechanism.

[0061] After completing the Redis server configuration, the cache server inspection can be triggered manually or automatically by the user to execute the cache server inspection method provided by the embodiment of the present invention. The manual triggering method is usually implemented by the operation and maintenance personnel selecting the target server in the management platform and clicking the "Inspect Now" button; the automatic triggering method automatically starts the intelligent agent task based on a scheduled task or event-driven mechanism, such as a scheduled inspection every morning, or automatically triggering an inspection task when the monitoring system detects an abnormality in a specific indicator. Through this mechanism, the system can achieve flexible and efficient intelligent inspection task scheduling.

[0062] 102. Based on historical operation information, construct an initial prompt word template.

[0063] In the embodiment of the present invention, the prompt word template refers to a predefined text structure or parameterized input framework, which is used as an input prompt for the language model to guide it to generate content or perform reasoning.

[0064] The initial prompt word template is constructed based on historical operating information, providing a "baseline reference context" for subsequent health status determination. Specifically, the input context of normal operation can be constructed from the historical operating information. By embedding this input context into the template field, the initial prompt word template is generated.

[0065] For example, specific construction methods may include: extracting key features such as the mean, maximum value, and anomalies from historical operation information; embedding them into template fields, such as: "In the past 30 days, the average memory usage was 80%, with a maximum of 95%; there were 5 connection rejections in the past 7 days." This type of information constitutes a textual description of the "normal operating status" as the input background for health assessment.

[0066] Alternatively, the health assessment results of historical operation information can be calculated through a preset initial weight list, and the calculation process can be embedded in the template field to obtain the above-mentioned initial prompt word template, so that the large language model learns the calculation method of the health assessment results.

[0067] 103. Add the current running information to the initial prompt word template to construct a target prompt word template.

[0068] In the embodiment of the present invention, the target prompt word template may refer to a complete prompt word structure constructed by combining current operation information and historical operation features, and is used as input for analysis by a large language model.

[0069] Current operating information is the basis for health assessment. The initial prompt word template is populated with the current operating information fields collected in real time. For example, "The current Redis server's memory usage is 94%, the number of connections is 9700, the hit rate is 71%, and the average response latency is 3.2ms. Based on the operating characteristics of the past 30 days, please determine whether there are current health risks and identify potential causes."

[0070] For example: "The current Redis server's memory usage is 94%, the number of connections is 9700, the hit rate is 71%, and the average response delay is 3.2ms. Refer to the preset initial weight list to calculate the health assessment results of historical operation information and its calculation process, and calculate the health assessment results corresponding to the current operation information accordingly."

[0071] 104. Provide the target prompt word template to a preset large language model for health assessment processing to obtain a health assessment result.

[0072] In an embodiment of the present invention, a large language model refers to a natural language understanding and generation model based on a deep neural network structure and trained on large-scale text, which has the capabilities of contextual reasoning, semantic induction and structured output, and is typically a model such as GPT, GLM, ERNIE, etc.

[0073] The pre-set large language model can be one that has been fine-tuned and optimized for cache servers. This model is built on top of a generic model (such as the GPT series). It is trained by incorporating cache system operation and maintenance data, inspection logs, tuning scripts, scoring metric semantics, and expert diagnostic data. This enables it to provide a professional understanding and intelligent analysis of cache server health.

[0074] Specifically, during the training process, we first collect operational logs and structured metrics (such as memory usage, latency, number of connections, persistence status, and master-slave synchronization delay) from mainstream cache servers like Redis and Memcached, along with corresponding manual inspection reports or tuning recommendations. These data are then used to construct "structured prompt word-manual recommendation" pairs as training samples. Subsequently, using supervised fine-tuning, we update the parameters of the general model based on these training samples, enabling it to process structured inspection prompt words and generate professional responses.

[0075] Furthermore, to enhance the model's adaptability to inspection tasks, reinforcement learning methods can be used for reward fine-tuning. For example, using standard analysis recommendations provided by experts as the desired output, this can guide the model's optimization generation strategy, enabling it to provide diagnostic and optimization recommendations consistent with actual O&M experience when faced with complex or abnormal operating conditions. Furthermore, by integrating the structured nature of prompt word templates with operational summaries, scoring results, and business scenario labels within the prompt word input, the model can more accurately understand the problem context and output stable, accurate, and highly interpretable evaluation results and tuning actions.

[0076] Therefore, the preset large language model can serve as the core reasoning engine of the intelligent agent task chain, supporting functions such as automatic inspection, health score analysis, and strategy recommendation, significantly improving the intelligence, automation, and accuracy of traditional inspection processes.

[0077] Specifically, an API call can be used to input a target prompt word template into a pre-set large language model, which then outputs a health assessment of the cache server's current status. This health assessment can include a health score (e.g., 82 / 100) and analysis results (e.g., abnormal item labels such as "Number of connections approaching the upper limit" or "Memory nearing full capacity").

[0078] 105. Generate inspection results of the cache server based on the health assessment results.

[0079] In an embodiment of the present invention, after obtaining the health assessment result, the health assessment result can be directly used as the above-mentioned inspection result.

[0080] Alternatively, you can obtain the current configuration information of the cache server and, based on the health assessment results returned by the large language model and combined with the current configuration information, output a structured, multi-dimensional inspection document (such as an inspection document in PDF format) as the inspection result.

[0081] The inspection results can be viewed by cache server administrators, sent to relevant personnel via email, or used to trigger an automated tuning process (i.e., tuning the cache server configuration information).

[0082] In an embodiment of the present invention, the current operating information and historical operating information of the cache server are obtained; an initial prompt word template is constructed based on the historical operating information; the current operating information is added to the initial prompt word template to construct a target prompt word template; the target prompt word template is provided to a preset large language model for health assessment processing to obtain a health assessment result; and based on the health assessment result, an inspection result of the cache server is generated. By combining the historical operating information and the current operating information to construct a dynamic target prompt word template, and providing the target prompt word template to the large language model for health assessment, a more accurate health assessment result is obtained, and then a more accurate inspection result can be generated based on the health assessment result, and an automated closed-loop server inspection process is realized, which can effectively improve inspection efficiency.

[0083] It is understandable that in the specific implementation of this application, data related to current operation information, historical operation information, business scenarios, etc. is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data and the construction, use and processing of cache servers must comply with relevant laws, regulations and standards of relevant countries and regions.

[0084] Optionally, in the step of constructing an initial prompt word template based on historical operation information, a preset initial weight list can also be obtained; based on the historical operation information and the corresponding initial weight coefficient, a first historical health status score of the cache server is calculated; the first historical health status score and the corresponding calculation process are determined as a first evaluation example; based on the first evaluation example, an initial prompt word template is constructed.

[0085] In this embodiment of the present invention, the initial weight list includes initial weight coefficients corresponding to historical operation information. The initial weight coefficients may include at least a performance coefficient, a memory health coefficient, a persistence state coefficient, a replication state coefficient, an error monitoring coefficient, and a connection pressure coefficient. For example, the recommended weight coefficient distribution may be [0.25, 0.25, 0.15, 0.15, 0.15, 0.05].

[0086] Specifically, the above-mentioned performance coefficient is used to adjust the weight ratio of the historical performance score to the first historical health status score, the above-mentioned memory health coefficient is used to adjust the weight ratio of the historical memory health score to the first historical health status score, the above-mentioned persistence status coefficient is used to adjust the weight ratio of the historical persistence status score to the first historical health status score, the above-mentioned replication status coefficient is used to adjust the weight ratio of the historical replication status score to the first historical health status score, the above-mentioned error monitoring coefficient is used to adjust the weight ratio of the historical error monitoring score to the first historical health status score, and the above-mentioned connection pressure coefficient is used to adjust the weight ratio of the historical connection pressure score to the first historical health status score.

[0087] Specifically, the calculation of the first historical health status score can be exemplified by the following calculation process:

[0088] HealthScore =

[0089] (w1 * PerformanceScore)+

[0090] (w2 * MemoryScore)+

[0091] (w3 * PersistenceScore)+

[0092] (w4 * ReplicationScore)+

[0093] (w5 * ErrorScore)+

[0094] (w6 * ConnectionScore)

[0095] Among them, the above-mentioned HealthScore represents the health status score (that is, it can be the first historical health status score), the above-mentioned w1 represents the performance coefficient, the above-mentioned w2 represents the memory health coefficient, the above-mentioned w3 represents the persistence status coefficient, the above-mentioned w4 represents the replication status coefficient, the above-mentioned w5 represents the error monitoring coefficient, the above-mentioned w6 represents the connection pressure coefficient, the above-mentioned PerformanceScore represents the performance score, the above-mentioned MemoryScore represents the memory health score, the above-mentioned PersistenceScore represents the persistence status score, the above-mentioned ReplicationScore represents the replication status score, the above-mentioned ErrorScore represents the error monitoring score, and the above-mentioned ConnectionScore represents the connection pressure score.

[0096] More specifically, the initial weight list may also include latency and throughput sub-factors corresponding to the performance score; memory usage sub-factors, memory management quality (i.e., fragmentation rate) sub-factors, and policy (i.e., eviction policy) configuration correctness sub-factors corresponding to the memory health score; RDB (snapshot) sub-factors, AOF (log) sub-factors, and backup mechanism sub-factors corresponding to the persistence score; master-slave synchronization latency sub-factors and slave node number sub-factors corresponding to the replication score; connection rejection rate sub-factors, key eviction sub-factors, and failed operation number sub-factors corresponding to the error monitoring score; and the number of currently established connections sub-factor corresponding to the connection pressure score. Each score can be calculated using the sub-factors corresponding to each score, and the health score (i.e., the first historical health score) can be calculated using the coefficients corresponding to each score.

[0097] More specifically, the PerformanceScore is a performance score, which can be obtained through the following calculation process:

[0098] PerformanceScore = latency sub-coefficient × latency_score + throughput sub-coefficient × ops_score. Latency_score is the response latency score, reflecting the cache server's response time to client requests; a higher score indicates faster responses. Ops_score is the operational throughput score, measuring the number of commands executed per unit time; a higher score indicates greater processing power. The latency sub-coefficient and throughput sub-coefficient each control the weight of each sub-score on the performance score.

[0099] The MemoryScore is the memory health score, which can be obtained through the following calculation process:

[0100] MemoryScore = Memory Usage Sub-Coefficient × Memory_Usage_Score + Memory Management Quality Sub-Coefficient × Fragmentation_Score + Policy Configuration Correctness Sub-Coefficient × Evict_Policy_Score. Memory_usage_score is the memory usage score, reflecting whether current memory usage is close to the configured threshold; fragmentation_score is the memory fragmentation score, measuring allocation continuity and reclamation efficiency; and Evict_Policy_Score is the evict policy rationality score, determined by whether the currently enabled maxmemory-policy is appropriate for the current business load. The total score for this dimension is calculated by weighted integration of the Memory Usage Sub-Coefficient, the Memory Management Quality Sub-Coefficient, and the Policy Configuration Correctness Sub-Coefficient.

[0101] The above PersistenceScore is the persistence status score, which can be obtained through the following calculation process:

[0102] PersistenceScore = RDB sub-factor × rdb_score + AOF sub-factor × aof_score + backup mechanism sub-factor × backup_score. RDB_score is a score calculated based on the persistence stability and effectiveness of the snapshot mechanism (RDB); aof_score is a score based on the execution status and configuration rationality of the append-only log mechanism (AOF); and backup_score is a score based on the external backup strategy settings and success rate. The RDB sub-factor, AOF sub-factor, and backup mechanism sub-factor each represent the contribution of these three persistence methods to the persistence status score.

[0103] The ReplicationScore is the replication status score, which can be obtained through the following calculation process:

[0104] ReplicationScore = Master-Slave Synchronization Lag Sub-Factor × sync_lag_score + Number of Slave Nodes Sub-Factor × slave_count_score. Sync_lag_score is the replication lag score between the master and slave nodes, and slave_count_score is the score corresponding to the number of connected slave nodes. The master-slave synchronization lag sub-factor and the number of slave nodes sub-factor together determine the replication status score, which measures the system's high availability support capabilities.

[0105] The ErrorScore is the error monitoring score, which can be obtained through the following calculation process:

[0106] ErrorScore = 100 - (rejected_conn_ratio sub-factor + evicted_keys sub-factor + failed_ops sub-factor + rejected_conn_ratio sub-factor). Here, rejected_conn_ratio represents the percentage of rejected connection requests; evicted_keys represents the number of keys automatically evicted due to memory constraints; and failed_ops represents the total number of command execution failures. These three abnormality indicators are weighted and deducted using their respective sub-factors. A higher score indicates a lower error frequency and greater system stability.

[0107] The ConnectionScore is the connection stress score, which can be obtained through the following calculation process:

[0108] ConnectionScore = 100 × (1 - current number of established connections sub-coefficient × connected_clients / maxclients), where connected_clients represents the number of currently connected clients and maxclients represents the maximum number of connections configured for the system. The current number of established connections sub-coefficient reflects the proportion of current connection usage to the system's maximum capacity. A higher coefficient indicates a resource bottleneck and a lower score.

[0109] By weighted synthesis of the scores of each of the above dimensions and their corresponding sub-scores, and further applying the initial weight list of the main scoring dimensions (i.e., performance scoring coefficient, memory health scoring coefficient, persistence status scoring coefficient, replication status scoring coefficient, error monitoring scoring coefficient, and connection pressure scoring coefficient), the health status score of the cache server (i.e., the first historical health status score) can be finally calculated. This can be used as an evaluation example in the construction of the initial prompt word template to improve the large language model's understanding of the overall server operating status and the diagnostic accuracy.

[0110] It is understandable that by breaking down a single health score into multiple sub-dimension scores and applying weighted processing in layers, the operating status of the cache server can be carefully portrayed from multiple aspects, avoiding the overall score from deviating from reality due to short-term fluctuations in a certain indicator. It has higher interference resistance and stability when facing complex operating scenarios. At the same time, when a score anomaly occurs, you can quickly locate the performance bottleneck or the source of the abnormal indicator by viewing the specific score of each score and its subordinate sub-scores. For example, if the decline in the health score is mainly due to the "memory health score", and the "fragmentation rate score" in the memory health score is low, it can be directly located as a memory management problem, improving the efficiency of fault location.

[0111] Optionally, in the step of constructing an initial prompt word template based on the first evaluation example, the business scenario of the cache server can also be obtained; the initial weight coefficient is adjusted based on the business scenario to obtain a target weight list; based on historical operation information and the corresponding target weight coefficient, the second historical health status score of the cache server is calculated; the second historical health status score and the corresponding calculation process are determined as the second evaluation example; based on the first evaluation example and the second evaluation example, the initial prompt word template is constructed.

[0112] In the embodiment of the present invention, the target weight list includes target weight coefficients corresponding to historical operation information.

[0113] Specifically, the scenario-aware mechanism can be introduced to further enhance the scenario adaptability of the scoring model. Specifically, before generating the prompt template, the cache server's business scenario information can be automatically obtained through user input, application identification, or pre-configured configuration. The business scenario indicates the application type and key performance concerns of the server, such as real-time trading systems, content delivery networks (CDNs), social platform caches, and IoT edge node caches.

[0114] After obtaining the business scenario, the initial weight coefficients in the original scoring system can be adjusted based on the preset business scenario and weight mapping rules to form a new target weight list. In the target weight list, each target weight coefficient corresponds to each scoring dimension in the historical operation information and is used to replace the default weight in subsequent calculations.

[0115] For example:

[0116] If the business scenario is highly available and distributed, the target weight coefficient of the replication status score (ReplicationScore) can be increased, for example, from the default 0.15 to 0.25, to enhance the impact of master-slave synchronization and redundant nodes on the overall score;

[0117] If the business scenario is a high-concurrency read-write scenario, you can increase the target weight coefficients of the performance score (PerformanceScore) and the connection pressure score (ConnectionScore), for example, to 0.3 and 0.1 respectively;

[0118] If data reliability is a priority in the business scenario, the sub-factors of the persistence score (PersistenceScore) and the backup mechanism score can be increased to ensure that data consistency and persistence account for a higher proportion in the score;

[0119] If the business scenario is a resource-constrained edge device, the target weights of the memory health score (MemoryScore) and the connection stress score (ConnectionScore) can be increased to reflect the sensitivity of the device's resource utilization efficiency.

[0120] Based on the target weight list and historical operating information, a second historical health status score is calculated, and the sub-item scores and weight coefficients of this score are recorded as the second evaluation example. Subsequently, by combining the first evaluation example (generated based on default weights) with the second evaluation example (generated based on business scenario weights), a more suitable initial prompt word template is constructed for subsequent large language model reference to perform health assessment tasks, making the assessment results more business-relevant and diagnostically targeted.

[0121] Optionally, in the step of generating the inspection result of the cache server based on the health assessment result, current configuration information of the cache server may also be obtained; and the inspection result may be generated based on the current configuration information and the health assessment result.

[0122] In this embodiment of the present invention, current configuration information refers to the set of configuration parameters in effect during the operation of the cache server. Specifically, this information can be obtained by reading the configuration file or calling the configuration query interface (for example, using the Redis CONFIGGET command). These parameters include the memory allocation policy, maximum connection limit, cache eviction policy, and other parameters. This information is used, in conjunction with the health assessment results, to analyze whether the current configuration is reasonable and whether there are any conflicts with the operating status.

[0123] The health assessment result can be a structured assessment conclusion outputted by parsing the target prompt word template using a large language model, such as a health score, a list of abnormal indicators, or a risk level classification. This result provides the core basis for generating inspection results, ensuring that the analysis process is directly linked to the operating status.

[0124] For example, when generating inspection results, the currently effective configuration parameters of the cache server are first obtained through an automated interface or log collection tool, such as the maximum memory limit is set to 8GB and the upper limit of the number of connections is set to 10,000. Subsequently, the key issues identified in the health assessment results are matched and analyzed with the current configuration information. For example, if the health assessment results indicate that the memory usage rate continues to exceed 90%, and the memory upper limit in the current configuration is set to a fixed value and the dynamic expansion policy is not enabled, an inspection result containing memory configuration optimization suggestions is generated. This avoids the correlation between the configuration and the operating status that may be overlooked during manual analysis, and achieves cross-validation of configuration parameters and real-time operating data.

[0125] Optionally, in the step of generating inspection results based on the current configuration information and health assessment results, key indicators can also be extracted from the current operation information; based on the key indicators, the optimization analysis corresponding to the current configuration information is determined; based on the current configuration information, health assessment results, key indicators and optimization analysis, an inspection report of the cache server is generated as the inspection result.

[0126] In an embodiment of the present invention, the extraction of the above-mentioned key indicators and the determination of the optimization analysis can also be achieved based on the above-mentioned large language model. Specifically, a corresponding optimization analysis prompt template can be constructed based on the above-mentioned current configuration information and health assessment results, and then the optimization analysis prompt template can be provided to the above-mentioned large language model, so that the above-mentioned large language model can extract key indicators from the current operation information and determine the optimization analysis based on the key indicators.

[0127] The aforementioned key indicators may refer to core parameters that reflect the operating status of the cache server. Specifically, these can be achieved through indicators such as memory usage, peak number of connections, and hit rate. Key indicators can intuitively reflect server load and performance bottlenecks. Optimization analysis refers to the diagnosis of potential problems and the derivation of improvement suggestions for abnormal key indicators. This can also be achieved through matching historical cases with a preset rule base or machine learning model to identify configuration defects or operational risks. An inspection report refers to a structured document that integrates configuration information, evaluation results, key indicators, and optimization suggestions. Specifically, natural language generation technology can be used to convert analysis results into a readable text format to facilitate operations and maintenance personnel to quickly understand the problem.

[0128] For example, in the process of generating an inspection report, key indicators with high weights or exceeding the threshold range are first screened out from the current operating information, such as memory usage that is continuously higher than the preset warning value. Then, combined with the parameter settings in the current configuration information, such as memory allocation strategy or connection number limit, analyze whether the abnormality of the key indicator is caused by improper configuration. If it is identified that the configuration parameters do not match the operating requirements, corresponding optimization suggestions are generated, such as recommendations to adjust the memory recovery mechanism or expand the cache capacity. Finally, the overall score, key indicator abnormalities, configuration analysis conclusions and optimization suggestions in the health assessment results are integrated into a structured report to form a complete inspection result that includes problem location and solutions.

[0129] Optionally, the method may further generate optimization commands corresponding to potential problems based on the optimization suggestions; and optimize the current configuration information of the cache server based on the optimization commands to obtain an optimized cache server.

[0130] In an embodiment of the present invention, the optimization analysis includes potential problems and optimization suggestions. The optimization suggestions may refer to specific improvement measures proposed for potential problems existing in the running state of the cache server. Specifically, they may be generated by a large language model or generated based on historical tuning cases or preset rule base matching. For example, it is recommended to execute a memory cleanup command for the memory fragmentation problem. Potential problems may refer to abnormal conditions that may affect the performance or stability of the cache server identified through health assessment. Specifically, they may be generated by a large language model or implemented by threshold comparison, trend prediction or correlation analysis. For example, the memory usage rate continues to rise and is close to the capacity limit. Optimization commands refer to a set of instructions that can directly act on the configuration or running state of the cache server. Specifically, they may be generated by scripts, template filling or API calls to generate large language models. For example, Redis configuration instructions for adjusting the memory allocation strategy are generated.

[0131] Specifically, after potential problems are identified in the health assessment results and optimization suggestions are generated, the text-based optimization suggestions are converted into executable command sequences based on the preset rule base. For example, to address the problem of connection overload, a configuration command set is automatically generated that includes maxclients parameter adjustment, connection pool optimization, and client current limiting strategy. The commands in the configuration command set apply configuration changes in sequence through the CONFIG SET command preset order, and operating indicators are collected after each change to verify the optimization effect. If the optimized indicators do not meet expectations, the rollback mechanism can be triggered to restore to the previous stable state, and an optimization failure report can be generated for subsequent analysis.

[0132] In one embodiment, if Figure 2 As shown, another cache server inspection method is provided, including the following steps:

[0133] The first step is to configure the Redis server information. The IP address, port number, and password of the Redis server can be entered by the user or automatically obtained.

[0134] The second step is to trigger the agent's task flow. Specifically, the agent's inspection and tuning tasks can be triggered manually or automatically.

[0135] The third step is to obtain the Redis configuration information. Specifically, you can obtain the Redis configuration information by calling the plug-in tool;

[0136] The fourth step is to obtain the Redis running status information. Specifically, you can obtain the Redis running status information by calling the plug-in tool;

[0137] Step 5: Send information to the large language model. Specifically, the acquired configuration and running status information can be sent to the large language model.

[0138] Step 6: Analyze the information and generate a score. Specifically, a large language model can analyze the information based on a preset algorithm (i.e., the calculation process corresponding to the first and second evaluation examples above) to generate a Redis health status score.

[0139] The seventh step is to generate an inspection report. Specifically, you can generate an inspection report in PDF format based on the analysis results;

[0140] Step 8: Identify problems and generate optimization commands. Specifically, a large language model can be used to identify potential problems and generate optimization commands.

[0141] The ninth step is to execute the optimization command. Specifically, you can call the plug-in tool to execute the generated optimization command.

[0142] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0143] In one embodiment, a cache server inspection device is provided, which corresponds to the cache server inspection method in the above embodiment. Figure 3 As shown, the cache server inspection device includes: a first acquisition module 301, a first construction module 302, a first addition module 303, a first evaluation module 304, and a first generation module 305. The functional modules are described in detail as follows:

[0144] A first acquisition module 301 is configured to acquire current and historical operation information of the cache server;

[0145] A first constructing module 302 is configured to construct an initial prompt word template based on the historical operation information;

[0146] A first adding module 303 is configured to add the current operation information to the initial prompt word template to construct a target prompt word template;

[0147] A first evaluation module 304 is configured to provide the target prompt word template to a preset large language model for health evaluation processing to obtain a health evaluation result;

[0148] The first generating module 305 is configured to generate an inspection result of the cache server based on the health assessment result.

[0149] Optionally, the first building module 302 includes:

[0150] A first acquisition submodule is configured to acquire a preset initial weight list, wherein the initial weight list includes initial weight coefficients corresponding to the historical operation information;

[0151] A first calculation submodule is configured to calculate a first historical health status score of the cache server based on the historical operation information and the corresponding initial weight coefficient;

[0152] a first determining submodule, configured to determine the first historical health status score and the corresponding calculation process as a first evaluation example;

[0153] The first construction submodule is configured to construct the initial prompt word template based on the first evaluation example.

[0154] Optionally, the first building block includes:

[0155] A first acquiring unit, configured to acquire a business scenario of the cache server;

[0156] A first adjustment unit is configured to adjust the initial weight coefficient based on the business scenario to obtain a target weight list, wherein the target weight list includes target weight coefficients corresponding to the historical operation information;

[0157] A first calculation unit is configured to calculate a second historical health status score of the cache server based on the historical operation information and the corresponding target weight coefficient;

[0158] a first determining unit, configured to determine the second historical health status score and the corresponding calculation process as a second evaluation example;

[0159] The first constructing unit is configured to construct the initial prompt word template based on the first evaluation example and the second evaluation example.

[0160] Optionally, the first generating module 305 includes:

[0161] A second acquisition submodule is used to obtain current configuration information of the cache server;

[0162] The first generating submodule is configured to generate the inspection result based on the current configuration information and the health assessment result.

[0163] Optionally, the first generating submodule includes:

[0164] A first extraction unit is used to extract key indicators from the current operation information;

[0165] A second determining unit is configured to determine an optimization analysis corresponding to the current configuration information based on the key indicator;

[0166] The first generating unit is configured to generate an inspection report of the cache server as the inspection result based on the current configuration information, the health assessment result, the key indicators, and the optimization analysis.

[0167] Optionally, the optimization analysis includes potential problems and optimization suggestions, and the device further includes:

[0168] A second generating unit is configured to generate an optimization command corresponding to the potential problem based on the optimization suggestion;

[0169] The first optimization unit is configured to optimize the current configuration information of the cache server based on the optimization command to obtain an optimized cache server.

[0170] Each module in the cache server inspection device described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0171] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer-readable instructions are executed by the processor, a cache server inspection method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0172] In an embodiment of the present application, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the cache server inspection method described above are implemented.

[0173] In an embodiment of the application, a readable storage medium is provided, which stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the steps of the cache server inspection method described above are implemented.

[0174] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0175] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0176] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A cache server inspection method, characterized in that: The method comprises: Obtaining current and historical operating information of the cache server; Building an initial prompt word template based on the historical operation information; Adding the current running information to the initial prompt word template to construct a target prompt word template; Providing the target prompt word template to a preset large language model for health assessment processing to obtain a health assessment result; Generating an inspection result of the cache server based on the health assessment result; The step of constructing an initial prompt word template based on the historical operation information includes: Obtaining a preset initial weight list, wherein the initial weight list includes initial weight coefficients corresponding to the historical operation information; Calculating a first historical health status score of the cache server based on the historical operation information and the corresponding initial weight coefficient; Determining the first historical health status score and the corresponding calculation process as a first evaluation example; Based on the first evaluation example, constructing the initial prompt word template; The constructing of the initial prompt word template based on the first evaluation example includes: Obtaining a business scenario of the cache server, where the business scenario indicates the application type of the server and its key performance concerns; Adjusting the initial weight coefficient based on the business scenario to obtain a target weight list, wherein the target weight list includes target weight coefficients corresponding to the historical operation information; Calculating a second historical health status score of the cache server based on the historical operation information and the corresponding target weight coefficient; Determining the second historical health status score and the corresponding calculation process as a second evaluation example; Based on the first evaluation example and the second evaluation example, the initial prompt word template is constructed.

2. The cache server inspection method according to claim 1, wherein: Generating an inspection result of the cache server based on the health assessment result includes: Obtaining current configuration information of the cache server; The inspection result is generated based on the current configuration information and the health assessment result.

3. The cache server inspection method according to claim 2, wherein: The generating the inspection result based on the current configuration information and the health assessment result includes: Extracting key indicators from the current operation information; Determining an optimization analysis corresponding to the current configuration information based on the key indicators; Based on the current configuration information, the health assessment result, the key indicators, and the optimization analysis, an inspection report of the cache server is generated as the inspection result.

4. The cache server inspection method according to claim 3, wherein: The optimization analysis includes potential problems and optimization suggestions, and the method further includes: Based on the optimization suggestions, generating optimization commands corresponding to the potential problems; The current configuration information of the cache server is optimized based on the optimization command to obtain an optimized cache server.

5. A cache server inspection device, characterized in that: The device comprises: A first acquisition module is used to obtain the current operation information and historical operation information of the cache server; A first construction module is configured to construct an initial prompt word template based on the historical operation information; A first adding module is used to add the current operation information to the initial prompt word template to construct a target prompt word template; A first evaluation module is configured to provide the target prompt word template to a preset large language model for health evaluation processing to obtain a health evaluation result; A first generating module, configured to generate an inspection result of the cache server based on the health assessment result; The first building block includes: A first acquisition submodule is configured to acquire a preset initial weight list, wherein the initial weight list includes initial weight coefficients corresponding to the historical operation information; A first calculation submodule is configured to calculate a first historical health status score of the cache server based on the historical operation information and the corresponding initial weight coefficient; a first determining submodule, configured to determine the first historical health status score and the corresponding calculation process as a first evaluation example; A first construction submodule is configured to construct the initial prompt word template based on the first evaluation example; The first building block includes: A first acquiring unit is configured to acquire a business scenario of the cache server, where the business scenario indicates an application type of the server and its key performance concerns; A first adjustment unit is configured to adjust the initial weight coefficient based on the business scenario to obtain a target weight list, wherein the target weight list includes target weight coefficients corresponding to the historical operation information; A first calculation unit is configured to calculate a second historical health status score of the cache server based on the historical operation information and the corresponding target weight coefficient; a first determining unit, configured to determine the second historical health status score and the corresponding calculation process as a second evaluation example; The first constructing unit is configured to construct the initial prompt word template based on the first evaluation example and the second evaluation example.

6. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executed on the processor, wherein: When the processor executes the computer-readable instructions, the cache server inspection method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the cache server inspection method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Server health state diagnosis method based on GAT-LP algorithm

    CN120086105A

  • Health state assessment method, device and equipment of intelligent excitation system, readable storage medium and program product

    CN120217876A