Server failure query method and electronic device

By splitting the server's state machine into multiple input-type and one output-type state machine, and using a mapping module to achieve decoupling, the problems of resource waste and poor real-time performance are solved, and the efficiency and accuracy of server fault query are improved.

CN120950293BActive Publication Date: 2026-01-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511464602.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-01-27
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

Existing server fault query methods suffer from problems such as resource waste, difficulty in data collaboration, and poor real-time performance, especially the surge in memory usage and the complexity and latency of cross-module calculations caused by configuring output state machines independently for each module.

Method used

The traditional single state machine is split into multiple input state machines and one output state machine. Decoupling is achieved through a mapping module. The output of the input state machine is used as the input of the mapping module, and the data is mapped to the input of the output state machine through the mapping module, thereby realizing cross-module data collaboration and resource optimization.

Benefits of technology

It optimizes resource utilization, improves the real-time performance of cross-module computing and data collaboration efficiency, and reduces memory usage and computing latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120950293B_ABST
    Figure CN120950293B_ABST
Patent Text Reader

Abstract

The application discloses a server fault query method and electronic equipment, and relates to the technical field of data communication security, wherein input type state machines are respectively configured for multiple modules of a server, the outputs of the input type state machines of the multiple modules are used as the inputs of a mapping module, the output of the mapping module is used as the input of an output type state machine, when a fault query request is acquired, the input index data of a target input type state machine is acquired from the input type state machines of the multiple modules through the output type state machine and the mapping module, and the fault probability of the server is determined based on the first logic function of the target input type state machine, the preset mapping relationship of the mapping module and the second logic function of the output type state machine in sequence. The problems of resource waste, data cooperation difficulty and poor real-time performance are solved, the effect of data cooperation, optimized resources and improved cross-module calculation real-time performance is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data communication security technology, and in particular to a server fault query method and electronic device. Background Technology

[0002] In server command-line monitoring systems, output-type state machines are typically used for fault diagnosis of servers, such as storage servers, compute servers, network servers, and database servers. Specifically, an output-type state machine is configured for each module within the server. When each module's output-type state machine receives external change data, it executes the corresponding logic processing function to calculate the module's output data. This output data from different modules is then used to determine the server's failure probability.

[0003] However, configuring each module in the server with an independent output state machine can cause server memory usage to spike, leading to resource waste. Furthermore, manually establishing communication links for cross-module computations makes data collaboration difficult and results in poor real-time performance. Summary of the Invention

[0004] This application provides a server fault query method and electronic device to at least solve the problems of resource waste, data collaboration difficulties and poor real-time performance in related technologies.

[0005] This application provides a method for querying server faults, including:

[0006] In response to a fault query request, a target input state machine is obtained from the input state machines of multiple modules through an output state machine and a mapping module, and the input index data of the target input state machine is obtained. The multiple modules of the server are configured with input state machines, the outputs of the input state machines of the multiple modules are used as the inputs of the mapping module, and the outputs of the mapping module are used as the inputs of the output state machine.

[0007] If the input index data of the target input state machine changes, the output index data of the target input state machine is determined based on the currently acquired input index data and the first logic function of the target input state machine.

[0008] Based on the preset mapping relationship between the output index data of the target input state machine and the mapping module, the mapping index data corresponding to the output index data is determined.

[0009] The failure probability of the server is determined based on the mapping index data and the second logic function of the output state machine.

[0010] This application also provides a server fault query device, including:

[0011] The first acquisition module is used to respond to a fault query request by acquiring a target input state machine from the input state machines of multiple modules through an output state machine and a mapping module, and acquiring the input index data of the target input state machine. The multiple modules of the server are configured with input state machines, the outputs of the input state machines of the multiple modules are used as the inputs of the mapping module, and the outputs of the mapping module are used as the inputs of the output state machine.

[0012] The first determining module is used to determine the output index data of the target input state machine based on the currently acquired input index data and the first logic function of the target input state machine if the input index data of the target input state machine changes.

[0013] The second determining module is used to determine the mapping index data corresponding to the output index data based on the preset mapping relationship between the output index data of the target input state machine and the mapping module.

[0014] The third determining module is used to determine the failure probability of the server based on the mapping index data and the second logic function of the output state machine.

[0015] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described server fault query methods.

[0016] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described server fault query methods.

[0017] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described server fault query methods.

[0018] This application configures multiple modules of the server with input state machines. The outputs of these input state machines serve as the inputs to a mapping module, and the outputs of the mapping module serve as the inputs to an output state machine. Upon receiving a fault query request, the output state machine and the mapping module retrieve the input index data of the target input state machine from the input state machines of the multiple modules. If the input index data of the target input state machine changes, the output index data of the target input state machine is calculated based on the currently retrieved input index data and the first logic function of the target input state machine. Then, based on the preset mapping relationship between the output index data of the target input state machine and the mapping module, the corresponding mapped index data is determined. Finally, the server's fault probability is determined based on the mapped index data and the second logic function of the output state machine. Thus, the traditional single state machine is split into multiple input state machines and one output state machine. The mapping module achieves decoupling and cross-module data collaboration, optimizing resources and improving the real-time performance of cross-module computation. Attached Figure Description

[0019] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic diagram of the architecture of a storage server fault query system provided for related technologies;

[0021] Figure 2 This application provides an architectural diagram of a server fault query system.

[0022] Figure 3 A flowchart illustrating a server fault query method provided in this application is shown.

[0023] Figure 4 A flowchart of an input-type state machine is provided for the implementation of this application;

[0024] Figure 5 A logical diagram illustrating a server fault query method provided in this application is shown below;

[0025] Figure 6 A schematic diagram illustrating the mapping relationship of a mapping module provided for the implementation of this application is shown.

[0026] Figure 7 This application provides a schematic diagram of the structure of a server fault query device. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0028] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0029] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0030] For example, see storage servers. Figure 1 The diagram illustrates the architecture of a storage server fault query system provided by the related technologies. Modules A and B of the storage server are each configured with an output state machine. For the output state machine of module A, when a user initiates a fault query request via the command-line interface, the output state machine of module A determines whether the input data has changed. If not, it directly returns the cached fault probability to the user; if so, input parameter group A receives external changed data (e.g., disk read / write speed, processor load), and logic processing function A executes calculation logic on the external changed data transmitted by input parameter group A, outputting the fault probability. The output state machine of module B also queries the fault probability of the storage server based on the same logic, which will not be elaborated further here.

[0031] However, the above-mentioned server fault query method has the following drawbacks:

[0032] Disadvantage 1: Each module of the server needs to be deployed independently as an output state machine, causing the server's memory usage to skyrocket;

[0033] Disadvantage 2: If cross-module computing is to be achieved (for example, the disk cache hit rate depends on the data in memory), communication links need to be established manually, which increases system complexity and thus increases the difficulty of data collaboration.

[0034] Disadvantage 3: External changes to data in each module only trigger the logic processing function of that module, resulting in poor real-time performance during cross-module calculations and data delays as high as hundreds of milliseconds.

[0035] It is evident that existing server fault query methods are prone to resource waste, difficulties in data collaboration, and poor real-time performance, and therefore need improvement.

[0036] For a better understanding of the server fault query method provided in this embodiment, please refer to... Figure 2 The diagram shown illustrates the architecture of the server fault query system provided in this embodiment. Modules A and B of the server are each configured with their corresponding input state machines. All modules of the server correspond to a mapping module, and all modules of the server correspond to an output state machine. That is, the output of the input state machine of each module is used as the input of the mapping module, and the output of the mapping module is used as the input of the output state machine.

[0037] Specifically, for the input state machine of module A, when a user initiates a fault query request via the command-line interface, the input state machine of module A determines whether the input data has changed. If not, it directly returns the cached fault probability to the user. If it has changed, input parameter group A receives the external changed data, and logic processing function A performs calculation logic on the external changed data transmitted by input parameter group A to obtain the output indicator data of the target input state machine (e.g., cache hit rate score). Then, the mapping module maps the output indicator data of the target input state machine through the routing engine to obtain mapped indicator data (e.g., global cache hit rate score), which serves as the input of the output state machine. Finally, the output state machine obtains the mapped indicator data through the input parameter group and calculates the fault probability using the fault probability calculation function. The output state machine of module B also queries the server's fault probability based on the above logic, which will not be elaborated further here.

[0038] Thus, a single state machine is split into multiple input state machines and one output state machine, and decoupling is achieved through a mapping module.

[0039] The embodiments of this application provide a server fault query method. The method is described in detail below in conjunction with the execution flow of the server fault query method (the technical terms involved must be explained).

[0040] Figure 3 This application provides a flowchart illustrating a server fault query method, which specifically includes the following: Figure 3 The following steps are shown:

[0041] S310. In response to the fault query request, the target input state machine is obtained from the input state machines of multiple modules through the output state machine and the mapping module, and the input index data of the target input state machine is obtained.

[0042] The server is configured with multiple modules, each with an input state machine. The outputs of the input state machines of these modules serve as the inputs of the mapping module, and the outputs of the mapping module serve as the inputs of the output state machines.

[0043] The input-type state machine can respond to external changes in data in real time and trigger logic processing functions to perform calculations. For details, see [link to documentation]. Figure 4 The flowchart of the input-type state machine shown shows that the input parameter group obtains external change data, triggers the logic processing function to perform calculations, and then obtains the updated output group.

[0044] The output-type state machine employs a lazy calculation mechanism, triggering the logic processing function to perform calculations only when a query request or external data change is detected.

[0045] The mapping module is used to map the output of the input state machine of each module to global index data, which can then be used as the input of the output state machine; or, the mapping module is used to map the input index parameters of the input state machine of one module to the output of the input state machine of another module.

[0046] Optionally, the aforementioned servers include, but are not limited to, storage servers, computing servers, network servers, database servers, etc.

[0047] In some embodiments, the specific implementation method of S110 includes, but is not limited to, the following method: based on the fault query request, detect whether there is a change in the input of the output state machine; if there is a change, detect whether there is a change in the input of the mapping module; if there is a change, obtain the state machine with the changed input from the input state machines of multiple modules as the target input state machine, and obtain the input index data of the target input state machine.

[0048] Understandably, because the output-type state machine uses a lazy computation mechanism, the logic processing function is only triggered to perform calculations when a query request or external data change is detected. For details, see [link to documentation]. Figure 5The diagram shown illustrates the logic of the server fault query method provided in this embodiment. When a user inputs a fault query request, the output state machine responds to the request and checks whether the input has changed. If a change exists, the mapping module is triggered, and the mapping module continues to check whether the input has changed. If a change still exists, the input state machines of multiple modules are triggered, and the input state machines of multiple modules continue to check whether the input has changed. Finally, the state machine with the changed input among the input state machines of multiple modules is selected as the target input state machine, and the input index data of the target input state machine is obtained.

[0049] In this way, by using the fault query request as the trigger condition, the system sequentially queries whether there have been changes in the inputs of the output state machine, the inputs of the mapping module, and the input modules of the input state machine, thus ensuring the orderliness of the logic.

[0050] S320. If the input index data of the target input state machine changes, the output index data of the target input state machine is determined based on the currently acquired input index data and the first logic function of the target input state machine.

[0051] In some embodiments, the server is a storage server, the target input state machine is a memory monitoring state machine, and the currently acquired input metric data includes the currently acquired memory usage rate, the currently acquired cache hit count, and the currently acquired dirty page ratio; then the specific implementation method of S320 includes, but is not limited to, the following methods:

[0052] When the change between the currently acquired memory usage rate and the previously acquired memory usage rate exceeds a first preset threshold, the current cache hit count, total number of requests, current dirty page ratio, and preset weight of the current dirty page ratio are processed based on the first logic function of the target input state machine to obtain the output index data of the target input state machine.

[0053] The first preset threshold is the trigger condition for calculating the first logic function of the target input state machine. Optionally, the first preset threshold can be set based on experience, including but not limited to values ​​such as 5%.

[0054] Specifically, the first ratio is obtained by dividing the current number of cache hits by the total number of requests; the first ratio is multiplied by 100 to obtain the first product; the current dirty page ratio and its corresponding preset weight are multiplied to obtain the second product; the first product and the second product are subtracted to obtain the cache efficiency score, and the cache efficiency score is used as the output indicator data of the target input state machine. Optionally, the cache efficiency score can be any value between 0 and 100.

[0055] Optionally, the memory monitoring state machine generates a cache efficiency score every second. Specifically, when there are currently obtained memory usage, currently obtained cache hit count, and currently obtained dirty page ratio, and when the change in the currently obtained memory usage compared to the previously obtained memory usage is greater than a first preset threshold, the cache efficiency score is determined using the above method; when there are no currently obtained memory usage, currently obtained cache hit count, and currently obtained dirty page ratio, and / or when the change in the currently obtained memory usage compared to the previously obtained memory usage is less than or equal to the first preset threshold, the cache efficiency score can be directly obtained from the cache.

