Alarm method, device, equipment and medium

By providing a quota alarm method in the computer storage system, we can determine whether the user resource use exceeds the preset threshold and issue an alarm when it exceeds the limit, which solves the problem of reduced available resources caused by unreasonable use of user resources and improves the user experience.

CN114996092BActive Publication Date: 2025-04-25JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210612278.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-04-25
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

In computer storage systems, when users’ resources are unreasonable, they cannot remind users in time, resulting in a decrease in the available resources of users, which in turn affects the user’s experience.

Method used

A quota alarm method is provided. By obtaining the current quota information corresponding to the service, it is determined whether the object capacity and number of objects exceed the preset alarm soft upper limit and hard upper limit. If it exceeds the alarm, an alarm will be issued.

Benefits of technology

It realizes that when user resources are used unreasonably, users are promptly reminded, and technicians will deal with it in a timely manner after receiving an alarm, so that users can use more available resources and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996092B_ABST
    Figure CN114996092B_ABST
Patent Text Reader

Abstract

The present application discloses an alarm method, device, equipment and medium, and relates to the field of computer technology. The method includes: according to the uploaded business, obtaining the current quota information corresponding to the business, the current quota information at least includes the object capacity and the number of objects in the index pool; judging whether the object capacity and the number of objects both exceed the corresponding preset alarm soft upper limit value, and judging whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value; when the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, an alarm is issued. When the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, an alarm is issued, so that when the user's resource usage is unreasonable, the user is reminded in time, and the technical personnel handle the alarm in time after receiving the alarm, so that the user can use more available resources and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an alarm method, device, equipment and medium. Background Art

[0002] As the requirements for computer system storage systems continue to increase, storage resources have become particularly important. In order to prevent the abuse of storage resources, the available resource quota of the environment is generally configured through resource control policies. At this time, the quota function for storage resources appears. The quota function can control the user's resource usage according to different restriction levels. However, when the user's resource usage is unreasonable, the user cannot be reminded, resulting in a reduction in the user's available resources, which in turn reduces the user's usage experience.

[0003] In view of the above-mentioned problems, finding out how to issue an alarm when resources are used irrationally is a problem that those skilled in the art are trying their best to solve. Summary of the invention

[0004] The purpose of this application is to provide an alarm method, device, equipment and medium for issuing an alarm when resources are used irrationally.

[0005] In order to solve the above technical problems, the present application provides a quota alarm method, including:

[0006] Determine the business that needs to be uploaded;

[0007] According to the uploaded business, obtain the current quota information corresponding to the business, which at least includes the object capacity and number of objects in the index pool;

[0008] Determine whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit values, and determine whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit values;

[0009] When the preset alarm soft upper limit value and the preset alarm hard upper limit value are met, an alarm is issued.

[0010] Preferably, determining whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit value, and determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value includes:

[0011] Get object capacity and number of objects;

[0012] Determine whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit values;

[0013] If both exceed the preset alarm soft upper limit, an alarm will be issued;

[0014] If neither exceeds the preset alarm soft upper limit, determine whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit;

[0015] If the preset hard upper limit of the alarm is exceeded, an alarm will be issued;

[0016] If the preset alarm hard upper limit is not exceeded, the current quota information is updated and the updated quota information is uploaded.

[0017] Preferably, if both exceed the preset alarm soft upper limit, after an alarm is issued, the method further includes:

[0018] Determine whether to enable the bucket multi-version function;

[0019] If so, an alarm is issued;

[0020] If not, the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value.

[0021] Preferably, after determining whether to enable the bucket multi-version function, the method further includes:

[0022] Check whether there is an object corresponding to the object name in the current quota information;

[0023] If it does not exist, information indicating incompatibility with the overwrite function is output and an alarm is issued;

[0024] If it exists, determine whether the sum of the object capacity and the used object capacity is greater than the sum of the existing object capacity and the preset alarm soft upper limit;

[0025] If it is greater, an alarm is issued, and the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceeds the corresponding preset alarm hard upper limit value is entered;

[0026] If not, no alarm is given, and the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value.

[0027] Preferably, before determining the business to be uploaded, the method further includes:

[0028] Get the log information generated when RGW is started;

[0029] Determine whether there is duplicate log information;

[0030] If there is no duplicate log information, proceed to the step of determining the business that needs to be uploaded;

[0031] If there is duplicate log information, traverse the object according to the index information in the current quota information and determine whether the object entity exists;

[0032] If the object entity exists, the process proceeds to update the current quota information and upload the updated quota information;

[0033] If the object entity does not exist, the index information is deleted.

[0034] Preferably, after an alarm is issued when the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, the method further includes:

[0035] Determine whether an exception occurs after executing the write object header phase;

[0036] If an exception occurs after executing the write object header phase, the object is searched based on the object name;

[0037] If the exception does not occur after executing the write object header phase, determine whether the exception occurs after the write object index completion phase;

[0038] If an exception occurs after the object index writing phase is completed, the updated current quota information will be used as the new quota information;

[0039] If no exception occurs after the object index writing completion phase, the process ends.

[0040] Preferably, taking the updated current quota information as new quota information includes:

[0041] The updated current quota information will be used as the new quota information after 24 hours.

[0042] In order to solve the above technical problems, the present application also provides a quota alarm device, which is applied to the above quota alarm method and includes:

[0043] A determination module is used to determine the business that needs to be uploaded;

[0044] A first acquisition module is used to acquire current quota information corresponding to the uploaded business according to the business, and the current quota information at least includes the object capacity and the number of objects in the index pool;

[0045] A first judgment module is used to judge whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit value, and to judge whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the used object number exceed the corresponding preset alarm hard upper limit value;

[0046] The first alarm module is used to generate an alarm when a preset alarm soft upper limit value and a preset alarm hard upper limit value are satisfied.

[0047] In addition, the quota alarm device also includes the following modules:

[0048] The second acquisition module is used to obtain the object capacity and the number of objects;

[0049] The second judgment module is used to judge whether the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit values;

[0050] The second alarm module is used to issue an alarm if both exceed the preset alarm soft upper limit value;

[0051] A third judgment module is used to judge whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the used object number exceed the corresponding preset alarm hard upper limit value if both do not exceed the preset alarm soft upper limit value;

[0052] The third alarm module is used to issue an alarm if the preset alarm hard upper limit value is exceeded;

[0053] The update and upload module is used to update the current quota information and upload the updated quota information if the preset alarm hard upper limit value is not exceeded.

[0054] The fourth judgment module is used to judge whether to enable the bucket multi-version function;

[0055] A fourth alarm module, for issuing an alarm if the condition is true;

[0056] If not, the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value.

[0057] A first search module is used to search whether there is an object corresponding to the object name according to the object name in the current quota information;

[0058] The output module is used for outputting information indicating incompatibility of the overwrite function and issuing an alarm if the overwrite function does not exist;

[0059] A fifth judgment module, used to judge whether the sum of the object capacity and the used object capacity is greater than the sum of the existing object capacity and the preset alarm soft upper limit value, if it exists;

[0060] a fifth alarm module, for generating an alarm if the value is greater than , and entering the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value;

[0061] If not, no alarm is given, and the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value.

[0062] The third acquisition module is used to obtain the log information generated when the RGW is started;

[0063] The sixth judgment module is used to judge whether there is duplicate log information;

[0064] If there is no duplicate log information, proceed to the step of determining the business that needs to be uploaded;

[0065] A traversal module is used to traverse the object according to the index information in the current quota information if there is duplicate log information, and enter the seventh judgment module to judge whether there is an object entity;

[0066] If the object entity exists, the process proceeds to update the current quota information and upload the updated quota information;

[0067] The deletion module is used to delete the index information if the object entity does not exist.

[0068] An eighth judgment module, used to judge whether an abnormality occurs after executing the object header writing phase;

[0069] A second search module is used to search for an object according to the object name if an exception occurs after executing the write object header phase;

[0070] If the exception does not occur after the write object header phase is executed, the ninth judgment module is entered to judge whether the exception occurs after the write object index completion phase;

[0071] If an exception occurs after the object index writing completion phase, the first as module is entered to use the updated current quota information as the new quota information;

[0072] If no exception occurs after the object index writing completion phase, the process ends.

[0073] The second module is used to update the current quota information as the new quota information after 24 hours.

[0074] To solve the above technical problems, the present application also provides a quota alarm device, including:

[0075] Memory for storing computer programs;

[0076] The processor is used to implement the steps of the above-mentioned quota warning method when executing a computer program.

[0077] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above quota warning method are implemented.

[0078] The quota alarm method provided by the present application includes: obtaining the current quota information corresponding to the business according to the uploaded business, the current quota information at least including the object capacity and the number of objects in the index pool; judging whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit value, and judging whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value; and issuing an alarm when the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied. When the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, an alarm is issued, so that when the user's resource usage is unreasonable, the user is reminded in time, and the technical personnel handle the alarm in time after receiving it, so that the user can use more available resources and improve the user experience.

[0079] The present application also provides a quota warning device, equipment and computer-readable storage medium, with the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0081] Figure 1 A flow chart of a quota warning method provided in an embodiment of the present application;

[0082] Figure 2 A structural diagram of a quota warning device provided in an embodiment of the present application;

[0083] Figure 3 A structural diagram of a quota alarm device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0085] The core of this application is to provide an alarm method, device, equipment and medium, which can issue an alarm when resources are used unreasonably.

[0086] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0087] The present application is applied to a massive storage system (Ceph), which is a distributed storage system with high performance, strong reliability and high scalability. An object storage gateway (RADOS gateway, RGW) is set in the system, which is the core part of the Ceph system. As an object storage gateway system, RGW plays the role of a RADOS cluster client on the one hand, providing data storage for object storage applications; on the other hand, it plays the role of an HTTP server, receiving and parsing data transmitted from the Internet. It communicates with Swift and S3 applications through the HTTP protocol, and the backend is combined with librados to communicate with the RADOS cluster through a socket. RGW supports the current mainstream WEB servers, including Civetweb, APACHE, Nginx, etc., among which Civetweb is a C++ library that can be embedded in the RGW framework and is the default WEB server of RGW; Apache and Nginx need to exist as independent processes. After receiving the request, the request is forwarded to RGW for processing through the listening port registered by RGW. One storage bucket corresponds to one RADOS object. A bucket contains two types of information. One type is transparent to the RGW gateway. This type of information usually refers to user-defined metadata. The RGW gateway directly saves this information in the extended attributes. One KV key-value pair corresponds to one extended attribute entry. The other type is the information that the RGW gateway is concerned about. This type of information includes the storage policy of objects in the bucket, the number of index objects in the bucket, the mapping relationship between application objects and index objects, and the quota of the bucket. This type of information is managed by the data structure RGWBucketInfo. When creating a bucket, the RGW gateway will synchronously create one or more index information to save the object list under the bucket to support the query bucket object list (List Bucket) function. Therefore, the index information must be updated when new objects are uploaded or deleted in the bucket.

[0088] Figure 1 This is a flow chart of a quota warning method provided by an embodiment of the present application. Figure 1 As shown, the quota alarm method includes:

[0089] S10: Determine the business to be uploaded.

[0090] S11: According to the uploaded business, obtain the current quota information corresponding to the business.

[0091] The current quota information includes at least the object capacity and number of objects in the index pool;

[0092] S12: Determine whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit values, and determine whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit values.

[0093] S13: When the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, an alarm is issued.

[0094] In this embodiment, the preset alarm hard upper limit value can be increased by 1 to prevent the situation where there is no space for operation when the overwrite function is performed. When the overwrite function is performed, the flag bit needs to be set to true to determine whether to perform the overwrite function.

[0095] In order to prevent the out-of-control process from destroying the performance of the system, most of the resources used by the process are tracked in Unix and Linux, allowing users and system administrators to use resource limits on the process. There are two types of limits: hard limits and soft limits. Hard limits can be set in any process at any time. Soft limits are limits actually executed by the kernel. Any process can set the soft limit to any value less than or equal to the hard limit of the process limit. The hard limit and soft limit mentioned here are the same concept as the preset alarm hard upper limit value and the preset alarm soft upper limit value mentioned above. And the order of determining the preset alarm hard upper limit value and the preset alarm soft upper limit value is not limited here. The preset alarm hard upper limit value can be determined first and then the preset alarm soft upper limit value; the preset alarm soft upper limit value can also be determined first and then the preset alarm hard upper limit value. There is no limitation on the order of judgment, the size of the preset alarm soft upper limit value, and the size of the preset alarm hard upper limit value. The implementation method can be determined according to the specific implementation scenario.

[0096] The quota alarm method provided by the present application includes: obtaining the current quota information corresponding to the business according to the uploaded business, the current quota information at least including the object capacity and the number of objects in the index pool; judging whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit value, and judging whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value; and issuing an alarm when the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied. When the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, an alarm is issued, so that when the user's resource usage is unreasonable, the user is reminded in time, and the technical personnel handle the alarm in time after receiving it, so that the user can use more available resources and improve the user experience.

[0097] Based on the above embodiment, as a more preferred embodiment, determining whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit value, and determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value includes:

[0098] Get object capacity and number of objects;

[0099] Determine whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit values;

[0100] If both exceed the preset alarm soft upper limit, an alarm will be issued;

[0101] If neither exceeds the preset alarm soft upper limit, determine whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit;

[0102] If the preset hard upper limit of the alarm is exceeded, an alarm will be issued;

[0103] If the preset alarm hard upper limit is not exceeded, the current quota information is updated and the updated quota information is uploaded.

[0104] The order of determining the preset alarm hard upper limit value and the preset alarm soft upper limit value is limited here. The preset alarm soft upper limit value is determined first and then the preset alarm hard upper limit value, but there is no limitation on the size of the preset alarm soft upper limit value and the size of the preset alarm hard upper limit value. The implementation method can be determined according to the specific implementation scenario. Because in the Ceph system, the hard limit can be set in any process at any time. The soft limit is the limit actually executed by the kernel, and any process can set the soft limit to any value less than or equal to the hard limit on the process. Therefore, the smaller preset alarm soft upper limit value should be determined first and then the larger preset alarm hard upper limit value should be determined. In order to avoid repeating the same steps multiple times and wasting resources.

[0105] Based on the above embodiment, as a more preferred embodiment, after the alarm is issued if both exceed the preset alarm soft upper limit, the method further includes:

[0106] Determine whether to enable the bucket multi-version function;

[0107] If so, an alarm is issued;

[0108] If not, the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value.

[0109] In order to avoid the situation where the bucket multi-version function is enabled and the bucket version cannot be determined, it is necessary to determine whether to enable the bucket multi-version function in this embodiment. In this embodiment, by setting a preset alarm hard upper limit, the user is reminded in time when the user's resource usage is unreasonable, and the technician handles the alarm in time after receiving it, so that the user can use more available resources and improve the user experience.

[0110] Based on the above embodiment, as a more preferred embodiment, after determining whether to enable the bucket multi-version function, the following further includes:

[0111] Check whether there is an object corresponding to the object name in the current quota information;

[0112] If it does not exist, information indicating incompatibility with the overwrite function is output and an alarm is issued;

[0113] If it exists, determine whether the sum of the object capacity and the used object capacity is greater than the sum of the existing object capacity and the preset alarm soft upper limit;

[0114] If it is greater, an alarm is issued, and the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceeds the corresponding preset alarm hard upper limit value is entered;

[0115] If not, no alarm is given, and the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value.

[0116] In order to make the alarm more accurate, the sum of the object capacity and the used object capacity, as well as the sum of the existing object capacity and the preset alarm soft upper limit value are compared. In this embodiment, by setting the preset alarm hard upper limit value, when the user's resource usage is unreasonable, the user is reminded in time, and the technical staff handles the alarm in time after receiving it, so that the user can use more available resources, thereby improving the user experience.

[0117] Based on the above embodiment, as a more preferred embodiment, before determining the service to be uploaded, the following is further included:

[0118] Get the log information generated when RGW is started;

[0119] Determine whether there is duplicate log information;

[0120] If there is no duplicate log information, proceed to the step of determining the business that needs to be uploaded;

[0121] If there is duplicate log information, traverse the object according to the index information in the current quota information and determine whether the object entity exists;

[0122] If the object entity exists, the process proceeds to update the current quota information and upload the updated quota information;

[0123] If the object entity does not exist, the index information is deleted.

[0124] When there is repeated log information, in order to prevent a quota alarm from being issued each time, many judgment steps are required. However, if there is no object entity, even if a subsequent judgment is performed, it is a waste of resources and a time-consuming operation. In order to avoid such consumption, in this embodiment, it is necessary to judge whether there is an object entity.

[0125] Based on the above embodiment, as a more preferred embodiment, after the alarm is issued when the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, the following is further included:

[0126] Determine whether an exception occurs after executing the write object header phase;

[0127] If an exception occurs after the object header write phase is executed, the object is searched based on the object name; it should be noted that the quota information will be updated after 3 minutes.

[0128] If the exception does not occur after executing the write object header phase, determine whether the exception occurs after the write object index completion phase;

[0129] If an exception occurs after the object index writing completion phase, the updated current quota information will be used as the new quota information; it should be noted that the updated current quota information will be used as the new quota information after 24 hours.

[0130] If no exception occurs after the object index writing completion phase, the process ends.

[0131] In real production environments, quota information is often inaccurate due to unavoidable abnormal conditions, such as a sudden power outage during a business. Once quota information loses accuracy, it will be impossible to ensure the reasonable allocation and use of storage resources by users in the system next time.

[0132] In the above embodiments, the quota alarm method is described in detail, and the present application also provides an embodiment corresponding to the quota alarm device. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.

[0133] Figure 2 This is a structural diagram of a quota warning device provided in an embodiment of the present application. Figure 2 As shown, the present application also provides an alarm device, including:

[0134] A determination module 20, used to determine the business that needs to be uploaded;

[0135] A first acquisition module 21 is used to acquire current quota information corresponding to the uploaded business according to the business, and the current quota information at least includes the object capacity and the number of objects in the index pool;

[0136] The first judgment module 22 is used to judge whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit value, and to judge whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the used object number exceed the corresponding preset alarm hard upper limit value;

[0137] The first alarm module 23 is used to generate an alarm when a preset alarm soft upper limit value and a preset alarm hard upper limit value are satisfied.

[0138] In addition, the quota alarm device also includes the following modules:

[0139] The second acquisition module is used to obtain the object capacity and the number of objects;

[0140] The second judgment module is used to judge whether the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit values;

[0141] The second alarm module is used to issue an alarm if both exceed the preset alarm soft upper limit value;

[0142] A third judgment module is used to judge whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the used object number exceed the corresponding preset alarm hard upper limit value if both do not exceed the preset alarm soft upper limit value;

[0143] The third alarm module is used to issue an alarm if the preset alarm hard upper limit value is exceeded;

[0144] The update and upload module is used to update the current quota information and upload the updated quota information if the preset alarm hard upper limit value is not exceeded.

[0145] The fourth judgment module is used to judge whether to enable the bucket multi-version function;

[0146] A fourth alarm module, for issuing an alarm if the condition is true;

[0147] If not, the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value.

[0148] A first search module is used to search whether there is an object corresponding to the object name according to the object name in the quota information;

[0149] The output module is used for outputting information indicating incompatibility of the overwrite function and issuing an alarm if the overwrite function does not exist;

[0150] A fifth judgment module, used to judge whether the sum of the object capacity and the used object capacity is greater than the sum of the existing object capacity and the preset alarm soft upper limit value, if it exists;

[0151] a fifth alarm module, for generating an alarm if the value is greater than , and entering the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value;

[0152] If not, no alarm is given, and the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value.

[0153] The third acquisition module is used to obtain the log information generated when the RGW is started;

[0154] The sixth judgment module is used to judge whether there is duplicate log information;

[0155] If there is no duplicate log information, proceed to the step of determining the business that needs to be uploaded;

[0156] A traversal module, which is used to traverse the object according to the index information in the quota information if there is duplicate log information, and enter the seventh judgment module to judge whether there is an object entity;

[0157] If the object entity exists, the process proceeds to update the current quota information and upload the updated quota information;

[0158] The deletion module is used to delete the index information if the object entity does not exist.

[0159] An eighth judgment module, used to judge whether an abnormality occurs after executing the object header writing phase;

[0160] A second search module is used to search for an object according to the object name if an exception occurs after executing the write object header phase;

[0161] If the exception does not occur after the write object header phase is executed, the ninth judgment module is entered to judge whether the exception occurs after the write object index completion phase;

[0162] If an exception occurs after the object index writing completion phase, the first as module is entered to use the updated current quota information as the new quota information;

[0163] If no exception occurs after the object index writing completion phase, the process ends.

[0164] The second module is used to update the current quota information as the new quota information after 24 hours.

[0165] The quota alarm method provided by the present application includes: obtaining the current quota information corresponding to the business according to the uploaded business, the current quota information at least including the object capacity and the number of objects in the index pool; judging whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit value, and judging whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value; and issuing an alarm when the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied. When the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, an alarm is issued, so that when the user's resource usage is unreasonable, the user is reminded in time, and the technical personnel handle the alarm in time after receiving it, so that the user can use more available resources and improve the user experience.

[0166] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0167] Figure 3 A quota alarm device structure diagram provided in an embodiment of the present application, such as Figure 3 As shown, the quota alarm devices include:

[0168] A memory 30, for storing computer programs;

[0169] The processor 31 is configured to implement the steps of the quota warning method mentioned in the above embodiment when executing a computer program.

[0170] The quota alarm device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0171] Among them, the processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 31 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 31 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 31 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0172] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor 31, the relevant steps of the quota alarm method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 30 may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include but is not limited to the quota alarm method, etc.

[0173] In some embodiments, the quota warning device may also include a display screen, an input and output interface, a communication interface, a power supply, and a communication bus.

[0174] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the quota warning device, and may include more or fewer components than those shown in the figure.

[0175] The quota alarm device provided in the embodiment of the present application includes a memory 30 and a processor 31. When the processor 31 executes the program stored in the memory 30, the quota alarm method can be implemented.

[0176] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0177] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory), ROM, random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0178] The above is a detailed introduction to an alarm method, device, equipment and medium provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0179] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A quota warning method, characterized in that: include: Determine the business that needs to be uploaded; According to the uploaded business, current quota information corresponding to the business is obtained, where the current quota information at least includes the object capacity and the number of objects in the index pool; Determining whether both the object capacity and the number of objects exceed corresponding preset alarm soft upper limits, and determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed corresponding preset alarm hard upper limits; When the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, an alarm is issued; The determining whether both the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit value, and determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value includes: Obtaining the object capacity and the number of objects; Determine whether the object capacity and the number of objects both exceed the corresponding preset alarm soft upper limit values; If both exceed the preset alarm soft upper limit, an alarm is issued; If neither exceeds the preset alarm soft upper limit value, determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceed the corresponding preset alarm hard upper limit value; If the preset alarm hard upper limit is exceeded, an alarm is issued; If the preset alarm hard upper limit value is not exceeded, the current quota information is updated and the updated quota information is uploaded.

2. The quota warning method according to claim 1, characterized in that: After the step of issuing an alarm if both exceed the preset alarm soft upper limit, the method further includes: Determine whether to enable the bucket multi-version function; If so, an alarm is issued; If not, the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceeds the corresponding preset alarm hard upper limit value.

3. The quota warning method according to claim 2, characterized in that: After determining whether to enable the bucket multi-version function, the following steps are also included: Searching, according to the object name in the current quota information, whether there is an object corresponding to the object name; If it does not exist, information indicating incompatibility with the overwrite function is output and an alarm is issued; If so, determining whether the sum of the object capacity and the used object capacity is greater than the sum of the existing object capacity and the preset alarm soft upper limit value; If it is greater, an alarm is issued, and the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceeds the corresponding preset alarm hard upper limit value is entered; If not, no alarm is given, and the process proceeds to the step of determining whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the number of used objects exceeds the corresponding preset alarm hard upper limit value.

4. The quota warning method according to claim 3, characterized in that: Before determining the business to be uploaded, the process further includes: Get the log information generated when RGW is started; Determine whether there is duplicate log information; If there is no duplicate log information, the step of determining the business to be uploaded is entered; If there is duplicate log information, traverse the object according to the index information in the current quota information, and determine whether the object entity exists; If the object entity exists, entering the step of updating the current quota information and uploading the updated quota information; If the object entity does not exist, the index information is deleted.

5. The quota warning method according to claim 4, characterized in that: When the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied, after an alarm is issued, the method further includes: Determine whether an exception occurs after executing the write object header phase; If an exception occurs after the execution of the object header writing phase, searching for the object according to the object name; If the exception does not occur after the write object header execution phase, determining whether the exception occurs after the write object index completion phase; If an exception occurs after the object index writing stage is completed, the updated current quota information is used as the new quota information; If no exception occurs after the write object index completion phase, the process ends.

6. The quota warning method according to claim 5, characterized in that: The updating of the current quota information as new quota information includes: After 24 hours, the updated current quota information is used as the new quota information.

7. A quota warning device, characterized in that: The quota warning method applied to any one of claims 1 to 6 comprises: A determination module is used to determine the business that needs to be uploaded; An acquisition module, configured to acquire current quota information corresponding to the uploaded business, wherein the current quota information includes at least an object capacity and a number of objects in the index pool; A judgment module, used to judge whether the object capacity and the number of objects both exceed corresponding preset alarm soft upper limits, and to judge whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the used object number exceed corresponding preset alarm hard upper limits; An alarm module, configured to generate an alarm when the preset alarm soft upper limit value and the preset alarm hard upper limit value are satisfied; The second acquisition module is used to obtain the object capacity and the number of objects; The second judgment module is used to judge whether the object capacity and the number of objects exceed the corresponding preset alarm soft upper limit values; The second alarm module is used to issue an alarm if both exceed the preset alarm soft upper limit value; A third judgment module is used to judge whether the sum of the object capacity and the number of objects and the sum of the used object capacity and the used object number exceed the corresponding preset alarm hard upper limit value if both do not exceed the preset alarm soft upper limit value; The third alarm module is used to issue an alarm if the preset alarm hard upper limit value is exceeded; The update and upload module is used to update the current quota information and upload the updated quota information if the preset alarm hard upper limit value is not exceeded.

8. A quota warning device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the quota warning method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the quota warning method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Disk alarm method and system, electronic equipment and storage medium

    CN110018943A

  • Quota method and device for distributed file system, server and storage medium

    CN110795041A