CN112379832B - Storage medium detection method and device - Google Patents
Storage medium detection method and device Download PDFInfo
- Publication number
- CN112379832B CN112379832B CN202011225105.9A CN202011225105A CN112379832B CN 112379832 B CN112379832 B CN 112379832B CN 202011225105 A CN202011225105 A CN 202011225105A CN 112379832 B CN112379832 B CN 112379832B
- Authority
- CN
- China
- Prior art keywords
- storage medium
- detection
- index
- health index
- health
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0653—Monitoring storage devices or systems
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B20/00—Signal processing not specific to the method of recording or reproducing; Circuits therefor
- G11B20/10—Digital recording or reproducing
- G11B20/18—Error detection or correction; Testing, e.g. of drop-outs
- G11B20/1816—Testing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Signal Processing (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Debugging And Monitoring (AREA)
Abstract
本申请提供一种存储介质检测方法和装置。本申请中,根据检测请求所指示的检测指标来对存储介质检测,其中检测指标包括:存储介质的使用情况、和/或存储介质的槽位连接情况、和/或已记录的所述存储介质发生的历史事件情况。由此,本申请新增了多项检测指标,可以更加全面地对存储介质进行检测。此外,本申请将各项检测指标对应的存储介质的参数值先转成量化信息,然后再综合起来得到健康指数,进而可以更加全面且直观地评估存储介质是否处于异常状态,使得用户可以及时进行处理,避免存储介质严重损坏而导致数据丢失等问题。
The present application provides a storage medium detection method and device. In this application, the storage medium is detected according to the detection index indicated by the detection request, wherein the detection index includes: the use of the storage medium, and/or the slot connection of the storage medium, and/or the recorded storage medium historical events that have occurred. Therefore, the present application adds a number of detection indicators, which can detect the storage medium more comprehensively. In addition, this application first converts the parameter values of the storage medium corresponding to various detection indicators into quantitative information, and then combines them to obtain a health index, which can then more comprehensively and intuitively evaluate whether the storage medium is in an abnormal state, so that users can timely carry out To avoid problems such as data loss caused by serious damage to the storage medium.
Description
技术领域technical field
本申请涉及存储领域,尤其涉及存储介质检测方法和装置。The present application relates to the field of storage, in particular to a storage medium detection method and device.
背景技术Background technique
存储介质是指存储数据的载体,例如硬盘、软盘、光盘、闪存等。存储介质是电子设备中重要的元件。在电子设备的日常使用中,存储介质可能会发生各种异常事件,例如读写数据超时等。其中,有些异常是外部原因导致的,例如人为造成的电子设备振动;有些异常是存储介质本身的故障导致的,例如硬盘出现坏道等。A storage medium refers to a carrier for storing data, such as a hard disk, a floppy disk, an optical disk, and a flash memory. Storage media are important components in electronic devices. In the daily use of electronic devices, various abnormal events may occur on the storage medium, such as reading and writing data overtime. Among them, some abnormalities are caused by external factors, such as human-caused vibrations of electronic equipment;
对于用户而言,很难察觉存储介质轻微的异常,而如果完全忽略这些异常,一旦存储介质出现严重损坏甚至数据丢失,会带来较大的损失。For users, it is difficult to detect slight abnormalities of the storage medium, and if these abnormalities are completely ignored, once the storage medium is seriously damaged or even data is lost, it will bring greater losses.
发明内容Contents of the invention
有鉴于此,本申请提供一种存储介质检测方法和装置。In view of this, the present application provides a storage medium detection method and device.
具体地,本申请是通过如下技术方案实现的:Specifically, this application is achieved through the following technical solutions:
根据本申请实施例的第一方面,提供一种存储介质检测方法,所述方法包括:According to a first aspect of an embodiment of the present application, a method for detecting a storage medium is provided, the method comprising:
接收对存储介质的检测请求;依据所述检测请求中的各项检测指标,确定与各检测指标对应的所述存储介质的参数值;所述检测指标至少包括:存储介质的使用情况、和/或存储介质的槽位连接情况、和/或已记录的所述存储介质发生的历史事件情况;Receive a detection request for a storage medium; determine the parameter values of the storage medium corresponding to each detection index according to each detection index in the detection request; the detection index includes at least: the usage of the storage medium, and/or Or the slot connection of the storage medium, and/or the recorded historical events of the storage medium;
依据各检测指标对应的所述存储介质的参数值,确定各检测指标对应的所述存储介质的量化信息;Determine the quantitative information of the storage medium corresponding to each detection index according to the parameter value of the storage medium corresponding to each detection index;
基于各检测指标对应的所述存储介质的量化信息,确定所述存储介质的健康指数,当所述健康指数小于或等于设定健康指数阈值,则确定所述存储介质异常。Determine the health index of the storage medium based on the quantitative information of the storage medium corresponding to each detection index, and determine that the storage medium is abnormal when the health index is less than or equal to a set health index threshold.
根据本申请实施例的第二方面,提供一种存储介质检测装置,所述装置包括:According to a second aspect of the embodiments of the present application, there is provided a storage medium detection device, the device comprising:
指标确定单元,用于接收对存储介质的检测请求;依据所述检测请求中的各项检测指标,确定与各检测指标对应的所述存储介质的参数值;所述检测指标至少包括:存储介质的使用情况、和/或存储介质的槽位连接情况、和/或已记录的所述存储介质发生的历史事件情况;An index determination unit, configured to receive a detection request for a storage medium; determine the parameter values of the storage medium corresponding to each detection index according to each detection index in the detection request; the detection index includes at least: a storage medium usage, and/or slot connection of the storage medium, and/or recorded historical events of the storage medium;
信息确定单元,用于依据各检测指标对应的所述存储介质的参数值,确定各检测指标对应的所述存储介质的量化信息;An information determination unit, configured to determine the quantitative information of the storage medium corresponding to each detection index according to the parameter value of the storage medium corresponding to each detection index;
异常确定单元,用于基于各检测指标对应的所述存储介质的量化信息,确定所述存储介质的健康指数,当所述健康指数小于或等于设定健康指数阈值,则确定所述存储介质异常。An abnormality determination unit, configured to determine the health index of the storage medium based on the quantitative information of the storage medium corresponding to each detection index, and determine that the storage medium is abnormal when the health index is less than or equal to a set health index threshold .
根据本申请实施例的第三方面,提供一种电子设备,包括:According to a third aspect of the embodiments of the present application, an electronic device is provided, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器通过运行所述可执行指令以实现如上述第一方面所述的方法。Wherein, the processor implements the method described in the first aspect above by running the executable instruction.
根据本申请实施例的第四方面,提供计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面所述方法的步骤。According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program described in the above-mentioned first aspect is implemented. method steps.
本申请中,可以根据检测请求所指示的检测指标来对存储介质检测,本申请中的检测指标包括:存储介质的使用情况、和/或存储介质的槽位连接情况、和/或已记录的所述存储介质发生的历史事件情况。由此,本申请新增了多项检测指标,可以更加全面地对存储介质进行检测。此外,本申请将各项检测指标对应的存储介质的参数值先转成量化信息,然后再综合起来得到健康指数,进而可以更加全面且直观地评估存储介质是否处于异常状态,使得用户可以及时进行处理,避免存储介质严重损坏而导致数据丢失等问题。In this application, the storage medium can be detected according to the detection index indicated by the detection request. The detection index in this application includes: the use of the storage medium, and/or the slot connection of the storage medium, and/or the recorded Historical event conditions that occur on the storage medium. Therefore, the present application adds a number of detection indicators, which can detect the storage medium more comprehensively. In addition, this application first converts the parameter values of the storage medium corresponding to various detection indicators into quantitative information, and then combines them to obtain a health index, which can then more comprehensively and intuitively evaluate whether the storage medium is in an abnormal state, so that users can timely carry out To avoid problems such as data loss caused by serious damage to the storage medium.
附图说明Description of drawings
图1是本申请一示例性实施例示出的一种存储介质检测方法的流程示意图。Fig. 1 is a schematic flowchart of a method for detecting a storage medium shown in an exemplary embodiment of the present application.
图2是本申请一示例性实施例示出的另一种存储介质检测方法的流程示意图。Fig. 2 is a schematic flowchart of another storage medium detection method shown in an exemplary embodiment of the present application.
图3是本申请一示例性实施例示出的另一种存储介质检测方法的流程示意图。Fig. 3 is a schematic flowchart of another storage medium detection method shown in an exemplary embodiment of the present application.
图4是本申请一示例性实施例示出的一种拟合曲线的示意图。Fig. 4 is a schematic diagram of a fitting curve shown in an exemplary embodiment of the present application.
图5是本申请一示例性实施例示出的一种用于存储介质检测的一结构示意图。Fig. 5 is a schematic structural diagram for storage medium detection according to an exemplary embodiment of the present application.
图6是本申请一示例性实施例示出的一种存储介质检测装置的框图。Fig. 6 is a block diagram of an apparatus for detecting a storage medium according to an exemplary embodiment of the present application.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present application as recited in the appended claims.
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in this application is for the purpose of describing particular embodiments only, and is not intended to limit the application. As used in this application and the appended claims, the singular forms "a", "the", and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of the present application, first information may also be called second information, and similarly, second information may also be called first information. Depending on the context, the word "if" as used herein may be interpreted as "at" or "when" or "in response to a determination."
现有的电子设备中,通常可以根据读写响应时间、温度等指标来检测存储介质,若检测到存储介质的某项指标超过预设标准范围,则认为存储介质存在异常并发出告警。In existing electronic equipment, the storage medium can usually be detected according to indicators such as read and write response time and temperature. If a certain indicator of the storage medium is detected to exceed the preset standard range, it is considered that the storage medium is abnormal and an alarm is issued.
然而,这种检测方式还存在一些问题。一方面,现有的读写时间、温度等检测指标比较片面,不能完全反应出存储介质的健康状态;另一方面,目前通常只能基于单个指标来进行提示,例如提示温度过高、读写时间较长等,而并不能将存储介质的多个检测指标结合起来进行全面的评估,进而使得用户无法根据全面评估的情况来针对性的对存储介质进行处理。However, there are still some problems with this detection method. On the one hand, the existing detection indicators such as reading and writing time and temperature are relatively one-sided and cannot fully reflect the health status of the storage medium; It takes a long time, etc., but it is not possible to combine multiple detection indicators of the storage medium to make a comprehensive evaluation, so that the user cannot perform targeted processing on the storage medium according to the comprehensive evaluation situation.
有鉴于此,本发明实施例提供了一种存储介质检测的方法。In view of this, an embodiment of the present invention provides a storage medium detection method.
参见图1,图1为本申请一示例性实施例示出的一种存储介质检测的方法的流程示意图。如图1所示,该流程可包括以下步骤:Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a method for detecting a storage medium according to an exemplary embodiment of the present application. As shown in Figure 1, the process may include the following steps:
步骤S101:接收对存储介质的检测请求;依据所述检测请求中的各项检测指标,确定与各检测指标对应的所述存储介质的参数值;所述检测指标至少包括:存储介质的使用情况、和/或存储介质的槽位连接情况、和/或已记录的所述存储介质发生的历史事件情况。Step S101: Receive a detection request for the storage medium; determine the parameter value of the storage medium corresponding to each detection index according to each detection index in the detection request; the detection index includes at least: the use of the storage medium , and/or slot connections of the storage medium, and/or recorded historical events that occurred on the storage medium.
本实施例中,存储介质可以是电子设备中用于存储数据的元件,例如硬盘、软盘等。其中,电子设备可以是服务器、PC机、移动终端等,电子设备中可以包括一种或多种存储介质,本实施例不进行限定。In this embodiment, the storage medium may be a component used to store data in an electronic device, such as a hard disk, a floppy disk, and the like. Wherein, the electronic device may be a server, a PC, a mobile terminal, etc., and the electronic device may include one or more storage media, which is not limited in this embodiment.
本实施例中,可以通过存储介质所在的电子设备来对该存储介质进行检测。举例来说,响应于用户下发的检测请求,电子设备该检测请求所指示的存储介质进行检测。In this embodiment, the storage medium may be detected through the electronic device where the storage medium is located. For example, in response to a detection request issued by the user, the electronic device detects the storage medium indicated by the detection request.
本实施例中,检测请求可以是周期性执行的。举例来说,用户下发的检测请求中,可以包括检测周期,例如1天、1周等,电子设备从接收到请求开始,每经过一个检测周期,对该存储介质进行检测。In this embodiment, the detection request may be performed periodically. For example, the detection request issued by the user may include a detection period, such as 1 day, 1 week, etc., and the electronic device detects the storage medium every time a detection period passes after receiving the request.
本实施例中,检测请求中可以包括指定的待检测存储介质和检测指标。In this embodiment, the detection request may include a designated storage medium to be detected and a detection indicator.
在一个实施例中,待检测存储介质和检测指标可以由用户自主选择确定,例如用户可以通过电子设备的可视化界面选择需要进行检测的存储介质、以及选择需要检测的检测指标。In one embodiment, the storage medium to be detected and the detection index can be determined by the user's own choice, for example, the user can select the storage medium to be detected and the detection index to be detected through the visual interface of the electronic device.
本实施例中,检测指标是可以用于评价存储介质健康情况的指标。在一个例子中,检测请求中的检测指标包括以下至少一项:存储介质的使用情况、存储介质的槽位连接情况、已记录的所述存储介质发生的历史事件情况。In this embodiment, the detection index is an index that can be used to evaluate the health status of the storage medium. In an example, the detection index in the detection request includes at least one of the following: usage of the storage medium, connection of slots of the storage medium, and recorded historical events of the storage medium.
下面对上述检测指标进行具体介绍。The above-mentioned detection indicators are introduced in detail below.
存储介质的使用情况:指存储介质在系统运行过程中的使用情况,包括性能参数等,可以通过存储介质所在电子设备的软件系统来查看。例如可以是以下多个指标中的一个或多个:驱动超时时间,踢盘次数,修复次数,读写超时次数等。Usage of the storage medium: refers to the usage of the storage medium during system operation, including performance parameters, etc., which can be viewed through the software system of the electronic device where the storage medium is located. For example, it may be one or more of the following multiple indicators: drive timeout period, disk kick times, repair times, read and write timeout times, and the like.
存储介质的槽位链路情况:指存储介质与电子设备进行连接的链路的情况,可选的,可以根据存储介质所在槽位的链路异常次数来指示。需要说明的是,由于电子设备中槽位通过物理接口、内部连接线等与硬盘一一连接,因而,可以通过电子设备来检测槽位的通信错误次数来表示槽位的链路异常次数。The slot link status of the storage medium: refers to the status of the link connecting the storage medium and the electronic device. Optionally, it can be indicated according to the number of link abnormalities in the slot where the storage medium is located. It should be noted that since the slots in the electronic device are connected to the hard disks one by one through physical interfaces, internal connecting wires, etc., the number of communication errors of the slots can be detected by the electronic device to represent the number of link abnormalities of the slots.
已记录的所述存储介质发生的历史事件情况:指存储介质中发生的事件。其中,发生的事件可以是存储介质内部发生的每一个事件、或者也可以为存储介质预先设置的事件。预设事件根据应用场景的不同进行确定,举例来说,预设事件可以是存储介质的迁移。Recorded historical events occurring in the storage medium: refer to events occurring in the storage medium. Wherein, the event that occurs may be every event that occurs inside the storage medium, or may also be an event preset for the storage medium. The preset event is determined according to different application scenarios. For example, the preset event may be the migration of the storage medium.
本实施例中,在读写时间、温度等基础检测指标的基础上,新增了多项检测指标,可以根据存储介质的实际情况来选择检测指标。本申请实施例可以更加全面的对存储介质进行检测,尽可能多地覆盖发生异常的原因,可以更全面地反映出存储介质的健康状态。In this embodiment, on the basis of basic detection indicators such as reading and writing time and temperature, multiple detection indicators are added, and the detection indicators can be selected according to the actual situation of the storage medium. The embodiment of the present application can detect the storage medium more comprehensively, cover as many causes of abnormalities as possible, and reflect the health status of the storage medium more comprehensively.
在一个例子中,检测指标还可以包括其他指标,例如可以包括硬盘自身属性、全面检测结果等。In an example, the detection indicator may also include other indicators, for example, it may include attributes of the hard disk itself, comprehensive detection results, and the like.
其中,硬盘自身属性,指硬盘的固有属性,可以通过读取硬盘中传感器和设定的固件程序计数器等来进行获取。例如可以是以下多个指标中的一个或多个:硬盘缓存大小、转速、硬盘容量、硬盘温度、上电时间、冲击震动、软硬复位。Wherein, the property of the hard disk itself refers to the inherent property of the hard disk, which can be obtained by reading the sensor in the hard disk and the set firmware program counter. For example, it may be one or more of the following multiple indicators: hard disk cache size, rotational speed, hard disk capacity, hard disk temperature, power-on time, impact vibration, soft and hard reset.
全面检测结果,指通过专用的全面检测工具所检测到的硬盘参数,该全面检测工具一般与硬盘类型相对应的软件程序,电子设备可以加载该全面检测工具,然后通过执行该软件程序来检测磁盘。可选地,包括如下检测指标:硬盘振动参数、硬盘磁头的旋转偏移参数、以及硬盘碟面的旋转偏移参数。Comprehensive testing results refer to hard disk parameters detected by a dedicated comprehensive testing tool. The comprehensive testing tool is generally a software program corresponding to the type of hard disk. Electronic equipment can load the comprehensive testing tool and then test the disk by executing the software program. . Optionally, the following detection indicators are included: hard disk vibration parameters, hard disk head rotation offset parameters, and hard disk disk surface rotation offset parameters.
需要说明的是,针对不同的存储介质,可以包括不同的检测指标,针对相同的检测指标也可以有不同的检测方法,这里只是示例性说明,并不是具体限定。It should be noted that, for different storage media, different detection indicators may be included, and for the same detection indicator, different detection methods may also be used, and this is only an illustration, not a specific limitation.
本实施例中,针对检测请求中所包含的各项检测指标,可以分别确定各检测指标对应的所述存储介质的参数值。检测指标不同,确定参数值的方法一般也不同。In this embodiment, for each detection index included in the detection request, the parameter value of the storage medium corresponding to each detection index may be determined respectively. The detection index is different, and the method of determining the parameter value is generally different.
在一个实施例中,对于数量类的参数值,例如“次数”等,可以将预设时长内累计得到的数量作为参数值,其中,可选地,预设时长可以是上一次检测至本次检测的时间段。举例来说,若检测指标为存储介质的使用情况中的读写超时次数,则可以在存储介质所在的软件系统中进行查询,确定上一次检测至今该存储介质的读写超时次数。In one embodiment, for the parameter value of the quantity category, such as "number of times", the accumulated quantity within the preset time period can be used as the parameter value, wherein, optionally, the preset time period can be from the last detection to this time The period of detection. For example, if the detection index is the number of read and write timeouts in the usage of the storage medium, it can be queried in the software system where the storage medium is located to determine the number of read and write timeouts of the storage medium since the last detection.
在一个实施例中,对于非数量类的参数值,例如“超时时间”、“是否发生预设事件”等,可以以当前检测到的结果作为参数值。In one embodiment, for non-quantitative parameter values, such as "timeout time", "whether a preset event occurs", etc., the currently detected result may be used as the parameter value.
当然,这里只是示例性说明,针对不同的检测指标,可以根据实际情况来确定对应的参数值,这里不再赘述。Of course, the description here is only an example. For different detection indicators, the corresponding parameter values can be determined according to the actual situation, and will not be repeated here.
步骤S102:依据各检测指标对应的所述存储介质的参数值,确定各检测指标对应的所述存储介质在该项检测指标上的量化信息。Step S102: According to the parameter value of the storage medium corresponding to each detection index, determine the quantitative information of the storage medium corresponding to each detection index on the detection index.
本实施例中,依据各检测指标对应的存储介质的参数值,可以确定该检测指标对应的量化信息。其中,该量化信息可以指示存储介质在该项检测指标上的健康状态。例如,量化信息可以被视为一个评分,评分越高,表示存储介质在该项检测指标上越健康,异常的概率越低。In this embodiment, the quantitative information corresponding to each detection index can be determined according to the parameter value of the storage medium corresponding to each detection index. Wherein, the quantitative information may indicate the health status of the storage medium on the detection index. For example, quantitative information can be regarded as a score. The higher the score, the healthier the storage medium is on the detection index, and the lower the probability of abnormality.
本实施例中,可以通过如图2所示的方法来存储介质在各项检测指标上的量化信息。如图2所示,包括以下步骤:In this embodiment, the quantitative information of the medium on various detection indicators can be stored through the method shown in FIG. 2 . As shown in Figure 2, it includes the following steps:
步骤S1021:针对每一检测指标,获得已设置的该检测指标对应的量化标准;所述量化标准至少包括该检测指标对应的存储介质参数值与量化信息的对应关系。Step S1021: For each detection index, obtain the set quantification standard corresponding to the detection index; the quantization standard includes at least the corresponding relationship between the storage medium parameter value corresponding to the detection index and the quantification information.
本实施例中,每一检测指标可以对应相同或不同的量化标准。其中,每一检测指标所对应的量化标准中,至少包括该检测指标对应的存储介质参数值与量化信息的对应关系。In this embodiment, each detection indicator may correspond to the same or different quantification standards. Wherein, the quantification standard corresponding to each detection index at least includes the corresponding relationship between the storage medium parameter value corresponding to the detection index and the quantification information.
在一个例子中,量化标准可以是一种标准化的计算方法,可以对存储介质参数值进行标准化计算,进而确定该参数值对应的量化信息。例如,计算方法可以是对参数值进行归一化计算。In an example, the quantization standard may be a standardized calculation method, which may perform standardized calculation on the parameter value of the storage medium, and then determine the quantification information corresponding to the parameter value. For example, the calculation method may be to perform normalized calculation on parameter values.
在一个例子中,量化标准中可以包括若干个参数值范围,且每个参数值范围对应一个量化信息。例如,若参数值属于第一范围,则对应第一量化信息;若参数值属于第二范围,则对应第二量化信息。由此,可以确定每一参数值对应的量化信息。In an example, the quantization standard may include several parameter value ranges, and each parameter value range corresponds to a piece of quantization information. For example, if the parameter value belongs to the first range, it corresponds to the first quantization information; if the parameter value belongs to the second range, it corresponds to the second quantization information. Thus, quantization information corresponding to each parameter value can be determined.
当然,量化标准还可以通过其他方式来指示参数值与量化信息的对应关系,例如,针对已记录的所述存储介质发生的历史事件情况,参数值可以是事件编号,并预设每个事件编号对应的量化信息等。这里只是示例性说明,并不进行限定。Of course, the quantitative standard can also indicate the corresponding relationship between the parameter value and the quantitative information in other ways. For example, for the recorded historical events of the storage medium, the parameter value can be an event number, and each event number can be preset Corresponding quantitative information, etc. The description here is only for illustration and not for limitation.
步骤S1022:在所述量化标准中查找到已确定的该检测指标对应的存储介质参数值所对应的量化信息,将查找到的量化信息确定为该检测指标对应的所述存储介质的量化信息。Step S1022: Find the quantitative information corresponding to the determined storage medium parameter value corresponding to the detection index in the quantitative standard, and determine the found quantitative information as the quantitative information of the storage medium corresponding to the detection index.
本实施例中,针对各检测指标,可以根据该检测指标的量化标准,然后在该量化标准中查找参数值所对应的量化信息。进而,可以将该量化信息作为该项检测指标上存储介质的量化信息。In this embodiment, for each detection index, the quantitative information corresponding to the parameter value may be searched in the quantization standard according to the quantization standard of the detection index. Furthermore, the quantitative information can be used as the quantitative information of the storage medium on the detection index.
本实施例中,每一检测指标中,可以包括若干个子检测指标,例如存储介质的使用情况这一检测指标,可以包括驱动超时时间,踢盘次数,修复次数,读写超时次数等多个具体指标。针对每一检测指标,可以先分别针对其每个子检测指标来确定对应的量化信息,然后将多个子检测指标的量化信息综合,得到该项检测指标对应的量化信息。In this embodiment, each detection index may include several sub-detection indexes, such as the detection index of the usage of the storage medium, which may include multiple specific sub-indexes such as drive timeout time, number of kick disks, number of repairs, number of read and write timeouts, etc. index. For each detection index, the corresponding quantitative information can be determined for each sub-detection index respectively, and then the quantitative information of multiple sub-detection indexes can be integrated to obtain the quantitative information corresponding to the detection index.
本实施例中,参数值可以是具体的数量,例如检测指标为存储介质的使用情况,以存储介质的使用情况具体为读写超时次数为例,量化标准可以次数与量化信息的对应关系。例如,读写超时次数为5次对应量化信息为100,读写超时次数为50对应量化信息为0。In this embodiment, the parameter value can be a specific quantity. For example, the detection indicator is the usage of the storage medium. Taking the usage of the storage medium as the number of read and write timeouts as an example, the quantification standard can be the corresponding relationship between the number of times and the quantification information. For example, 5 reading and writing timeouts correspond to 100 quantization information, and 50 reading and writing timeouts correspond to 0 quantization information.
本实施例中,参数值也可以是比例,例如可以是偏离额定属性的比例。例如检测指标为读写时间,量化标准可以是读写时间超过额定时间的比例与量化信息的对应关系。例如,超过额定时间小于0%对应量化信息为100,超过额定时间20%对应量化信息为70等。In this embodiment, the parameter value may also be a ratio, for example, it may be a ratio that deviates from a rated attribute. For example, the detection index is the reading and writing time, and the quantitative standard may be the corresponding relationship between the ratio of the reading and writing time exceeding the rated time and the quantitative information. For example, less than 0% of the rated time corresponds to 100 quantization information, 20% of the rated time exceeds the corresponding quantization information of 70, and so on.
当然,参数值也可以是其他形式的,这里只是示例性说明,并不进行限定。Certainly, the parameter value may also be in other forms, which are only illustrated here and not limited.
举例来说,量化标准可以通过参数值范围与量化信息的对应关系,来指示参数值与量化信息的对应关系。针对各项检测指标,首先获取该项检测指标对应的量化标准,例如包括3组参数值范围与量化信息的对应关系,如表1所示;然后,确定该项检测指标对应的存储介质的参数值,例如为参数值5;接着,量化标准中查找该参数值所属的参数值范围对应的量化信息,例如在For example, the quantization standard may indicate the correspondence between the parameter value and the quantization information through the correspondence between the parameter value range and the quantization information. For each detection index, first obtain the quantification standard corresponding to the detection index, for example, including the corresponding relationship between three groups of parameter value ranges and quantitative information, as shown in Table 1; then, determine the parameters of the storage medium corresponding to the detection index value, for example, the parameter value 5; then, in the quantization standard, search for the quantification information corresponding to the parameter value range to which the parameter value belongs, for example, in
表1中,可以确定参数值5对应的量化信息为100。In Table 1, it can be determined that the quantization information corresponding to the parameter value 5 is 100.
表1Table 1
步骤S103:基于各检测指标对应的所述存储介质在各项检测指标上的量化信息,确定所述存储介质的健康指数,当所述健康指数小于或等于设定健康指数阈值,则确定所述存储介质异常。Step S103: Determine the health index of the storage medium based on the quantitative information of the storage medium on each detection index corresponding to each detection index, and determine the health index of the storage medium when the health index is less than or equal to the set health index threshold. The storage medium is abnormal.
本实施例中,基于各检测指标对应的存储介质在各项检测指标上的量化信息,可以综合各量化信息得到存储介质的健康指数。In this embodiment, based on the quantitative information of the storage medium corresponding to each detection indicator on each detection indicator, the health index of the storage medium can be obtained by integrating all the quantitative information.
在一个实施例中,可以将各项检测指标上的量化信息的加和或者平均值作为健康指数。In one embodiment, the sum or average of the quantitative information on each detection index can be used as the health index.
在另一个实施例中,可以先确定各项检测指标的权重值,然后基于所述存储介质在各项检测指标上的量化信息和各项检测指标的权重值,确定所述存储介质的健康指数。In another embodiment, the weight value of each detection index can be determined first, and then the health index of the storage medium can be determined based on the quantitative information of the storage medium on each detection index and the weight value of each detection index .
例如,可以分别计算每项检测指标上的权重值与存储介质在该项检测指标上的量化信息的乘积,然后将各项检测指标上得到的乘积相加,得到的加和作为存储介质的健康指数。For example, the product of the weight value of each detection index and the quantitative information of the storage medium on the detection index can be calculated separately, and then the products obtained on each detection index can be added, and the sum obtained can be used as the health of the storage medium index.
举例来说,可以将存储介质的使用情况、存储介质的槽位连接情况、已记录的所述存储介质发生的历史事件情况作为检测指标。针对存储介质的使用情况,假设该检测指标所占的权重值为30%,存储介质的量化信息为100;针对存储介质的槽位连接情况,假设该检测指标所占的权重值为50%,存储介质的量化信息为60;针对已记录的所述存储介质发生的历史事件,假设该检测指标所占的权重值为20%,存储介质的量化信息为60,则可以通过公式100*30%+60*50%+60*20%,确定存储介质的健康指数为72。For example, the usage status of the storage medium, the slot connection status of the storage medium, and the recorded historical events of the storage medium may be used as detection indicators. For the usage of the storage medium, assume that the weight value of the detection index is 30%, and the quantitative information of the storage medium is 100; for the slot connection of the storage medium, assume that the weight value of the detection index is 50%, The quantitative information of the storage medium is 60; for the recorded historical events of the storage medium, assuming that the weight value of the detection indicator is 20%, and the quantitative information of the storage medium is 60, the
本实施例中,健康指数可以指示存储介质的健康状态。一般来说,健康指数越高,表示存储介质越健康,存在异常的概率越低。在一个实施例中,可以预设一个健康指数阈值,当所述健康指数小于或等于设定健康指数阈值,则确定所述存储介质异常。基于此,用户可以直观地获取存储介质当前状态,并及时进行处理。In this embodiment, the health index may indicate the health state of the storage medium. Generally speaking, the higher the health index, the healthier the storage medium and the lower the probability of abnormalities. In an embodiment, a health index threshold may be preset, and when the health index is less than or equal to the set health index threshold, it is determined that the storage medium is abnormal. Based on this, the user can intuitively obtain the current state of the storage medium and process it in time.
至此,完成了图1所示的实施例。根据图1所示实施例,接收对存储介质的检测请求,其中,检测请求所指示的检测指标中,包括:存储介质的使用情况、和/或存储介质的槽位连接情况、和/或已记录的所述存储介质发生的历史事件情况。接收到检测请求后,首先确定与各检测指标对应的存储介质的参数值,然后依据各项检测指标对应的存储介质的参数值,确定各检测指标对应的存储介质的量化信息,继而根据各项检测指标对应的存储介质的量化信息,确定所述存储介质的健康指数。由此,一方面,本实施例在读写时间、温度等基础检测指标的基础上,新增了多项检测指标,可以根据存储介质的实际情况来选择检测指标,可以更加全面地对存储介质进行检测;另一方面,本实施例并不是单一地对每个指标进行评估,而是将多个检测指标综合起来,得到健康指数,进而用户可以根据健康指数来直观地确定存储介质当前是否异常,并及时进行处理。So far, the embodiment shown in FIG. 1 is completed. According to the embodiment shown in FIG. 1, a detection request for a storage medium is received, wherein the detection index indicated by the detection request includes: the use of the storage medium, and/or the slot connection of the storage medium, and/or Recorded historical events that occurred on the storage medium. After receiving the detection request, first determine the parameter value of the storage medium corresponding to each detection index, and then determine the quantitative information of the storage medium corresponding to each detection index according to the parameter value of the storage medium corresponding to each detection index, and then according to each The quantitative information of the storage medium corresponding to the detection index is determined to determine the health index of the storage medium. Therefore, on the one hand, on the basis of basic detection indicators such as reading and writing time and temperature, this embodiment adds a number of detection indicators, which can be selected according to the actual situation of the storage medium, and can more comprehensively monitor the storage medium. On the other hand, this embodiment does not evaluate each indicator individually, but combines multiple detection indicators to obtain a health index, and then the user can intuitively determine whether the storage medium is currently abnormal according to the health index , and deal with it in a timely manner.
本实施例中,基于对存储介质进行检测得到健康指数的基础上,还可以确定存储介质的健康指数变化趋势。下面结合图3来介绍一种确定健康指数变化趋势的方法。In this embodiment, based on the health index obtained by detecting the storage medium, the change trend of the health index of the storage medium may also be determined. A method for determining the changing trend of the health index will be introduced below in conjunction with FIG. 3 .
图3是本申请一示例性实施例示出的另一种存储介质检测方法的流程示意图。如图3所示,包括以下步骤:Fig. 3 is a schematic flowchart of another storage medium detection method shown in an exemplary embodiment of the present application. As shown in Figure 3, the following steps are included:
步骤S301:根据当前确定的所述健康指数、以及已存储的之前确定的历史健康指数,确定所述存储介质的健康指数变化趋势;所述健康指数变化趋势指示健康指数上升、下降或不变。Step S301: Determine the change trend of the health index of the storage medium according to the currently determined health index and the stored previously determined historical health index; the change trend of the health index indicates that the health index increases, decreases or remains unchanged.
步骤S302:若所述健康指数趋势指示健康指数下降,则确定所述存储介质存在异常隐患。Step S302: If the health index trend indicates that the health index is declining, it is determined that there is a potential abnormality in the storage medium.
本实施例中,存储介质所在的系统可以在检测得到健康指数后,对健康指数进行存储。In this embodiment, the system where the storage medium is located may store the health index after detecting the health index.
可选地,存储介质可以周期性的进行检测,例如每间隔2小时检测一次,然后对检测得到的健康指数进行存储。Optionally, the storage medium may be tested periodically, for example, once every 2 hours, and then store the health index obtained through the detection.
可选地,存储介质可以定期删除已存储的健康指数,例如每周或每月删除距离当前时间预设时长之前检测得到的健康指数。Optionally, the storage medium may periodically delete the stored health index, for example, delete the health index detected before a preset period of time from the current time every week or every month.
本实施例中,可以根据当前检测确定的健康指数、以及已存储的之前确定的历史健康指数,来确定存储介质的健康指数变化趋势。In this embodiment, the change trend of the health index of the storage medium may be determined according to the health index determined by the current detection and the stored historical health index determined before.
其中,已存储的之前确定的历史健康指数,可以是系统中存储的本存储介质的所有历史健康指数;或者也可以是指定数量的历史健康指数,一般可以根据时间顺序,从距离当前时刻由近到远来获取该指定数量的历史健康指数;或者也可以是指定时间段内的历史健康指数。Among them, the previously determined historical health indexes that have been stored can be all the historical health indexes of the storage medium stored in the system; Obtain the historical health index of the specified quantity from far away; or it can also be the historical health index within the specified time period.
基于该多个健康指数,可以确定存储介质的健康指数变化趋势,指示指示健康指数上升、下降或不变。Based on the plurality of health indices, a change trend of the health indices of the storage medium may be determined, indicating that the health indices increase, decrease, or remain unchanged.
本实施例中,可以根据健康指数变化趋势,来确定存储介质是否存在异常隐患。例如,若健康指数变化趋势指示健康指数下降,则确定所述存储介质存在异常隐患。In this embodiment, it may be determined whether there is a potential abnormality in the storage medium according to the change trend of the health index. For example, if the change trend of the health index indicates that the health index drops, it is determined that there is a potential abnormality in the storage medium.
其中,可选地,还可以根据健康指数变化趋势来预测存储介质的健康指数变化情况,例如可以确定健康指数变化为小于预设阈值的时间,然后对用户进行提示。Wherein, optionally, the change of the health index of the storage medium may also be predicted according to the change trend of the health index, for example, the time when the change of the health index is less than a preset threshold may be determined, and then a prompt is given to the user.
本实施例中,可以通过拟合曲线的方式来确定健康指数的变化趋势。In this embodiment, the variation trend of the health index can be determined by fitting a curve.
首先,按照时间顺序对当前确定的所述健康指数、以及已存储的之前确定的历史健康指数进行拟合,得到健康指数的拟合曲线;然后基于所述拟合曲线确定所述存储介质的健康指数趋势。Firstly, fitting the currently determined health index and the stored previously determined historical health index in chronological order to obtain a fitting curve of the health index; then determining the health of the storage medium based on the fitting curve Exponential trend.
如图4所示,横轴为时间,纵轴为健康指数。以2020年1月1日-1月7日检测得到的健康指数为例,对该7天内检测确定的7个健康指数进行拟合,可以得到如图4所示的拟合曲线。As shown in Figure 4, the horizontal axis is time, and the vertical axis is health index. Taking the health index detected from January 1 to January 7, 2020 as an example, the 7 health indexes detected and determined within the 7 days are fitted, and the fitting curve shown in Figure 4 can be obtained.
需要说明的是,数据拟合的方式有多种,例如可以通过Matlab软件进行多项式函数拟合,这里不进行赘述。It should be noted that there are many ways of data fitting, for example, polynomial function fitting can be performed by Matlab software, which will not be repeated here.
本实施例中,根据该拟合曲线,可以确定存储介质的健康指数趋势。In this embodiment, according to the fitting curve, the health index trend of the storage medium can be determined.
本实施例中,可以根据拟合曲线在当前时刻所对应的切线斜率来确定健康指数趋势。例如,可以在拟合曲线中测量得到当前时刻对应的点的切线斜率;或者也可以对拟合曲线所对应的拟合函数求导,确定当前时刻对应的导数值。In this embodiment, the trend of the health index can be determined according to the slope of the tangent line corresponding to the fitted curve at the current moment. For example, the tangent slope of the point corresponding to the current moment can be measured in the fitting curve; or the fitting function corresponding to the fitting curve can be derived to determine the derivative value corresponding to the current moment.
若切线斜率为正数,则确定健康指数变化趋势为健康指数上升;若切线斜率为0,则确定健康指数变化趋势为健康指数不变;若切线斜率为负数,则确定健康指数变化趋势为健康指数下降。If the slope of the tangent line is positive, it is determined that the change trend of the health index is rising; if the slope of the tangent line is 0, it is determined that the change trend of the health index is constant; if the slope of the tangent line is negative, it is determined that the change trend of the health index is healthy Index down.
由此,可以根据切线斜率来确定健康指数变化趋势,若健康指数趋势指示健康指数下降,则确定所述存储介质存在异常隐患,可以对用户进行告警提示。Thus, the health index change trend can be determined according to the slope of the tangent line. If the health index trend indicates that the health index declines, it is determined that there is a potential abnormality in the storage medium, and a warning can be given to the user.
在一个例子中,可以根据切线斜率来预测存储介质的健康指数的数值变化。例如根据该切线斜率计算之后每一天的预测健康指数。In one example, the numerical change of the health index of the storage medium can be predicted according to the slope of the tangent line. For example, the predicted health index of each subsequent day is calculated according to the slope of the tangent line.
在一个例子中,可以预设一个隐患阈值,若根据切线斜率计算确定的预测健康指数小于该隐患阈值,则预测存储介质在该时间将进入隐患状态。由此,存储介质可以对用户发起提示,提示用户存储介质进入隐患状态的时间。In an example, a hidden danger threshold may be preset, and if the predicted health index calculated and determined according to the tangent slope is smaller than the hidden danger threshold, it is predicted that the storage medium will enter a hidden danger state at this time. Thus, the storage medium can initiate a prompt to the user, prompting the user when the storage medium enters the hidden state.
至此,完成了图3所示的实施例。通过图3所示的实施例,可以根据拟合曲线来对存储介质健康指数的变化趋势进行预测,从而可以提前对用户进行提示,避免因存储介质损坏而导致数据异常。So far, the embodiment shown in FIG. 3 is completed. Through the embodiment shown in FIG. 3 , the change trend of the health index of the storage medium can be predicted according to the fitting curve, so that the user can be prompted in advance to avoid abnormal data caused by damage to the storage medium.
本实施例中,为了使用户能更好的了解存储介质的具体情况,可以根据各检测指标对应的存储介质的参数值、和/或存储介质的健康指数等,生成检测报告。可选地,该检测报告可以通过可视化界面等方式向用户进行展示。In this embodiment, in order to enable the user to better understand the specific conditions of the storage medium, a detection report may be generated according to the parameter values of the storage medium corresponding to each detection index and/or the health index of the storage medium. Optionally, the detection report may be displayed to the user through a visual interface or other means.
本实施例中,还可以根据各项检测指标的量化信息,生成对应的提示信息,并将该提示信息添加到检测报告中,以使用户根据该提示信息来处理异常事件。举例来说,若存储介质温度异常,可以通过提示信息来提醒用户查看通风、调整环境温度等;若存储介质存在大量振动,可以通过提示信息来提醒用户减少环境振动等;若存储介质上电时间超过指定范围,可以通过提示信息来提醒用户存储介质可能超过质保时间,需要及时更换等。In this embodiment, it is also possible to generate corresponding prompt information according to the quantitative information of each detection index, and add the prompt information to the detection report, so that the user can handle the abnormal event according to the prompt information. For example, if the temperature of the storage medium is abnormal, the user can be reminded to check the ventilation and adjust the ambient temperature through prompt information; If the specified range is exceeded, a prompt message can be used to remind the user that the storage medium may have exceeded the warranty period and needs to be replaced in time.
本实施例中,为了更好地保存存储介质的检测结果,还可以在存储介质的存储区域中设置一个预设保留区,该预设保留区内存储的数据在所述存储介质被执行格式化时不会被删除。In this embodiment, in order to better save the detection results of the storage medium, a preset reserved area can also be set in the storage area of the storage medium, and the data stored in the preset reserved area is formatted in the storage medium will not be deleted.
在一个例子中,可以在所述存储介质的预设保留区内存储所述存储介质的健康指数,和/或,已确定的各检测指标对应的所述存储介质的参数值或者各检测指标对应的所述存储介质的量化信息。In an example, the health index of the storage medium may be stored in a preset reserved area of the storage medium, and/or, the parameter values of the storage medium corresponding to the determined detection indicators or the corresponding detection indicators Quantified information of the storage medium.
在一个例子中,可以在所述存储介质的预设保留区内存储生成的检测报告。In an example, the generated detection report may be stored in a preset reserved area of the storage medium.
由此,将检测结果存储在预设保留区内,可以使得该存储介质的检测结果能够跟随该存储介质,即使存储介质发生迁移,新的电子设备依然可以根据存储介质内保存的检测结果获取完整的记录,从而使得用户可以根据该检测结果对存储介质进行有效的管理。Therefore, storing the detection results in the preset reserved area can make the detection results of the storage medium follow the storage medium. Even if the storage medium is migrated, the new electronic device can still obtain complete record, so that the user can effectively manage the storage medium according to the detection result.
与前述存储介质检测方法的实施例相对应,本申请还提供了存储介质检测装置的实施例。Corresponding to the foregoing embodiments of the storage medium detection method, the present application also provides embodiments of a storage medium detection device.
本申请存储介质检测装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图5所示,为本申请存储介质检测装置所在电子设备的一种硬件结构图,除了图5所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。Embodiments of the storage medium detection apparatus of the present application may be applied to electronic equipment. The device embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for operation by the processor of the electronic device where it is located. From the hardware level, as shown in Figure 5, it is a hardware structural diagram of the electronic equipment where the storage medium detection device of the present application is located, except for the processor, memory, network interface, and non-volatile memory shown in Figure 5 In addition, the electronic equipment where the device in the embodiment is located usually may also include other hardware according to the actual function of the electronic equipment, which will not be repeated here.
图6是本申请一示例性实施例示出的一种存储介质检测装置的框图。Fig. 6 is a block diagram of an apparatus for detecting a storage medium according to an exemplary embodiment of the present application.
请参考图6,所述存储介质检测装置60可以应用在前述图5所示的电子设备中,包括有:Please refer to FIG. 6, the storage
指标确定单元601,用于接收对存储介质的检测请求;依据所述检测请求中的各项检测指标,确定与各检测指标对应的所述存储介质的参数值;所述检测指标至少包括:存储介质的使用情况、和/或存储介质的槽位连接情况、和/或已记录的所述存储介质发生的历史事件情况;The
信息确定单元602,用于依据各检测指标对应的所述存储介质的参数值,确定各检测指标对应的所述存储介质的量化信息;An
异常确定单元603,用于基于各检测指标对应的所述存储介质的量化信息,确定所述存储介质的健康指数,当所述健康指数小于或等于设定健康指数阈值,则确定所述存储介质异常。An
其中,可选地,所述依据各检测指标对应的所述存储介质的参数值,确定各检测指标对应的所述存储介质的量化信息,包括:Wherein, optionally, the determining the quantitative information of the storage medium corresponding to each detection index according to the parameter value of the storage medium corresponding to each detection index includes:
针对每一检测指标,获得已设置的该检测指标对应的量化标准;所述量化标准至少包括该检测指标对应的存储介质参数值与量化信息的对应关系;For each detection index, obtain the quantitative standard corresponding to the detection index that has been set; the quantitative standard includes at least the corresponding relationship between the storage medium parameter value corresponding to the detection index and quantitative information;
在所述量化标准中查找到已确定的该检测指标对应的存储介质参数值所对应的量化信息,将查找到的量化信息确定为该检测指标对应的所述存储介质的量化信息。Find the quantified information corresponding to the determined storage medium parameter value corresponding to the detection index in the quantization standard, and determine the found quantified information as the quantified information of the storage medium corresponding to the detection index.
可选地,所述基于各检测指标对应的所述存储介质的量化信息,确定所述存储介质的健康指数,包括:Optionally, the determining the health index of the storage medium based on the quantitative information of the storage medium corresponding to each detection index includes:
确定各项检测指标的权重值;Determine the weight value of each detection index;
基于所述存储介质在各项检测指标上的量化信息和各项检测指标的权重值,确定所述存储介质的健康指数。The health index of the storage medium is determined based on the quantitative information of the storage medium on each detection index and the weight value of each detection index.
可选地,所述装置还包括:Optionally, the device also includes:
趋势确定单元604,用于根据当前确定的所述健康指数、以及已存储的之前确定的历史健康指数,确定所述存储介质的健康指数变化趋势;所述健康指数变化趋势指示健康指数上升、下降或不变;若所述健康指数趋势指示健康指数下降,则确定所述存储介质存在异常隐患。A
可选地,所述根据当前确定的所述健康指数、以及已存储的之前确定的历史健康指数,确定所述存储介质的健康指数变化趋势根据,包括:Optionally, the basis for determining the change trend of the health index of the storage medium according to the currently determined health index and the stored previously determined historical health index includes:
按照时间顺序对当前确定的所述健康指数、以及已存储的之前确定的历史健康指数进行拟合,得到健康指数的拟合曲线;Fitting the currently determined health index and the stored previously determined historical health index in chronological order to obtain a fitting curve of the health index;
基于所述拟合曲线确定所述存储介质的健康指数变化趋势。Determine the change trend of the health index of the storage medium based on the fitting curve.
可选地,所述存储介质还包括预设保留区;所述预设保留区内存储的数据在所述存储介质被执行格式化时不会被删除;Optionally, the storage medium further includes a preset reserved area; the data stored in the preset reserved area will not be deleted when the storage medium is formatted;
所述装置还包括:The device also includes:
数据存储单元605,用于在所述存储介质的预设保留区内存储所述存储介质的健康指数,和/或,已确定的各检测指标对应的所述存储介质的参数值或者各检测指标对应的所述存储介质的量化信息。The
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and effects of each unit in the above device, please refer to the implementation process of the corresponding steps in the above method for details, and will not be repeated here.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application. It can be understood and implemented by those skilled in the art without creative effort.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementing device is a computer, which may take the form of a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, e-mail device, game control device, etc. desktops, tablets, wearables, or any combination of these.
与前存储介质检测方法的实施例相对应,本申请还提供一种存储介质检测装置,该装置包括:处理器以及用于存储机器可执行指令的存储器。其中,处理器和存储器通常借由内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够与其他设备或者部件进行通信。Corresponding to the embodiments of the previous storage medium detection method, the present application further provides a storage medium detection device, which includes: a processor and a memory for storing machine-executable instructions. Wherein, the processor and the memory are usually connected to each other by an internal bus. In other possible implementation manners, the device may further include an external interface, so as to be able to communicate with other devices or components.
在本实施例中,通过读取并执行所述存储器存储的与存储介质检测逻辑对应的机器可执行指令,所述处理器被促使执行如前述实施例中所述的存储介质检测方法。In this embodiment, by reading and executing the machine-executable instructions stored in the memory and corresponding to the storage medium detection logic, the processor is prompted to execute the storage medium detection method as described in the foregoing embodiments.
与前述存储介质检测方法的实施例相对应,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现实现如前述实施例中所述的存储介质检测方法中的步骤。Corresponding to the embodiments of the aforementioned storage medium detection method, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the aforementioned embodiments can be implemented. The steps in the storage medium detection method described in.
上述对本申请特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of the present application. Other implementations are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible or may be advantageous in certain embodiments.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above is only a preferred embodiment of the application, and is not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application should be included in the application. within the scope of protection.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011225105.9A CN112379832B (en) | 2020-11-05 | 2020-11-05 | Storage medium detection method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011225105.9A CN112379832B (en) | 2020-11-05 | 2020-11-05 | Storage medium detection method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112379832A CN112379832A (en) | 2021-02-19 |
| CN112379832B true CN112379832B (en) | 2023-04-25 |
Family
ID=74578349
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011225105.9A Active CN112379832B (en) | 2020-11-05 | 2020-11-05 | Storage medium detection method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112379832B (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105892950A (en) * | 2016-04-01 | 2016-08-24 | 浪潮电子信息产业股份有限公司 | Disk array reconstruction method and disk array reconstruction system |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7512847B2 (en) * | 2006-02-10 | 2009-03-31 | Sandisk Il Ltd. | Method for estimating and reporting the life expectancy of flash-disk memory |
| CN102081622B (en) * | 2009-11-30 | 2013-01-02 | 中国移动通信集团贵州有限公司 | Method and device for evaluating system health degree |
| US9959059B2 (en) * | 2014-10-20 | 2018-05-01 | Sandisk Technologies Llc | Storage error management |
| CN111124785B (en) * | 2019-12-22 | 2024-02-09 | 广东浪潮大数据研究有限公司 | Method, device, equipment and storage medium for hard disk fault detection |
| CN111835593B (en) * | 2020-07-14 | 2022-06-03 | 杭州海康威视数字技术股份有限公司 | Detection method based on nonvolatile storage medium, storage medium and electronic equipment |
-
2020
- 2020-11-05 CN CN202011225105.9A patent/CN112379832B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105892950A (en) * | 2016-04-01 | 2016-08-24 | 浪潮电子信息产业股份有限公司 | Disk array reconstruction method and disk array reconstruction system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112379832A (en) | 2021-02-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102591591B (en) | Disk detection system, disk detection method and network store system | |
| US20130013652A1 (en) | Proactive Method for Improved Reliability for Sustained Persistence of Immutable Files in Storage Clouds | |
| US20180157438A1 (en) | Slow-disk detection method and apparatus | |
| WO2023185767A1 (en) | Slow disk drive detection method and apparatus, and electronic device and storage medium | |
| CN111045881A (en) | Slow disk detection method and system | |
| CN114528181A (en) | Storage protection prompt processing method and device based on solid state disk, and terminal | |
| CN110413430A (en) | A kind of life-span prediction method of solid state hard disk, device and equipment | |
| CN111949488A (en) | A kind of hard disk failure prediction method, system and electronic device and storage medium | |
| CN110244233A (en) | Battery detection method, electronic equipment and computer storage medium | |
| WO2024139333A1 (en) | Method and device for predicting operating state of storage cluster | |
| CN117033127A (en) | State monitoring method and device of storage device, electronic device and storage medium | |
| CN101872641A (en) | Hard disk failure warning method and device in hard disk video recorder | |
| CN115470059A (en) | Disk detection method, device, equipment and storage medium | |
| CN113590405A (en) | Hard disk error detection method and device, storage medium and electronic device | |
| EP3072049B1 (en) | Indicating rebuild state of storage devices | |
| JP4573179B2 (en) | Performance load abnormality detection system, performance load abnormality detection method, and program | |
| CN112379832B (en) | Storage medium detection method and device | |
| CN109213659A (en) | A kind of monitoring method, device and the storage medium of device memory state | |
| CN116627737A (en) | A hard disk testing method, device, equipment and medium | |
| WO2023098269A1 (en) | Solid-state drive processing method, system, and device, and non-volatile readable storage medium | |
| CN109375871A (en) | A log processing method, system, electronic device and storage medium | |
| CN114003477B (en) | Slow disk diagnostic information collection method, system, terminal and storage medium | |
| CN111897692A (en) | File recording method and device, electronic equipment and storage medium | |
| CN115114070A (en) | Fault diagnosis method, device, equipment and medium | |
| CN111835593B (en) | Detection method based on nonvolatile storage medium, storage medium and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |
