Quick-positioning storage pressure testing method and storage medium thereof

By constructing test data packets and combining them with verification operations at preset verification levels, data errors in storage stress testing can be quickly located, solving the problem of low efficiency in existing technologies and achieving more efficient storage stress testing.

CN121029480APending Publication Date: 2025-11-28ARTMEM TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511070308.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Existing storage stress testing methods cannot quickly distinguish between logical address and data errors, resulting in low testing efficiency. Furthermore, enabling CRC checks across all data increases computational latency and storage space usage.

Method used

By constructing a test data packet containing the starting logical block address, the number of blocks to be written/read, the logical unit, and the check value, and performing a check operation in combination with a preset check level, data errors can be quickly located, and a status log can be saved to stop the operation when the check fails.

Benefits of technology

It enables rapid location of data errors, improves the accuracy and efficiency of storage stress testing, reduces the difficulty of locating data errors caused by external conditions, and enhances testing efficiency and analysis accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121029480A_ABST
    Figure CN121029480A_ABST
Patent Text Reader

Abstract

The invention discloses a quick-positioning storage pressure test method and a storage medium thereof.The method comprises the steps that a write-in command is received, a test data packet is obtained, and the test data packet is provided with an initial logic block address, a write-in block number, a logic unit and a check value; the control unit performs verification operation according to the initial logic block address and the verification value in combination with a preset verification level and the verification level determined by the logic unit to obtain a verification result; when the verification result is successful, executing a write operation according to the initial logic block address and the write block number; and when the verification result is failure, storing a state log of the write-in operation, stopping executing the write-in operation, and outputting positioning information according to the logic unit, the verification result and the state log. Through the verification operation combining the initial logic block address and the verification value, data verification can be rapidly carried out, rapid positioning can be carried out under the condition of data errors and abnormities, and the accuracy and the test efficiency of the storage pressure test are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the chip testing technical field, and in particular to a storage pressure test method for rapid positioning and a storage medium thereof. BACKGROUND

[0002] The storage test is a verification process for verifying whether the storage system meets the established target through systematic means, mainly verifying the core indexes such as read-write performance, data consistency, fault recovery capability, etc. The existing technology usually adopts fixed mode filling + tail CRC check. This test method cannot distinguish logical address and data error, and cannot quickly locate and analyze in the case of error. At the same time, full CRC check will cause the test overhead to increase, thereby causing the problem of low test efficiency. SUMMARY

[0003] The embodiments of the present application provide a storage pressure test method for rapid positioning and a storage medium thereof, which can quickly perform data verification and quickly locate in the case of data error exception, thereby improving the accuracy and test efficiency of the storage pressure test.

[0004] In a first aspect, the embodiments of the present application provide a storage pressure test method for rapid positioning, applied to a control unit, and the test method comprises the following steps: Constructing a test data packet, the test data packet being provided with a starting logical block address, a write block number, a logical unit and a check value; wherein the starting logical block address and the check value are used to perform a check operation according to a preset check level and a check level determined by the logical unit, to obtain a check result; the starting logical block address and the write block number are used to perform a write operation, and the logical unit is used to output positioning information according to the check result; Sending a write command to a storage unit, the write command comprising the test data packet.

[0005] In a second aspect, the embodiments of the present application provide a storage pressure test method for rapid positioning, applied to a control unit, and the test method comprises the following steps: Constructing a test data packet, the test data packet being provided with a starting logical block address, a read block number, a logical unit and a check value; wherein the starting logical block address and the check value are used to perform a check operation according to a preset check level and a check level determined by the logical unit, to obtain a check result; the read block number is used to perform a read operation, and the logical unit is used to output positioning information according to the check result; Sending a read command to a storage unit, the read command comprising the test data packet; Receiving a completion instruction and performing a check operation on the test data packet in the completion instruction.

[0006] In a third aspect, embodiments of the present application provide a storage pressure test method for fast positioning, applied to a storage unit, the test method comprising the following steps: receiving a write command and obtaining a test data packet, wherein the test data packet is provided with a starting logical block address, a write block number, a logical unit, and a check value; a control unit determines a check level in combination with a preset check level and a check level determined by the logical unit, performs a check operation according to the starting logical block address and the check value, and obtains a check result; when the check result is successful, performing a write operation according to the starting logical block address and the write block number; when the check result is unsuccessful, saving a state log of the write operation and stopping the execution of the write operation, and the control unit outputs positioning information according to the logical unit, the check result, and the state log.

