Key arrangement method and device based on prefetched key and storage medium
The invention discloses a key arrangement method and device based on a prefetch key and a storage medium, and the method comprises the steps: firstly, mapping a key file in a key pool from a disk to a memory in a memory mapping mode, and storing key data with a fixed byte length in the key file; acc...
Gespeichert in:
Hauptverfasser: | , , , |
---|---|
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 invention discloses a key arrangement method and device based on a prefetch key and a storage medium, and the method comprises the steps: firstly, mapping a key file in a key pool from a disk to a memory in a memory mapping mode, and storing key data with a fixed byte length in the key file; according to the offset pointer of the key file, obtaining a prefetch key from the key file for use; and after the use is completed, recovering and sorting the residual to-be-returned keys in the prefetched keys, and updating and recording the total quantity of the residual keys of the key file. According to the method, the residual to-be-returned keys in the prefetched keys are recovered and sorted through the offset pointer position of the key file, key splicing and other means, so that the waste of key resources is avoided; meanwhile, the size of the key file mapped to the memory is modified through the fruncate function, the problem that the total number of keys is larger than the size of the key file after the to |
---|