CN115963977A - Solid state disk, data operation method and device thereof, and electronic device - Google Patents

Solid state disk, data operation method and device thereof, and electronic device Download PDF

Info

Publication number
CN115963977A
CN115963977A CN202111172637.5A CN202111172637A CN115963977A CN 115963977 A CN115963977 A CN 115963977A CN 202111172637 A CN202111172637 A CN 202111172637A CN 115963977 A CN115963977 A CN 115963977A
Authority
CN
China
Prior art keywords
data
storage unit
namespace
solid state
state disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111172637.5A
Other languages
Chinese (zh)
Inventor
陈镇星
尹慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongshan Longsys Electronics Co ltd
Original Assignee
Zhongshan Longsys Electronics Co ltd
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 Zhongshan Longsys Electronics Co ltd filed Critical Zhongshan Longsys Electronics Co ltd
Priority to CN202111172637.5A priority Critical patent/CN115963977A/en
Priority to PCT/CN2021/131265 priority patent/WO2023056687A1/en
Publication of CN115963977A publication Critical patent/CN115963977A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application is applicable to the technical field of data storage, and provides a solid state disk, a data operation method and device thereof, and electronic equipment, wherein the data operation method of the solid state disk comprises the following steps: receiving a data operation instruction from the electronic equipment, wherein the data operation instruction carries information of data to be operated and an identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs; if the identification of the target name space is a first identification, performing data operation on a storage unit corresponding to the first name space based on the information of the data to be operated, wherein the storage unit corresponding to the first name space is used for storing system data of the electronic equipment; if the identifier of the target namespace is the second identifier, performing data operation on the storage unit corresponding to the second namespace based on the information of the data to be operated, wherein the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment, so that the time delay of the operation of the system data can be reduced.

Description

Solid state disk, data operation method and device thereof, and electronic equipment
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a solid state disk, a data operation method and apparatus thereof, and an electronic device.
Background
A Solid State Disk (SSD) is a hard disk composed of a control unit and a solid state storage unit. The SSD has the same specification, function, and usage method of an interface as a general hard disk (i.e., a mechanical hard disk), and has a faster read/write speed and higher stability because the SSD does not have a mechanical rotation device of the general hard disk, and is widely used as a storage device of electronic devices (e.g., computers) in various fields.
When the electronic device uses the SSD as the storage device, both system data and non-system data are usually stored in the SSD. However, the existing SSD usually stores the system data and the non-system data of the electronic device in a mixed manner, which causes a large time delay for the read/write operation of the system data.
Disclosure of Invention
In view of this, embodiments of the present application provide a solid state disk, a data operation method and apparatus thereof, and an electronic device, so as to solve a technical problem that a read-write operation of system data has a large time delay due to an existing SSD data storage manner.
A first aspect of the embodiments of the present application provides a data operation method for a solid state disk, where the data operation method is applied to the solid state disk, and the data operation method includes:
receiving a data operation instruction from electronic equipment, wherein the data operation instruction carries information of data to be operated and an identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs;
if the identifier of the target namespace is a first identifier, performing data operation on a storage unit corresponding to a first namespace based on the information of the data to be operated, wherein the storage unit corresponding to the first namespace is used for storing system data of the electronic equipment;
and if the identifier of the target namespace is a second identifier, performing data operation on a storage unit corresponding to a second namespace based on the information of the data to be operated, wherein the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment.
Optionally, before the receiving the data operation instruction from the electronic device, the data operation method further includes:
receiving a configuration information acquisition request from the electronic equipment;
responding to the configuration information acquisition request, and returning the configuration information of the solid state disk to the electronic equipment; the configuration information is used for describing a configuration situation of a storage unit in the solid state disk, and the configuration situation includes: the storage unit of the solid state disk is defined by a first naming space and a second naming space; the storage unit corresponding to the first namespace is used for storing system data of the electronic equipment, and the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment; the identifier of the first namespace is the first identifier, and the identifier of the second namespace is the second identifier.
Optionally, the first namespace and the second namespace both correspond to at least one storage unit; the storage unit corresponding to the first namespace is physically independent from the storage unit corresponding to the second namespace.
Optionally, all the storage units corresponding to the first namespace are configured as a single-layer unit structure; the storage unit corresponding to the second namespace is configured to be a single-layer unit structure, a multi-layer unit structure, a three-layer unit structure or a four-layer unit structure.
A second aspect of the embodiments of the present application provides a data operation method for a solid state disk, which is applied to an electronic device, and the data operation method includes:
acquiring configuration information of a solid state disk, wherein the configuration information is used for describing the configuration condition of a storage unit in the solid state disk;
and generating a data operation instruction based on the configuration information and the information of the data to be operated, and sending the data operation instruction to the solid state disk, wherein the data operation instruction carries the information of the data to be operated and the identifier of the target namespace corresponding to the storage unit to which the data to be operated belongs.
Optionally, the information of the data to be operated includes a data type, an identifier, or content of the data to be operated; correspondingly, the generating a data operation instruction based on the configuration information and the information of the data to be operated includes:
determining the identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs based on the data type of the data to be operated;
and generating the data operation instruction based on the identification of the target namespace and the identification or the content of the data to be operated.
A third aspect of the embodiments of the present application provides a data operating apparatus for a solid state disk, including:
the data processing device comprises a first communication unit, a second communication unit and a processing unit, wherein the first communication unit is used for receiving a data operation instruction from electronic equipment, and the data operation instruction carries information of data to be operated and an identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs;
the first data operation unit is used for performing data operation on a storage unit corresponding to a first namespace based on the information of the data to be operated if the identifier of the target namespace is a first identifier, and the storage unit corresponding to the first namespace is used for storing system data of the electronic equipment;
and the second data operation unit is used for performing data operation on a storage unit corresponding to a second namespace based on the information of the data to be operated if the identifier of the target namespace is a second identifier, and the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment.
A fourth aspect of an embodiment of the present application provides an electronic device, including:
the second communication unit is used for acquiring configuration information of the solid state disk, and the configuration information is used for describing the configuration condition of a storage unit in the solid state disk;
and the instruction generating unit is used for generating a data operation instruction based on the configuration information and the information of the data to be operated and sending the data operation instruction to the solid state disk, wherein the data operation instruction carries the information of the data to be operated and the identifier of the target namespace corresponding to the storage unit to which the data to be operated belongs.
A fifth aspect of the embodiments of the present application provides a solid state disk, including: the device comprises a data operation device and a plurality of storage units connected with the data operation device; the data manipulation device is configured to perform the steps of the data manipulation method of the first aspect or any alternative of the first aspect.
A sixth aspect of an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored in the memory and executable on the electronic device, the processor implementing the steps of the data manipulation method of the second aspect or any alternative of the second aspect when executing the computer program.
A seventh aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the data manipulation method of the first aspect or any alternative of the first aspect.
An eighth aspect of embodiments of the present application provides another computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the data manipulation method of the second aspect or any alternative of the second aspect.
A ninth aspect of the embodiments of the present application provides a computer program product, which when running on a solid state disk, causes the solid state disk to execute the steps of the data operation method according to the first aspect or any optional manner of the first aspect.
A tenth aspect of the embodiments of the present application provides another computer program product, which, when running on a solid state disk, causes the solid state disk to perform the steps of the data operation method according to the second aspect or any optional manner of the second aspect.
The implementation of the data operation method and device for the solid state disk, the electronic device, the computer readable storage medium and the computer program product provided by the embodiment of the application has the following beneficial effects:
according to the data operation method of the solid state disk, the storage units in the solid state disk are distinguished through the first naming space and the second naming space, namely the storage unit corresponding to the first naming space is used for storing system data of the electronic device, and the storage unit corresponding to the second naming space is used for storing non-system data of the electronic device, so that when the electronic device needs to operate the system data, the electronic device only needs to carry the first identification of the first naming space corresponding to the storage unit to which the system data belongs in the data operation instruction, and the solid state disk can perform data operation on the storage unit corresponding to the first naming space based on the data operation instruction; when the electronic device needs to operate the non-system data, the electronic device only needs to carry a second identifier of a second namespace corresponding to a storage unit to which the non-system data belongs in a data operation instruction, and the solid state disk can perform data operation on the storage unit corresponding to the second namespace based on the data operation instruction. The solid state disk respectively stores the system data and the non-system data of the electronic equipment in different storage units, so that the operation of the system data and the operation of the non-system data are not influenced mutually, and the time delay of the operation of the system data can be reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of a solid state disk according to an embodiment of the present application;
fig. 2 is a flowchart illustrating an implementation of a data operation method of a solid state disk according to an embodiment of the present application;
fig. 3 is a flowchart illustrating an implementation of a data operation method of a solid state disk according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of a data operating apparatus of a solid state disk according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It is noted that the terminology used in the description of the embodiments of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application. In the description of the embodiments of the present application, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an associative relationship describing an association, meaning that there may be three relationships, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more, and "at least one", "one or more" means one, two or more, unless otherwise specified.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a definition of "a first" or "a second" feature may explicitly or implicitly include one or more of the features.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless otherwise specifically stated.
A Solid State Disk (SSD) is a hard disk composed of a control unit and a solid state storage unit. The SSD has the same specification, function, and usage method of an interface as a general hard disk (i.e., a mechanical hard disk), and has a faster read/write speed and higher stability because the SSD does not have a mechanical rotation device of the general hard disk, and is widely used as a storage device of electronic devices (e.g., computers) in various fields.
When the electronic device uses the SSD as the storage device, both system data and non-system data are usually stored in the SSD. However, the conventional SSD generally stores the system data and the non-system data of the electronic device in a mixed manner, that is, the storage unit in the SSD is used for storing both the system data and the non-system data of the electronic device, which causes a large delay in the reading and writing operations of the system data. In addition, most of the storage units in the existing SSD adopt flash memory blocks with a three-level cell (TLC) structure, and since the data read-write speed of the flash memory blocks with the TLC structure is slow, the read-write operation of system data has a long time delay.
In addition, the read-write operation of the system data by the electronic device is generally a fragmentation operation with random addresses and small data length, so that extra filling data can be generated by adopting a flash memory block with a TLC structure in a storage unit, the write amplification of the SSD is increased, and the service life of the SSD is shortened.
In order to solve the foregoing technical problem, an embodiment of the present application first provides a solid state disk. Fig. 1 is a schematic structural diagram of a solid state disk according to an embodiment of the present application. As shown in fig. 1, the solid state disk 10 may include: a data manipulation device 11 and a plurality of storage units 12 connected to the data manipulation device 11.
The data operation device 11 may be a control unit. The data operation device 11 is used for performing data operations on the memory unit 12, for example, performing data writing operations (i.e., writing data into the memory unit 12) or data reading operations (i.e., reading data from the memory unit 12) on the memory unit 12.
The storage unit 12 is a physical (i.e., not logical) storage medium, and may be a flash memory (flash memory) block. For example, the memory unit 12 may be a flash block of a NAND (not AND, NAND) type, OR a flash block of a NOR (not OR, NOR) type, AND the specific type of the flash block is not particularly limited herein.
In the embodiment of the present application, the storage units 12 in the solid state disk 10 are divided into two types, each type includes at least one storage unit 12, and the two types of storage units 12 are defined through a first namespace and a second namespace, that is, the first namespace and the second namespace both correspond to at least one storage unit 12.
It should be noted that the storage unit 12 corresponding to the first namespace and the storage unit 12 corresponding to the second namespace are physically independent from each other, that is, the storage unit 12 corresponding to the first namespace is different from the storage unit 12 corresponding to the second namespace, that is, the storage unit 12 corresponding to the first namespace is not overlapped with the storage unit 12 corresponding to the second namespace.
And the first name space and the second name space are both provided with one identifier. For example, the identification of the first namespace can be a first identification and the identification of the second namespace can be a second identification. In a specific application, the first identifier and the second identifier may both be composed of numbers, letters, or words, for example, the first identifier may be Namespace1, and the second identifier may be Namespace2.
In the embodiment of the present application, when the solid state disk 10 is used as a storage device of an electronic device (e.g., a mobile phone, a tablet computer, a notebook computer, or the like), the storage unit 12 corresponding to the first namespace may be used to store system data of the electronic device, and the storage unit 12 corresponding to the second namespace may be used to store non-system data of the electronic device. The system data may be data related to system operation of the electronic device, among other things. The system operation may be an operation related to an Operating System (OS) of the electronic device, for example, an installation operation of the OS or an installation operation of an Application (APP), or the like. The non-system data may be other data than the system data of the electronic device, such as audio data or video data, etc.
Since the electronic device has a high requirement on the time delay of the operation of the system data, that is, the operation of the system data is required to have a small time delay, in an embodiment of the present application, all the storage units 12 corresponding to the first namespace may be configured as a Single Level Cell (SLC) structure. Because the data read-write speed of the storage unit with the SLC structure is high, the data volume stored in each unit is small, and the service life of each unit is long, the storage unit with the SLC structure can reduce the time delay of the operation of system data, can reduce the write-in amplification of the SSD, and prolongs the service life of the SSD.
In another embodiment of the present application, the storage unit 12 corresponding to the second namespace may be configured as an SLC structure, or a multi-level cell (MLC) structure, or a TLC structure, or a quad-level cell (QLC) structure, and the like, which is specifically set according to actual requirements, and is not particularly limited herein.
Since the solid state disk 10 needs to communicate with the electronic device when serving as a storage device of the electronic device, please continue to refer to fig. 1, the solid state disk 10 may further include an interface unit 13.
Illustratively, the interface unit 13 may include: a high-speed serial computer extended bus (PCIE) interface, a Serial Advanced Technology Attachment (SATA) interface, a Serial Attached SCSI (SAS) interface, or a Mini SATA (MSATA) interface, etc. SCSI refers to Small Computer System Interface (Small Computer System Interface), among others.
In specific applications, when the electronic device needs to perform data operation on the solid state disk 10, a user may insert the solid state disk 10 into a corresponding interface slot on the electronic device, so that the solid state disk 10 establishes communication connection with the electronic device through the interface unit 13, and the electronic device further implements the data operation on the solid state disk 10.
Based on the solid state disk provided by the embodiment, the embodiment of the application further provides a data operation method of the solid state disk. Fig. 2 is a flowchart of an implementation of a data operation method of a solid state disk provided in an embodiment of the present application, and as shown in fig. 2, the data operation method may include S21 to S23, which are detailed as follows:
s21: the electronic equipment acquires the configuration information of the solid state disk.
In the embodiment of the application, after the electronic device establishes communication connection with the solid state disk, the electronic device needs to acquire configuration information of the solid state disk, where the configuration information is used to describe a configuration situation of a storage unit in the solid state disk. Specifically, the configuration case may include the following: the storage unit of the solid state disk is defined by a first naming space and a second naming space; the storage unit corresponding to the first namespace is used for storing system data of the electronic equipment, and the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment; the identifier of the first namespace is a first identifier and the identifier of the second namespace is a second identifier.
In a possible implementation manner, after the electronic device establishes a communication connection with the solid state disk, the electronic device may actively acquire configuration information of the solid state disk. In this implementation, the electronic device may send a configuration information acquisition request to the solid state disk. After receiving the configuration information acquisition request, the solid state disk may return the configuration information of the solid state disk to the electronic device in response to the configuration information acquisition request.
In another possible implementation manner, after the electronic device establishes a communication connection with the solid state disk, the electronic device may passively receive configuration information of the solid state disk sent by the solid state disk. In this implementation manner, after the electronic device establishes communication connection with the solid state disk, the solid state disk may actively send configuration information of the solid state disk to the electronic device. The electronic equipment receives the configuration information of the solid state disk sent by the solid state disk.
S22: and the electronic equipment generates a data operation instruction based on the configuration information and the information of the data to be operated, and sends the data operation instruction to the solid state disk.
In the embodiment of the application, after the electronic device acquires the configuration information of the solid state disk, data operation can be performed on the solid state disk. The data operations may include: a data read operation or a data write operation, etc.
When the electronic device needs to perform data operation on the solid state disk, the electronic device may generate a data operation instruction based on the configuration information of the solid state disk and the information of the data to be operated, and send the data operation instruction to the solid state disk. The information of the data to be operated may include: data type, identification, content, etc. For example, the data types of the data to be operated on may include: system data or non-system data. The identifier of the data to be operated may be a name of the data to be operated, or may be a name of a file in which the data to be operated is located, or the like.
In one embodiment of the present application, the electronic device may generate the data operation instruction by:
determining the identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs based on the data type of the data to be operated;
and generating the data operation instruction based on the identification of the target namespace and the identification or the content of the data to be operated.
In a possible implementation manner of this embodiment, when the data type of the data to be operated is system data, the electronic device determines that the storage unit to which the data to be operated belongs is a storage unit used for storing the system data in the solid state disk, that is, a storage unit corresponding to the first namespace, and therefore, the electronic device determines that the target namespace is the first namespace. Based on the data operation instruction, the electronic equipment generates a data operation instruction based on the first identifier of the first namespace and the identifier or the content of the data to be operated.
In another possible implementation manner of this embodiment, when the data type of the data to be operated is non-system data, the electronic device determines that the storage unit to which the data to be operated belongs is a storage unit used for storing the non-system data in the solid state disk, that is, a storage unit corresponding to the second namespace, and therefore, the electronic device determines that the target namespace is the second namespace. Based on the operation command, the electronic equipment generates a data operation command based on the second identifier of the second namespace and the identifier or the content of the data to be operated.
Therefore, in the embodiment of the application, the data operation instruction generated by the electronic device carries information of the data to be operated and the identifier of the target namespace corresponding to the storage unit to which the data to be operated belongs.
In this embodiment, the electronic device generates the data operation instruction based on the identifier of the target namespace and the identifier or the content of the data to be operated, which may specifically include the following two cases:
in case 1, the electronic device needs to perform data reading operation on the solid state disk.
In this case, the electronic device may generate the data reading instruction based on the identifier of the target namespace and the identifier of the data to be read. Specifically, if the data to be read is system data of the electronic device, the electronic device may generate a data reading instruction based on a first identifier of the first namespace and an identifier of the data to be read; if the data to be read is non-system data of the electronic device, the electronic device may generate a data reading instruction based on the second identifier of the second namespace and the identifier of the data to be read. That is, the data reading instruction generated by the electronic device includes an identifier of data to be read and an identifier of the target namespace.
And in case 2, the electronic equipment needs to perform data writing operation on the solid state disk.
In this case, the electronic device may generate the data write instruction based on the identification of the target namespace and the content of the data to be written. Specifically, if the data to be written is system data of the electronic device, the electronic device may generate a data writing instruction based on the first identifier of the first namespace and the content of the data to be written; if the data to be written is non-system data of the electronic device, the electronic device may generate a data writing instruction based on the second identifier of the second namespace and the content of the data to be written. That is, the data writing instruction generated by the electronic device includes the content of the data to be written and the identifier of the target namespace.
S23: the solid state disk receives a data operation instruction from the electronic equipment.
In the embodiment of the application, after the solid state disk receives the data operation instruction sent by the electronic device, the data operation instruction can be analyzed to obtain the identifier of the target namespace corresponding to the storage unit to which the data to be operated belongs and the information of the data to be operated.
In an embodiment of the present application, if the solid state disk detects that the identifier of the target namespace is the first identifier, the solid state disk executes S24. In another embodiment of the present application, if the solid state disk detects that the identifier of the target namespace is the second identifier, the solid state disk executes S25.
S24: and if the solid state disk detects that the identifier of the target name space is the first identifier, performing data operation on the storage unit corresponding to the first name space based on the information of the data to be operated.
In this embodiment, when the identifier of the target namespace carried in the data operation instruction is the first identifier, it is described that the data to be operated is system data of the electronic device, and at this time, the solid state disk may perform data operation on the storage unit corresponding to the first namespace based on the information of the data to be operated carried in the data operation instruction.
Specifically, when the data operation instruction is a data reading instruction, the solid state disk may read the data to be read from the storage unit corresponding to the first namespace based on the identifier of the data to be read carried in the data reading instruction. When the data operation instruction is a data writing instruction, the solid state disk can write the content of the data to be written carried in the data writing instruction into the storage unit corresponding to the first namespace.
S25: and if the solid state disk detects that the identifier of the target name space is the second identifier, performing data operation on a storage unit corresponding to the second name space based on the information of the data to be operated.
In this embodiment, when the identifier of the target namespace carried in the data operation instruction is the second identifier, it is indicated that the data to be operated is non-system data of the electronic device, and at this time, the solid state disk may perform data operation on the storage unit corresponding to the second namespace based on the information of the data to be operated carried in the data operation instruction.
Specifically, when the data operation instruction is a data reading instruction, the solid state disk may read the data to be read from the storage unit corresponding to the second namespace based on the identifier of the data to be read carried in the data reading instruction. When the data operation instruction is a data writing instruction, the solid state disk can write the content of the data to be written carried in the data writing instruction into the storage unit corresponding to the second namespace.
S24 and S25 are two parallel steps, and for a single data operation command, if the solid state disk executes S24, S25 is not executed, and if the solid state disk executes S25, S24 is not executed.
As can be seen from the above, in the data operation method of the solid state disk provided in this embodiment, since the storage units in the solid state disk are distinguished by the first namespace and the second namespace, that is, the storage unit corresponding to the first namespace is used for storing system data of the electronic device, and the storage unit corresponding to the second namespace is used for storing non-system data of the electronic device, when the electronic device needs to operate the system data, the electronic device only needs to carry the first identifier of the first namespace corresponding to the storage unit to which the system data belongs in the data operation instruction, and the solid state disk can perform data operation on the storage unit corresponding to the first namespace based on the data operation instruction; when the electronic device needs to operate the non-system data, the electronic device only needs to carry a second identifier of a second namespace corresponding to a storage unit to which the non-system data belongs in a data operation instruction, and the solid state disk can perform data operation on the storage unit corresponding to the second namespace based on the data operation instruction. The solid state disk respectively stores the system data and the non-system data of the electronic equipment in different storage units, so that the operation of the system data and the operation of the non-system data are not influenced mutually, and the time delay of the operation of the system data can be reduced.
Referring to fig. 3, fig. 3 is a schematic flowchart of a data operation method of a solid state disk according to another embodiment of the present application. As shown in fig. 3, with respect to the embodiment corresponding to fig. 3, S21 in this embodiment may specifically include S211 to S212, which are detailed as follows:
s211: the electronic equipment sends a configuration information acquisition request to the solid state disk.
S212: and the solid state disk receives a configuration information acquisition request from the electronic equipment and returns the configuration information of the solid state disk to the electronic equipment in response to the configuration information acquisition request.
In this embodiment, after the electronic device establishes a communication connection with the solid state disk, the electronic device may actively acquire the configuration information of the solid state disk, that is, the electronic device may send a configuration information acquisition request to the solid state disk. After receiving the configuration information acquisition request, the solid state disk may return the configuration information of the solid state disk to the electronic device in response to the configuration information acquisition request.
As can be seen from the above, in the data operation method of the solid state disk provided in this embodiment, the solid state disk sends the configuration information of the solid state disk to the electronic device after receiving the configuration information acquisition request from the electronic device, so that the processing resource of the solid state disk can be prevented from being wasted.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Based on the steps executed by the solid state disk in the above embodiments, the embodiments of the present application further provide an embodiment of a data operating apparatus of the solid state disk. Referring to fig. 4, fig. 4 is a schematic structural diagram of a data operating device of a solid state disk according to an embodiment of the present disclosure, and for convenience of description, only parts related to the embodiment are shown. The units included in the data operation device 40 of the solid state disk are used to execute the steps executed by the solid state disk in the above method embodiment, please refer to the related description in the above method embodiment, and details are not described here again. As shown in fig. 4, the data operation apparatus 40 of the solid state disk includes: a first communication unit 41, a first data manipulation unit 41, and a second data manipulation unit 43. Wherein:
the first communication unit 41 is configured to receive a data operation instruction from an electronic device, where the data operation instruction carries information of data to be operated and an identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs.
The first data operation unit 42 is configured to, if the identifier of the target namespace is a first identifier, perform data operation on a storage unit corresponding to a first namespace based on the information of the data to be operated, where the storage unit corresponding to the first namespace is used to store system data of the electronic device.
The second data operation unit 43 is configured to, if the identifier of the target namespace is a second identifier, perform data operation on a storage unit corresponding to a second namespace based on the information of the data to be operated, where the storage unit corresponding to the second namespace is used to store non-system data of the electronic device.
Optionally, the first communication unit 41 is further configured to:
receiving a configuration information acquisition request from the electronic equipment, and returning the configuration information of the solid state disk to the electronic equipment in response to the configuration information acquisition request;
the configuration information is used for describing a configuration situation of a storage unit in the solid state disk, and the configuration situation includes: the storage unit of the solid state disk is defined by a first naming space and a second naming space; the storage unit corresponding to the first namespace is used for storing system data of the electronic equipment, and the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment; the identifier of the first namespace is the first identifier, and the identifier of the second namespace is the second identifier.
Optionally, the first namespace and the second namespace both correspond to at least one storage unit; the storage unit corresponding to the first namespace is physically independent from the storage unit corresponding to the second namespace.
Optionally, all the storage units corresponding to the first namespace are configured as a single-layer unit structure; the storage unit corresponding to the second namespace is configured as a single-layer unit structure, a multi-layer unit structure, a three-layer unit structure or a four-layer unit structure.
Based on the steps executed by the electronic device in the above embodiments, embodiments of the electronic device are further provided in the embodiments of the present application. Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, and for convenience of description, only portions related to the embodiment are shown. The units included in the electronic device 50 are configured to execute the steps executed by the electronic device in the foregoing method embodiment, and please refer to the related description in the foregoing method embodiment for details, which is not described herein again. As shown in fig. 5, the electronic device 50 includes: a second communication unit 51 and an instruction generation unit 52. Wherein:
the second communication unit 51 is configured to acquire configuration information of the solid state disk, where the configuration information is used to describe a configuration condition of a storage unit in the solid state disk.
The instruction generating unit 52 is configured to generate a data operation instruction based on the configuration information and the information of the data to be operated, and send the data operation instruction to the solid state disk, where the data operation instruction carries the information of the data to be operated and an identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs.
Optionally, the information of the data to be operated includes a data type, an identifier, or content of the data to be operated; correspondingly, the instruction generating unit 52 is specifically configured to:
determining the identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs based on the data type of the data to be operated;
and generating the data operation instruction based on the identification of the target namespace and the identification or the content of the data to be operated.
It should be noted that, because the above-mentioned information interaction between the units, the execution process, and the like are based on the same concept, and the specific functions and technical effects thereof are based on the same concept, reference may be made to the method embodiment specifically, and details are not described here.
Fig. 6 is a schematic structural diagram of an electronic device according to another embodiment of the present application. As shown in fig. 6, the electronic device 60 includes: a processor 61, a memory 62 and a computer program 63 stored in the memory 62 and operable on the processor 61, for example, a program corresponding to a data operation method of a solid state disk. The processor 61 executes the computer program 63 to implement the steps executed by the electronic device in the data operation method embodiment of the solid state disk. Alternatively, the processor 61 implements the functions of the respective units in the embodiment corresponding to fig. 5 described above, for example, the functions of the units 51 to 52 shown in fig. 5, when executing the computer program 63.
Illustratively, the computer program 63 may be divided into one or more units that are stored in the memory 62 and executed by the processor 61 to complete the application. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 63 in the electronic device 60. For example, the computer program 63 may be divided into a second communication unit and an instruction generation unit, each unit functioning specifically as described above.
Those skilled in the art will appreciate that fig. 6 is merely an example of the electronic device 60 and does not constitute a limitation of the electronic device 60, that the electronic device 60 may include more or fewer components than shown, or some components may be combined, or different components may be included, for example, the electronic device 60 may also include input-output devices, network access devices, buses, etc.
The Processor 61 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 62 may be an internal storage unit of the electronic device 60, such as a hard disk or a memory of the electronic device 60. The memory 62 may also be an external storage unit of the electronic device 60, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device 60. Further, the memory 62 may also include both internal and external storage units of the electronic device 60. The memory 62 is used for storing the computer programs and other programs and data required by the electronic device 60. The memory 62 may also be used to temporarily store data that has been output or is to be output.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps performed by the solid state disk in the foregoing method embodiments.
The embodiment of the present application further provides another computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program can implement the steps performed by the electronic device in the above-mentioned method embodiments
The embodiment of the present application further provides a computer program product, which when running on the solid state disk, causes the solid state disk to execute the steps executed by the solid state disk in the above method embodiments.
The embodiment of the present application further provides another computer program product, which, when running on an electronic device, causes the electronic device to perform the steps performed by the electronic device in the above method embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A data operation method of a solid state disk is characterized by being applied to the solid state disk and comprising the following steps:
receiving a data operation instruction from electronic equipment, wherein the data operation instruction carries information of data to be operated and an identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs;
if the identification of the target name space is a first identification, performing data operation on a storage unit corresponding to a first name space based on the information of the data to be operated, wherein the storage unit corresponding to the first name space is used for storing system data of the electronic equipment;
and if the identifier of the target namespace is a second identifier, performing data operation on a storage unit corresponding to a second namespace based on the information of the data to be operated, wherein the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment.
2. The data manipulation method of claim 1, wherein prior to said receiving a data manipulation instruction from an electronic device, the data manipulation method further comprises:
receiving a configuration information acquisition request from the electronic equipment, and returning the configuration information of the solid state disk to the electronic equipment in response to the configuration information acquisition request;
the configuration information is used for describing a configuration situation of a storage unit in the solid state disk, and the configuration situation includes: the storage unit of the solid state disk is defined by a first naming space and a second naming space; the storage unit corresponding to the first namespace is used for storing system data of the electronic equipment, and the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment; the identifier of the first namespace is the first identifier, and the identifier of the second namespace is the second identifier.
3. The data operation method according to claim 1, wherein the first namespace and the second namespace each correspond to at least one storage unit; the storage unit corresponding to the first namespace is physically independent from the storage unit corresponding to the second namespace.
4. The data operation method according to any one of claims 1 to 3, wherein all the storage units corresponding to the first namespace are configured as a single-layer unit structure; the storage unit corresponding to the second namespace is configured to be a single-layer unit structure, a multi-layer unit structure, a three-layer unit structure or a four-layer unit structure.
5. A data operation method of a solid state disk is applied to electronic equipment and comprises the following steps:
acquiring configuration information of a solid state disk, wherein the configuration information is used for describing the configuration condition of a storage unit in the solid state disk;
and generating a data operation instruction based on the configuration information and the information of the data to be operated, and sending the data operation instruction to the solid state disk, wherein the data operation instruction carries the information of the data to be operated and the identifier of the target namespace corresponding to the storage unit to which the data to be operated belongs.
6. The data operation method according to claim 5, wherein the information of the data to be operated on comprises a data type, an identifier or a content of the data to be operated on; correspondingly, the generating a data operation instruction based on the configuration information and the information of the data to be operated includes:
determining the identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs based on the data type of the data to be operated;
and generating the data operation instruction based on the identification of the target namespace and the identification or the content of the data to be operated.
7. A data operation device of a solid state disk is characterized by comprising:
the data processing device comprises a first communication unit, a second communication unit and a processing unit, wherein the first communication unit is used for receiving a data operation instruction from electronic equipment, and the data operation instruction carries information of data to be operated and an identifier of a target namespace corresponding to a storage unit to which the data to be operated belongs;
the first data operation unit is used for performing data operation on a storage unit corresponding to a first name space based on the information of the data to be operated if the identifier of the target name space is a first identifier, and the storage unit corresponding to the first name space is used for storing system data of the electronic equipment;
and the second data operation unit is used for performing data operation on a storage unit corresponding to a second namespace based on the information of the data to be operated if the identifier of the target namespace is a second identifier, and the storage unit corresponding to the second namespace is used for storing non-system data of the electronic equipment.
8. An electronic device, comprising:
the second communication unit is used for acquiring configuration information of the solid state disk, and the configuration information is used for describing the configuration condition of a storage unit in the solid state disk;
and the instruction generating unit is used for generating a data operation instruction based on the configuration information and the information of the data to be operated and sending the data operation instruction to the solid state disk, wherein the data operation instruction carries the information of the data to be operated and the identifier of the target namespace corresponding to the storage unit to which the data to be operated belongs.
9. A solid state disk, comprising: the device comprises a data operation device and a plurality of storage units connected with the data operation device; the data manipulation device is used for executing the data manipulation method according to any one of claims 1 to 4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a data manipulation method according to any one of claims 1 to 4 or according to claim 5 or 6.
CN202111172637.5A 2021-10-08 2021-10-08 Solid state disk, data operation method and device thereof, and electronic device Pending CN115963977A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111172637.5A CN115963977A (en) 2021-10-08 2021-10-08 Solid state disk, data operation method and device thereof, and electronic device
PCT/CN2021/131265 WO2023056687A1 (en) 2021-10-08 2021-11-17 Solid state disk and data manipulation method and apparatus therefor, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111172637.5A CN115963977A (en) 2021-10-08 2021-10-08 Solid state disk, data operation method and device thereof, and electronic device

