Method, apparatus, device and medium for determining verification frequency based on device score

By determining the verification frequency based on device type score and performance level in the Ceph cluster, the problem of inconsistent verification frequency requirements of different storage devices is solved, and the verification frequency and equipment operation status is matched, meeting the verification requirements of the Ceph cluster.

CN119537120BActive Publication Date: 2025-07-25RD DATA TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510092724.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-07-25
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

In the prior art, Ceph cluster adopts a global verification method for different storage devices connected to, resulting in different verification frequency requirements of different storage devices, which cannot meet the needs of each device type.

Method used

The security score is determined based on the type of storage device in the Ceph cluster, the device performance level is determined through the security score, and the corresponding verification frequency is obtained, and the verification frequency is adjusted to match the operation of the equipment.

Benefits of technology

The verification frequency matches the operation of the storage device, meets the verification needs of each storage device in the Ceph cluster, and improves the pertinence and efficiency of the verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537120B_ABST
    Figure CN119537120B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for determining a verification frequency based on device scoring. The method includes determining a security score of a storage device based on the device type of the storage device in a Ceph cluster; determining a device performance level of the storage device based on the security score; obtaining a verification frequency corresponding to the device performance level, and using the obtained verification frequency as the verification frequency of the storage device. The present application determines the device score of the storage device based on the device type, determines the device performance level based on the device score, and finally determines the verification frequency of each storage device based on the device performance level, so that the verification frequency matches the operating conditions of the storage device, thereby meeting the verification requirements of each storage device in the Ceph cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Ceph clusters, and particularly relates to a method, device, equipment and medium for determining the verification frequency based on device scoring. Background Art

[0002] Ceph is a distributed storage system, which has characteristics such as reliability, intelligence, and distribution, realizes functions such as high reliability, high scalability, high performance, and high automation, and finally stores user data. A variety of storage devices will be connected to the Ceph cluster, for example, mechanical hard disks, NAND flash memories, etc. However, the stabilities and reliabilities of the storage devices connected to the Ceph cluster are different, so it is necessary to verify the data integrity of the storage devices connected to the Ceph cluster. Currently, the global verification method is generally used to verify the data integrity of the storage devices. However, the existing methods treat all the connected storage devices equally, so that the verification frequencies of all storage devices are the same. However, the device performances presented by different storage devices during use will be different, which will result in different verification frequency requirements for different storage devices. Furthermore, the existing methods cannot meet the requirements of the Ceph cluster with storage devices of different device types connected.

[0003] Therefore, the existing technology still needs to be improved. Summary of the Invention

[0004] The technical problem to be solved by the present application is to provide a method, device, equipment and medium for determining the verification frequency based on device scoring in view of the deficiencies of the existing technology.

[0005] To solve the above technical problem, a first aspect of the present application provides a method for determining the verification frequency based on device scoring, which is applied to a Ceph cluster. The method for determining the verification frequency based on device scoring specifically includes:

[0006] Determine the security score of the storage device based on the device type of the storage device in the Ceph cluster;

[0007] Determine the device performance level of the storage device based on the security score;

[0008] Obtain the verification frequency corresponding to the device performance level, and use the obtained verification frequency as the verification frequency of the storage device.

[0009] In the method for determining the verification frequency based on device scoring, after using the obtained verification frequency as the verification frequency of the storage device, the method further includes:

[0010] When monitoring the write operation of the storage device, perform a verification operation on the storage device;

[0011] Starting from the verification operation, with the write operation as the trigger condition, perform the verification operation on the storage device according to the verification frequency.

[0012] The method for determining the verification frequency based on device scoring, wherein determining the device performance level of the storage device based on the security score specifically includes:

[0013] Detect whether the security score meets the preset requirements;

[0014] When the security score meets the preset requirements, determine the device performance level of the storage device according to the corresponding relationship between the security score and the device performance level;

[0015] When the security score does not meet the preset requirements, perform a verification operation on the storage device;

[0016] If the verification operation passes, set the device performance level of the storage device to the lowest device performance level;

[0017] If the verification fails, prompt that the storage device is abnormal.

[0018] The method for determining the verification frequency based on device scoring, wherein determining the security score of the storage device based on the device type of the storage device in the Ceph cluster specifically includes:

[0019] Determine the initial security score of the storage device based on the device type of the storage device in the Ceph cluster;

[0020] Obtain the IO response time of the storage device, and determine the running score of the storage device based on the IO response time;

[0021] Determine the security score of the storage device based on the initial security score and the running score.

[0022] The method for determining the verification frequency based on device scoring, wherein obtaining the IO response time of the storage device specifically includes:

[0023] Record the IO response time of the storage device within a preset duration;

[0024] Calculate the mean value of all recorded IO response times to obtain the IO response mean value, and use the IO response mean value as the IO response time of the storage device.

[0025] The method for determining the verification frequency based on device scoring, wherein before determining the security score of the storage device based on the device type of the storage device in the Ceph cluster, the method further includes:

[0026] Periodically monitor the cluster load of the Ceph cluster;

[0027] If the monitored cluster load is greater than the prior cluster load, perform an operation to determine the security score of the storage device based on the device type of the storage device in the Ceph cluster.

[0028] The method for determining the verification frequency based on the device score, wherein the obtaining the verification frequency corresponding to the device performance level specifically includes:

[0029] Compare the device performance level with the device performance level threshold;

[0030] If the device performance level is higher than the device performance level threshold, use the default verification frequency as the verification frequency of the storage device, where the default verification frequency is the interval time between two verification operations.

[0031] If the device performance level is lower than or equal to the device performance level threshold, determine the verification frequency of the storage device based on a preset relationship table, where the verification frequency in the preset relationship table is the number of write operations between two verification operations.

[0032] The second aspect of the present application provides a device for determining the verification frequency based on the device score, wherein the device for determining the verification frequency based on the device score specifically includes:

[0033] The first determination module is used to determine the security score of the storage device based on the device type of the storage device in the Ceph cluster;

[0034] The second determination module is used to determine the device performance level of the storage device based on the security score;

[0035] The obtaining module is used to obtain the verification frequency corresponding to the device performance level and use the obtained verification frequency as the verification frequency of the storage device.

[0036] The third aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in any one of the above-mentioned methods for determining the verification frequency based on the device score.

[0037] The fourth aspect of the present application provides a terminal device, which includes: a processor and a memory;

[0038] The memory stores a computer-readable program executable by the processor;

[0039] When the processor executes the computer-readable program, it implements the steps in any one of the above-mentioned methods for determining the verification frequency based on the device score.

[0040] Beneficial effects: Compared with the prior art, the present application provides a method, apparatus, device and medium for determining a verification frequency based on device scoring. The method includes determining a security score of a storage device based on the device type of the storage device in a Ceph cluster; determining a device performance level of the storage device based on the security score; obtaining a verification frequency corresponding to the device performance level, and using the obtained verification frequency as the verification frequency of the storage device. The present application determines the device score of the storage device based on the device type, determines the device performance level based on the device score, and finally determines the verification frequency of each storage device based on the device performance level, so that the verification frequency matches the operating conditions of the storage device, thereby meeting the verification requirements of each storage device in the Ceph cluster. Description of the Drawings

[0041] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0042] Figure 1 It is a flowchart of the method for determining the verification frequency based on device scoring provided by the embodiment of the present application.

[0043] Figure 2 It is a specific process schematic diagram of step S30.

[0044] Figure 3 It is a principle block diagram of the device for determining the verification frequency based on device scoring provided by the embodiment of the present application.

[0045] Figure 4 It is a principle block diagram of the terminal device provided by the embodiment of the present application. Detailed Embodiments