[0056] Optionally, the cache management mechanism in this embodiment pre-configures a cache validity period, for example, a cache validity period of 200ms, after which the data is marked as expired.

[0057] See also Figure 5 The target input state machine starts the first logic function to calculate the currently acquired input index data, and then updates the output index and transmits it to the mapping module.

[0058] In this way, when the target input state machine is a memory monitoring state machine, the cache hit rate score is calculated based on the currently acquired cache hit count, total number of requests, currently acquired dirty page ratio, and the preset weight of the currently acquired dirty page ratio. This score is used as the output indicator data of the target input state machine. This method adopts an event-driven model, and the calculation is triggered immediately by input changes, which reduces the response time of memory monitoring.

[0059] In some embodiments, the server is a storage server, the target input state machine is a disk monitoring state machine, and the currently acquired input indicator data includes the currently acquired reallocated sector count, the currently acquired seek error rate, and the currently acquired temperature threshold. The specific implementation method of S320 includes, but is not limited to, the following method: based on the first logic function of the target input state machine, the currently acquired reallocated sector count, the currently acquired seek error rate, and the currently acquired temperature threshold are weighted and calculated to obtain the output indicator data of the target input state machine.

[0060] Specifically, the currently acquired redistributed sector count is multiplied by the corresponding weight to obtain the first product; the currently acquired seek error rate is multiplied by the corresponding weight to obtain the second product; the currently acquired temperature threshold is multiplied by the corresponding weight to obtain the third product; the first product, the second product, and the third product are added together to obtain the disk health score, and the disk health score is used as the output index data of the target input state machine.

[0061] Optionally, the above weights can be set based on experience. For example, the weight corresponding to the reallocated sector count is set to 0.4, the weight corresponding to the currently acquired seek error rate is set to 0.4, and the weight corresponding to the currently acquired temperature threshold is set to 0.3.

[0062] Optionally, the disk health score can be any score between 0 and 10, with 10 being healthy. Furthermore, any change in any of the three input metrics mentioned above can trigger the calculation of the disk health score.

[0063] Optionally, the memory monitoring state machine generates a cache efficiency score every second.

[0064] In this way, when the target input state machine is the disk monitoring state machine, the disk health is calculated based on the currently acquired reallocation sector count, the currently acquired seek error rate, the currently acquired temperature threshold and their corresponding weights, and used as the output index data of the target input state machine. This method adopts an event-driven model, and the calculation is triggered immediately by input changes, which reduces the response time of disk monitoring.

[0065] In this way, the memory monitoring state machine and the disk monitoring state machine can run independently without data coupling, and disk counting errors will not pollute the memory channel.

[0066] S330. Based on the preset mapping relationship between the output index data of the target input state machine and the mapping module, determine the mapping index data corresponding to the output index data.

[0067] The preset mapping relationships corresponding to the mapping module include: the mapping relationship between the output index parameters of the input state machines of multiple modules and the global index data input to the output state machine, and the mapping relationship between the input index parameters of the input state machine of one module and the output of the input state machine of another module.

[0068] For ease of understanding, see Figure 6 The diagram illustrates the mapping relationship of the mapping module. The input parameter set of the mapping module consists of the output metric data of the input state machine. Examples of the output metric data of the input state machine include cache efficiency score, disk health, and dirty page ratio. After mapping the output metric data of the input state machine based on the mapping relationship, the output parameter set of the mapping module is obtained. Examples of the output parameter set of the mapping module include global cache efficiency score, global disk health, and write pressure metric.

[0069] When configuring the preset mapping relationship corresponding to the mapping module, you can first configure the following input / output groups: 1. Create a memory output group named MemoryOutputGroup and bind the output parameters of the memory state machine; 2. Create a disk output group named DiskOutputGroup and bind the output parameters of the disk state machine; 3. Create a global input group named GlobalInputGroup as the input container for the output state machine. Next, dynamic mapping rules are established, including: 1. Memory-to-global mapping: Source: MemoryOutputGroup.CacheHitRate → Target: globalInputGroup.MemCacheScore, Condition: Synchronize when the cache hit rate score changes by >2%; 2. Disk-to-global mapping: Source: DiskOutputGroup.HealthIndex → ​​Target: GlobalInputGroup.DiskHealthScore, Condition: Synchronize when the disk health score changes by >0.5 points; 3. Cross-dependency mapping: Source: MemoryOutputGroup.DirtyPageRatio → Target: GlobalInputGroup.DiskWritePressure, Explanation: Convert the dirty page ratio of the memory monitoring state machine into the write pressure index of the disk monitoring state machine.

