CN107707346A - A kind of key storage based on database, acquisition methods - Google Patents

A kind of key storage based on database, acquisition methods Download PDF

Info

Publication number
CN107707346A
CN107707346A CN201710231202.0A CN201710231202A CN107707346A CN 107707346 A CN107707346 A CN 107707346A CN 201710231202 A CN201710231202 A CN 201710231202A CN 107707346 A CN107707346 A CN 107707346A
Authority
CN
China
Prior art keywords
key
storage
database
storage table
state
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
CN201710231202.0A
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.)
Zhejiang Kyushu Quantum Information Technology Ltd By Share Ltd
Original Assignee
Zhejiang Kyushu Quantum Information Technology Ltd By Share 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 Zhejiang Kyushu Quantum Information Technology Ltd By Share Ltd filed Critical Zhejiang Kyushu Quantum Information Technology Ltd By Share Ltd
Priority to CN201710231202.0A priority Critical patent/CN107707346A/en
Publication of CN107707346A publication Critical patent/CN107707346A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Computational Linguistics (AREA)
  • Storage Device Security (AREA)

Abstract

A kind of key storage based on database, acquisition methods, comprise the following steps:A) cipher key index value is created;B) same type storage table n is created, the title of each storage table is had any different;C) key insertion storage table:According to key identification, each character in key identification is done into intersection, then on the basis of the intersection divided by n, obtains the index of the key, so as to obtain in storage table corresponding to current operation insertion, is finally inserted key information in the storage table;D) key obtains:According to the index of key, the key directly needed for acquisition from storage table.Compared with prior art, the present invention by the storage table of database by carrying out subregion, and the title of partitioned storage table is corresponding with the cipher key index value for being stored in the table, reduce the sweep time needed for key inquiry, this method abandoned substantial amounts of key data information be stored in database one open in table and caused by the low mode of key search efficiency, improve the query rate of database.

Description

A kind of key storage based on database, acquisition methods
Technical field
The present invention relates to database key technical field of memory, more particularly to a kind of key storage based on database, obtain Take method.
Background technology
With a wide range of popularization of internet, the information transmission between the mankind has reached unprecedented quantity and frequency, On the internet, therefore, the mankind have also arrived unprecedented various privacy informations to the demand of secret communication for exposure more and more Height, at present, data message using key encryption be most regular assurance communication security means, so the demand to key It is very big, in addition, general key includes key identification, corresponding key value and the node letter for producing the key substantially Breath, opens in table if those substantial amounts of key data informations are stored in database one, is reading in use, key will certainly be influenceed Search efficiency.
The content of the invention
Present invention aims at a kind of key storage based on database, acquisition methods are provided, to solve in the prior art Substantial amounts of key data information is stored in database one and opened in table, is reading in use, the skill of extreme influence key search efficiency Art defect.
The technical proposal of the invention is realized in this way:
A kind of key storage based on database, acquisition methods, comprise the following steps:
A) cipher key index value is created:Determine the key identification, key value and the node for producing the key of deposited key Information, wherein every part of key identification is one-to-one corresponding with key value, the index value corresponding to key identification is calculated by algorithm, Key is stored in different storage tables according to corresponding index value;
B) storage table is created:Same type storage table n is created, the title of each storage table is had any different, and creates 1 Record sheet table_state, the record sheet table_state are used to record the close of different nodal information keys in each storage table Key amount;
C) key insertion storage table:According to key identification, by the way of similar character ASCCII code values are cumulative, by key The ASCII character value of each character does intersection in mark, then on the basis of the intersection divided by n, obtains the index of the key, from And the storage table table name inserted needed for current key is obtained, finally key information is inserted in the storage table, for example, n takes 32, phase Index after removing is 30, then storage table is table_30;
D) key obtains:According to the index of key, the key directly needed for acquisition from storage table.
Preferably, methods described also includes the deletion of step e) keys:According to key identification, by each word in key identification The ASCII character value of symbol does intersection, then on the basis of the intersection divided by n, the index of the key is obtained, so as to carry out key Delete.
Preferably, before key insertion storage table handling, the table of a record cipher key node state is created, it is current for recording The information of key state in each storage table, the state letter of different nodal information current keys in every storage table is recorded in the table Breath.
Preferably, the key state includes the quantity of key storage, close according to certain node acquisition specified quantity when needing During key, it can be arranged according to the quantity that corresponding node is stored in each storage table in the table is inquired about according to the quantity of the storage Sequence is inquired about, and when reaching specified quantity, just obtains key from these storage tables up to quantity.
Preferably, the descending or ascending sequence of quantity of the sorting query including key storage.
Preferably, after key inserts storage table, to record sheet table_state and cipher key node state is recorded Table is updated.
Preferably, after key is deleted, record sheet table_state and record cipher key node state table are entered Row renewal.
Compared with prior art, the present invention has following beneficial effect:
The key storage based on database, the acquisition methods of the present invention, by the way that the storage table of database is carried out into subregion, and The title of partitioned storage table is corresponding with the cipher key index value for being stored in the table, reduces the sweep time needed for key inquiry, should Method abandoned substantial amounts of key data information be stored in database one open in table and caused by key search efficiency it is low Mode, improve the query rate of database.
Brief description of the drawings
Fig. 1 is the method flow diagram that the present invention creates storage table and key storage;
Fig. 2 is the flow chart of key acquisition method in storage table of the present invention;
Fig. 3 is the flow chart that key is deleted in storage table of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the present invention is clearly and completely described.
As shown in Figure 1 to Figure 3, a kind of key storage based on database, acquisition methods, comprise the following steps:
A) cipher key index value is created:Determine the key identification, key value and the node for producing the key of deposited key Information, wherein every part of key identification and key value are one-to-one relation, calculated by algorithm corresponding to key identification Index value, key is stored in different storage tables according to corresponding index value, the index value and the storage table being stored in need Correspond to;
B) storage table is created:Same type storage table n is created, the title of each storage table is had any different, and creates 1 Record sheet table_state, the record sheet table_state are used to record the close of different nodal information keys in each storage table Key amount, opened (i.e. n takes 32) for example, creating same type table 32, the title of those storage tables takes table_0, table_ respectively 1st, table_2......table_31, the structure of every table is consistent in 32 storage tables;
C) key insertion storage table:According to key identification, by the way of similar character ASCCII code values are cumulative, by key The ASCII character value of each character does intersection in mark, then on the basis of the intersection divided by n, obtains the index of the key, from And the storage table table name inserted needed for current key is obtained, finally key information is inserted in the storage table, for example, n takes 32, phase Index after removing is 30, then storage table is table_30;
D) key obtains:The index calculated according to key identification, key, inquiry are close directly needed for acquisition from storage table During key, as long as finding storage table corresponding to the index that key identification is calculated, without searching other storage tables, save Search the time.
Because the space of database is limited, the useless key being stored in database can be deleted, it is described Method also includes step e) keys and deleted:According to key identification, the ASCII character value of each character in key identification is closed Collection, then on the basis of the intersection divided by n, the index of the key is obtained, so as to carry out the deletion of key.
Because the acquisition of key is probably while obtains the key for the multiple quantity for specifying cipher key node, in order to accelerate to obtain Speed, the quantity of retrieval table as few as possible is needed in multiple storage tables to obtain the key of specified quantity, key insertion Before storing table handling, the table of a record cipher key node state is created, for recording the letter of key state in current each storage table Cease, the status information of different nodal information current keys in every storage table, the described record cipher key node shape are recorded in the table The table of state can share with recording the record sheet table_state of size of key.The key state includes the quantity of key storage, when When needing to obtain specified quantity key according to certain node, it can be stored according to corresponding node in the table is inquired about in each storage table Quantity, inquiry is ranked up according to the quantity of the storage, when reaching specified quantity, the just storage table from these up to quantity Middle acquisition key.
The descending or ascending sequence of quantity of the sorting query including key storage.
After key inserts storage table, record sheet table_state and record cipher key node state table are carried out Renewal, record sheet table_state effects will be embodied in key obtains, and required key can be quickly searched by size of key. After key is deleted, record sheet table_state and record cipher key node state table are updated.
The principle of the comprehensive present invention understands, the key storage of the invention based on database, acquisition methods, by by data The storage table in storehouse carries out subregion, and the title of partitioned storage table is corresponding with the cipher key index value for being stored in the table, reduces key Sweep time needed for inquiry, this method abandoned substantial amounts of key data information be stored in database one open in table and caused by The low mode of key search efficiency, improve the query rate of database.

Claims (7)

1. a kind of key storage based on database, acquisition methods, it is characterised in that comprise the following steps:
A) cipher key index value is created:The key identification, key value and the nodal information for producing the key of deposited key are determined, Wherein every part of key identification and key value are one-to-one corresponding, and the index value corresponding to key identification is calculated by algorithm, according to Key is stored in different storage tables by corresponding index value;
B) storage table is created:Same type storage table n is created, the title of each storage table is had any different, and creates 1 record Table table_state, the record sheet table_state are used for the key for recording different nodal information keys in each storage table Amount;
C) key insertion storage table:According to key identification, each character in key identification is done into intersection, then in the intersection On the basis of divided by n, obtain the index of the key, so as to obtain corresponding to current operation insertion in storage table, finally believe key Breath is inserted in the storage table;
D) key obtains:According to the index of key, the key directly needed for acquisition from storage table.
2. the key storage based on database, acquisition methods as claimed in claim 1, it is characterised in that methods described is also wrapped Include the deletion of step e) keys:According to key identification, each character in key identification is done into intersection, then on the basis of the intersection Upper divided by n, obtains the index of the key, so as to carry out the deletion of key.
3. the key storage based on database, acquisition methods as claimed in claim 2, it is characterised in that key insertion storage Before table handling, the table of a record cipher key node state is created, should for recording the information of key state in current each storage table The status information of different nodal information current keys in every storage table is recorded in table.
4. the key storage based on database, acquisition methods as claimed in claim 3, it is characterised in that the key state Quantity including key storage, when needing to obtain specified quantity key according to certain node, it can be saved according to inquiring about to correspond in the table The quantity that is stored in each storage table of point, inquiry is ranked up according to the quantity of the storage, when reaching specified quantity, just from These obtain key in storage table up to quantity.
5. the key storage based on database, acquisition methods as claimed in claim 5, it is characterised in that the sorting query The descending or ascending sequence of quantity including key storage.
6. the key storage based on database, acquisition methods as claimed in claim 5, it is characterised in that deposited in key insertion After storing up table, record sheet table_state and record cipher key node state table are updated.
7. the key storage based on database, acquisition methods as claimed in claim 6, it is characterised in that be deleted in key Afterwards, record sheet table_state and record cipher key node state table are updated.
CN201710231202.0A 2017-04-10 2017-04-10 A kind of key storage based on database, acquisition methods Pending CN107707346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710231202.0A CN107707346A (en) 2017-04-10 2017-04-10 A kind of key storage based on database, acquisition methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710231202.0A CN107707346A (en) 2017-04-10 2017-04-10 A kind of key storage based on database, acquisition methods

Publications (1)

Publication Number Publication Date
CN107707346A true CN107707346A (en) 2018-02-16

Family

ID=61169578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710231202.0A Pending CN107707346A (en) 2017-04-10 2017-04-10 A kind of key storage based on database, acquisition methods

Country Status (1)

Country Link
CN (1) CN107707346A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111382179A (en) * 2020-03-10 2020-07-07 北京金山云网络技术有限公司 Data processing method and device and electronic equipment
CN112235102A (en) * 2020-09-29 2021-01-15 北京智芯微电子科技有限公司 Hybrid key storage and management method and storage device
WO2023000318A1 (en) * 2021-07-23 2023-01-26 华为技术有限公司 Address verification method and corresponding device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917403A (en) * 2010-07-23 2010-12-15 华中科技大学 Distributed key management method for ciphertext storage
CN102402394A (en) * 2010-09-13 2012-04-04 腾讯科技(深圳)有限公司 Hash algorithm-based data storage method and device
CN103530378A (en) * 2013-10-15 2014-01-22 福建榕基软件股份有限公司 Data paging query method and device and data base construction method and device
US20160112190A1 (en) * 2012-08-15 2016-04-21 Selim Aissi Searchable encrypted data
WO2016193962A1 (en) * 2015-06-02 2016-12-08 K2View Ltd Encryption directed database management system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917403A (en) * 2010-07-23 2010-12-15 华中科技大学 Distributed key management method for ciphertext storage
CN102402394A (en) * 2010-09-13 2012-04-04 腾讯科技(深圳)有限公司 Hash algorithm-based data storage method and device
US20160112190A1 (en) * 2012-08-15 2016-04-21 Selim Aissi Searchable encrypted data
CN103530378A (en) * 2013-10-15 2014-01-22 福建榕基软件股份有限公司 Data paging query method and device and data base construction method and device
WO2016193962A1 (en) * 2015-06-02 2016-12-08 K2View Ltd Encryption directed database management system and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111382179A (en) * 2020-03-10 2020-07-07 北京金山云网络技术有限公司 Data processing method and device and electronic equipment
CN111382179B (en) * 2020-03-10 2023-12-01 北京金山云网络技术有限公司 Data processing method and device and electronic equipment
CN112235102A (en) * 2020-09-29 2021-01-15 北京智芯微电子科技有限公司 Hybrid key storage and management method and storage device
CN112235102B (en) * 2020-09-29 2023-07-21 北京智芯微电子科技有限公司 Hybrid key storage and management method and storage device
WO2023000318A1 (en) * 2021-07-23 2023-01-26 华为技术有限公司 Address verification method and corresponding device

Similar Documents

Publication Publication Date Title
CN102307149B (en) IP (internet protocol) lookup method and device and route updating method and device
WO2019045959A1 (en) Kvs tree database
US7305385B1 (en) N-gram based text searching
CN110268399A (en) Merging tree for attended operation is modified
CN106339450B (en) Index method of tree-shaped data
CN107045531A (en) A kind of system and method for optimization HDFS small documents access
CN109726177A (en) A kind of mass file subregion indexing means based on HBase
CN107707346A (en) A kind of key storage based on database, acquisition methods
CN102930060A (en) Method and device for performing fast indexing of database
JP2009512950A (en) Architecture and method for efficiently bulk loading Patricia Tri
CN101751475B (en) Method for compressing section records and device therefor
CN105912675A (en) Batch delete/query method and apparatus for merging small files
CN106203171A (en) Big data platform Security Index system and method
CN105468785A (en) Computer file management method
CN104408128B (en) A kind of reading optimization method indexed based on B+ trees asynchronous refresh
CN112262379A (en) Storing data items and identifying stored data items
US7693850B2 (en) Method and apparatus for adding supplemental information to PATRICIA tries
CN110597805B (en) Memory index structure processing method
US7620640B2 (en) Cascading index method and apparatus
CN109803022B (en) Digital resource sharing system and service method thereof
CN103955519A (en) Account inquiring and recording system and inquiring and recording method thereof
CN109388641B (en) Method, the equipment, medium of the common prefix of key in a kind of retrieval key value database
CN104021142B (en) The storage of tamper resistant systems web page files fingerprint and querying method
CN110046352A (en) Address Standardization method and device
EP2164005B1 (en) Content addressable storage systems and methods employing searchable blocks

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180216

WD01 Invention patent application deemed withdrawn after publication