[0046] The embodiments of the present application provide a method, apparatus, device and medium for determining a verification frequency based on device scoring. To make the purpose, technical solutions and effects of the present application clearer and more definite, the following further details the present application with reference to the drawings and by way of examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of this application means the presence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0048] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which this application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.

[0049] It should be understood that the sequence numbers and magnitudes of the steps in this embodiment do not mean the order of execution. The order of execution of each process is determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.

[0050] Through research, it is found that Ceph is a distributed storage system, which has characteristics such as reliability, intelligence, and distribution, realizes functions such as high reliability, high scalability, high performance, and high automation, and finally stores user data. A variety of storage devices will be connected to the Ceph cluster. For example, mechanical hard disks, NAND flash memories, etc. However, the stability and reliability of the storage devices connected to the Ceph cluster are different, so it is necessary to verify the data integrity of the storage devices connected to the Ceph cluster. Currently, the global verification method is generally used to verify the data integrity of the storage devices. However, the existing method treats all connected storage devices equally, so that the verification frequency of all storage devices is the same. However, the device performance presented by different storage devices during use will be different, which will result in different verification frequency requirements for different storage devices. Therefore, the existing method cannot meet the requirements of the Ceph cluster for storage devices of different device types.

[0051] To solve the above problems, in the embodiments of the present application, the security score of a storage device is determined based on the device type of the storage device in the Ceph cluster; the device performance level of the storage device is determined based on the security score; the verification frequency corresponding to the device performance level is obtained, and the obtained verification frequency is used as the verification frequency of the storage device. The present application determines the device score of the storage device based on the device type, determines the device performance level based on the device score, and finally determines the verification frequency of each storage device based on the device performance level, so that the verification frequency matches the operating conditions of the storage device, thereby meeting the verification requirements of each storage device in the Ceph cluster.

[0052] The following further describes the application content by describing the embodiments in conjunction with the accompanying drawings.

[0053] This embodiment provides a method for determining the verification frequency based on device scoring, as Figure 1 shown, the method includes:

[0054] S10. Determine the security score of the storage device based on the device type of the storage device in the Ceph cluster.

[0055] Specifically, Ceph is a distributed storage system that can provide capacity expansion without affecting services and has high IO performance when supporting multiple workloads. There are several storage devices connected to the Ceph cluster, such as flash memory and high-speed hard disks. When determining the security score of the storage device based on the device type of the storage device in the Ceph cluster, it can be to determine the security score of each storage device in the Ceph cluster, or it can be to determine the security score of a specified storage device in the Ceph cluster.

[0056] The trigger operation for determining the security score can be formed based on a user-side request or based on the cluster status of the Ceph cluster. In one implementation, the trigger operation for determining the security score is formed based on the cluster status of the Ceph cluster. Specifically, before determining the security score of the storage device based on the device type of the storage device in the Ceph cluster, the method further includes:

[0057] Periodically monitor the cluster load of the Ceph cluster;

[0058] If the monitored cluster load is greater than the prior cluster load, perform the operation of determining the security score of the storage device based on the device type of the storage device in the Ceph cluster.

[0059] Specifically, the interval duration for periodically monitoring the cluster load of the Ceph cluster can be preset or determined based on the prior cluster load. The prior cluster load can also be preset or determined based on the historical cluster load. In the embodiments of the present application, the interval duration is determined based on the prior cluster load. The determination process of the interval duration can be as follows: after detecting the cluster load, if the cluster load is greater than the prior cluster load, the interval duration is set to the default duration; if the cluster load is less than or equal to the prior cluster load, the interval duration corresponding to the cluster load detected at the current moment is determined according to the corresponding relationship between the preset cluster load and the interval duration, and the cluster load of the Ceph cluster is monitored after this interval duration. Adjusting the interval duration based on the cluster load can accurately obtain the execution moment when the operation of determining the security score of the storage device based on the device type of the storage device in the Ceph cluster needs to be performed, and update the verification frequency of the storage device quickly and accurately, so that the verification frequency matches the device performance level of the storage device, and further the data integrity of the storage device can be verified more timely.

[0060] Further, the prior cluster load is determined based on the historical cluster load. Specifically, the prior cluster load can be the cluster load detected at the previous detection moment of the current moment, or the maximum value of the cluster loads detected at the previous preset number of detection moments of the current monitoring moment, or the average value of the cluster loads detected at the previous preset number of detection moments of the current monitoring moment, etc.

[0061] The device type is used to reflect the access type of the storage device. The device type can include local devices and network devices. The initial security score corresponding to the local device is higher than the initial security score corresponding to the network device. Of course, in practical applications, local devices and network devices can be regarded as two device type categories, and each device type category also includes sub-device types. For example, both device type categories include block devices, flash memories, encrypted hard disks, and other non-standard devices, etc. When configuring the initial security score for the device type, the initial security score can be configured for the two device type categories respectively first, and then the initial security score can be configured for each sub-device type. In this way, when obtaining the device type, the device type category corresponding to the storage device can be obtained first, and then the sub-device type corresponding to the storage device can be obtained.

[0062] Exemplarily, the determining the security score of the storage device based on the device type of the storage device in the Ceph cluster specifically includes:

[0063] Determining the initial security score of the storage device based on the device type of the storage device in the Ceph cluster;

[0064] Obtaining the IO response time of the storage device, and determining the running score of the storage device based on the IO response time;

[0065] Determine the security score of the storage device based on the initial security score and the running score.

[0066] Specifically, the initial security score is the device score corresponding to the device type, and the running score is the running performance score determined based on the IO response time of the storage device. The security score is the overall score of the storage device under the current running performance, which is used to reflect the overall device state of the storage device. Among them, the initial security score can be the initial security score configured for the device type, or can be determined based on the initial security score configured for the device type and the user-set score corresponding to the storage device. For example, it can be the minimum value of the initial security score and the user-set score, or the average value of the initial security score and the user-set score, or the weighted value obtained by weighting the initial security score and the user-set score. The initial security score can be determined based on the initial security score of the device type class to which the device type belongs, or can be determined based on the initial security score of the device type class to which the device type belongs and the initial security score of the sub-device type corresponding to the storage device in this device type class. For example, it is the product of the two initial security scores, etc.

[0067] Furthermore, the IO response time is the response duration for processing one IO operation, and the IO response time can reflect the response performance of the storage device. Among them, the IO response time at the current moment can be directly obtained, or it can be the average response time of all IO operations within a preset duration.

[0068] In one implementation, the obtaining of the IO response time of the storage device specifically includes:

[0069] S21. Obtain the IO response time of the storage device within a preset duration;

[0070] S22. Calculate the mean value of all the recorded IO response times to obtain the IO response mean value, and use the IO response mean value as the IO response time of the storage device.

[0071] Specifically, the preset duration is pre-set. When obtaining the IO response time within the preset duration of the storage device, the start time can be the current moment, and record the IO response time of each IO operation in the future preset duration. Or, the end time can be the current moment, and read the IO response time of each IO operation in the historical preset duration. In the embodiments of the present application, continuously record the number of historical IO operations of the storage device and the IO response time of each historical IO operation within the preset duration. Therefore, when obtaining the IO response time within the preset duration of the storage device, the recorded number of historical IO operations and the IO response time of each historical IO operation can be read, and then the average IO response of the historical IO operations can be calculated based on the number of historical IO operations and the IO response time of each historical IO operation to obtain the IO response time of the storage device.

[0072] Further, after obtaining the IO response time of the storage device, determine the running score of the storage device based on the IO response time of the storage device. The running score is used to reflect the running state of the storage device. Among them, the running score is inversely proportional to the IO response time, that is, the shorter the IO response time, the more stable the running state of the storage device, so the running score is larger. On the contrary, the longer the IO response time, the more unstable the running state of the storage device, so the running score is smaller. Even when the IO response time is greater than the preset time threshold, the running score can be set to negative to facilitate quickly triggering the verification of the storage device. Among them, when determining the running score based on the IO response time, several IO response time periods can be pre-set, and a running score can be configured for each IO response time period. After obtaining the IO response time of the storage device, the IO response time period in which the IO response time is located can be determined, and then the running score corresponding to the IO response time period can be used as the running score corresponding to the IO response time. Or, the inverse proportional relationship between the IO response time and the running score can be set. After obtaining the IO response time, compare the IO response time with the preset IO response time threshold. If the IO response time is greater than the preset IO response time threshold, directly use the negative running score as the running score corresponding to the IO response time. If the IO response time is less than or equal to the preset IO response time threshold, determine the positive running score based on the inverse proportional relationship and use the positive running score as the running score corresponding to the IO response time.

[0073] S20. Determine the device performance level of the storage device based on the security score.

[0074] Specifically, the device performance level is used to reflect the device stability of the storage device, and is used to determine the verification frequency of the storage device. Among them, the device performance level can be determined based on the correspondence between the security score and the device performance level. For example, the correspondence between the security score and the device performance level is preset, and when the security score is obtained, the device performance level of the storage device is determined based on this correspondence.

[0075] However, in practical applications, it is possible that the storage device has already malfunctioned, and for the malfunctioning storage device, it is not necessary to determine its verification frequency, but abnormal prompts or verifications can be performed. Based on this, in one implementation, the determining the device performance level of the storage device based on the security score specifically includes:

[0076] Detect whether the security score meets the preset requirements;

[0077] When the security score meets the preset requirements, determine the device performance level of the storage device according to the correspondence between the security score and the device performance level;

[0078] When the security score does not meet the preset requirements, perform a verification operation on the storage device. If the verification operation passes, set the device performance level of the storage device to the lowest device performance level. If the verification fails, prompt that the storage device is abnormal.

[0079] Specifically, the preset requirements are preset. The preset requirements can be that the security score is greater than or equal to a preset score threshold. Among them, the preset score threshold can be the average value of the security scores of the preset number of times of the security score, etc. Or, the preset requirements can be the difference between the security score being greater than the previous security score, or the security score being less than the previous security score and the difference between the previous security score and the security score being less than the preset difference threshold. In this way, by using the difference between the previous security score and the security score as the preset requirements, on the one hand, it can be determined whether the storage device is operating normally, and on the other hand, it can be determined whether the storage is operating smoothly. When there are large fluctuations in the operation of the storage device, directly verifying the storage device can more timely detect the abnormality of the storage device.

[0080] Further, when the security score meets the preset requirements, it indicates that the device performance level can be determined based on the security score. Conversely, when the security score does not meet the preset requirements, it means that the device performance cannot be determined based on the security score, and it is necessary to directly perform a verification operation on the storage device, and then determine whether to determine the device performance level of the storage device based on the verification result obtained from the verification operation. Specifically, if the verification operation passes, it indicates that the data integrity of the storage device meets the requirements. However, since the security score does not meet the preset requirements, the lowest device performance level is set for the storage device. If the verification operation fails, it indicates that the data integrity of the storage device does not meet the requirements, and the storage device is prompted to be abnormal. Among them, before prompting the storage device to be abnormal, it is also possible to first attempt to repair the storage device. If the repair is successful, the lowest device performance level is set for the storage device.

[0081] The corresponding relationship between the security score and the device performance level can be pre-set. Among them, the corresponding relationship can be that if the security score is greater than the first security score threshold, the corresponding device performance level is level one, that is, the stability of the storage device is very high; if the security score is between the first security score threshold and the second security score threshold, the corresponding device performance level is level two, that is, the stability of the storage device is normal (that is, it meets the ordinary level or the preset standard level); if the security score is less than the second security score threshold, the corresponding device performance level is level three (that is, the lowest level), that is, the stability of the storage device is low. Based on the above level mapping information, in this embodiment, the security assignment is matched with the corresponding relationship between the security score and the device performance level to determine the device performance level corresponding to the storage device.