[0070] See also Figure 5 The mapping module maps the output index data of the target input state machine to an index based on a preset mapping relationship, and updates the mapped index data to the output state machine.

[0071] Therefore, when the output index data of the target input state machine is obtained, the preset mapping relationship corresponding to the mapping module is used to map the output index data of the target input state machine to obtain the mapped index data corresponding to the output index data.

[0072] In this way, automatic data routing across modules is achieved through the mapping module.

[0073] In some embodiments, when there are many modules on the server, two or more mapping modules can be configured. Specifically, the output of the input state machine of some modules is used as the input of one mapping module, the output of the input state machine of the remaining modules is used as the input of another module, and then the outputs of all mapping modules are used as the input of one output state machine.

[0074] In this way, when there are many modules on the server, the pressure on a single mapping module can be reduced by expanding the number of mapping modules. At the same time, a mapping mechanism is also used to achieve automatic data routing across modules.

[0075] In some embodiments, when a new module is added to the server, after configuring the input state machine for the new module, it is also necessary to configure the corresponding mapping relationship for the module. Therefore, the method further includes: when the input state machine of the new module is obtained, configuring the mapping relationship between the output of the input state machine and the input of the output state machine of the new module.

[0076] In this way, for newly added modules on the server, the mapping rules can be modified at runtime (such as temporarily adding temperature weights). Only the corresponding mapping rules need to be configured, eliminating the need for manual data pipeline development and modifying the core logic. This improves scalability and reduces configuration time.

[0077] S340. Determine the server's failure probability based on the mapping index data and the second logic function of the output state machine.

[0078] In some embodiments, the server is a storage server, and the mapping index data includes disk health, cache efficiency score, and write pressure; then the specific implementation method of S340 includes, but is not limited to, the following method: when the disk health is less than or equal to a preset health threshold, based on the second logic function of the output state machine, the disk health, the first weight corresponding to the disk health, the cache efficiency score, the second weight corresponding to the cache efficiency score, the write pressure, and the third weight corresponding to the write pressure are processed to obtain the server failure probability.

[0079] Specifically, calculate the first difference between the total disk health value and the disk health status, and calculate the second difference between the total cache efficiency score and the cache efficiency rating; multiply the first difference by the first weight to obtain the first product, multiply the second difference by the second weight and divide by a preset value to obtain the second ratio; multiply the write pressure by the third weight to obtain the second product; add the first product, the second ratio and the second product together to obtain the server failure probability.

[0080] The preset health threshold can be a trigger condition for calculation by the second logic function of the output state machine. Optionally, the preset health threshold can be set based on experience, including but not limited to values ​​such as 8.

[0081] Optionally, disk health is denoted as DiskHealthScore, cache efficiency score is denoted as MemCacheScore, and write pressure is denoted as DiskWritePressure.

[0082] Optionally, the first, second, and third weights can be set based on experience. For example, the first weight can be set to 0.6, the second weight to 0.3, and the third weight to 0.1.

[0083] Optionally, the total disk health score, total cache efficiency score, and preset values ​​can be set based on experience. For example, the total disk health score is 10, the total cache efficiency score is 100, and the preset value is 10.

[0084] It should be noted that, because the output state machine uses a lazy calculation mechanism, when any of the above mapping index data changes, it is not calculated immediately, but only when the user queries.

[0085] Optionally, the aforementioned preset health threshold can be changed according to actual circumstances.

[0086] See also Figure 5 After the output-type state machine starts the second logic function to calculate the mapped index data, it updates the fault probability and feeds it back to the user. If the input of the input-type state machine has not changed, the fault probability is retrieved from the cache.

[0087] In this way, when a user queries a fault, if the indicator mapping data changes and the disk health is less than or equal to a preset health threshold, the second logic function of the output state machine is triggered to perform calculations, ignoring invalid calculations when the health index is large. Furthermore, the aforementioned preset health threshold can be changed according to the actual situation to achieve the use of change filters to trigger routing based on data change thresholds, block non-critical changes according to policies, and minimize invalid calculations.

[0088] In some embodiments, appropriate weights can be assigned to the different mapping metric data based on the server's operating time period. The method further includes: obtaining the server's operating time; if the operating time is within a working time period, a first weight is determined to be 70%, and the sum of the second and third weights is 30%; if the operating time is within a backup time period, a second weight is determined to be 60%, and the sum of the first and third weights is 40%.

[0089] For example, during working hours (08:00-18:00), the first weight corresponding to disk health is increased to 70%, and the sum of the second and third weights is 30%; during backup hours (22:00-02:00), the second weight corresponding to cache efficiency score is increased to 60%, and the sum of the first and third weights is 40%.

[0090] This implements an adaptive filtering mechanism that introduces a weight allocator, dynamically adjusting weights based on time, i.e., adjusting routing priorities, thus better reflecting actual operating conditions.

[0091] In some embodiments, the weights corresponding to the mapping index data can be dynamically adjusted based on the failure probability. The method further includes: if the failure probability is greater than a first preset risk probability, then the first weight is set to 80%, and the sum of the second and third weights is 20%.

[0092] The first preset risk probability can optimize the triggering conditions of the weights. Optionally, the first preset risk probability can be set based on experience, including but not limited to values ​​such as 40%.

[0093] In this way, a real-time feedback optimization mechanism can be adopted to dynamically adjust the weight of the mapping indicator data, ensuring that the fault prediction process adapts to different load scenarios.

[0094] In some embodiments, the monitoring frequency of the disk can be dynamically adjusted based on the failure probability. In this case, where the server is a storage server, the method further includes: if the failure probability is obtained three times consecutively greater than a second preset risk probability, then the monitoring frequency of the disks in the multiple modules is adjusted from a first monitoring frequency to a second monitoring frequency, wherein the second monitoring frequency is greater than the first monitoring frequency.

[0095] The second preset risk probability can optimize the triggering conditions of the weights. Optionally, the second preset risk probability can be set based on experience, including but not limited to values ​​such as 30%.

[0096] Optionally, the first and second monitoring frequencies can be set based on experience. For example, the first monitoring frequency is once every 200ms, and the second monitoring frequency is once every 50ms.

[0097] In this way, a real-time feedback optimization mechanism can be adopted to dynamically adjust the disk monitoring frequency, ensuring that the fault prediction process adapts to different load scenarios.

[0098] In some embodiments, a fault prediction linkage mechanism is also provided.

[0099] In one scenario, where the server is a storage server, the method further includes: if the failure probability is greater than a first preset risk probability, obtaining risky disks with disk health levels less than a preset health threshold from multiple modules; initiating a disk association reconstruction task to perform reconstruction operations on the risky disks.

[0100] The first preset risk probability refers to the critical condition for determining whether there is a high risk of failure.

[0101] In this way, by adopting a fault prediction and linkage mechanism, high-risk disks are automatically associated with reconstruction tasks to perform reconstruction operations on the risky disks and avoid the risk from occurring.

[0102] In another scenario, where the server is a storage server, the method further includes: if the failure probability is greater than a first preset risk probability, obtaining abnormal memory with a cache efficiency score less than a preset efficiency threshold from multiple modules; and running a memory copy task to migrate the data in the abnormal memory to backup memory.

[0103] In this way, by adopting a fault prediction and linkage mechanism and a triggered disk pre-copy mechanism, data with high fault risk is migrated to backup memory in advance to avoid the occurrence of risks.

[0104] Through the above methods, we can achieve a three-in-one capability of accurate prediction of server health management, efficient utilization of resources, and automated operation and maintenance, providing core protection for large-scale storage clusters.

[0105] The server fault query method provided in this application configures multiple modules of the server with input state machines. The outputs of the input state machines of these modules serve as the inputs of a mapping module, and the outputs of the mapping module serve as the inputs of an output state machine. When a fault query request is received, the input index data of the target input state machine is obtained from the input state machines of the multiple modules through the output state machine and the mapping module. If it is determined that the input index data of the target input state machine has changed, the output index data of the target input state machine is first calculated based on the currently obtained input index data and the first logic function of the target input state machine. Then, based on the preset mapping relationship of the output index data of the target input state machine in the mapping module, the corresponding mapping index data is determined. Finally, the server fault probability is determined based on the mapping index data and the second logic function of the output state machine. Thus, the traditional single state machine is split into multiple input state machines and one output state machine. The mapping module achieves decoupling and cross-module data collaboration, optimizing resources and improving the real-time performance of cross-module computation.

[0106] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0107] The embodiments of this application also provide a server fault query device, wherein the number of simple virtual device claims shall not exceed one (except in special cases). For the omitted virtual device claims, the description shall be expanded and correspond one-to-one with the method claims.

[0108] Based on the above embodiments, Figure 7This is a schematic diagram of a server fault query device provided in an embodiment of this application. The server fault query device 700 includes a first acquisition module 701, a first determination module 702, a second determination module 703, and a third determination module 704, wherein:

[0109] The first acquisition module 701 is used to respond to a fault query request by acquiring a target input state machine from the input state machines of multiple modules through an output state machine and a mapping module, and acquiring the input index data of the target input state machine. The multiple modules of the server are configured with input state machines, the outputs of the input state machines of the multiple modules are used as the inputs of the mapping module, and the outputs of the mapping module are used as the inputs of the output state machine.

[0110] The first determining module 702 is used to determine the output index data of the target input state machine based on the currently acquired input index data and the first logic function of the target input state machine if the input index data of the target input state machine changes.

[0111] The second determining module 703 is used to determine the mapping index data corresponding to the output index data based on the preset mapping relationship between the output index data of the target input state machine and the mapping module.

[0112] The third determining module 704 is used to determine the failure probability of the server based on the mapping index data and the second logic function of the output state machine.

[0113] In some embodiments of this disclosure, the target input state machine is a memory monitoring state machine, and the currently acquired input indicator data includes the currently acquired memory usage rate, the currently acquired cache hit count, and the currently acquired dirty page ratio.

[0114] The first determining module 702 includes:

[0115] The first determining unit is configured to, when the change between the currently acquired memory usage rate and the previously acquired memory usage rate is greater than a first preset threshold, process the currently acquired cache hit count, total number of requests, currently acquired dirty page ratio, and preset weights of the currently acquired dirty page ratio based on the first logic function of the target input state machine to obtain the output index data of the target input state machine.

[0116] In some embodiments of this disclosure, the target input state machine is a disk monitoring state machine, and the currently acquired input indicator data includes the currently acquired reallocation sector count, the currently acquired seek error rate, and the currently acquired temperature threshold.

[0117] The first determining module 702 includes:

[0118] The second determining unit performs a weighted calculation on the currently acquired redistribution sector count, the currently acquired seek error rate, and the currently acquired temperature threshold based on the first logic function of the target input state machine to obtain the output index data of the target input state machine.

[0119] In some embodiments of this disclosure, the preset mapping relationship corresponding to the mapping module includes:

[0120] The mapping relationship between the output index parameters of the input state machines of multiple modules and the global index data input to the output state machine, and the mapping relationship between the input index parameters of the input state machine of one module and the output of the input state machine of another module.

[0121] In some embodiments of this disclosure, the mapping metric data includes disk health, cache efficiency score, and write pressure;

[0122] The third determining module 704 includes:

[0123] The third determining unit is used to process the disk health, the first weight corresponding to the disk health, the cache efficiency score, the second weight corresponding to the cache efficiency score, the write pressure, and the third weight corresponding to the write pressure based on the second logic function of the output state machine when the disk health is less than or equal to a preset health threshold, so as to obtain the failure probability of the server.

[0124] In some embodiments of this disclosure, the device further includes:

[0125] The second acquisition module is used to acquire the server's runtime.

[0126] The fourth determining module is configured to, if the running time falls within a working time period, determine the first weight as 70%, and the sum of the second weight and the third weight as 30%;

[0127] The fifth determining module is used to determine the second weight as 60% if the running time is within the backup time period, and the sum of the first weight and the third weight is 40%.

[0128] In some embodiments of this disclosure, the device further includes:

[0129] The configuration module is used to configure the mapping relationship between the output of the input state machine of the newly added module and the input of the output state machine when the input state machine of the newly added module is obtained.

[0130] In some embodiments of this disclosure, the server is a storage server, and the apparatus further includes:

[0131] The third acquisition module is used to acquire, from the plurality of modules, a risk disk whose disk health is less than a preset health threshold if the failure probability is greater than the first preset risk probability.

[0132] The startup module is used to initiate the disk association reconstruction task and perform the reconstruction operation on the risky disk.

[0133] In some embodiments of this disclosure, the server is a storage server, and the apparatus further includes:

[0134] An adjustment module is used to adjust the monitoring frequency of the disk in the plurality of modules from a first monitoring frequency to a second monitoring frequency if the probability of failure is obtained three times in a row is greater than a second preset risk probability, wherein the second monitoring frequency is greater than the first monitoring frequency.

[0135] For a description of the features in the embodiment of the server fault query device, please refer to the relevant description of the embodiment of the server fault query method, which will not be repeated here.

[0136] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described server fault query method embodiments.

[0137] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described server fault query method embodiments when running.

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

[0139] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described server fault query method embodiments.

[0140] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described server fault query method embodiments.

[0141] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0142] The above provides a detailed description of a server fault query method and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for querying server faults, characterized in that, include: In response to a fault query request, a target input state machine is obtained from the input state machines of multiple modules through an output state machine and a mapping module, and the input index data of the target input state machine is obtained. The multiple modules of the server are configured with input state machines, the outputs of the input state machines of the multiple modules are used as the inputs of the mapping module, and the outputs of the mapping module are used as the inputs of the output state machine. If the input index data of the target input state machine changes, the output index data of the target input state machine is determined based on the currently acquired input index data and the first logic function of the target input state machine. Based on the preset mapping relationship between the output index data of the target input state machine and the mapping module, the mapping index data corresponding to the output index data is determined. The failure probability of the server is determined based on the mapping index data and the second logic function of the output state machine. The server is a storage server, the target input state machine is a memory monitoring state machine, and the currently acquired input indicator data includes the currently acquired memory utilization rate, the currently acquired cache hit count, and the currently acquired dirty page ratio. The step of determining the output index data of the target input state machine based on the currently acquired input index data and the first logic function of the target input state machine includes: When the change between the currently acquired memory usage rate and the previously acquired memory usage rate exceeds a first preset threshold, based on the first logic function of the target input state machine, the currently acquired cache hit count, total number of requests, currently acquired dirty page ratio, and a preset weight of the currently acquired dirty page ratio are processed to obtain the output index data of the target input state machine; or, The server is a storage server, the target input state machine is a disk monitoring state machine, and the currently acquired input indicator data includes the currently acquired reallocated sector count, the currently acquired seek error rate, and the currently acquired temperature threshold. The step of determining the output index data of the target input state machine based on the currently acquired input index data and the first logic function of the target input state machine includes: Based on the first logic function of the target input state machine, the currently acquired redistribution sector count, the currently acquired seek error rate, and the currently acquired temperature threshold are weighted and calculated to obtain the output index data of the target input state machine.

2. The server fault query method according to claim 1, characterized in that, The preset mapping relationship corresponding to the mapping module includes: The mapping relationship between the output index parameters of the input state machines of multiple modules and the global index data input to the output state machine, and the mapping relationship between the input index parameters of the input state machine of one module and the output of the input state machine of another module.

3. The server fault query method according to claim 1, characterized in that, The server is a storage server, and the mapping metric data includes disk health, cache efficiency score, and write pressure. The step of determining the failure probability of the server based on the mapping index data and the second logic function of the output state machine includes: When the disk health is less than or equal to a preset health threshold, the disk health, the first weight corresponding to the disk health, the cache efficiency score, the second weight corresponding to the cache efficiency score, the write pressure, and the third weight corresponding to the write pressure are processed based on the second logic function of the output state machine to obtain the failure probability of the server.

4. The server fault query method according to claim 3, characterized in that, Also includes: Obtain the server's runtime; If the running time falls within a working period, the first weight is determined to be 70%, and the sum of the second weight and the third weight is 30%. If the running time is within the backup time period, the second weight is determined to be 60%, and the sum of the first weight and the third weight is 40%.

5. The server fault query method according to claim 1, characterized in that, Also includes: When the input state machine of a newly added module is obtained, the mapping relationship between the output of the input state machine of the newly added module and the input of the output state machine is configured.

6. The server fault query method according to claim 1, characterized in that, The server is a storage server, and the method further includes: If the failure probability is greater than the first preset risk probability, a risk disk with a disk health value less than a preset health threshold is obtained from the plurality of modules; Initiate a disk association rebuild task to perform a rebuild operation on the risky disk.

7. The server fault query method according to claim 1, characterized in that, The server is a storage server, and the method further includes: If the probability of failure is greater than the second preset risk probability three times in a row, the monitoring frequency of the disks in the plurality of modules will be adjusted from the first monitoring frequency to the second monitoring frequency, wherein the second monitoring frequency is greater than the first monitoring frequency.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the server fault query method as described in any one of claims 1 to 7 when executing the computer program.

Citation Information

Patent Citations

  • Charging pile running state determining method and device

    CN109738720A

  • Order state transfer method and device, electronic equipment and storage medium

    CN111144982A