WO2023231064A1 - 存储装置的优化方法、存储装置以及计算机可读存储介质 - Google Patents

存储装置的优化方法、存储装置以及计算机可读存储介质 Download PDF

Info

Publication number
WO2023231064A1
WO2023231064A1 PCT/CN2022/097732 CN2022097732W WO2023231064A1 WO 2023231064 A1 WO2023231064 A1 WO 2023231064A1 CN 2022097732 W CN2022097732 W CN 2022097732W WO 2023231064 A1 WO2023231064 A1 WO 2023231064A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
behavior information
storage device
application scenario
behavior
Prior art date
Application number
PCT/CN2022/097732
Other languages
English (en)
French (fr)
Inventor
梁小庆
邓恩华
Original Assignee
深圳市江波龙电子股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳市江波龙电子股份有限公司 filed Critical 深圳市江波龙电子股份有限公司
Publication of WO2023231064A1 publication Critical patent/WO2023231064A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • the present application relates to the technical field of storage products, and in particular to an optimization method of a storage device, a storage device and a computer-readable storage medium.
  • Storage products will be used in various situations, such as video recording, copying files, system disks, etc.
  • the complexity of various situations varies greatly.
  • these situations are simply divided into read-only, write-only or mixed read-write applications.
  • Enterprise-level SSDs on the market will also be optimized differently for these situations, but this requires users to be clear about their applications. Scenarios and selecting corresponding storage products require certain user expertise.
  • manufacturers will not do such detailed classification and have certain requirements for production management. Therefore, consumer products are generally general-purpose storage products and are basically not optimized for different scenarios.
  • the storage product in the application of storage products, the storage product, as a slave device, basically passively responds to requests from the master device (host).
  • Slave devices generally have a unique combination of manufacturer ID + product ID + serial number, so the master device can easily identify the slave device.
  • most of the current common storage products cannot identify different connected main devices, nor can they remember the usage scenarios of different connected main devices. Therefore, they cannot make different optimizations for different main devices.
  • the main technical problem solved by this application is to provide a storage device optimization method, storage device and computer-readable storage medium, which can solve the problem that existing storage products cannot be optimized for the application scenarios of different main devices during the application process.
  • a technical solution adopted in the first aspect of this application is to provide an optimization method for a storage device, which method includes:
  • first behavior information of the master device in the process of identifying the storage device; determine corresponding application scenario information based on the first behavior information; and optimize the storage device based on the application scenario information.
  • obtain the first behavioral information of the master device in the process of identifying the storage device including:
  • At least one of the information of a command, a time value, and a voltage value in the process of identifying the storage device by the master device is obtained as the first behavioral information.
  • obtaining the first behavioral information of the master device in the process of identifying the storage device also includes:
  • the device identification code of the master device is obtained as the first behavioral information.
  • determine corresponding application scenario information based on the first behavioral information including:
  • the above method also includes:
  • the first behavior information is stored.
  • store the first line of information including:
  • the first behavior information is processed to obtain the corresponding second behavior information; the second behavior information is stored.
  • process the first behavior information to obtain corresponding second behavior information including:
  • Hash value mapping is performed on the first line of information to obtain the corresponding second line of information.
  • store the second behavior information including:
  • optimize the storage device based on application scenario information including:
  • a technical solution adopted in the second aspect of this application is to provide a storage device, which includes a processor and a memory connected to each other.
  • the memory is used to store program instructions
  • the processor is used to execute the program instructions to implement the above optimization method of the storage device.
  • a technical solution adopted in the third aspect of this application is to provide a computer-readable storage medium that stores program instructions that can be executed to implement the above-mentioned storage device optimization method.
  • this application provides an optimization method for a storage device, a storage device and a computer-readable storage medium.
  • the method includes: obtaining the first behavior information of the master device in the process of identifying the storage device; according to the first For one line of information, the corresponding application scenario information is determined; based on the application scenario information, the storage device is optimized.
  • Figure 1 is a schematic flowchart of a first embodiment of a storage device optimization method provided by this application;
  • Figure 2 is a schematic flow chart of S12 in Figure 1;
  • FIG. 3 is a schematic flow chart of S13 in Figure 1;
  • Figure 4 is a schematic flowchart of a second embodiment of a storage device optimization method provided by this application.
  • FIG. 5 is a schematic flow chart of S23 in Figure 4.
  • Figure 6 is a schematic flow chart of S232 in Figure 5;
  • Figure 7 is a schematic structural diagram of an embodiment of a storage device provided by this application.
  • Figure 8 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by this application.
  • an embodiment means that a particular feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application.
  • the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
  • the steps in the embodiments of the present application are not necessarily processed in the order of the steps described.
  • the steps can be selectively disrupted and rearranged according to the needs, or the steps in the embodiments can be deleted or the steps in the embodiments can be added.
  • the step descriptions in the embodiments of the application are only optional sequence combinations and do not represent all the sequence combinations of the steps in the embodiments of the application.
  • the sequence of steps in the embodiments cannot be considered to limit the application.
  • Figure 1 is a schematic flowchart of a first embodiment of a storage device optimization method provided by this application. The method includes:
  • S11 Obtain the first behavioral information of the master device in the process of identifying the storage device.
  • the first step in communication between the master device (host) and the slave device (storage product) is to identify the slave device, such as correctly establishing a connection at the physical layer, link matching, and obtaining the type of slave device. and detailed information (such as USB enumeration), device capacity, etc.
  • the storage protocol document will define the standards for each sub-operation, but will not define a series of operations for the entire identification process. In this way, during the entire process of identifying slave devices, the operations of different master devices will have certain differences, such as the order of commands. , the number of commands is different, or the time difference between commands is different, or even the power supply voltage of the master device is different, etc. (different storage protocols will have different differences); at the same time, for the same master device, due to the identification of the slave device The behavior is a fixed logical operation of software and hardware, with a certain consistency.
  • At least one of the information of a command, a time value, and a voltage value in the process of identifying the storage device by the master device is obtained as the first behavior information.
  • the device identification code of the main device may also be obtained as the first behavioral information.
  • the main device has a unique device identification code, which may include: Device ID, IMEI, UUID, UDID, OAID, IDFA, GAID, ESN, etc.
  • the device identification codes of different master devices are different, so the storage device can distinguish different master devices based on the device identification codes.
  • different behavioral information can be selected in a targeted manner, or the behavioral information can be processed, such as adjusting the accuracy of time values, voltage values, etc.
  • S12 Determine corresponding application scenario information based on the first behavior information.
  • the second behavior information corresponding to different master devices may be pre-stored in the storage device, and the first behavior information and the second behavior information may be matched to determine the corresponding master device and further determine the corresponding application scenario information.
  • a storage device that does not pre-store the second behavior information corresponding to the master device cannot obtain the corresponding application scenario information when it is connected to the master device for the first time, and needs to store the first behavior information of the master device. This process This will be described in detail in later embodiments.
  • the storage device After the storage device connects to the main device once, it stores the first behavior information of the main device and establishes the corresponding application scenario information. When the main device is connected again subsequently, the storage device can use the first behavior information according to the first behavior information. Identify the main device and determine the corresponding application scenario information.
  • the storage device can load corresponding optimization data, and use the optimization data to optimize the storage device.
  • the optimization data may be a program, a script, etc.
  • the storage device may pre-store corresponding optimization data.
  • the storage device is a solid-state drive and the main device is a computer. After acquiring the first behavior information of the computer in the process of identifying the solid-state drive, the solid-state drive recognizes the computer and determines the corresponding application scenario for use.
  • the SSD will load the corresponding optimization data and use the optimization data to perform disk cleaning, defragmentation and other operations to improve the system's response speed.
  • the optimization data can also be used to perform regular disk checks to improve the reliability of the system disk. .
  • this embodiment provides a method for optimizing a storage device.
  • the method includes: obtaining the first behavior information of the master device in the process of identifying the storage device; and determining the corresponding behavior information based on the first behavior information.
  • Application scenario information ; optimize the storage device based on the application scenario information.
  • S12 may also include:
  • S121 Match the first behavior information with the second behavior information stored in the storage device, and determine the second behavior information that matches the first behavior information.
  • the second behavior information is pre-stored in the storage device.
  • the second behavior information can be obtained and stored by the storage device when it is connected to the main device for the first time.
  • the behavior information in the process of identifying the storage device has a certain consistency. Therefore, during the development process of the storage device, multiple types of commonly used master devices can be tested to obtain Multiple sets of behavior information respectively corresponding to multiple types of master devices are written into the storage device as second behavior information.
  • application scenario information corresponding to multiple types of master devices can be further established, associated with the second behavior information, and stored together in the storage device.
  • S122 Determine the master device corresponding to the second behavior information matching the first behavior information.
  • the second behavior information stored in the storage device has a one-to-one correspondence with the master device. After determining the second behavior information that matches the first behavior information, its corresponding master device can be determined.
  • application scenario information corresponding to multiple types of master devices is pre-stored in the storage device. After determining the master device, the corresponding application scenario information can be determined.
  • S13 may also include:
  • the optimization data may be a program, a script, etc.
  • the storage device may pre-store optimization data corresponding to various application scenario information.
  • the storage device loads optimization data corresponding to the application scenario information, and the storage device can be optimized using the optimization data, so that the storage device can perform well in different application scenarios.
  • the storage device is a memory card
  • the main devices to which it can be connected include a video surveillance device and a computer.
  • the video surveillance device and the computer have different behavior information in the process of identifying the memory card.
  • the memory card obtains the behavioral information of the video surveillance device during the identification process and determines that the application scenario is video recording.
  • the memory card loads the corresponding optimized data to improve storage throughput, thereby reducing latency and ensuring There are no frame drops or errors in the video screen.
  • the user may need to copy the video in the memory card.
  • the memory card can be connected to the computer.
  • the memory card When connected to the computer, the memory card obtains the behavioral information of the computer during the recognition process and determines that the application scenario is copying files. This The memory card loads the corresponding optimized data at the same time, switches the file system to the file system corresponding to the computer's disk, and performs 4k alignment, thereby improving the copying speed of video files.
  • Figure 4 is a schematic flowchart of a second embodiment of a storage device optimization method provided by this application. The method includes:
  • the storage device when the storage device is connected to the main device for the first time, the corresponding application scenario information cannot be obtained based on the first behavior information. At this time, it is necessary to store the first behavior information of the main device and establish the corresponding application scenario information. So that when the storage device is connected to the main device again, the main device is identified according to the first behavior information, and then the corresponding application scenario information is determined, and the storage device is optimized according to the application scenario information.
  • S23 may also include:
  • S231 Process the first behavior information to obtain corresponding second behavior information.
  • the first behavior information can be processed, for example, the first behavior information is hashed using a hash function.
  • Column value mapping converts a large amount of data into shorter fixed-length data to obtain the corresponding second row information.
  • hash function (or hash algorithm, also known as hash function, English: Hash Function) is a method of creating a small digital "fingerprint" from any kind of data.
  • the hash function compresses the message or data into a digest, making the amount of data smaller and fixing the format of the data. This function shuffles the data to recreate a fingerprint called hash values (hash codes, hash sums, or hashes).
  • hash values hash codes, hash sums, or hashes.
  • a hash value is usually represented by a short string of random letters and numbers. Good hash functions rarely have hash collisions in the input domain.
  • the second behavior information is stored.
  • FIG. 6 is a schematic flow chart of S232 in Figure 5.
  • S232 may also include:
  • the second behavior information is associated with the main device, so that the second behavior information stored in the storage device has a one-to-one correspondence with the main device.
  • S2322 Establish application scenario information corresponding to the main device.
  • application scenario information corresponding to the main device is established so that the stored application scenario information and the main device also have a one-to-one correspondence.
  • S2323 Store the second behavior information and the application scenario information corresponding to the main device associated with the second behavior information.
  • the second behavior information and the application scenario information corresponding to its associated master device are stored in the storage device as a set of data.
  • corresponding optimization data can be established for the application scenario information, added to the group of data and stored together, so that the storage device can load the optimization data more quickly when it identifies the corresponding master device again based on the first behavior information. optimization.
  • corresponding optimization data can also be established for various commonly used application scenarios. These optimization data have a certain degree of versatility in the same type of application scenarios.
  • they are combined with the application scenario information in advance. Perform storage, and after determining the corresponding application scenario information based on the first behavior information, directly load the corresponding optimized data, so that the storage device is more flexible and has better adaptability to multiple application scenarios.
  • FIG. 7 is a schematic structural diagram of an embodiment of a storage device provided by the present application.
  • the device 200 includes a processor 201 and a memory 202 that are connected to each other.
  • the memory 202 is used to store program instructions
  • the processor 201 is used to execute the program instructions to implement the method provided by any one or any non-conflicting combination of the above embodiments.
  • the processor 201 is a central processing unit (CPU), which is one of the main devices of an electronic computer and a core component in the computer. Its function is mainly to interpret computer instructions and process data in computer software.
  • the CPU is the core component of the computer that reads instructions, decodes them, and executes them.
  • the central processing unit mainly consists of two parts, namely the controller and the arithmetic unit, which also include cache memory and the data and control bus that realize the connection between them.
  • the main functions of the central processing unit are to process instructions, perform operations, control time, and process data.
  • the CPU is the core hardware unit that controls and allocates all hardware resources of the computer (such as memory, input and output units) and performs general operations.
  • the CPU is the computing and control core of the computer. The operations of all software layers in the computer system will eventually be mapped to CPU operations through the instruction set.
  • the memory 202 is a read-only memory (ROM) or a random access memory (RAM), which is a memory device in a computer system and is mainly used to store programs and data. All information in the computer, including input raw data, computer programs, intermediate running results, and final running results, are stored in memory. It stores and retrieves information according to the location specified by the controller.
  • ROM read-only memory
  • RAM random access memory
  • Figure 8 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application.
  • the computer-readable storage medium 300 includes program instructions 301.
  • the program instructions 301 can be executed to implement any one of the above embodiments or Any non-conflicting combination of methods provided.
  • the capacity of the computer-readable storage medium 300 can meet the requirements for storing the program instructions 301 .
  • embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media 300 (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) embodying computer-usable program code therein.
  • computer-readable storage media 300 including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer-readable storage media 300 may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the program instructions 301 stored in the computer-readable storage medium 300 generate instructions including An article of manufacture of a device that instructs the device to perform the functions specified in a process or processes of a flowchart and/or a block or blocks of a block diagram.
  • These computer-readable storage media 300 may also be loaded onto a computer or other programmable data processing device such that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, thereby causing the computer or other programmable device to perform a computer-implemented process.
  • the program instructions 301 executed on provide steps for implementing the functions specified in the flow diagram process or processes and/or the block diagram block or blocks.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Stored Programmes (AREA)

Abstract

本申请涉及存储产品技术领域,公开了一种存储装置的优化方法、存储装置以及计算机可读存储介质,该方法包括:获取主设备在对存储装置进行识别过程中的第一行为信息;根据第一行为信息,确定对应的应用场景信息;根据应用场景信息,对存储装置进行优化。通过上述方法,通过获取主设备在对存储装置进行识别过程中的第一行为信息,确定对应的应用场景信息,再根据应用场景信息对存储装置进行优化,能够识别不同的主设备,并针对不同主设备的应用场景进行优化,从而提高存储装置的性能、寿命和可靠性,提升产品的用户体验。

Description

存储装置的优化方法、存储装置以及计算机可读存储介质 【技术领域】
本申请涉及存储产品技术领域,特别涉及一种存储装置的优化方法、存储装置以及计算机可读存储介质。
【背景技术】
存储产品会应用到各种场合,如视频录像、拷贝文件、系统盘等,各种场合的复杂度差别非常大。在存储产品中,会把这些场合简单的区分为只读、只写或读写混合应用,市面上的企业级SSD也会针对这些场合做不同的优化,但是这样就需要用户能清楚自己的应用场景并选择对应的存储产品,对用户专业有一定要求。另外在消费类产品中,厂家也不会去做这么细致的分类,对生产管理有一定要求,所以消费类一般是通用存储产品,且基本不会针对不同场景优化。
在存储产品的应用中,存储产品作为从设备,基本是被动的响应主设备(host)的请求。从设备一般都有唯一的厂商ID+产品ID+系列号组合,所以主设备可以方便的识别从设备。但是目前常见的存储产品大多无法识别接入的不同主设备,也无法记忆接入的不同主设备的使用场景,也就无法针对不同的主设备做不同的优化。
【发明内容】
本申请主要解决的技术问题是提供一种存储装置的优化方法、存储装置以及计算机可读存储介质,能够解决现有存储产品在应用过程中无法针对不同主设备的应用场景进行优化的问题。
为解决上述技术问题,本申请第一方面采用的一个技术方案是:提供一种存储装置的优化方法,该方法包括:
获取主设备在对存储装置进行识别过程中的第一行为信息;根据第一行为信息,确定对应的应用场景信息;根据应用场景信息,对存储装置进行优化。
可选地,获取主设备在对存储装置进行识别过程中的第一行为信 息,包括:
响应于存储装置上电,获取主设备对存储装置进行识别过程中的命令、时间值、电压值中的至少一种信息作为第一行为信息。
可选地,获取主设备在对存储装置进行识别过程中的第一行为信息,还包括:
响应于存储装置上电,获取主设备的设备识别码作为第一行为信息。
可选地,根据第一行为信息,确定对应的应用场景信息,包括:
将第一行为信息与存储装置中存储的第二行为信息进行匹配,确定与第一行为信息匹配的第二行为信息;确定与第一行为信息匹配的第二行为信息对应的主设备;确定主设备对应的应用场景信息。
可选地,上述方法还包括:
在根据第一行为信息,未获取到对应的应用场景信息时,对第一行为信息进行存储。
可选地,对第一行为信息进行存储,包括:
对第一行为信息进行处理,以得到对应的第二行为信息;对第二行为信息进行存储。
可选地,对第一行为信息进行处理,以得到对应的第二行为信息,包括:
对第一行为信息进行散列值映射,以得到对应的第二行为信息。
可选地,对第二行为信息进行存储,包括:
将第二行为信息与主设备关联;建立主设备对应的应用场景信息;对第二行为信息和第二行为信息关联的主设备对应的应用场景信息进行存储。
可选地,根据应用场景信息,对存储装置进行优化,包括:
加载应用场景信息对应的优化数据;利用优化数据对存储装置进行优化。
为解决上述技术问题,本申请第二方面采用的一个技术方案是:提供一种存储装置,该装置包括互相连接的处理器和存储器。
可选地,存储器用于存储程序指令,处理器用于执行该程序指令以实现上述存储装置的优化方法。
为解决上述技术问题,本申请第三方面采用的一个技术方案是:提供一种计算机可读存储介质,该存储介质存储有程序指令,该程序指令能够被执行以实现上述存储装置的优化方法。
区别于现有技术,本申请提供了一种存储装置的优化方法、存储装置以及计算机可读存储介质,该方法包括:获取主设备在对存储装置进行识别过程中的第一行为信息;根据第一行为信息,确定对应的应用场景信息;根据应用场景信息,对存储装置进行优化。通过上述方法,通过获取主设备在对存储装置进行识别过程中的第一行为信息,确定对应的应用场景信息,再根据应用场景信息对存储装置进行优化,能够识别不同的主设备,并针对不同主设备的应用场景进行优化,从而提高存储装置的性能、寿命和可靠性,提升产品的用户体验。
【附图说明】
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。其中:
图1是本申请提供的存储装置的优化方法第一实施例的流程示意图;
图2是图1中S12的流程示意图;
图3是图1中S13的流程示意图;
图4是本申请提供的存储装置的优化方法第二实施例的流程示意图;
图5是图4中S23的流程示意图;
图6是图5中S232的流程示意图;
图7是本申请提供的存储装置一实施例的结构示意图;
图8是本申请提供的计算机可读存储介质一实施例的结构示意图。
【具体实施方式】
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
本申请实施例中的步骤并不一定是按照所描述的步骤顺序进行处理,可以按照需求有选择的将步骤打乱重排,或者删除实施例中的步骤,或者增加实施例中的步骤,本申请实施例中的步骤描述只是可选的顺序组合,并不代表本申请实施例的所有步骤顺序组合,实施例中的步骤顺序不能认为是对本申请的限制。
本申请实施例中的术语“和/或”指的是包括相关联的列举项目中的一个或多个的任何和全部的可能组合。还要说明的是:当用在本说明书中时,“包括/包含”指定所陈述的特征、整数、步骤、操作、元件和/或组件的存在,但是不排除一个或多个其他特征、整数、步骤、操作、元件和/或组件和/或它们的组群的存在或添加。
本申请中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
参阅图1,图1是本申请提供的存储装置的优化方法第一实施例的流程示意图,该方法包括:
S11:获取主设备在对存储装置进行识别过程中的第一行为信息。
可以理解地,在存储通讯中,主设备(host)和从设备(存储产品)通信的第一步是需要对从设备做识别,比如物理层正确建立连接、链路匹配、获取从设备的类型和详细信息(如USB枚举)、设备容量等。要完成这个对从设备的识别过程,需要一连串的组合操作。存储协议文档会定义每个子操作的标准,但不会定义整个识别过程的一连串操作,这样在识别从设备的整个过程中,不同的主设备的操作会有一定的差别,比如命令先后顺序不一样,命令数量不一样,或者命令之间的时间差不一样,甚至主设备的供电电压也有差异等等(不同的存储协议会有不同的差异点);同时,对于同一个主设备,由于识别从设备的行为是软硬件固定逻辑操作,具有一定的一致性。
可选地,响应于存储装置上电,获取主设备对存储装置进行识别过程中的命令、时间值、电压值中的至少一种信息作为第一行为信息。
可选地,响应于存储装置上电,还可以获取主设备的设备识别码作为第一行为信息。具体地,主设备具有唯一的设备识别码,设备识别码可以包括:Device ID,IMEI,UUID,UDID,OAID,IDFA,GAID,ESN等等。不同主设备之间的设备识别码不同,因此存储装置可以基于设备识别码对不同的主设备进行区分。
可以理解地,对于主设备对存储装置进行识别过程中涉及的其他信息,只要能够用于区分不同的主设备,也可以作为第一行为信息,在此不做具体限定。
可选地,为了提高识别的准确率,可以针对性地挑选不同的行为信息,也可以对行为信息进行处理,例如对时间值、电压值等做精度调整等等。
S12:根据所述第一行为信息,确定对应的应用场景信息。
可选地,存储装置中可以预先存储不同主设备对应的第二行为信息,将第一行为信息与第二行为信息进行匹配,以确定对应的主设备, 进而确定对应的应用场景信息。
可选地,没有预先存储主设备对应的第二行为信息的存储装置在与主设备首次连接时,无法获取到对应的应用场景信息,需要对该主设备的第一行为信息进行存储,这个过程将在在后面的实施例中进行详细说明。
可选地,存储装置在与主设备进行一次连接后,对主设备的第一行为信息进行存储,并建立对应的应用场景信息,后续再次连接该主设备时,存储装置可以根据第一行为信息识别该主设备,并确定对应的应用场景信息。
S13:根据所述应用场景信息,对所述存储装置进行优化。
可选地,针对不同的应用场景信息,存储装置可以加载对应的优化数据,并利用优化数据对存储装置进行优化。
可选地,优化数据可以是程序、脚本等,对于不同的应用场景信息,存储装置可以预先存储相对应的优化数据。例如在一具体实施例中,存储装置为固态硬盘,主设备为计算机,固态硬盘在获取计算机对固态硬盘进行识别过程中的第一行为信息后,识别到该计算机并确定对应的应用场景为用作系统盘,固态硬盘会加载对应的优化数据,利用优化数据进行磁盘清理、碎片整理等操作,以提高系统的响应速度;同时还可以利用优化数据定期进行磁盘检查,以提高系统盘的可靠性。
相比于现有技术,本实施例提供了一种存储装置的优化方法,该方法包括:获取主设备在对存储装置进行识别过程中的第一行为信息;根据第一行为信息,确定对应的应用场景信息;根据应用场景信息,对存储装置进行优化。通过上述方法,通过获取主设备在对存储装置进行识别过程中的第一行为信息,确定对应的应用场景信息,再根据应用场景信息对存储装置进行优化,能够识别不同的主设备,并针对不同主设备的应用场景进行优化,从而提高存储装置的性能、寿命和可靠性,提升产品的用户体验。
参阅图2,图2是图1中S12的流程示意图,S12还可以包括:
S121:将所述第一行为信息与所述存储装置中存储的第二行为信息 进行匹配,确定与所述第一行为信息匹配的第二行为信息。
可选地,存储装置中预先存储有第二行为信息,第二行为信息可以为存储装置在与主设备首次连接时获取并存储得到。
可选地,对于同一类型的主设备,其对存储装置进行识别过程中的行为信息具有一定的一致性,所以也可以在存储装置开发过程中,对常用的多种类型主设备进行测试,获取多种类型主设备分别对应的多组行为信息,将这多组行为信息写入存储装置中,作为第二行为信息。
可选地,可以进一步建立多种类型主设备分别对应的应用场景信息,与第二行为信息关联,一起存储到存储装置中。
可选地,将第一行为信息与第二行为信息进行匹配,确定与第一行为信息匹配的第二行为信息。
S122:确定与所述第一行为信息匹配的第二行为信息对应的主设备。
可选地,在存储装置中存储的第二行为信息与主设备是一一对应的,确定与第一行为信息匹配的第二行为信息后,可以确定其对应的主设备。
S123:确定所述主设备对应的应用场景信息。
可选地,存储装置中预先存储有多种类型主设备分别对应的应用场景信息,在确定主设备后,可以确定对应的应用场景信息。
参阅图3,图3是图1中S13的流程示意图,S13还可以包括:
S131:加载所述应用场景信息对应的优化数据。
S132:利用所述优化数据对所述存储装置进行优化。
可选地,优化数据可以是程序、脚本等,存储装置可以预先存储多种应用场景信息分别对应的优化数据。
可选地,存储装置加载应用场景信息对应的优化数据,利用优化数据可以对存储装置进行优化,从而使存储装置在不同应用场景下都能发挥良好的性能。
可选地,在一具体实施例中,存储装置为一存储卡,其可以连接的主设备包括视频监控设备和计算机,视频监控设备和计算机在对存储卡 进行识别过程中的行为信息不同。在连接视频监控设备时,该存储卡获取视频监控设备在进行识别过程中的行为信息,确定应用场景为视频录像,此时存储卡加载对应的优化数据,提高存储吞吐,从而降低时延,确保视频画面不出现丢帧、错帧。用户可能需要将该存储卡中的视频拷贝出来,可以将该存储卡连接到计算机上,在连接计算机时,该存储卡获取计算机在进行识别过程中的行为信息,确定应用场景为拷贝文件,此时存储卡加载对应的优化数据,将文件系统切换成和计算机的磁盘相对应的文件系统,并进行4k对齐,从而提升视频文件的拷贝速度。
参阅图4,图4是本申请提供的存储装置的优化方法第二实施例的流程示意图,该方法包括:
S21:获取主设备在对存储装置进行识别过程中的第一行为信息。
S22:根据所述第一行为信息,确定对应的应用场景信息。
S23:在根据所述第一行为信息,未获取到对应的应用场景信息时,对所述第一行为信息进行存储。
可选地,在存储装置与主设备首次连接时,根据第一行为信息无法获取到对应的应用场景信息,此时需要对该主设备的第一行为信息进行存储,建立对应的应用场景信息,以使存储装置再次连接该主设备时,根据第一行为信息识别该主设备,进而确定对应的应用场景信息,根据应用场景信息对存储装置进行优化。
参阅图5,图5是图4中S23的流程示意图,S23还可以包括:
S231:对所述第一行为信息进行处理,以得到对应的第二行为信息。
可选地,为了更好地记录第一行为信息,更方便地使用存储装置存储的第二行为信息进行匹配,可以对第一行为信息进行处理,例如对第一行为信息利用散列函数进行散列值映射,把大量的数据转化为较短的固定长度数据,以得到对应的第二行为信息。
具体地,散列函数(或散列算法,又称哈希函数,英语:Hash Function)是一种从任何一种数据中创建小的数字“指纹”的方法。散列函数把消息或数据压缩成摘要,使得数据量变小,将数据的格式固定下来。该函数将数据打乱混合,重新创建一个叫做散列值(hash values,hash codes, hash sums,或hashes)的指纹。散列值通常用一个短的随机字母和数字组成的字符串来代表。好的散列函数在输入域中很少出现散列冲突。
S232:对所述第二行为信息进行存储。
可选地,处理第一行为信息得到第二行为信息后,对第二行为信息进行存储。
参阅图6,图6是图5中S232的流程示意图,S232还可以包括:
S2321:将所述第二行为信息与所述主设备关联。
可选地,将第二行为信息与主设备进行关联,以使存储装置中存储的第二行为信息与主设备是一一对应的关系。
S2322:建立所述主设备对应的应用场景信息。
可选地,建立该主设备对应的应用场景信息,以使存储的应用场景信息与主设备也是一一对应的关系。
S2323:对所述第二行为信息和所述第二行为信息关联的所述主设备对应的应用场景信息进行存储。
可选地,将第二行为信息与其关联的主设备对应的应用场景信息作为一组数据,存储到存储装置中。
可选地,可以针对该应用场景信息建立对应的优化数据,加入该组数据中一起进行存储,以使存储装置再次根据第一行为信息识别到对应的主设备时能够更快地加载优化数据进行优化。
可选地,也可以针对常用的多种应用场景分别建立对应的优化数据,这些优化数据在同种类型的应用场景下具有一定的通用性,在存储装置开发过程中,预先与应用场景信息一起进行存储,在根据第一行为信息确定对应的应用场景信息后,直接加载对应的优化数据,以使存储装置更具灵活性,对多种应用场景有更好地适应性。
参阅图7,图7是本申请提供的存储装置一实施例的结构示意图,该装置200包括互相连接的处理器201和存储器202。
具体地,存储器202用于存储程序指令,处理器201用于执行该程序指令以实现上述实施例中任一个或任一不冲突的组合所提供的方法。
可选地,处理器201为中央处理器(CPU),是电子计算机的主要 设备之一,电脑中的核心配件。其功能主要是解释计算机指令以及处理计算机软件中的数据。CPU是计算机中负责读取指令,对指令译码并执行指令的核心部件。中央处理器主要包括两个部分,即控制器、运算器,其中还包括高速缓冲存储器及实现它们之间联系的数据、控制的总线。中央处理器的功效主要为处理指令、执行操作、控制时间、处理数据。在计算机体系结构中,CPU是对计算机的所有硬件资源(如存储器、输入输出单元)进行控制调配、执行通用运算的核心硬件单元。CPU是计算机的运算和控制核心。计算机系统中所有软件层的操作,最终都将通过指令集映射为CPU的操作。
可选地,存储器202为只读存储器(ROM)或随机存取存储器(RAM),是计算机系统中的记忆设备,主要用来存放程序和数据。计算机中的全部信息,包括输入的原始数据、计算机程序、中间运行结果和最终运行结果,都保存在存储器中。它是根据控制器指定的位置存入和取出信息。
参阅图8,图8是本申请提供的计算机可读存储介质一实施例的结构示意图,该计算机可读存储介质300包括程序指令301,程序指令301能够被执行以实现上述实施例中任一个或任一不冲突的组合所提供的方法。其中,计算机可读存储介质300的容量大小能够满足存储程序指令301的要求。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可读存储介质300(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机可读存储介质300实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机可读存储介质300到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备 的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的程序指令301产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机可读存储介质300也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储介质300中的程序指令301产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机可读存储介质300也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的程序指令301提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是根据本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (11)

  1. 一种存储装置的优化方法,其特征在于,所述方法包括:
    获取主设备在对存储装置进行识别过程中的第一行为信息;
    根据所述第一行为信息,确定对应的应用场景信息;
    根据所述应用场景信息,对所述存储装置进行优化。
  2. 根据权利要求1所述的方法,其特征在于,
    所述获取主设备在对存储装置进行识别过程中的第一行为信息,包括:
    响应于存储装置上电,获取主设备对所述存储装置进行识别过程中的命令、时间值、电压值中的至少一种信息作为第一行为信息。
  3. 根据权利要求1所述的方法,其特征在于,
    所述获取主设备在对存储装置进行识别过程中的第一行为信息,包括:
    响应于存储装置上电,获取主设备的设备识别码作为第一行为信息。
  4. 根据权利要求1所述的方法,其特征在于,
    所述根据所述第一行为信息,确定对应的应用场景信息,包括:
    将所述第一行为信息与所述存储装置中存储的第二行为信息进行匹配,确定与所述第一行为信息匹配的第二行为信息;
    确定与所述第一行为信息匹配的第二行为信息对应的主设备;
    确定所述主设备对应的应用场景信息。
  5. 根据权利要求1所述的方法,其特征在于,
    所述方法还包括:
    在根据所述第一行为信息,未获取到对应的应用场景信息时,对所述第一行为信息进行存储。
  6. 根据权利要求5所述的方法,其特征在于,
    所述对所述第一行为信息进行存储,包括:
    对所述第一行为信息进行处理,以得到对应的第二行为信息;
    对所述第二行为信息进行存储。
  7. 根据权利要求6所述的方法,其特征在于,
    所述对所述第一行为信息进行处理,以得到对应的第二行为信息,包括:
    对所述第一行为信息进行散列值映射,以得到对应的第二行为信息。
  8. 根据权利要求6所述的方法,其特征在于,
    所述对所述第二行为信息进行存储,包括:
    将所述第二行为信息与所述主设备关联;
    建立所述主设备对应的应用场景信息;
    对所述第二行为信息和所述第二行为信息关联的所述主设备对应的应用场景信息进行存储。
  9. 根据权利要求1所述的方法,其特征在于,
    所述根据所述应用场景信息,对所述存储装置进行优化,包括:
    加载所述应用场景信息对应的优化数据;
    利用所述优化数据对所述存储装置进行优化。
  10. 一种存储装置,其特征在于,所述存储装置包括互相连接的处理器和存储器,所述存储器用于存储程序指令,所述处理器用于执行所述程序指令以实现如权利要求1至9任一项所述的方法。
  11. 一种计算机可读存储介质,其特征在于,存储有程序指令,所述程序指令能够被执行以实现如权利要求1至9任一项所述的方法。
PCT/CN2022/097732 2022-06-01 2022-06-08 存储装置的优化方法、存储装置以及计算机可读存储介质 WO2023231064A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210628317.4A CN117234407A (zh) 2022-06-01 2022-06-01 存储装置的优化方法、存储装置以及计算机可读存储介质
CN202210628317.4 2022-06-01

Publications (1)

Publication Number Publication Date
WO2023231064A1 true WO2023231064A1 (zh) 2023-12-07

Family

ID=89026661

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/097732 WO2023231064A1 (zh) 2022-06-01 2022-06-08 存储装置的优化方法、存储装置以及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN117234407A (zh)
WO (1) WO2023231064A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302496A (zh) * 2015-11-23 2016-02-03 浪潮(北京)电子信息产业有限公司 一种集群存储系统的读写性能优化框架及方法
US20180136839A1 (en) * 2016-11-14 2018-05-17 Open Drives LLC Storage Optimization Based I/O Pattern Modeling
US20210256349A1 (en) * 2020-02-14 2021-08-19 Micron Technology, Inc. Optimization of quality of service of data storage devices
CN113885692A (zh) * 2021-10-22 2022-01-04 合肥兆芯电子有限公司 存储器效能优化方法、存储器控制电路单元以及存储装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302496A (zh) * 2015-11-23 2016-02-03 浪潮(北京)电子信息产业有限公司 一种集群存储系统的读写性能优化框架及方法
US20180136839A1 (en) * 2016-11-14 2018-05-17 Open Drives LLC Storage Optimization Based I/O Pattern Modeling
US20210256349A1 (en) * 2020-02-14 2021-08-19 Micron Technology, Inc. Optimization of quality of service of data storage devices
CN113885692A (zh) * 2021-10-22 2022-01-04 合肥兆芯电子有限公司 存储器效能优化方法、存储器控制电路单元以及存储装置

Also Published As

Publication number Publication date
CN117234407A (zh) 2023-12-15

Similar Documents

Publication Publication Date Title
JP5309043B2 (ja) ストレージシステム及びストレージシステムでの重複データ削除のための方法
US20160150012A1 (en) Content-based replication of data between storage units
US8060734B1 (en) Systems and methods for providing recommendations to improve boot performance based on community data
CN104699739A (zh) 针对文件不同版本生成内容可寻址存储签名的方法和系统
US11010055B2 (en) Command processing for a storage system
CN108509215B (zh) 一种系统软件的更换方法、装置、终端设备及存储介质
CN104699740A (zh) 针对文件生成内容可寻址存储签名的方法和系统
US7921230B2 (en) USB devices pre-configuration for KVM switch
CN112035475A (zh) 区块链的区块存储方法、装置、节点设备及存储介质
TWI778811B (zh) 升級方法,電腦系統和遠端升級設備
CN105208135A (zh) 一种文件传输方法和设备
US11467987B1 (en) Computational pipelines for computational storage devices
US9639340B2 (en) System and method of loading virtual machines
CN111124280A (zh) 一种数据追加写入方法、装置及电子设备和存储介质
CN112445729A (zh) 操作地址确定方法、PCIe系统、电子设备及存储介质
US20150269098A1 (en) Information processing apparatus, information processing method, storage, storage control method, and storage medium
WO2023231064A1 (zh) 存储装置的优化方法、存储装置以及计算机可读存储介质
CN112433812A (zh) 一种虚拟机跨集群迁移方法、系统、设备及计算机介质
JP2016514393A (ja) 差分符号化のためのシリアライゼーション
US20100281212A1 (en) Content-based write reduction
JP5444728B2 (ja) ストレージシステム、ストレージシステムにおけるデータ書込方法及びデータ書込プログラム
WO2020113421A1 (zh) 一种挂载文件系统的方法、终端设备及存储介质
CN114138711A (zh) 文件迁移方法、装置、存储介质及电子设备
US10091298B2 (en) Enhancing performance of data storage in a dispersed storage network
JP2019515381A (ja) 一貫性を有する散在ストレージ・ネットワークにおけるデータの格納

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22944390

Country of ref document: EP

Kind code of ref document: A1