Virtual data quick filling method and device, equipment and storage medium
By setting a virtual page on the super block of the SSD and using the copyback command, the virtual data is directly saved in the cache register and filled in to the target address, which solves the problem of low resource application and transmission efficiency during the virtual data filling process and improves the virtual data Filling efficiency and data security.
Patent Information
- Application Number
- CN202410797590.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-03
AI Technical Summary
In the process of filling in virtual data in the existing technology, it is necessary to apply for cache resources and transmit messages between modules, which results in large time loss, low efficiency, and affects data security and storage performance.
By setting a virtual page on the super block of the SSD, using the copyback read and write command to directly save the virtual data to the cache register, and filling in the virtual data to the target address through the write function, the application for cache resources and data transmission are reduced, and the filling time is improved. efficiency.
It reduces the time loss of message transmission between modules, improves the efficiency of filling in virtual data, and ensures the security and performance of user data stored in solid-state drives.
Smart Images

Figure CN118585463A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state hard disks, and in particular to a method, device, equipment and storage medium for quickly filling in virtual data. Background Art
[0002] The data writing performance of a solid-state drive is an important characteristic of a solid-state drive. In the process of writing data, multiple steps are required, so the solid-state drive has strict requirements for the data writing process.
[0003] During the current data writing process, after the host issues a write command, the SSD will move the data to the buffer. When the SSD sends a write command to the NAND, it will configure the fc cmd command to specify the NAND physical address and data address of the current write command. According to different master controllers, the data address can be divided into the following two ways: one is the direct address, that is, specifying the address where the current data is located, and the other is through the index method, dividing the buffer space into 4K units, and returning the starting index of the 4K unit occupied by the current data in the buffer. If the data volume is greater than 4K, the multiple 4K units requested will be connected in the form of a linked list. In addition to the above configuration, other configurations will be performed on the fc cmd command, such as specifying the current command as a write operation, the type of the current operation (SLC / TLC), etc. After the fc cmd command is configured, the fc cmd command is placed in the send queue and the write command is sent to the flash controller. The communication between the flash memory controller and the flash memory medium is composed of 8 IO interfaces, 5 enable signals (ALE, CLE, WE#, RE# and CE#), 1 status pin and 1 write protection pin. The write command, write address information and write data are all input through the 8 IO interfaces. When performing a write operation, the flash memory controller first sends a write command (80h), then sends a write address, and after waiting for a period of time, the data begins to be transferred from the buffer to the cache register. After the data transmission is completed, a write command (10h) is sent, and the flash memory chip begins to write data from the cache register to the flash memory medium. At the same time, since flash memory storage has an inherent bit error rate, in order to ensure the correctness of the data, ECC check protection will be added to the original data during the data write operation.
[0004] In order to ensure the stability of data storage, special processing is required when writing data. Among them, virtual filling is a common application scenario. For example, when a block is not full, it is necessary to fill the block with virtual data to ensure the security of the data in the nand; when a read operation is required, when there is no data written on a die, it is necessary to fill the die with virtual data; and when the wordline where the key data is located is the edge wordline, it is necessary to fill the edge wordline with virtual data to ensure the current data security. In the existing process of writing virtual data, the method of filling virtual data is consistent with the normal steps of writing data, and the complexity is low, but this operation requires applying for buffer resources to store virtual data, and also moving virtual data from the buffer to the nand. The time loss caused by message transmission between modules increases, making the efficiency of virtual data filling low. Summary of the invention
[0005] In view of this, the purpose of the present invention is to overcome the deficiencies in the prior art and to provide a method, device, equipment and storage medium for quickly filling in virtual data.
[0006] The present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present disclosure provides a method for quickly filling in virtual data, the method comprising:
[0008] Fill the virtual data into the data of the virtual page on the first super block of the solid state drive;
[0009] Acquire a target address where the virtual data needs to be written, and obtain a physical address of the virtual page according to a logical unit and a plane corresponding to the target address;
[0010] receiving a copyback read command, and saving the virtual data of the virtual page into a cache register in the plane according to the copyback read command and the physical address of the virtual page;
[0011] A copyback write command is received, and the virtual data stored in the cache register is filled into the target address of the plane through the copyback write command.
[0012] Furthermore, filling the virtual data into the data of the virtual page on the first super block of the solid state drive includes:
[0013] Setting the first page of the first data block in each plane in each logical unit of the solid state drive as the virtual page;
[0014] The virtual data to be filled into the virtual page is selected, and a write function of the virtual page is called, and the virtual data is filled into the data of the virtual page through the write function.
[0015] Furthermore, the step of filling the virtual data into the data of the virtual page through the write function includes:
[0016] Applying for a cache and a descriptor in the static random access memory of the solid state drive, wherein the cache is used to store the virtual data, and the descriptor is used to manage configuration information related to the write operation;
[0017] The physical address of the virtual page in the flash memory is configured by the descriptor, the address of the cache where the virtual data is located is configured by the descriptor, and the type of the current operation is configured as a write type by the descriptor;
[0018] The write function is called to send a write command to the back end of the solid state drive, so that the back end writes the virtual data in the cache into the data of the virtual page according to the write command.
[0019] Further, obtaining the physical address of the virtual page according to the logical unit and the plane corresponding to the target address includes:
[0020] Using the logical unit and plane corresponding to the target address as the logical unit and plane corresponding to the virtual page;
[0021] The data blocks, pages, logical units and planes of the virtual page are calculated according to a preset calculation method defined by the firmware to obtain the physical address of the virtual page.
[0022] Further, after the virtual data of the virtual page is saved in the cache register in the plane according to the physical address of the virtual page through the copyback read command, the method further includes:
[0023] The data in the unfilled data page is saved in the cache register in units of data units through a copyback read command.
[0024] In a second aspect, an embodiment of the present disclosure provides a device for quickly filling in virtual data, the device comprising:
[0025] A first filling module is used to fill virtual data into the data of the virtual page on the first super block of the solid state drive;
[0026] A calculation module, used for acquiring a target address where the virtual data needs to be written, and obtaining a physical address of the virtual page according to a logical unit and a plane corresponding to the target address;
[0027] A saving module, configured to receive a copyback read command, and save the virtual data of the virtual page to a cache register in the plane according to the physical address of the virtual page through the copyback read command;
[0028] The second filling module is used to receive a copyback write command, and fill the virtual data stored in the cache register into the target address of the plane through the copyback write command.
[0029] Furthermore, the device also includes:
[0030] A setting module, used for setting the first page of the first data block in each plane in each logical unit of the solid state drive as the virtual page;
[0031] The calling module is used for selecting virtual data to be filled into the virtual page, and calling the write function of the virtual page, and filling the virtual data into the data of the virtual page through the write function.
[0032] Furthermore, the device also includes:
[0033] An application module, used for applying for a cache and a descriptor in the static random access memory of the solid state drive, wherein the cache is used to store the virtual data, and the descriptor is used to manage configuration information related to the write operation;
[0034] A configuration module, configured to configure the physical address of the virtual page in the flash memory through the descriptor, configure the address of the cache where the virtual data is located through the descriptor, and configure the type of the current operation as a write type through the descriptor;
[0035] The sending module is used to call the write function to send a write command to the back end of the solid state drive, so that the back end writes the virtual data in the cache into the data of the virtual page according to the write command.
[0036] In a third aspect, a computer device is provided in an embodiment of the present disclosure, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the method for quickly filling in virtual data described in the first aspect when executing the computer program.
[0037] In a fourth aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for quickly filling in virtual data described in the first aspect are implemented.
[0038] Beneficial effects of this application:
[0039] The method for quickly filling in virtual data provided by the embodiment of the present application includes: filling in the virtual data into the data of the virtual page on the first super block of the solid-state hard disk; obtaining the target address to which the virtual data needs to be written, and obtaining the physical address of the virtual page according to the logical unit and plane corresponding to the target address; receiving a copyback read command, and saving the virtual data of the virtual page to the cache register in the plane through the copyback read command and according to the physical address of the virtual page; receiving a copyback write command, and filling in the virtual data saved in the cache register into the target address of the plane through the copyback write command. Through the technical solution of the present invention, the time loss caused by message transmission between modules can be reduced, the application for cache resources and the transmission of data from cache to cache register can be reduced, the efficiency of virtual data filling is greatly improved, and the security of user data stored in the solid-state hard disk is ensured.
[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work. In each of the drawings, similar components are numbered similarly.
[0042] Figure 1 A flowchart of a method for quickly filling in virtual data provided by an embodiment of the present application is shown;
[0043] Figure 2 A schematic diagram of setting a virtual page for a solid state drive provided by an embodiment of the present application is shown;
[0044] Figure 3 A schematic diagram of a flash memory internal write-back operation provided by an embodiment of the present application is shown;
[0045] Figure 4 A schematic diagram of filling in virtual data in the prior art is shown;
[0046] Figure 5 A schematic diagram showing the configuration and filling of virtual data for a solid state drive according to an embodiment of the present application is shown;
[0047] Figure 6 A schematic diagram of the structure of a device for quickly filling in virtual data provided by an embodiment of the present application is shown;
[0048] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0049] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0050] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. In contrast, when an element is referred to as being "directly on" another element, there is no intermediate element. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0051] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0052] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of the template are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0054] Example 1
[0055] like Figure 1 , which is a flowchart of a method for quickly filling in virtual data in an embodiment of the present application, and the method for quickly filling in virtual data provided in an embodiment of the present application includes the following steps:
[0056] Step S110, filling virtual data into the data of the virtual page on the first super block of the solid state drive.
[0057] It should be noted that a solid-state drive usually includes multiple flash memory chips, each flash memory chip includes multiple logic units LUN, LUN is a basic unit that can independently execute flash memory chip commands, each LUN includes multiple planes, each plane includes multiple blocks, and each block includes multiple pages.
[0058] In this embodiment, during the mass production stage of the solid state drive, the data of the dummy page on the first super block of each plane of the solid state drive is filled with dummy data, that is, Figure 2 As shown, the first page page of the first data block block in each plane plane on each logical unit lun of the solid state drive is set to a virtual page dummy page, and then the virtual data dummydata to be filled in the virtual page dummy page is selected. The virtual data dummy data data is generally set to 0x5AA5. The selection basis is to keep the data 0 and 1 written into the flash memory of the solid state drive balanced, thereby reducing the probability of bit flipping of the data. Further, the write function of the virtual page dummypage is called, and the virtual data dummy data is filled into the data of the virtual page dummy page through the write function.
[0059] Specifically, the steps of filling virtual data into the data of the virtual page through the write function are as follows:
[0060] First, a cache buffer of a preset size (for example, 4K) and a descriptor fccmd are applied in the static random access memory (SRAM) of the solid state drive, wherein the cache buffer is used to store dummy data, and the descriptor fccmd is used to manage the configuration information related to the write operation;
[0061] Then, the physical address of the dummy page in the flash memory chip is configured through the descriptor, the address of the cache buffer where the dummy data is located is configured through the descriptor, and the type of the current operation is configured as a write type through the descriptor;
[0062] Finally, the write function is called to send a write command to the back end of the solid state drive. After receiving the write command, the back end will write the dummy data in the cache buffer into the data of the virtual page dummy page according to the write command, and after the write command is executed, the cache buffer and descriptor fc cmd applied before the step are released.
[0063] It should be noted that the dummy page is not used for other functions, but only for writing dummy data. The reason for this setting is that the write-back operation inside the flash memory NAND is better than the normal read and write operation, such as Figure 3 This is a schematic diagram of the copyback operation inside the flash memory chip. It can be seen that the data in the same plane can be transferred from one page to another page by using the cache register through the write-back operation. Therefore, a dummy page is set in each plane inside the flash memory chip.
[0064] Step S120, obtaining a target address where the virtual data needs to be written, and obtaining a physical address of the virtual page according to a logical unit and a plane corresponding to the target address.
[0065] Specifically, when it is necessary to write dummy data, the target physical address of the dummy data to be written is obtained, and the corresponding plane in the logical unit lun is obtained according to the target physical address, that is, the corresponding plane in the logical unit lun of the virtual page. In addition, in step S110, the data block block and page page of the virtual page are both 1, so the physical address of the virtual page dummy page can be calculated according to the data block block, page page, logical unit lun and plane of the virtual page according to the preset calculation method defined by the firmware.
[0066] Exemplarily, the preset calculation method defined by the firmware may be:
[0067] (blk id << faa blk lsb) | (page id << faa page lsb) | (lunit id << lunit id lsb) | (pln id << pln id lsb), where the values of faa blk lsb, faa page lsb, lunit id lsb, and pln id lsb are related to the capacity and NAND flash particles. For example: for a 1t disk, pln id lsb is 2, lunit id lsb is 4, faa page lsb is 8, faa blk lsb is 20. So when blk id is 1, page id is 2, lunit id is 2, and pln id is 1, the physical address is calculated as follows:
[0068] (1 << 20) | (2 << 8) | (2 << 4) | (1 << 2)
[0069] That is, 0000 0000 0001 0000 0000 0010 0010 1000
[0070] Then the actual physical address is: 100000000001000101000
[0071] Step S130: Receive a copyback read command, and save the virtual data of the virtual page to the cache register in the plane according to the physical address of the virtual page through the copyback read command.
[0072] Furthermore, different from Figure 4 the method in the prior art shown, which needs to transfer data from the cache buffer outside the flash memory chip, in the embodiment of the present application, as shown in Figure 5 the flash memory controller issues a write-back read command (00h - 35h) at a fixed timing through the bus, and saves the data of the virtual page (dummy page) to the cache register (cache register) in the current plane (plane) according to the physical address of the virtual page through the write-back read command.
[0073] Because the virtual data (dummy data) is written from the page in the current plane of the flash memory chip to the cache register, there is no need for the virtual data to be transferred from the buffer to the cache register. Therefore, the existing invention reduces the data transfer time and improves the data transfer rate of filling dummy.
[0074] Step S140, receiving a copyback write command, and filling the virtual data stored in the cache register into the target address of the plane through the copyback write command.
[0075] Then, the dummy data in the cache register is written into the target address in the plane by sending a write-back program command (85h-10h).
[0076] The method writes the dummy data into the flash memory by writing the data of the cache register cacheregister, and does not need to apply for resources in the cache buffer to store the dummy data. The cache buffer has limited resources, and the present invention does not need to apply for cache resources, thereby improving the utilization rate of cache resources.
[0077] In an optional implementation, when writing data to a solid state drive, an idle super block is applied for, and data is written to the flash memory corresponding to the super block. When the amount of data written is less than the amount of data that can be stored in the basic unit wordline of the super block, it is necessary to write dummy data to the flash memory that has not been filled with data in the basic unit wordline, so that the newly opened super block superblock is closed, thereby ensuring the security of the data in the flash memory that has been written.
[0078] If a basic unit wordline needs to be filled with some dummy data, first execute the step of sending the write-back read command (00h-35h), first fill the cache register with dummy data, and then use the write-back read command (00h-35h) to store the data in the unfilled data page into the cache register in units of data unit. In this case, the cache register not only contains the original data in the page, but also writes the dummy data into the unfilled data in the page, and finally executes the write-back program command (85h-10h) to write the data in the cache register into the flash memory corresponding to the address of the page.
[0079] The method for quickly filling in virtual data provided by the embodiment of the present application is to fill in the virtual data into the data of the virtual page on the first super block of the solid-state hard disk; obtain the target address to which the virtual data needs to be written, and obtain the physical address of the virtual page according to the logical unit and plane corresponding to the target address; receive a copyback read command, and save the virtual data of the virtual page to the cache register in the plane through the copyback read command and according to the physical address of the virtual page; receive a copyback write command, and fill in the virtual data saved in the cache register to the target address of the plane through the copyback write command. Through the technical solution of the present invention, the time loss caused by message transmission between modules can be reduced, the application for cache resources and the transmission of data from cache to cache register can be reduced, the efficiency of virtual data filling is greatly improved, and the security of user data stored in the solid-state hard disk is ensured.
[0080] Example 2
[0081] like Figure 6 FIG. 1 is a schematic diagram of a virtual data quick filling device 600 in an embodiment of the present application, wherein the device comprises:
[0082] A first filling module 610 is used to fill virtual data into the data of the virtual page on the first super block of the solid state drive;
[0083] A calculation module 620 is used to obtain a target address where the virtual data needs to be written, and obtain a physical address of the virtual page according to a logical unit and a plane corresponding to the target address;
[0084] A saving module 630, configured to receive a copyback read command, and save the virtual data of the virtual page to a cache register in the plane according to the copyback read command and the physical address of the virtual page;
[0085] The second filling module 640 is used to receive a copyback write command, and fill the virtual data stored in the cache register into the target address of the plane through the copyback write command.
[0086] Optionally, the virtual data quick filling device 600 further includes:
[0087] A setting module, used for setting the first page of the first data block in each plane in each logical unit of the solid state drive as the virtual page;
[0088] The calling module is used for selecting virtual data to be filled into the virtual page, and calling the write function of the virtual page, and filling the virtual data into the data of the virtual page through the write function.
[0089] Optionally, the virtual data quick filling device 600 further includes:
[0090] An application module, used for applying for a cache and a descriptor in the static random access memory of the solid state drive, wherein the cache is used to store the virtual data, and the descriptor is used to manage configuration information related to the write operation;
[0091] A configuration module, configured to configure the physical address of the virtual page in the flash memory through the descriptor, configure the address of the cache where the virtual data is located through the descriptor, and configure the type of the current operation as a write type through the descriptor;
[0092] The sending module is used to call the write function to send a write command to the back end of the solid state drive, so that the back end writes the virtual data in the cache into the data of the virtual page according to the write command.
[0093] Optionally, the virtual data quick filling device 600 further includes:
[0094] A definition module, used for taking the logical unit and plane corresponding to the target address as the logical unit and plane corresponding to the virtual page;
[0095] The calculation submodule is used to calculate the data block, page, logic unit and plane of the virtual page according to a preset calculation method defined by the firmware to obtain the physical address of the virtual page.
[0096] Optionally, the virtual data quick filling device 600 further includes:
[0097] The saving submodule is used to save the data in the unfilled data page to the cache register in units of data units through a copyback read command.
[0098] The virtual data quick filling device provided in the embodiment of the present application can reduce the time loss caused by message transmission between modules, reduce the application for cache resources and the transmission of data from cache to cache registers, greatly improve the efficiency of virtual data filling, and ensure the security of user data stored in the solid-state hard drive.
[0099] Example 3
[0100] The present application also provides a computer device. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.
[0101] The computer device 7 includes a memory 71, a processor 72, and a network interface 73 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 7 with a memory 71, a processor 72, and a network interface 73, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.
[0102] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0103] The memory 71 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D slot compatibility test memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 71 can be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 71 can also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 7. Of course, the memory 71 can also include both the internal storage unit of the computer device 7 and its external storage device. In this embodiment, the memory 71 is generally used to store the operating system and various application software installed on the computer device 7, such as computer-readable instructions of the slot compatibility test method, etc. In addition, the memory 71 can also be used to temporarily store various types of data that have been output or are to be output.
[0104] The processor 72 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other virtual data fast filling chip in some embodiments. The processor 72 is generally used to control the overall operation of the computer device 7. In this embodiment, the processor 72 is used to run the computer-readable instructions or process data stored in the memory 71, such as the computer-readable instructions for running the slot compatibility test method.
[0105] The network interface 73 may include a wireless network interface or a wired network interface. The network interface 73 is generally used to establish a communication connection between the computer device 7 and other electronic devices.
[0106] The computer device provided in this embodiment can execute the above-mentioned method for quickly filling in virtual data. The method for quickly filling in virtual data here can be the method for quickly filling in virtual data in each of the above-mentioned embodiments.
[0107] Example 4
[0108] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for quickly filling in virtual data in the embodiment are implemented.
[0109] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, referred to as SMC), a secure digital (Secure Digital, referred to as SD) card, a flash card, etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.
[0110] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0111] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0112] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or partly contributed to the prior art or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium can be a non-volatile storage medium or a volatile storage medium. For example, the storage medium can be: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes.
[0113] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for quickly filling in virtual data, It is characterized in that The method comprises: Fill the virtual data into the data of the virtual page on the first super block of the solid state drive; Acquire a target address where the virtual data needs to be written, and obtain a physical address of the virtual page according to a logical unit and a plane corresponding to the target address; receiving a copyback read command, and saving the virtual data of the virtual page into a cache register in the plane according to the copyback read command and the physical address of the virtual page; A copyback write command is received, and the virtual data stored in the cache register is filled into the target address of the plane through the copyback write command.
2. The method for quickly filling in virtual data according to claim 1, It is characterized in that The step of filling the virtual data into the data of the virtual page on the first super block of the solid state drive comprises: setting the first page of the first data block in each plane in each logical unit of the solid state drive as the virtual page; The virtual data to be filled into the virtual page is selected, and a write function of the virtual page is called, and the virtual data is filled into the data of the virtual page through the write function.
3. The method for quickly filling in virtual data according to claim 2, It is characterized in that The step of filling the virtual data into the data of the virtual page by using the write function includes: Applying for a cache and a descriptor in the static random access memory of the solid state drive, wherein the cache is used to store the virtual data, and the descriptor is used to manage configuration information related to the write operation; The physical address of the virtual page in the flash memory is configured by the descriptor, the address of the cache where the virtual data is located is configured by the descriptor, and the type of the current operation is configured as a write type by the descriptor; The write function is called to send a write command to the back end of the solid state drive, so that the back end writes the virtual data in the cache into the data of the virtual page according to the write command.
4. The method for quickly filling in virtual data according to claim 1, It is characterized in that The obtaining the physical address of the virtual page according to the logical unit and the plane corresponding to the target address includes: Using the logical unit and plane corresponding to the target address as the logical unit and plane corresponding to the virtual page; The data blocks, pages, logical units and planes of the virtual page are calculated according to a preset calculation method defined by the firmware to obtain the physical address of the virtual page.
5. The method for quickly filling in virtual data according to claim 1, It is characterized in that After the virtual data of the virtual page is saved in the cache register in the plane according to the physical address of the virtual page through the copyback read command, the method further includes: The data in the unfilled data page is saved in the cache register in units of data units through a copyback read command.
6. A virtual data quick filling device, It is characterized in that The device comprises: A first filling module is used to fill virtual data into the data of the virtual page on the first super block of the solid state drive; A calculation module, used for acquiring a target address where the virtual data needs to be written, and obtaining a physical address of the virtual page according to a logical unit and a plane corresponding to the target address; A saving module, configured to receive a copyback read command, and save the virtual data of the virtual page to a cache register in the plane according to the physical address of the virtual page through the copyback read command; The second filling module is used to receive a copyback write command, and fill the virtual data stored in the cache register into the target address of the plane through the copyback write command.
7. The virtual data quick filling device according to claim 6, It is characterized in that The device also includes: A setting module, used for setting the first page of the first data block in each plane in each logical unit of the solid state drive as the virtual page; The calling module is used for selecting virtual data to be filled into the virtual page, and calling the write function of the virtual page, and filling the virtual data into the data of the virtual page through the write function.
8. The virtual data quick filling device according to claim 6, It is characterized in that The device also includes: An application module, used for applying for a cache and a descriptor in the static random access memory of the solid state drive, wherein the cache is used to store the virtual data, and the descriptor is used to manage configuration information related to the write operation; A configuration module, configured to configure the physical address of the virtual page in the flash memory through the descriptor, configure the address of the cache where the virtual data is located through the descriptor, and configure the type of the current operation as a write type through the descriptor; The sending module is used to call the write function to send a write command to the back end of the solid state drive, so that the back end writes the virtual data in the cache into the data of the virtual page according to the write command.
9. A computer device, It is characterized in that It comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for quickly filling in virtual data according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for quickly filling in virtual data according to any one of claims 1 to 5 are implemented.