Publications (1)

Publication Number Publication Date
CN115963977A true CN115963977A (en) 2023-04-14

Family

ID=85803140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111172637.5A Pending CN115963977A (en) 2021-10-08 2021-10-08 Solid state disk, data operation method and device thereof, and electronic device

Country Status (2)

Country Link
CN (1) CN115963977A (en)
WO (1) WO2023056687A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117055820B (en) * 2023-10-09 2024-02-09 苏州元脑智能科技有限公司 Command processing method of solid state disk, solid state disk and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666044B (en) * 2016-02-29 2021-11-30 华为技术有限公司 Method for accessing shingled magnetic recording SMR hard disk and server
CN108959108B (en) * 2017-05-26 2021-08-24 上海宝存信息科技有限公司 Solid state disk access method and device using same
CN109062514B (en) * 2018-08-16 2021-08-31 郑州云海信息技术有限公司 Bandwidth control method and device based on namespace and storage medium
CN112612924A (en) * 2020-12-30 2021-04-06 绿盟科技集团股份有限公司 Data reading and exporting methods and devices, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2023056687A1 (en) 2023-04-13

Similar Documents

Publication Publication Date Title
CN107844431B (en) Mapping table updating method, memory control circuit unit and memory storage device
US10891236B2 (en) Data storage device and operating method thereof
KR102137761B1 (en) Heterogeneous unified memory section and method for manaing extended unified memory space thereof
CN111459844B (en) Data storage device and method for accessing logical-to-physical address mapping table
US9411537B2 (en) Embedded multimedia card (EMMC), EMMC system including the EMMC, and method of operating the EMMC
US20130013853A1 (en) Command executing method, memory controller and memory storage apparatus
US10769066B2 (en) Nonvolatile memory device, data storage device including the same and operating method thereof
US11269765B2 (en) Operating method of controller and memory system
US9164804B2 (en) Virtual memory module
US10067676B2 (en) Hybrid memory drives, computer system, and related method for operating a multi-mode hybrid drive
KR102507140B1 (en) Data storage device and operating method thereof
KR20200093362A (en) Memory system and operating method thereof
KR102595233B1 (en) Data processing system and operating method thereof
US20200356491A1 (en) Data storage device and method for loading logical-to-physical mapping table thereof
KR20200114052A (en) Controller, memory system and operating method thereof
KR20200114212A (en) Data storage device and operating method thereof
KR20200129863A (en) Controller, memory system and operating method thereof
CN110781093B (en) Data storage device capable of changing mapping cache buffer size
KR20200114086A (en) Controller, memory system and operating method thereof
KR20200115831A (en) Controller, memory system and operating method thereof
CN115963977A (en) Solid state disk, data operation method and device thereof, and electronic device
KR20210006556A (en) Controller, memory system and operating method thereof
US11036629B2 (en) Controller, memory system and operating method thereof
CN114579484A (en) Data storage device and method of operating the same
KR20230037255A (en) Method for managing event log, controller and storage device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination