Unlock instant, AI-driven research and patent intelligence for your innovation.

Interval data storage method, device, server and storage medium

A data storage and database technology, applied in the direction of database indexing, structured data retrieval, etc., can solve the problems of large memory consumption and inability to realize data storage in any interval.

Active Publication Date: 2020-10-30
RUN TECH CO LTD BEIJING
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The commonly used Redis database caches data and uses the Set data structure for storage. However, for the storage of interval data, it is necessary to list all the key-value pairs, establish indexes and store them. The number of interval data and the occupied memory maintain a nonlinear relationship, which consumes a lot of memory
In addition, using the Sorted Sets data structure to store interval data can only store data that does not overlap in each group of interval ranges, and cannot store arbitrary interval data

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
  • Interval data storage method, device, server and storage medium
  • Interval data storage method, device, server and storage medium
  • Interval data storage method, device, server and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0022] The interval data storage method provided in this embodiment is applicable to the case of storing interval data, the method can be executed by an interval data storage device, the device can be implemented by software and / or hardware, and the device can be integrated in the server middle. see figure 1 , the method of this implementation specifically includes the following steps:

[0023] S110. Determine the start score value and the end score value of each interval range according to the start value and end value of each interval range.

[0024] Among them, the interval range is the range data between the start value and the end value, including the start value and the end value, represented by the start value and the end value, where the start value is less than the end value, and the interval between the start value and the end value The range data of all corresponds to an attribute value, and the attribute values ​​corresponding to the start value, end value, and i...

Embodiment 2

[0032] This embodiment is optimized on the basis of the above embodiments, details not described in detail in this embodiment can be found in the above embodiments. see figure 2 , the interval data storage method provided in this embodiment includes:

[0033] S210. Determine the start score value and the end score value of each interval range according to the start value and end value of each interval range.

[0034] S220. Construct a start record and a stop record respectively in the database according to the attribute value, the start score value and the stop score value of each interval range.

[0035] S230. Determine the target score value of the target value to be queried.

[0036] Specifically, the target scoring value of the target value to be queried is determined according to a preset linear function.

[0037] S240. Search for attribute values ​​whose score values ​​are smaller than the target score value from the initial record key value set to form a first attri...

Embodiment 3

[0045] On the basis of the above-mentioned embodiments, this embodiment describes in detail the implementation process of the interval data storage method by taking IP address interval data storage as an example. It should be noted that the embodiment of the present invention is not limited to the case of storing IP address interval data, and the method for storing interval data in this embodiment is applicable to the case of storing data of any interval. The implementation process of the interval data storage method is as follows:

[0046] Obtain the interval data to be stored, as shown in Table 1, where the interval data is the data range between the start IP and the end IP, taking the start IP as 0.0.0.10 and the end IP as 0.0.0.20 as an example, the interval data 0.0.0.10, 0.0.0.11, 0.0.0.12, 0.0.0.13, 0.0.0.14, 0.0.0.15, 0.0.0.16, 0.0.0.17, 0.0.0.18, 0.0.0.19, 0.0.0.20, corresponding to the above interval data The attribute values ​​are all "A".

[0047] start...

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 embodiment of the invention discloses an interval data storage method and apparatus, a server and a storage medium. The method comprises the following steps of: determining a starting score valueand a ending score value of each interval range according to the starting value and the ending value of each interval range; According to the attribute value, the starting score value and the ending score value of each interval range, constructing the starting record and the ending record in the database respectively. The embodiment of the invention constructs the interval data into two groups ofrecords for storage without enumerating all the key-value pairs of the interval data, thereby realizing efficient storage of the interval data and saving storage space.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of data storage, and in particular, to a method, device, server, and storage medium for interval data storage. Background technique [0002] With the advent of the data age and the rapid development of Internet social networks, etc., the amount of data generated has also increased exponentially. For data with different sources and structures on the network, data governance is required to meet the needs of big data storage. According to the data governance strategy, different data will be stored in different locations in the data center, such as the traditional relational database ORACLE, the distributed columnar database Hbase, and so on. After the data enters the data center through data governance, it can be mined and analyzed and used for upper-level business calls. [0003] Although various databases have very good versatility, for data that needs to be accessed frequently, it nee...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/22
Inventor 张志远周寅生石志中张俊杰
Owner RUN TECH CO LTD BEIJING