[0007] In a fourth aspect, embodiments of the present application provide a storage pressure test method for fast positioning, applied to a storage unit, the test method comprising the following steps: receiving a read command and obtaining a test data packet, wherein the test data packet is provided with a starting logical block address, a read block number, a logical unit, and a check value; performing a read operation according to the starting logical block address and the read block number, and writing read data into the test data packet; a control unit determines a check level in combination with a preset check level and a check level determined by the logical unit, performs a check operation according to the starting logical block address and the check value, and obtains a check result; when the check result is successful, sending a completion instruction containing the test data packet to the control unit; when the check result is unsuccessful, saving a state log of the read operation and stopping the execution of the read operation, and the control unit outputs positioning information according to the logical unit, the check result, and the state log.

[0008] In some embodiments, the test data packet further comprises a reserved field, and the performing a check operation according to the logical block address and the check value comprises: determining a check type according to the reserved field; performing a check operation according to the check type, the logical unit, the starting logical block address, and the check value.

[0009] In some embodiments, the performing a check operation according to the check type, the starting logical block address, and the check value comprises: When the reserved field is zero, a check operation is performed according to the start logical block address; When the reserved field is non-zero, a check operation is performed according to the check type and a check length corresponding to the logical unit.

[0010] In some embodiments, before the determining the check type according to the reserved field, the method further comprises: obtaining an environmental parameter, the environmental parameter comprising temperature, power supply; determining the reserved field according to the environmental parameter.

[0011] In some embodiments, the check value comprises, but is not limited to, a CRC code, an LDPC code.

[0012] In a fifth aspect, an embodiment of the present application provides an electronic device, characterized by comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for fast positioning of storage stress test as described above.

[0013] In a sixth aspect, a computer readable storage medium is provided, characterized by storing a computer program, wherein the computer program is executable on a processor to implement the method for fast positioning of storage stress test as described above.

[0014] The method for fast positioning of storage stress test and the storage medium thereof have at least the following beneficial effects: a test data packet is obtained by receiving a write command, wherein the test data packet is provided with a start logical block address, a write block number, a logical unit, and a check value; a control unit determines a check level in combination with a preset check level and a check level determined by the logical unit, performs a check operation according to the start logical block address and the check value, and obtains a check result; when the check result is successful, a write operation is performed according to the start logical block address and the write block number; when the check result is unsuccessful, a state log of the write operation is saved, and the write operation is stopped, and positioning information is output according to the logical unit, the check result, and the state log. The check operation in combination with the start logical block address and the check value can quickly perform data check, quickly position in the case of data error exception, and improve the accuracy and test efficiency of storage stress test.

[0015] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by means of the structures particularly pointed out in the description and the appended claims. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1A flow chart of a fast positioning storage pressure test method applied to a control unit according to an embodiment of the present application; Figure 2 A flow chart of a fast positioning storage pressure test method applied to a control unit according to another embodiment of the present application; Figure 3 A flow chart of a fast positioning storage pressure test method applied to a storage unit according to an embodiment of the present application; Figure 4 A flow chart of a fast positioning storage pressure test method applied to a storage unit according to another embodiment of the present application; Figure 5 A flow chart of step S2300 in Figure 3 A flow chart of step S2310 in Figure 6 A flow chart of step S2320 in Figure 5 A flow chart of step S2310 in Figure 7 A flow chart of step S2320 in Figure 5 A flow chart of step S2320 in Figure 8 A structure diagram of a test data packet in Figure 1 A structure diagram of a test data packet in Figure 9 A structure diagram of a test data packet in DETAILED DESCRIPTION

[0017] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various embodiments. Meanwhile, the steps or actions in the method description can also be sequentially changed or adjusted in a manner obvious to those skilled in the art. Therefore, the order in the specification and the drawings is only for clear description of an embodiment and does not mean a necessary order, unless otherwise stated that a certain order must be followed.

[0018] In the description of the present application, one or more means one or more, more than two means more than two, greater than, less than, more than, etc. are understood as not including the number, above, below, etc. are understood as including the number. If it is described as first, second, it is only used to distinguish technical features for the purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or implicitly indicating the sequence of indicated technical features.

[0019] The serial numbers of components in this document, such as "first", "second", etc., are only used to distinguish the described objects, and have no technical meaning. Unless otherwise specified, the "connection" and "coupling" in this application include direct and indirect connections (couplings).

[0020] The storage pressure test method for rapid positioning according to the embodiments of the present application is a verification process for verifying whether a storage system meets the predetermined target through systematic means, and mainly verifies core indexes such as read-write performance, data consistency, fault recovery capability, etc. The test process adopts tools such as FIO and vdbench to realize dynamic data collection, and evaluates system reliability through simulation of node failure, multi-client concurrency and other scenarios.

