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.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


