Data writing method, device, electronic equipment and storage medium
The embodiment of the invention discloses a data writing method, a device, electronic equipment and a storage medium. The method comprises the steps: judging whether the size of to-be-stored data reaches the data capacity of a storage block or not when a data writing instruction is received; if the...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The embodiment of the invention discloses a data writing method, a device, electronic equipment and a storage medium. The method comprises the steps: judging whether the size of to-be-stored data reaches the data capacity of a storage block or not when a data writing instruction is received; if the size of the to-be-stored data reaches the data capacity of one storage block, performing writing operation on the to-be-stored data by taking the storage block as a mapping unit; If the size of the to-be-stored data does not reach the data capacity of one storage block, performing writing operationon the to-be-stored data by taking the storage page as a mapping unit. By adopting the technical scheme, the utilization rate of the storage space is improved, and redundant data is reduced.
本发明实施例公开了一种数据写入方法、装置、电子设备及存储介质,所述方法包括:当接收到数据写入指令时,判断待存储数据的大小是否达到一个存储块的数据容量;若待存储数据的大小达到一个存储块的数据容量,则以存储块为映射单元对所述待存储数据进行写入操作;若待存储数据的大小没有达到一个存储块的数据容量,则以存储页为映射单元对所述待存储数据进行写入操作。通过采用上述技术方案,提高了存储空间的利用率,减少了冗余数据。 |
---|