[0021] However, the existing storage pressure test method fills data packets in a fixed mode and checks the cyclic redundancy check (CRC) value at the tail of the data packet, which cannot distinguish logical addresses or data errors occurring in the storage pressure test process, and full CRC checking will cause a problem of large test overhead, thereby resulting in low test efficiency. Although the existing storage pressure test method uses a replacement CRC method, such as using SHA-256 algorithm for checking, it will increase the calculation delay. Secondly, the improved storage pressure test method uses a freezing mechanism, that is, a piece of non-volatile cache is used to temporarily store error information data, but there is a problem of data redundancy and occupation of additional storage space.

[0022] Based on the above, the present application provides a storage pressure test method for rapid positioning and a storage medium thereof. The method includes receiving a write command and obtaining a test data packet, wherein the test data packet is provided with a starting logical block address, a write block number, a logical unit and a check value; performing a check operation according to the starting logical block address and the check value to obtain a check result; when the check result is successful, performing a write operation according to the starting logical block address and the write block number; when the check result is failed, saving a state log of the write operation and stopping the write operation, and outputting positioning information according to the logical unit, the check result and the state log. Through the check operation combining the starting logical block address and the check value, data checking can be quickly performed, and rapid positioning can be performed in the case of data error exception, thereby improving the accuracy and test efficiency of the storage pressure test. At the same time, the check type can be adjusted according to the test environment, thereby solving the problem that data errors caused by external conditions such as temperature, signal interference, etc. in the storage pressure test process are difficult to quickly locate, and realizing real-time capture of exceptions through construction of test data packet writing and multiple checks, thereby improving test efficiency and analysis accuracy.

[0023] Please refer to Figure 1 , Figure 1The flow of the fast positioning storage pressure test method applied to the control unit is shown. As shown in Figure 1 The fast positioning storage pressure test method provided by the embodiment of the present application is applied to the control unit, and includes the following steps: In step S1100, a test data packet is constructed, and the test data packet is provided with a starting logical block address, a write block number, a logical unit and a check value; wherein the starting logical block address and the check value are used to perform a check operation according to a check level determined by a preset check level and a logical unit to obtain a check result; the starting logical block address and the write block number are used to perform a write operation, and the logical unit is used to output positioning information according to the check result.

[0024] It can be understood that the test data packet is an important link in the data management and test process, and a reasonable storage strategy can ensure the safety, accessibility and reusability of data. In the embodiment of the present application, in order to quickly locate the fault, the starting logical block address, the write block number, the logical unit and the check value need to be configured in the test data packet. The logical block address (LBA) is a general mechanism for describing the data block on the computer storage device, and is generally used in the auxiliary memory device such as a hard disk. The LBA can refer to the address of a data block or the data block pointed to by an address. In actual application, when the operating system reads or writes data, it first locates to a specific device through a device number, then determines a specific partition through a partition number, and finally calculates the specific data block position using the LBA. It should be noted that the block is the smallest unit of the erase operation, which is composed of multiple pages; the write operation is in units of pages, but rewriting data requires whole block erasing and rewriting. By configuring the number of write blocks, the total amount of data written can be accurately controlled, and in turn the amount of data for storage stress testing can be accurately controlled. The logical unit is the basic unit of data processing and storage. A logical unit is a concept used in computer systems, databases, or data processing to organize and process information. In data processing, a logical unit can be a data record, a file, a table, a collection, or other data that can be stored and managed for subsequent processing and analysis. In computer systems, files, folders, and directories can also be considered logical units. Logical units can help storage stress testing to more effectively organize and manage data. The design of logical units is crucial to the efficiency and accuracy of data processing systems. A reasonable logical structure design can greatly improve the speed and accuracy of data processing, while reducing errors and redundancy. In addition, logical units also help improve data security, as logical units can ensure data integrity and consistency. By reasonably dividing and organizing logical units, data storage, retrieval, and updating can be more effectively performed. In the embodiments of the present application, by recording the logical unit, the logical unit that has errors or abnormalities during the test process can be quickly located, improving test efficiency and analysis accuracy.

[0025] It should be noted that the check value is a value obtained by a certain operation to verify the correctness of a set of data. Specifically, data verification is a verification operation to ensure data integrity, and the check value is a value calculated from the original data by a specified algorithm in this process, which is used for subsequent data integrity verification. In practical applications, the data receiving party recalculates the check value using the same algorithm as the data sending party for the received data. If the check values calculated twice are the same, it means that the data has not changed during transmission or storage, i.e., the data is complete.

[0026] It should be noted that the control unit and the storage unit are different roles in a computing component or system. In the embodiments of the present application, the control unit is the host (Host), which usually refers to a computer that serves as a control center or main system, responsible for managing and coordinating the work of other devices. The storage unit is a device (Device), which refers to an external device or subsystem that depends on the host, and usually needs the control of the host to work. In some embodiments, the control unit and the storage unit are two core roles in a USB protocol-based network system. The control unit serves as the master of the USB network, responsible for initiating communication, managing connected devices, and distributing power. Typical representatives include computers, laptops, and other devices with USB host controller architecture. The storage unit is a slave that passively responds to Host instructions, relies on Host to provide power, and performs specific functions. For example, USB flash drives, printers, cameras, and other peripherals that need to be connected to the Host through USB.

[0027] Step S2100, a write command is sent to the storage unit, and the write command includes a test data packet.

[0028] It can be understood that, in the write process of the storage pressure test, the control unit sends a write command with a test data packet to the storage unit, so that the storage unit obtains the starting logical block address, the number of write blocks, the logical unit and the check value in the test data packet, and ensures that the storage unit can perform a write operation according to the starting logical block address and the number of write blocks after passing the check according to the check value, thereby performing a write pressure test. In the case where the check fails, the storage unit can output positioning information according to the logical unit to realize real-time capture of exceptions, thereby improving the write test efficiency and analysis accuracy.

[0029] Please refer to Figure 2 , Figure 2 The application further provides a flow of a fast positioning storage pressure test method applied to a control unit. As shown in Figure 2 , the fast positioning storage pressure test method applied to the control unit includes the following steps: Step S1200, a test data packet is constructed, and the test data packet is provided with a starting logical block address, a number of read blocks, a logical unit and a check value; wherein the starting logical block address and the check value are used to perform a check operation according to a preset check level and a check level determined by the logical unit to obtain a check result; the starting logical block address and the number of read blocks are used to perform a read operation, and the logical unit is used to output positioning information according to the check result.

[0030] It can be understood that, in the read process of the storage pressure test, the test data packet is constructed in the same way as in the above step S1100, and the test data packet is provided with a starting logical block address, a number of read blocks, a logical unit and a check value. By configuring the number of read blocks, the total amount of read data can be accurately controlled, and thus the amount of data of the storage pressure test can be accurately controlled. The starting logical block address, the logical unit and the check value in the test data packet are set and function in the same way as described above, and thus will not be described here.

[0031] Step S2200, a read command is sent to the storage unit, and the read command includes a test data packet.

[0032] It can be understood that, in the reading process of the storage pressure test, the control unit sends a read command with a test data packet to the storage unit, so that the storage unit obtains the starting logical block address, the read block number, the logical unit and the check value in the test data packet, and ensures that the storage unit can pass the check through the check value, and then performs a read operation according to the starting logical block address and the read block number, to perform the read pressure test. In the case of failing to pass the check, the storage unit can output positioning information according to the logical unit to realize real-time capture of exceptions, and improve the read test efficiency and analysis accuracy.

[0033] Step S3200, the completion instruction is accepted, and a check operation is performed on the test data packet in the completion instruction.

[0034] It can be understood that, after the storage unit completes the read operation, a completion instruction including read data and a test data packet is sent to the control unit. After the control unit receives the completion instruction, a check is performed through the starting logical block address and the check value. In the case of passing the check, the read test process is completed. In the case of failing to pass the check, the storage unit can output positioning information according to the logical unit to realize real-time capture of exceptions, and improve the read test efficiency and analysis accuracy.

[0035] Please refer to Figure 3 , Figure 3 A flow of a fast positioning storage pressure test method applied to a storage unit provided by another embodiment of the present application is shown. As Figure 3 shown, the fast positioning storage pressure test method of the embodiment of the present application is applied to the storage unit, and includes the following steps: Step S1300, a write command is received, and a test data packet is obtained, wherein the test data packet is provided with a starting logical block address, a write block number, a logical unit and a check value.

[0036] It can be understood that, in the storage pressure test process, the storage unit receives a write command sent by the control unit, wherein the test data packet in the write command is provided with a starting logical block address, a write block number, a logical unit and a check value. The specific content and function of the test data packet are consistent with the test data packet constructed by the control unit in the above step S1100, and will not be repeated here.

[0037] Step S2300, the control unit combines the preset check level and the check level determined by the logical unit to perform a check operation according to the starting logical block address and the check value, and obtains a check result.

[0038] It can be understood that, as known from the above, the LBA is a logical address system used by a storage device such as a hard disk to identify a data storage location. When data is written, the system will store the data to the specified location according to the LBA. The verification process verifies the integrity of the data by comparing whether the actual data in the storage device is consistent with the expected data. If there is a difference, there may be data corruption or write error.

[0039] Referring to Figure 5 , Figure 5 A specific implementation process diagram of another embodiment of the above step S2300 is shown. As shown in Figure 5 , the test data packet further includes a reserved field, and the above step S2300 at least includes the following steps: Step S2310, determining the verification type according to the reserved field.

[0040] It can be understood that, in actual application, in order to cope with different test levels and requirements, the verification type of the storage stress test needs to be set through the reserved field. Specifically, different levels can be set by external conditions, such as high and low temperature, temperature cycle, power failure, etc. The test setting level is higher, and the normal temperature environment test setting level is lower. It should be noted that, generally, before the storage stress test is started, the verification level needs to be determined in advance by setting the reserved field according to the difference of logical units or test scenarios, and the verification level of the entire storage stress test is determined.

[0041] Referring to Figure 6 , Figure 6 A specific implementation process diagram of another embodiment of the above step S2310 is shown. As shown in Figure 5 , step S2310 at least includes the following steps: Step S2311, obtaining an environmental parameter, the environmental parameter including temperature, power supply.

[0042] It can be understood that, since different external conditions are set in the test scenario to perform storage testing, in order to simulate the actual device operating environment, different performance requirements are made on the test process and results of the storage device. Therefore, in different test environments, the verification type needs to be set according to the environmental parameter. The environmental parameter includes temperature, power supply, etc. Specifically, generally, the storage device operates in an environmental temperature of 25℃-85℃. Within this interval, it can be considered as normal temperature test, since the device operates stably within this temperature interval, therefore, in the normal temperature test process, the storage test setting level is lower. In the power supply environment, when there is a power failure in the environmental parameter, the possibility of device error is higher, therefore, the storage test setting level is higher, so as to accurately locate and analyze the error occurred in the test process.

[0043] Step S2312, determining the reserved field according to the environmental parameter.

[0044] It can be understood that after obtaining the environmental parameters, the reserved field in the test data packet is determined. In a specific application, the reserved field directly represents the verification level of the storage stress test. For example, if the reserved field is zero, the verification level of the storage stress test is the lowest, and the corresponding verification length is 0, that is, no additional verification is performed on the data bytes, and only the LBA address is verified. When the reserved field is not zero, the data bytes corresponding to the verification length are verified according to the actual requirements and the level allocated by the logical unit, so as to improve the accuracy of the verification.

[0045] Step S2320, performing a verification operation according to the verification type, the logical unit, the starting logical block address, and the verification value.

[0046] It can be understood that, in order to ensure the accuracy of data read and write verification, the verification is performed by means of forced starting logical block address verification combined with optional verification value. In actual application, whether to perform verification on the data bytes is determined according to the reserved field and the verification type, and then the verification length is determined according to the verification type and the logical unit, so as to ensure that the verification result can fully reflect the errors existing in the stress test process and perform rapid positioning and analysis.

[0047] Please refer to Figure 7 , Figure 7 a specific implementation process diagram of another embodiment of the above step S2320 is shown. As Figure 5 shown, step S2320 at least includes the following steps: Step S2321, when the reserved field is zero, performing a verification operation according to the starting logical block address.

[0048] It can be understood that when the reserved field is zero and the test level is the lowest, the verification operation is performed according to the starting logical block address, that is, LBA verification. The LBA verification is mainly used for data consistency verification in a storage system, and the data integrity of the logical block address is detected to ensure the storage reliability. Specifically, the LBA verification is performed by a verification algorithm to verify the LBA number and the corresponding data block, so as to ensure the address correctness, that is, the LBA number read or written is not wrong due to errors in the transmission process; and to ensure the data integrity, that is, the data block pointed to by the LBA is not damaged, tampered or lost due to hard disk bad tracks. In actual application, the LBA verification is an important mechanism to ensure the accuracy and integrity of hard disk data positioning, and is widely used in normal operation and data maintenance of storage devices.

[0049] Step S2322, when the reserved field is not zero, performing a verification operation according to the verification type and the verification length corresponding to the logical unit.

[0050] It can be understood that when the reserved field is non-zero, the test level is low, and on the basis of the LBA check, the check operation also needs to be performed according to the check type and the check length corresponding to the logical unit.

[0051] In a specific application, different values of the reserved field represent different levels, and the higher the level, the more the amount of check data. For example, if the check level is A, only the first 64*A bytes are checked. Different levels can be determined by the test scene or the logical unit, for example, the logical unit sets the level 3, and then the logical unit checks 192B per 4KB of data in the process of processing data, and when the logical unit sets the level 1, the logical unit only checks 64B per 4KB of data, so the data check can be checked in different amounts through the level set by the logical unit.

[0052] Step S3300, when the check result is successful, performing a write operation according to the starting logical block address and the write block number.

[0053] It can be understood that when the check result is successful, the storage device needs to perform a write operation. Specifically, in the test process of Universal Flash Storage (UFS), a write operation needs to be performed according to the starting logical block address and the write block number. The UFS is a high-performance storage solution, and has significant advantages in speed, data transmission efficiency and interface technology compared with the embedded Multi Media Card (eMMC). The UFS is based on serial data transmission technology, and although there are only two data channels between the internal storage unit and the host, the actual data transmission speed is much higher than that of the eMMC flash based on parallel technology.

[0054] Step S4300, when the check result is failed, saving the state log of the write operation, and stopping the execution of the write operation, and the control unit outputs the positioning information according to the logical unit, the check result and the state log.

[0055] It can be understood that when the check result is failed, in order to ensure rapid fault positioning, the state log needs to be saved immediately when an error is triggered, such as the last 16 CMD histories, multiple Unipro / PHY register states, the current power mode, buffer usage and part of the read-write related variables, to realize complete freezing of the fault scene. Especially in the case of dead loop, hardware triggered abnormal interruption, etc., when the check result is failed, the control unit saves the state log of the write operation immediately, and stops the execution of the write operation. At the same time, according to the logical unit, the check result and the state log, the positioning information is outputted to determine the logical unit where the error occurs.

[0056] Please refer toFigure 4 , Figure 4 The figure shows the flow of a fast positioning storage pressure test method applied to a storage unit according to another embodiment of the present application. As shown in the figure, the fast positioning storage pressure test method according to the embodiment of the present application comprises the following steps: Figure 4 Step S1400, receiving a read command and obtaining a test data packet, wherein the test data packet is provided with a starting logical block address, a read block number, a logical unit and a check value.

[0057] It can be understood that, in the storage pressure test process, the storage unit receives a read command sent by the control unit, wherein the test data packet in the read command is provided with a starting logical block address, a read block number, a logical unit and a check value. The specific content and function of the test data packet are consistent with the test data packet constructed by the control unit in the above-mentioned step S1200, and will not be repeated here.

[0058] Step S2400, performing a read operation according to the starting logical block address and the read block number, and writing the read data into the test data packet.

[0059] It can be understood that, in order to accurately read data, a read operation is performed according to the starting logical block address and the read block number. At the same time, in order to verify the accuracy of the read data, the read data needs to be written into the test data packet. In actual application, the read data is written into the test data packet by instruction, which belongs to the prior art and will not be repeated here.

[0060] Step S3400, the control unit combines the preset check level and the check level determined by the logical unit to perform a check operation according to the starting logical block address and the check value, and obtains a check result.

[0061] It can be understood that, after the read data is written into the test data packet, in order to ensure the integrity of the data, a check operation needs to be performed according to the starting logical block address and the check value, wherein the specific check process is consistent with the above-mentioned step 2300, and will not be repeated here.

[0062] Step S4400, when the check result is successful, sending a completion instruction containing the test data packet to the control unit.

[0063] It can be understood that, in order to accurately transmit the read data, when the check result is successful, the test data packet containing the read data needs to be written into the completion instruction, and the completion instruction needs to be sent to the control unit, so that the control unit performs the check operation as described in the above-mentioned steps.

[0064] ​Step S5400: When the verification result is a failure, save the status log of the write operation and stop the write operation. The control unit outputs the location information based on the logic unit, the verification result and the status log.

[0065] Understandably, when the verification result fails, in order to ensure rapid fault location, it is necessary to immediately save the status log upon triggering the error. The specific process is the same as step S4300 above, and will not be repeated here.

[0066] It should be noted that the storage stress testing method provided in this application can effectively locate data transmission errors such as bit flips. Bit flips refer to the phenomenon where a bit in binary data changes from 0 to 1 or from 1 to 0, which can lead to data corruption, program crashes, and other problems. Causes include: hardware failures, such as memory failures, electromagnetic interference, voltage fluctuations, temperature changes, and other physical factors that may alter the state of storage units; software errors, such as incorrect bit operations or buffer overflows; and radiation effects, where high-energy particles alter the values ​​of storage units. In practical applications, this application successfully detects bit flips caused by high and low temperatures and quickly locates abnormal data errors, effectively improving the detection rate by 80%.

[0067] like Figure 8 As shown, Figure 8 This is a structural diagram of a test data packet provided in one embodiment of this application. The test data packet is 4KB in size, wherein the first 4 bytes and the last 5-8 bytes are used to store the LBA address, the first 4-7 bytes record the number of times the address is written, bytes 8-11 record the logical unit, the last 4 bytes store the CRC32 check value, and the other bytes are filled with fixed values. Figure 8 As shown in (a), the LBA address is 100, this address has been written to 66 times, and the number of logical units written is 0. For example... Figure 8 As shown in (b), the LBA address is 100, the number of writes to this address is 55, and the number of write logic units is 5.

[0068] It should be noted that the number of write times refers to the number of times a specific LBA address is written with data. Each time a write operation is performed on the address, such as writing new data or overwriting old data, the write counter is incremented. For solid state disks (SSD), the number of write times is particularly important, as the performance and reliability of the SSD will gradually decrease as the number of write times increases. This is because SSDs use flash memory to store data, and the storage cells of the flash memory gradually wear out after being written to, which can eventually lead to data loss or performance degradation. In the prior art, SSD manufacturers provide tools to monitor and report the number of write times for each LBA, and regularly checking and monitoring the number of write times for LBAs can help predict the health and performance degradation of the hard disk. At the same time, during use, the write position of the data can be balanced as much as possible to avoid excessive use of certain areas.

[0069] It should be noted that CRC32 has strong error detection capability, and also has the advantages of small overhead and easy implementation of encoder and detection circuit. Specifically, from the error detection capability, the probability of errors that CRC cannot detect is very low. From the performance and overhead, CRC is much better than parity and arithmetic and checksum methods. Therefore, in the field of data storage and data communication, CRC32 is widely used.

[0070] In actual application, the control unit carries out pressure test process, adopts instruction queue (command queue) to carry out test, and adopts MTK6877 test in hardware aspect. In the write test process, when abnormal problems occur in pre-write data due to external environmental factors, such as electromagnetic interference, temperature influence, abnormal transmission signal, etc., the existing test method will write the error data or flipped data as normal data into the storage medium because it does not have the function of detecting and positioning abnormal scene. The storage pressure test method provided by the embodiment of the present application can identify abnormal data in time before writing into the storage medium, save abnormal logs and stop write operation, avoid writing abnormal data into the storage medium, and effectively improve the positioning speed and abnormal monitoring accuracy.

[0071] In the read test process, the read data types include discrete data and bulk data. Because there is a part of the cache area in the control unit for storing the mapping relationship, frequent reading and writing of the mapping relationship is avoided. In bulk data reading, the existing test method cannot be operated frequently because of continuous data reading, so that the error site is not covered or not completely covered, and it takes 30 minutes to locate the specific reason. The storage stress test method provided in the embodiment can identify abnormal data in time and save abnormal logs. In actual testing, it only takes about 20 minutes to complete positioning, and the positioning speed is improved by 33%. In addition, in the discrete data reading process, because the data is discontinuous, the mapping relationship needs to be frequently operated, so that the error site is partially covered or completely covered. The existing test method usually takes 1 hour to locate, while the storage stress test method provided in the embodiment can complete positioning in about 30 minutes, the positioning speed is improved by 50%, and the accuracy is improved by 50%. In addition, as the test environment becomes worse, such as high and low temperature-25-100 degrees cycle and the like, the positioning speed and accuracy are significantly improved.

[0072] As shown in Figure 9 , the electronic device 600 is a schematic diagram of an embodiment of the present application. Figure 9

[0073] The electronic device 600 of the embodiment of the present application includes one or more processors 610 and memories 620, Figure 9 , taking one processor 610 and one memory 620 as an example.

[0074] The processor 610 and the memory 620 can be connected through a bus or other means, Figure 9 , taking connection through a bus as an example.

[0075] The memory 620 is a kind of non-transient computer readable storage medium, which can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory 620 can include high-speed random access memory, and can also include non-transient memory, such as at least one magnetic disk storage device, flash memory device, or other non-transient solid-state memory device. In some embodiments, the memory 620 can optionally include a memory 620 remotely arranged relative to the processor 610, and these remote memories can be connected to the electronic device 600 through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0076] Those skilled in the art can understand that Figure 9 The device structure shown in the above embodiment does not constitute a limitation on the electronic device 600, and can include more or fewer components than the diagram, or combine certain components, or different component arrangements. ​

[0077] The embodiment of the present application further provides a storage medium storing computer executable instructions for executing the storage pressure test method of quick positioning.

[0078] In an embodiment, the storage medium stores computer executable instructions executed by one or more processors 610, such as a processor 610 in the electronic device 600, so that the one or more processors 610 execute the storage pressure test method of quick positioning provided by any embodiment of the present application.

[0079] The apparatus embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network nodes. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0080] Those skilled in the art can understand that all or some steps in the method disclosed above can be implemented as software, firmware, hardware and their appropriate combinations. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer readable medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, as known to those skilled in the art, communication media generally includes computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery medium.

[0081] It should be understood that, in the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B, and A and B existing at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0082] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection between some interfaces, devices or units, which can be electrical, mechanical or other forms. The units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Some or all units can be selected according to actual needs to achieve the purpose of the embodiment.

[0083] It should also be understood that the various embodiments provided by the embodiments of the present application can be combined in any way to achieve different technical effects.

[0084] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present application, and these equivalent modifications or replacements are all included in the scope defined by the claims of the present application.

Claims

1. A rapid location-based storage stress testing method, applied to a control unit, characterized in that, The testing method includes the following steps: A test data packet is constructed, which includes a starting logical block address, a number of write blocks, a logical unit, and a check value. The starting logical block address and the check value are used to perform a check operation based on a preset check level and a check level determined by the logical unit, to obtain a check result. The starting logical block address and the number of write blocks are used to perform a write operation, and the logical unit is used to output location information based on the check result. A write command is sent to the storage unit, the write command including the test data packet.

2. A rapid location-based storage stress testing method, applied to a control unit, characterized in that, The testing method includes the following steps: A test data packet is constructed, which includes a starting logical block address, a number of read blocks, a logical unit, and a check value. The starting logical block address and the check value are used to perform a check operation based on a preset check level and a check level determined by the logical unit, to obtain a check result. The starting logical block address and the number of read blocks are used to perform a read operation, and the logical unit is used to output location information based on the check result. Send a read command to the storage unit, the read command including the test data packet; Accept the completion instruction and perform the verification operation on the test data packet in the completion instruction.

3. A rapid location-based storage stress testing method, applied to storage units, characterized in that, The testing method includes the following steps: Receive a write command and obtain a test data packet, wherein the test data packet contains a starting logical block address, the number of write blocks, a logical unit, and a check value; The control unit combines the preset verification level and the verification level determined by the logic unit, performs a verification operation based on the starting logic block address and the verification value, and obtains the verification result. When the verification result is successful, the write operation is performed according to the starting logical block address and the number of write blocks; When the verification result is a failure, the status log of the write operation is saved and the write operation is stopped. The control unit outputs the location information based on the logic unit, the verification result and the status log.

4. A rapid location-based storage stress testing method, applied to storage units, characterized in that: The testing method includes the following steps: Receive a read command and obtain a test data packet, wherein the test data packet contains a starting logical block address, a number of blocks to be read, a logical unit, and a check value; Based on the starting logical block address and the number of blocks to be read, perform a read operation and write the read data into the test data packet; The control unit combines the preset verification level and the verification level determined by the logic unit, performs a verification operation based on the starting logic block address and the verification value, and obtains the verification result. When the verification result is successful, a completion command containing the test data packet is sent to the control unit; When the verification result is a failure, the status log of the read operation is saved and the read operation is stopped. The control unit outputs the location information based on the logic unit, the verification result and the status log.

5. The test method according to claim 3 or 4, characterized in that, The test data packet also includes a reserved field, and the verification operation based on the logical block address and the checksum includes: The verification type is determined based on the reserved fields; The verification operation is performed based on the verification type, the logical unit, the starting logical block address, and the verification value.

6. The test method according to claim 5, characterized in that, The step of performing a verification operation based on the verification type, the logical unit, the starting logical block address, and the verification value includes: When the reserved field is zero, a verification operation is performed based on the starting logical block address; When the reserved field is non-zero, a verification operation is performed according to the verification type and the verification length corresponding to the logical unit.

7. The test method according to claim 5, characterized in that, Before determining the verification type based on the reserved fields, the method further includes: Acquire environmental parameters, including temperature and power supply; The reserved fields are determined based on the environmental parameters.

8. The test method according to any one of claims 1 to 4, characterized in that, The verification value includes, but is not limited to, CRC verification code and LDPC verification code.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the storage stress test method for rapid location as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The system contains a computer program that, when executed by a processor, implements the storage stress test method for rapid location as described in any one of claims 1 to 8.