Data storage method, data searching method and device

A data storage device and data storage technology, applied in the computer field, can solve problems such as wasting space, achieve the effects of reducing space waste, improving space utilization, and saving hardware costs

Inactive Publication Date: 2012-08-01
HUAWEI DIGITAL TECH (CHENGDU) CO LTD
View PDF3 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] Embodiments of the present invention provide a data storage method, a data search method, and

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data storage method, data searching method and device
  • Data storage method, data searching method and device
  • Data storage method, data searching method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] figure 1 It is a flow chart of a data storage method provided by an embodiment of the present invention. like figure 1 As shown, this embodiment includes:

[0046] Step 11: Obtain the keyword to be stored in the TCAM, and obtain the bit width of the keyword.

[0047] Step 12: Select the standard bit width with the smallest difference from the bit width of the keyword from all the standard bit widths of the TCAM as the first standard bit width. If the first standard bit width is greater than or equal to the bit width of the keyword, perform step 13 and step 15; otherwise, perform steps 14a, 14b and step 15.

[0048] The first standard bit width is to select the standard bit width with the smallest difference from the bit width of the key to be stored from all the standard bit widths, rather than the minimum standard bit width greater than the bit width of the key to be stored. For example, the specific key length used by TCAM mainly has the following four standard bi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a data storage method, a data searching method and a device. The data storage method includes acquiring a keyword to be stored in a ternary content addressable memory (TCAM), selecting standard bit wide having the smallest difference with the bit wide of the keyword as first standard bit wide from all the standard bit wide in the TCAM, storing the keyword into a space with the storage bit wide equal to the first standard bit wide in the TCAM if the first standard bit wide is larger than or equal to the bit wide of the keyword, incising the keyword into a first keyword and a second keyword otherwise, storing the first keyword into a space with the storage bit wide equal to the first standard bit wide in the TCAM, storing the second keyword into a space with the storage bit wide equal to the second standard bit wide in the TCAM, and storing linked data that the keyword corresponds to in a storage. Storage address of the linked data in the storage corresponds to the index of the keyword in the TCAM. The methods and the device remarkably reduce waste of TCAM space and improves space utilization ratio.

Description

[0001] This application claims the priority of the Chinese patent application filed with China Patent Office on December 31, 2011, application number 201110459396.2, titled "data storage method, search method and device", the entire contents of which are incorporated by reference in this application . technical field [0002] The embodiments of the present invention relate to computer technology, and in particular to a data storage method, a data search method and a device. Background technique [0003] The state of each bit in TCAM (Ternary Content Addressable Memory, TCAM) can be "0" or "1", or the third state "don't care", so it is called "three-state ". This feature enables TCAM to have the function of filtering the bit fields of the searched data. All entries in the TCAM table can be accessed in parallel. The ordinary polling search method improves the search speed. However, the cost of TCAM is relatively high, the unit price of storage space is higher than that of o...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F17/30
Inventor 刘恒杨俊杰
Owner HUAWEI DIGITAL TECH (CHENGDU) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products