Solid-state disk capacity monitoring method, device and system, terminal equipment and storage medium
By obtaining the original information of the unit logic area of the solid state disk and determining the capacity index data, and carrying out capacity monitoring in combination with preset thresholds, the problem of low efficiency of solid state disk capacity monitoring in the prior art is solved, and efficient and accurate automatic monitoring is achieved.
Patent Information
- Application Number
- CN202411721967.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
In the prior art, the capacity monitoring of solid-state disks is inefficient, and it is prone to inaccurate and untimely monitoring problems, and lacks automated capacity monitoring and management tools.
By obtaining the original information of the unit logic area at the preset time, determining the capacity index data of the solid state disk, and performing capacity monitoring based on the capacity index data and preset thresholds, achieving efficient and accurate automatic monitoring of the solid state disk capacity.
It realizes efficient and accurate automatic monitoring of solid-state disk capacity, avoids the problems of inaccurate and untimely monitoring, and improves the management efficiency and reliability of solid-state disks.
Smart Images

Figure CN119645764A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a solid-state disk capacity monitoring method, device, system, terminal equipment, and storage medium. Background Art
[0002] In the prior art, Zoned Namespace (ZNS) is a new type of Non-Volatile Memory Express (NVMe) protocol that can optimize storage performance and extend device life by dividing a solid state disk (SSD) into multiple zones. Currently, under the Linux operating system, it is necessary to receive inspection / management instructions input by the user to feedback relevant information representing the capacity usage of each zone.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art:
[0004] The existing capacity monitoring methods are not only inefficient, but also prone to inaccurate and untimely monitoring. Therefore, there is an urgent need for a method that can automatically monitor the capacity of ZNS NVMe SSDs efficiently and accurately. Summary of the invention
[0005] The embodiments of the present invention provide a solid-state disk capacity monitoring method, apparatus, system, terminal equipment and storage medium, which can realize efficient and accurate automatic monitoring of solid-state disk capacity.
[0006] In a first aspect, an embodiment of the present invention provides a method for monitoring the capacity of a solid-state disk, comprising:
[0007] Acquire original information of a unit logical area at a preset time, and determine capacity index data of the solid-state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid-state disk into a preset size;
[0008] The capacity of the solid state disk is monitored according to the capacity indicator data and a preset threshold.
[0009] In a second aspect, an embodiment of the present invention provides a solid state disk capacity monitoring device, including:
[0010] An acquisition module, used to acquire original information of a unit logical area at a preset time, and determine the capacity index data of the solid state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid state disk into a preset size;
[0011] A monitoring module is used to monitor the capacity of the solid state disk according to the capacity indicator data and a preset threshold.
[0012] In a third aspect, an embodiment of the present invention provides a solid-state disk capacity monitoring system, including a device side and a server side; the device side includes a collector; the server side includes a gateway and a task engine;
[0013] The collector is used to obtain the original information of the unit logical area at a preset time, and determine the capacity index data of the solid state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid state disk into a preset size;
[0014] The gateway is used to receive the capacity indicator data sent by the collector;
[0015] The task engine is used to monitor the capacity of the solid state disk according to the capacity indicator data and a preset threshold.
[0016] In a fourth aspect, an embodiment of the present invention provides a terminal device, including:
[0017] one or more processors;
[0018] A memory for storing one or more programs;
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the solid-state disk capacity monitoring method as described in any embodiment of the present invention.
[0020] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the solid-state disk capacity monitoring method as described in any embodiment of the present invention.
[0021] In a sixth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the solid-state disk capacity monitoring method as described in any embodiment of the present invention is implemented.
[0022] The embodiment of the present invention provides a method, device, system, terminal device and storage medium for monitoring the capacity of a solid-state disk, wherein the method comprises: obtaining the original information of a unit logical area at a preset time, and determining the capacity index data of the solid-state disk according to the original information; wherein the unit logical area comprises an area obtained by dividing the logical address space in the solid-state disk into a preset size; and monitoring the capacity of the solid-state disk according to the capacity index data and a preset threshold. By obtaining the original information of the unit logical area at each preset time, and obtaining the capacity index number of the solid-state disk according to the original information processing, efficient and accurate automatic monitoring of the capacity of the solid-state disk can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A flow chart of a solid state disk capacity monitoring method provided by an embodiment of the present invention is shown;
[0025] Figure 2 A schematic diagram showing the division of the logical address space in a solid state disk in a solid state disk capacity monitoring method provided by an embodiment of the present invention is shown;
[0026] Figure 3 A schematic diagram of the structure of a solid state disk capacity monitoring device provided by an embodiment of the present invention is shown;
[0027] Figure 4 A schematic diagram of the structure of a solid state disk capacity monitoring system provided by an embodiment of the present invention is shown;
[0028] Figure 5 A schematic diagram of the hardware structure of a terminal device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described through the implementation method with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the following embodiments, optional features and examples are provided in each embodiment at the same time. The various features recorded in the embodiments can be combined to form multiple optional schemes, and each numbered embodiment should not be regarded as only one technical scheme. The acquisition, storage, use, processing, etc. of data in the technical scheme of this application comply with the relevant provisions of national laws and regulations.
[0030] In the related art, there is a lack of automated capacity monitoring and management tools for ZNS NVMe SSDs under the Linux operating system. Users need to manually check and manage the capacity usage of each zone, and the capacity usage is presented through relatively low-level statements with poor readability, requiring professionals to interpret it into more readable capacity usage information. This not only increases the workload, but is also prone to errors and omissions, and it is impossible to achieve real-time monitoring, resulting in low efficiency, inaccuracy, and delay in capacity monitoring.
[0031] Figure 1 The flowchart of a solid state disk capacity monitoring method provided by an embodiment of the present invention is shown. The solid state disk capacity monitoring method provided by an embodiment of the present invention can be applied to monitoring the capacity of a ZNS NVMe SSD solid state disk under a Linux operating system. The method can be executed by a solid state disk capacity monitoring device, which is implemented in software and / or hardware, and the device can be configured in a terminal device, for example, the device can be partially configured in a terminal device that deploys an SSD, and partially configured in a server.
[0032] like Figure 1 As shown, the solid state disk capacity monitoring method provided in the embodiment of the present invention may include the following steps:
[0033] S110: Acquire original information of a unit logical area at a preset time, and determine capacity index data of the solid state disk according to the original information.
[0034] In the embodiment of the present invention, the preset time may include a time at every first preset time interval. The first preset time interval may be set according to a specific scenario, and when the first preset time interval is short, obtaining the original information of the unit logical area at the preset time may be considered as obtaining the original information of the unit logical area in real time.
[0035] The unit logical area may include an area obtained by dividing the logical address space in the solid state disk into a preset size. Figure 2 A schematic diagram of the division of the logical address space in a solid state disk in a solid state disk capacity monitoring method provided by an embodiment of the present invention is shown. Figure 2 The unit logical area Zone0-Zonex can be understood as a number of areas that are equally divided into the entire logical address space of the SSD based on the ZNS technology. Each area has an independent address space and management method, which is designed to optimize the performance and durability of the storage device.
[0036] In this embodiment, for ZNS NVMe SSD under Linux operating system, a daemon collection program can be written based on existing programming languages (such as Golang language). Among them, the collection program can obtain the original information of the unit logical area in all ZNS NVMe SSDs deployed on this device by calling the function interface provided by the Linux operating system (for example, calling Linux blkzone).
[0037] The original information of the unit logical area may include, but is not limited to, the number information, identification information, and space situation information of the unit logical area contained in the solid state disk. Figure 2 In the logical address space division diagram of the solid state disk shown in FIG. 1 , the original information of the unit logical area may include the number information of the unit logical area (ie, x+1), the identification information (ie, Zone0-Zonex), and the space situation information of the unit logical area. Figure 2 Taking Zone2 in the example, the space situation information may include but is not limited to the first and last address information of the unit logical area Zone2, the first and last address information of the invalid space in the unit logical area, and the write pointer address information.
[0038] In this embodiment, the capacity index data of the solid state disk may include but is not limited to the total capacity, used capacity and free capacity of the solid state disk. Determining the capacity index data of the solid state disk based on the original information of the unit logical area may include: determining the total capacity, used capacity and free capacity of the solid state disk based on the number information, identification information and space situation information of the unit logical area in the solid state disk.
[0039] In some optional embodiments, determining the capacity index data of the solid-state disk based on the original information may include: performing preset processing on the original information to obtain sub-capacity index data of the unit logical area; wherein the preset processing may include: base conversion processing, capacity calculation processing and preset capacity unit formatting processing; and determining the capacity index data of the solid-state disk based on the sub-capacity index data.
[0040] See again Figure 2Since the space situation information in the unit logical area is usually in binary form, the total capacity and invalid space in the unit logical area can be determined respectively by performing base conversion processing and mathematical calculation processing (i.e., capacity calculation processing) on the first and last address information of the unit logical area and the first and last address information of the invalid space in the unit logical area. Among them, the difference between the total capacity and the invalid space can be used as the actual capacity of the unit logical area. Since each unit logical area needs to write data in a sequential manner, the write pointer address information can also be converted, and the write pointer address after base conversion and the starting address information of the unit logical area can be calculated to determine the write amount and free capacity in the actual capacity of the unit logical area.
[0041] In addition, for the convenience of management, in this embodiment, the capacity unit (i.e., preset capacity unit) can be preset, and the determined total capacity, invalid space, actual capacity, write amount, and free capacity can be converted into the preset capacity unit to implement the preset capacity unit formatting operation. Among them, the actual capacity, write amount, and free capacity, etc. formatted into the preset capacity unit, can be included in the sub-capacity indicator data of the unit logical area.
[0042] Furthermore, by summarizing and calculating the sub-capacity index data of all unit logical areas in the solid-state disk, capacity index data such as the total capacity, used capacity and free capacity of the solid-state disk can be obtained.
[0043] In these optional implementations, by performing base conversion processing, capacity calculation processing, and preset capacity unit formatting processing on the original information of the unit logical area, the sub-capacity indicator data of the unit logical area can be determined, and then the capacity indicator data of the solid state disk can be determined based on each sub-capacity indicator data.
[0044] S120: Monitor the capacity of the solid state disk according to the capacity indicator data and the preset threshold.
[0045] In this embodiment, the capacity index data may represent the capacity usage of the solid state disk, and the preset threshold may represent the threshold of insufficient remaining capacity. The capacity of the solid state disk may be monitored by comparing the capacity index data with the preset threshold.
[0046] In some optional implementations, capacity monitoring of the solid-state disk based on capacity indicator data and preset thresholds may include: determining capacity utilization based on the capacity indicator data; and issuing a capacity alarm to the solid-state disk through a preset alarm method when the capacity utilization reaches a preset threshold.
[0047] The proportion of the used capacity to the total capacity in the capacity indicator data may be used as the capacity utilization rate of the solid state disk. The preset threshold may include an alarm threshold of the capacity utilization rate, such as 75%. The preset alarm method may include but is not limited to email notification, SMS notification, phone notification, and instant messaging software notification.
[0048] The related art lacks an alarm mechanism for ZNS NVMe SSD, which may easily lead to write failure or performance degradation due to the exhaustion of remaining capacity. In these optional implementations, when the capacity utilization rate reaches the preset threshold, the SSD alarm can be issued through the preset alarm method; when the capacity utilization rate does not reach the preset threshold, no alarm is issued. This improves the reliability and performance of the device to which the SSD belongs.
[0049] In addition, in some embodiments, when the solid-state disks include at least two, the capacity indicator data of the solid-state disks may also include a solid-state disk identifier; correspondingly, when there is a solid-state disk whose capacity utilization rate reaches a preset threshold, a capacity alarm can be issued for the corresponding solid-state disk through a preset alarm method based on the solid-state disk identifier.
[0050] In addition, in some embodiments, the preset threshold may include an alarm threshold of the remaining capacity rate, such as 15%. In this case, the capacity monitoring of the solid state disk according to the capacity indicator data and the preset threshold may also include: determining the remaining capacity rate according to the capacity indicator data; and issuing a capacity alarm to the solid state disk in a preset alarm mode when the remaining capacity rate is less than or equal to the preset threshold.
[0051] The embodiment of the present invention provides a method for monitoring the capacity of a solid-state disk, which obtains the original information of a unit logical area at a preset time, and determines the capacity index data of the solid-state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid-state disk into a preset size; and the capacity of the solid-state disk is monitored according to the capacity index data and a preset threshold. By obtaining the original information of the unit logical area at each preset time, and obtaining the capacity index number of the solid-state according to the original information processing, efficient and accurate automatic monitoring of the capacity of the solid-state disk can be achieved.
[0052] The embodiments of the present invention can be combined with the solid-state disk capacity monitoring method proposed in the above embodiments. This embodiment describes the data storage aspect in detail based on the above embodiments. By storing capacity indicator data in time series, it is convenient for subsequent capacity query, trend prediction and other business executions; by storing capacity alarm log data, it is possible to locate unit logical areas and / or solid-state disks with insufficient storage space, balance the use of storage space, and reduce data writing failures; by using the rule parameters in the storage capacity monitoring process (such as preset thresholds and alarm rules, etc.), it is convenient for the normal execution of the monitoring method in situations such as cold start.
[0053] The solid-state disk capacity monitoring method provided by an embodiment of the present invention may also include: storing capacity indicator data in a time sequence corresponding to preset moments; predicting the capacity indicator data within a preset time range based on the sequentially stored capacity indicator data through a capacity trend prediction model; and storing the predicted capacity indicator data.
[0054] In this embodiment, the relevant data of SSD capacity monitoring can be stored in a preset database (such as Click house data, MySQL database, etc.) through an existing database management system with online analysis and processing and real-time data analysis functions to support real-time analysis and processing of relevant data of large-scale SSD capacity monitoring.
[0055] Among them, since the preset time has a corresponding relationship with the original information, and the original information has a corresponding relationship with the capacity index data, the preset time and the capacity index data also have a corresponding relationship. By storing the capacity index data in the preset database according to the time sequence of the corresponding preset time, it is beneficial to the execution of subsequent capacity query, trend prediction and other services.
[0056] The capacity trend prediction model may include an existing machine learning model with time series data prediction function. The historical capacity index data may be obtained as a sample set to construct and update the capacity trend prediction model. Accordingly, the capacity index data of the solid-state disk stored in time series corresponding to the solid-state disk may be predicted by the newly constructed capacity trend prediction model to predict the capacity index data of the solid-state disk within a preset time range (e.g., the next 15 days, 30 days, etc.).
[0057] The predicted capacity index data can also be stored in a preset database. By predicting the trend of capacity index data, it is not only convenient to optimize and manage the upper-layer applications of the SSD, thereby improving performance, but also provides a reference for the optimization strategy of balanced capacity usage, reduces failures caused by uneven capacity usage, and extends the service life of the SSD.
[0058] In some optional embodiments, before obtaining the original information of the unit logical area at the preset moment, it may also include: configuring and storing the preset threshold in response to a first configuration instruction of the preset threshold; wherein the stored preset threshold is updated based on each of the capacity indicator data stored in sequence.
[0059] The solid state disk capacity monitoring device may also provide a user interface (such as an interface written based on HTML), and may receive a first configuration instruction of a preset threshold through a first interface in the user interface, and may store the configured preset threshold in a preset database. In addition, if a preset threshold has been stored in the preset database, the stored preset threshold may be replaced by the newly configured preset threshold; or the newly configured preset threshold may be stored while retaining the stored preset threshold.
[0060] The solid state disk capacity monitoring device can also automatically update the stored preset threshold value based on the sequentially stored capacity indicator data in response to a preset trigger, thereby ensuring the timeliness and accuracy of the alarm. The preset trigger can be set according to the application scenario, for example, it can include every second preset time interval, or it can include the alarm frequency being less than the preset frequency, etc., which are not exhaustive here.
[0061] In some optional implementations, the solid-state disk capacity monitoring method may further include: when the result of the capacity monitoring includes a capacity alarm, storing log data of the capacity alarm; wherein the alarm rule corresponding to the capacity alarm is pre-configured and stored based on a second configuration instruction.
[0062] The results of capacity monitoring may include capacity alarm and normal capacity. The capacity alarm refers to the situation where the solid-state disk alarm is issued through the preset alarm method; the normal capacity refers to the situation where the solid-state disk alarm is not issued. By storing the log data of the capacity alarm in the preset database in the case of a capacity alarm, it is possible to locate the unit logical area and / or solid-state disk with insufficient storage space, balance the use of storage space, and reduce data writing failures.
[0063] The alarm rules corresponding to the capacity alarm may include, but are not limited to, preset alarm methods and communication accounts corresponding to the preset alarm methods. The second configuration instruction of the alarm rules may be received through the second interface in the user interface, and the configured alarm rules may be stored in the preset database. If the alarm rules are already stored in the preset database, the stored alarm rules may be replaced by the newly configured alarm rules; or the newly configured alarm rules may be stored while retaining the stored alarm rules.
[0064] By storing rule parameters such as preset thresholds and alarm rules in the capacity monitoring process in a preset database, it is beneficial to configure the preset thresholds and alarm rules in situations such as cold start, so that the monitoring method can be executed normally.
[0065] In some optional implementations, the solid state disk capacity monitoring method may further include: storing the original information and / or sub-capacity indicator data along with the corresponding capacity indicator data.
[0066] In these optional implementations, in addition to storing the capacity indicator data in a preset database in a time series, the original information and / or sub-capacity indicator data used to process the capacity indicator data can also be stored in the preset database in a time series along with the corresponding capacity indicator data. By storing the original information and / or sub-capacity indicator data, it is helpful to repair the capacity indicator data in abnormal situations such as loss or damage of the capacity indicator data, thereby improving the robustness of capacity monitoring.
[0067] In some optional embodiments, the SSD capacity monitoring method may further include: receiving a display mode and a display dimension; wherein the display mode includes at least one of the following: a SSD mode, a device mode, and a device cluster mode; the display dimension includes at least one of the following: a time interval dimension, a characteristic value dimension, and a capacity trend prediction dimension; processing the stored capacity indicator data according to the display mode and the display dimension, and visually displaying the processing results through a preset display method.
[0068] The display mode and display dimension may be received through a third interface in the user interface.
[0069] Among them, the display mode can represent the aggregation dimension of capacity indicator data. When the display mode is SSD mode, the capacity indicator data can be displayed with SSD as the aggregation dimension; when the display mode is device mode, the capacity indicator data of each SSD deployed on the device can be summarized and displayed with device as the aggregation dimension; when the display mode is device cluster mode, the capacity indicator data of each device deployed in the cluster can be summarized and displayed with device cluster as the aggregation dimension.
[0070] Among them, the display dimension can represent the data that needs to be displayed in the capacity indicator data within the aggregation dimension. Among them, when the display dimension includes the time interval dimension, the historical time interval can be set to filter and display the capacity indicator data within the historical time interval. Among them, the characteristic value of the capacity indicator data can include at least one of the following: peak value, mean value and minimum value, etc. When the display dimension includes the characteristic value dimension, the characteristic value of the capacity indicator data within the default time interval or the set historical event interval can be determined and displayed. Among them, when the display dimension includes the capacity trend prediction dimension, the capacity indicator data predicted based on the stored capacity indicator data can be displayed. In addition, the display dimension can also include the capacity alarm dimension, and when the display dimension includes the capacity alarm dimension, the capacity indicator data that triggers an alarm within the default time interval or the set historical event interval can be displayed separately.
[0071] Among them, the solid-state disk capacity monitoring device can perform relevant processing (such as screening, calculation, etc.) on the stored capacity indicator data, capacity alarm log data and predicted capacity indicator data according to the received display mode and display dimension, and can display the processed data in the fourth interface of the user interface according to preset graphics, tables or views to achieve visual display.
[0072] In these optional implementations, the stored data is processed and visualized based on the display mode and display dimension, which can more intuitively present the capacity usage of the solid state drive and improve the user experience.
[0073] The embodiment of the present invention describes the data storage in detail based on the above embodiment. By storing capacity indicator data in time series, it is convenient for subsequent capacity query, trend prediction and other business executions; by storing the log data of capacity alarm, it is possible to locate the unit logical area and / or solid-state disk with insufficient storage space, balance the use of storage space, and reduce data writing failures; by using the rule parameters in the storage capacity monitoring process, it is convenient for the normal execution of the monitoring method in situations such as cold start. In addition, the embodiment of the present invention and the solid-state disk capacity monitoring method proposed in the above embodiment belong to the same inventive concept, and the technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0074] Figure 3 The structural schematic diagram of a solid-state disk capacity monitoring device provided by an embodiment of the present invention is shown. The embodiment of the present invention can be applied to the case of monitoring the capacity of a ZNS NVMe SSD solid-state disk under a Linux operating system. The solid-state disk capacity monitoring device provided by the present invention can implement the solid-state disk capacity monitoring method provided by the above embodiment.
[0075] like Figure 3 As shown, the solid state disk capacity monitoring device in the embodiment of the present invention may include:
[0076] The acquisition module 310 is used to acquire original information of the unit logical area at a preset time, and determine the capacity index data of the solid state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid state disk into a preset size;
[0077] The monitoring module 320 is used to monitor the capacity of the solid state disk according to the capacity indicator data and the preset threshold value.
[0078] In some optional implementations, the acquisition module may be used to:
[0079] Performing preset processing on the original information to obtain sub-capacity indicator data of the unit logical area; wherein the preset processing includes: base conversion processing, capacity calculation processing and preset capacity unit formatting processing;
[0080] According to the sub-capacity index data, capacity index data of the solid state disk is determined.
[0081] In some optional implementations, the monitoring module may be used to:
[0082] Determine capacity utilization rate based on capacity indicator data;
[0083] When the capacity usage reaches a preset threshold, a capacity alarm is issued to the solid state drive through a preset alarm method.
[0084] In some optional implementations, the solid state disk capacity monitoring device may further include:
[0085] A database module, used to store the capacity indicator data in a time sequence corresponding to the preset moments;
[0086] A prediction module, configured to predict the capacity indicator data within a preset time range according to the sequentially stored capacity indicator data by using a capacity trend prediction model;
[0087] Correspondingly, the database module can also be used to store the predicted capacity indicator data.
[0088] In some optional implementations, the solid state disk capacity monitoring device may further include:
[0089] The user interface module can be used to configure and store the preset threshold in response to a first configuration instruction of the preset threshold; wherein the stored preset threshold is updated based on each of the capacity indicator data stored in sequence.
[0090] In some optional implementations, the database module may also be used to store log data of the capacity alarm when the result of the capacity monitoring includes a capacity alarm; wherein the alarm rule corresponding to the capacity alarm is pre-configured and stored based on the second configuration instruction.
[0091] In some optional implementations, the user interface module may also be used to:
[0092] Receive a display mode and a display dimension; wherein the display mode includes at least one of the following: a solid state disk mode, a device mode, and a device cluster mode; and the display dimension includes at least one of the following: a time interval dimension, a feature value dimension, and a capacity trend prediction dimension;
[0093] The stored capacity indicator data is processed according to the display mode and display dimension, and the processing result is visualized through a preset display method.
[0094] The solid-state disk capacity monitoring device provided in the embodiment of the present invention belongs to the same inventive concept as the solid-state disk capacity monitoring method provided in the above embodiment. The technical details not fully described in the embodiment of the present invention can be referred to the above embodiment, and the embodiment of the present invention has the same beneficial effects as the above embodiment.
[0095] Figure 4 The structural schematic diagram of a solid-state disk capacity monitoring system provided by an embodiment of the present invention is shown. The embodiment of the present invention can be applied to the case of monitoring the capacity of a ZNS NVMe SSD solid-state disk under a Linux operating system. The solid-state disk capacity monitoring system provided by the present invention can implement the solid-state disk capacity monitoring method provided by the above embodiment.
[0096] like Figure 4 As shown, the solid-state disk capacity monitoring system in the embodiment of the present invention may include a device side and a server side; the device side may include a collector 410; the server side may include a gateway 420 and a task engine 430;
[0097] The collector 410 may be used to obtain original information of a unit logical area at a preset time, and determine the capacity index data of the solid state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid state disk into a preset size;
[0098] The gateway 420 may be used to receive the capacity indicator data sent by the collector 410;
[0099] The task engine 430 may be used to monitor the capacity of the solid state disk according to the capacity indicator data and the preset threshold value.
[0100] The collector can serialize the capacity indicator data into a string, such as a JSON string, and push the serialized capacity indicator data to the gateway via the Hypertext Transfer Protocol (HTTP) or other methods. The gateway can send the capacity indicator data to the task engine via the Remote Procedure Call (RPC) protocol or other methods.
[0101] In some optional implementations, the collector may be used to:
[0102] Performing preset processing on the original information to obtain sub-capacity indicator data of the unit logical area; wherein the preset processing includes: base conversion processing, capacity calculation processing and preset capacity unit formatting processing;
[0103] According to the sub-capacity index data, capacity index data of the solid state disk is determined.
[0104] In some optional implementations, the task engine may be used to:
[0105] Determine capacity utilization rate based on capacity indicator data;
[0106] When the capacity usage reaches a preset threshold, a capacity alarm is issued to the solid state drive through a preset alarm method.
[0107] In some optional implementations, the server side may further include:
[0108] A database is used to store capacity indicator data in a time sequence corresponding to a preset moment;
[0109] The task engine can also be used to predict the capacity indicator data within a preset time range based on the capacity indicator data stored in sequence through the capacity trend prediction model;
[0110] Correspondingly, the database can also be used to store the predicted capacity indicator data.
[0111] Among them, the task engine can send the capacity indicator data to the database in time series through the RPC protocol and other methods to achieve time series storage of the capacity indicator data.
[0112] In some optional implementations, the solid state disk capacity monitoring system may further include:
[0113] The user interface can be used to configure and store the preset threshold in response to the first configuration instruction of the preset threshold; wherein the stored preset threshold is updated based on the capacity indicator data stored in sequence. In some optional implementations, the database can also be used to:
[0114] The original information and / or sub-capacity indicator data are stored along with the corresponding capacity indicator data.
[0115] In some optional implementations, the database may also be used to:
[0116] In the case where the result of the capacity monitoring includes a capacity alarm, the log data of the capacity alarm is stored; wherein the alarm rule corresponding to the capacity alarm is pre-configured and stored based on the second configuration instruction.
[0117] In some optional implementations, the user interface may also be used to:
[0118] Receive a display mode and a display dimension; wherein the display mode includes at least one of the following: a solid state disk mode, a device mode, and a device cluster mode; and the display dimension includes at least one of the following: a time interval dimension, a feature value dimension, and a capacity trend prediction dimension;
[0119] The stored capacity indicator data is processed according to the display mode and display dimension, and the processing results are visualized through a preset display method.
[0120] In addition, the display dimension may also include a capacity alarm dimension; accordingly, the user interface may process the stored log data according to the display mode and the capacity alarm dimension, and visualize the processing results through a preset display method.
[0121] The user interface in the solid state disk capacity monitoring system may be used to provide the first interface, the second interface, the third interface and the fourth interface mentioned above.
[0122] It can be understood that the solid-state disk capacity monitoring system provided in the embodiment of the present invention and the solid-state disk capacity monitoring device provided in the above-mentioned embodiment can be divided into modules based on different division methods, but both can implement the solid-state disk capacity monitoring method provided in the above-mentioned embodiment. Among them, each module in the solid-state disk capacity monitoring system and each module in the solid-state disk capacity monitoring device can have an inclusion relationship. For example, the collector on the device side of the system can include the acquisition module in the device; the task engine on the server side of the system can include the monitoring module, prediction module and adjustment module in the device; the database on the server side of the system can include the database module in the device; the user interface on the server side of the system can include the user interface module in the device. In addition, the system may also include other modules, such as Figure 4 As shown, the server side can also provide a service interface, which can be used to establish data communication between the user interface and the database. The user interface and the service interface can communicate via HTTP.
[0123] The solid-state disk capacity monitoring system provided in the embodiment of the present invention belongs to the same inventive concept as the solid-state disk capacity monitoring method provided in the above embodiment. The technical details not fully described in the embodiment of the present invention can be referred to the above embodiment, and the embodiment of the present invention has the same beneficial effects as the above embodiment.
[0124] Figure 5 The hardware structure diagram of a terminal device provided by an embodiment of the present invention is shown. The terminal device in the embodiment of the present invention may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0125] like Figure 5 As shown, the terminal device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the terminal device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0126] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the terminal device 500 to communicate with other devices wirelessly or by wire to exchange data. Figure 5 The terminal device 500 is shown as having various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0127] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above functions defined in the method for monitoring the capacity of a client or solid-state disk provided in the embodiment of the present invention are executed.
[0128] The terminal provided in the embodiment of the present invention and the solid-state disk capacity monitoring method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in the embodiment of the present invention can be referred to the above embodiment, and the embodiment of the present invention has the same beneficial effects as the above embodiment.
[0129] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for monitoring the capacity of a client or a solid-state disk provided in the above embodiment is implemented.
[0130] It should be noted that the computer-readable storage medium in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory (FLASH), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In an embodiment of the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0131] In some embodiments, the client and server may communicate using any currently known or future developed network protocol such as HTTP, and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0132] The computer-readable storage medium may be included in the terminal device, or may exist independently without being installed in the terminal device.
[0133] The terminal device stores and carries one or more programs. When the one or more programs are executed by the terminal device, the terminal device:
[0134] The original information of the unit logical area at a preset time is obtained, and the capacity index data of the solid-state disk is determined based on the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid-state disk into a preset size; and the capacity of the solid-state disk is monitored based on the capacity index data and the preset threshold.
[0135] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0136] The embodiments of the present disclosure also provide a computer program product, including a computer program, which, when executed by a processor, can implement a solid-state disk capacity monitoring method as provided in any embodiment of the present disclosure.
[0137] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code for the disclosed operation, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0138] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the function pages marked in the square box can occur in a different order from the order marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] The units involved in the embodiments of the present invention may be implemented by software or hardware, wherein the name of a unit does not limit the unit itself in some cases.
[0140] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0141] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for monitoring the capacity of a solid state disk, characterized in that: include: Acquire original information of a unit logical area at a preset time, and determine capacity index data of the solid-state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid-state disk into a preset size; The capacity of the solid state disk is monitored according to the capacity indicator data and a preset threshold.
2. The method according to claim 1, characterized in that The determining the capacity index data of the solid state disk according to the original information includes: Performing preset processing on the original information to obtain sub-capacity indicator data of the unit logical area; wherein the preset processing includes: base conversion processing, capacity calculation processing and preset capacity unit formatting processing; The capacity index data of the solid state disk is determined according to the sub-capacity index data.
3. The method according to claim 1, characterized in that The step of monitoring the capacity of the solid state disk according to the capacity indicator data and a preset threshold value includes: Determine the capacity utilization rate according to the capacity indicator data; When the capacity usage rate reaches the preset threshold, a capacity alarm is issued to the solid state disk in a preset alarm manner.
4. The method according to claim 1, characterized in that Also includes: The capacity index data is stored in a time sequence corresponding to the preset time; By using a capacity trend prediction model, predicting the capacity indicator data within a preset time range according to each of the capacity indicator data stored in sequence; The predicted capacity indicator data is stored.
5. The method according to claim 4, characterized in that Before obtaining the original information of the unit logical area at the preset time, the method further includes: In response to a first configuration instruction of the preset threshold, the preset threshold is configured and stored; wherein the stored preset threshold is updated based on each of the capacity indicator data stored in sequence.
6. The method according to claim 1, characterized in that Also includes: In the case where the result of the capacity monitoring includes a capacity alarm, the log data of the capacity alarm is stored; wherein the alarm rule corresponding to the capacity alarm is pre-configured and stored based on the second configuration instruction.
7. The method according to claim 4, characterized in that Also includes: Receive a display mode and a display dimension; wherein the display mode includes at least one of the following: a solid state disk mode, a device mode, and a device cluster mode; and the display dimension includes at least one of the following: a time interval dimension, a feature value dimension, and a capacity trend prediction dimension; The stored capacity indicator data is processed according to the display mode and display dimension, and the processing result is visually displayed in a preset display method.
8. A solid state disk capacity monitoring device, characterized in that: include: An acquisition module, used to acquire original information of a unit logical area at a preset time, and determine the capacity index data of the solid state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid state disk into a preset size; A monitoring module is used to monitor the capacity of the solid state disk according to the capacity indicator data and a preset threshold.
9. A solid state disk capacity monitoring system, characterized in that: It includes a device side and a server side; the device side includes a collector; the server side includes a gateway and a task engine; The collector is used to obtain the original information of the unit logical area at a preset time, and determine the capacity index data of the solid state disk according to the original information; wherein the unit logical area includes an area obtained by dividing the logical address space in the solid state disk into a preset size; The gateway is used to receive the capacity indicator data sent by the collector; The task engine is used to monitor the capacity of the solid state disk according to the capacity indicator data and a preset threshold.
10. A terminal device, characterized in that: The terminal comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the solid-state disk capacity monitoring method as described in any one of claims 1-7.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the solid-state disk capacity monitoring method as described in any one of claims 1-7 is implemented.
12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the solid state disk capacity monitoring method as claimed in any one of claims 1 to 7.