[0082] S30. Obtain the verification frequency corresponding to the device performance level, and use the obtained verification frequency as the verification frequency of the storage device.

[0083] Specifically, the verification frequency is the frequency of performing data integrity verification on the storage device. Among them, the verification frequency is the number of write operations between two verifications. For example, if the verification frequency is 10, then the number of write operations between the previous verification and the current verification is 10, that is, after the previous verification, after the storage device performs 10 write operations, the verification is performed when the 11th write operation is executed.

[0084] The verification frequency corresponding to the device performance level can be determined according to a preset relationship table of device performance levels and verification frequencies. After obtaining the device performance level, the verification frequency corresponding to the device performance level is searched for in the preset relationship table. Among them, the higher the device performance level, the lower the verification frequency; conversely, the lower the device performance level, the higher the verification frequency. For example, for a storage device with a particularly low device performance level, a verification operation can be performed each time a write operation is executed, so as to promptly detect device anomalies of the storage device and promptly attempt to repair or report the anomalies.

[0085] In addition, in practical applications, in order for the verification frequency not to affect the performance of the Ceph cluster, a default verification frequency can be preset. When the device performance level of the storage device in the Ceph cluster is higher than the device performance level threshold, the default verification frequency is configured for the storage device with a device performance level higher than the device performance level threshold, so that the verification frequencies of these storage devices are the same and synchronous verification can be performed. Since the write operation frequencies of the storage devices in the Ceph cluster are different, when the default verification frequency is configured for the storage device with a device performance level higher than the device performance level threshold, the default verification frequency can be set as an interval time, that is to say, the default verification frequency is the interval time between two verification operations (for example, 10 days, 20 days, etc.), so that the storage devices with a device performance level higher than the device performance level threshold perform verification operations according to the interval time, keeping the verification operations of each storage device synchronous.

[0086] Based on this, as Figure 2 shown, the specific steps for obtaining the verification frequency corresponding to the device performance level include:

[0087] S31. Compare the device performance level with the device performance level threshold;

[0088] S32. If the device performance level is higher than the device performance level threshold, use the default verification frequency as the verification frequency of the storage device, where the default verification frequency is the interval time between two verification operations.

[0089] S33. If the device performance level is lower than or equal to the device performance level threshold, determine the verification frequency of the storage device based on the preset relationship table, where the verification frequency in the preset relationship table is the number of write operations between two verification operations.

[0090] In the embodiments of the present application, storage devices with a device performance level higher than the device performance level threshold can all adopt the default verification frequency, so as to keep the storage devices running stably in the Ceph cluster synchronously perform verification. For storage devices with a device performance level lower than or equal to the device performance level threshold, verification is performed according to the verification frequency. In this way, abnormal storage devices in the Ceph cluster can be detected in time while minimizing the verification frequency.

[0091] In one implementation, after obtaining the verification frequency of the storage device, the storage device is verified according to the verification frequency. That is to say, after using the obtained verification frequency as the verification frequency of the storage device, the method further includes:

[0092] When monitoring the write operation of the storage device, perform a verification operation on the storage device;

[0093] Starting from the verification operation and taking the write operation as the trigger condition, perform a verification operation on the storage device according to the verification frequency.

[0094] Specifically, the write operation is the first write operation performed after configuring the verification frequency for the storage device. That is to say, after configuring the verification frequency for the storage device according to the device performance level, monitor the write operation of the storage device. When the write operation is detected, perform a verification operation on the storage device, and starting from the verification operation and taking the write operation as the trigger condition, perform a verification operation on the storage device according to the verification frequency, that is, taking this verification operation as the first verification operation, record the number of write operations performed after the write operation corresponding to the verification operation, and when the number of write operations meets the verification frequency requirement, perform the next verification operation. That is to say, the verification operation is triggered based on the write operation, that is, when the write operation is detected, the verification operation is triggered to perform a verification operation on the storage device. For example, the verification frequency is 20. After performing the first verification operation, monitor the write operations performed by the storage device. When the number of write operations reaches 20, when the write operation is detected again, perform the second verification operation, and so on, until the verification frequency of the storage device is configured again based on the device performance level.

[0095] In summary, this embodiment provides a method for determining the verification frequency based on device scoring. The method includes determining the security score of a storage device based on the device type of the storage device in the Ceph cluster; determining the device performance level of the storage device based on the security score; obtaining the verification frequency corresponding to the device performance level, and using the obtained verification frequency as the verification frequency of the storage device. This application determines the device score of the storage device based on the device type, determines the device performance level based on the device score, and finally determines the verification frequency of each storage device based on the device performance level, so that the verification frequency matches the operating conditions of the storage device, thereby meeting the verification requirements of each storage device in the Ceph cluster.

[0096] Based on the above method for determining the verification frequency based on device scoring, this embodiment provides a device for determining the verification frequency based on device scoring, as Figure 3 shown. The device for determining the verification frequency based on device scoring specifically includes:

[0097] A first determination module 100, configured to determine the security score of a storage device based on the device type of the storage device in the Ceph cluster;

[0098] A second determination module 200, configured to determine the device performance level of the storage device based on the security score;

[0099] An acquisition module 300, configured to obtain the verification frequency corresponding to the device performance level, and use the obtained verification frequency as the verification frequency of the storage device.

[0100] Based on the above method for determining the verification frequency based on device scoring, this embodiment provides a computer-readable storage medium. The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method for determining the verification frequency based on device scoring as described in the above embodiment.

[0101] Based on the above method for determining the verification frequency based on device scoring, this application also provides a terminal device, as Figure 4 shown. It includes at least one processor 20; a display screen 21; and a memory 22, and may further include a communication interface 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22, and the communication interface 23 can complete mutual communication through the bus 24. The display screen 21 is set to display a preset user guidance interface in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logical instructions in the memory 22 to execute the method in the above embodiment.

[0102] In addition, when the logic instructions in the above-mentioned memory 22 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0103] The memory 22, as a computer-readable storage medium, can be set to store software programs and computer-executable programs, such as the program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implements the methods in the above-mentioned embodiments.

[0104] The memory 22 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 22 may include high-speed random access memory and may also include non-volatile memory. For example, various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or optical discs, etc., may also be transient storage media.

[0105] In addition, the specific processes of loading and executing multiple instructions by the above-mentioned storage medium and the instruction processor in the terminal device have been described in detail in the above methods, and will not be repeated here one by one.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for determining the verification frequency based on device scoring, characterized in that, Applied to a Ceph cluster, the method for determining the verification frequency based on device scoring specifically includes: Periodically monitor the cluster load of the Ceph cluster. If the monitored cluster load is greater than the prior cluster load, determine the initial security score of the storage devices in the Ceph cluster based on the device types of the storage devices, where the device type is used to reflect the access type of the storage device, and the device types include local devices and network devices, and the prior cluster load is determined based on historical cluster loads; Record the IO response time of the storage device within a preset duration, calculate the mean value of all the recorded IO response times to obtain the IO response mean value, and use the IO response mean value as the IO response time of the storage device, and determine the running score of the storage device based on the IO response time; Determine the security score of the storage device based on the initial security score and the running score; Determine the device performance level of the storage device based on the security score; Obtain the verification frequency corresponding to the device performance level, and use the obtained verification frequency as the verification frequency of the storage device, where the verification frequency is the frequency of data integrity verification; The specific steps of calculating the mean value of all the recorded IO response times to obtain the IO response mean value include: Read the recorded historical IO operation times and the IO response time of each historical IO operation; Calculate the IO response mean value of the historical IO operations based on the historical IO operation times and the IO response time of each historical IO operation to obtain the IO response time of the storage device; The specific steps of determining the running score of the storage device based on the IO response time include: After obtaining the IO response time, compare the IO response time with a preset IO response time threshold; If the IO response time is greater than the preset IO response time threshold, directly use a negative running score as the running score corresponding to the IO response time; If the IO response time is less than or equal to the preset IO response time threshold, determine a positive running score based on a preset inverse proportional relationship, and use the positive running score as the running score corresponding to the IO response time.

2. The method for determining the verification frequency based on device scoring according to claim 1, wherein After using the obtained verification frequency as the verification frequency of the storage device, the method further includes: When monitoring the write operation of the storage device, perform a verification operation on the storage device; Starting from the verification operation, using the write operation as the trigger condition, perform verification operations on the storage device according to the verification frequency.

3. The method for determining the verification frequency based on device scoring according to claim 1, wherein The specific steps of determining the device performance level of the storage device based on the security score include: Detect whether the security score meets the preset requirements; When the security score meets the preset requirements, determine the device performance level of the storage device according to the corresponding relationship between the security score and the device performance level; When the security score does not meet the preset requirements, perform a verification operation on the storage device; If the verification operation passes, set the device performance level of the storage device to the lowest device performance level; If the verification fails, prompt that the storage device is abnormal.

4. The method for determining the verification frequency based on device scoring according to claim 1, wherein The specific steps of obtaining the verification frequency corresponding to the device performance level include: Compare the device performance level with a device performance level threshold; If the device performance level is higher than the device performance level threshold, the default verification frequency is used as the verification frequency of the storage device, where the default verification frequency is the interval time between two verification operations; If the device performance level is lower than or equal to the device performance level threshold, the verification frequency of the storage device is determined based on a preset relationship table, where the verification frequency in the preset relationship table is the number of write operations between two verification operations.

5. A verification frequency determination device based on device scoring, characterized in that Applied to a Ceph cluster, the verification frequency determination device based on device scoring specifically includes: A first determination module, configured to periodically monitor the cluster load of the Ceph cluster. If the monitored cluster load is greater than the prior cluster load, determine the initial security score of the storage device based on the device type of the storage device in the Ceph cluster, record the IO response time of the storage device within a preset duration, calculate the mean value of all the recorded IO response times to obtain the IO response mean value, and use the IO response mean value as the IO response time of the storage device, and determine the running score of the storage device based on the IO response time; determine the security score of the storage device based on the initial security score and the running score, where the device type is used to reflect the access type of the storage device, the device type includes local devices and network devices, and the prior cluster load is determined based on historical cluster loads; A second determination module, configured to determine the device performance level of the storage device based on the security score; An acquisition module, configured to acquire the verification frequency corresponding to the device performance level, and use the acquired verification frequency as the verification frequency of the storage device, where the verification frequency is the frequency of data integrity verification; The specific process of calculating the mean value of all the recorded IO response times to obtain the IO response mean value specifically includes: Read the recorded historical IO operation times and the IO response time of each historical IO operation; Calculate the IO response mean value of the historical IO operations based on the historical IO operation times and the IO response time of each historical IO operation to obtain the IO response time of the storage device; The specific process of determining the running score of the storage device based on the IO response time specifically includes: After obtaining the IO response time, compare the IO response time with a preset IO response time threshold; If the IO response time is greater than the preset IO response time threshold, directly use a negative running score as the running score corresponding to the IO response time; If the IO response time is less than or equal to the preset IO response time threshold, determine a positive running score based on a preset inverse proportional relationship, and use the positive running score as the running score corresponding to the IO response time.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the verification frequency determination method based on device scoring according to any one of claims 1-4.

7. A terminal device, characterized in that, Including: A processor and a memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the steps in the method for determining the verification frequency based on device scoring according to any one of claims 1-4 are implemented.

Citation Information

Patent Citations

  • Electrical equipment state monitoring method and system

    CN119025841A