A method and apparatus for retrieving data

CN116150206BActive Publication Date: 2026-07-03SUPCON TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUPCON TECH CO LTD
Filing Date
2023-01-03
Publication Date
2026-07-03

Smart Images

  • Figure CN116150206B_ABST
    Figure CN116150206B_ABST
Patent Text Reader

Abstract

The application discloses a data retrieval method and device, and relates to the field of databases.The method comprises the following steps: searching for a first secondary index item in a first secondary index page at a first position number, wherein the first secondary index item comprises time range information of a first primary index page and storage location information of the first primary index page, the time range indicated by the time range information comprises a target time point, obtaining the first primary index page based on the storage location information of the first primary index page, searching for a first primary index item in the first primary index page, wherein the first primary index item comprises the target time point, and obtaining data of the first position number at the target time point according to the first primary index item.The method is equivalent to reading multiple primary index pages by reading one secondary index page, the first primary index page is quickly located, and therefore, the data of the first position number at the target time point is quickly retrieved, and the data retrieval efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of databases, and in particular to a method and apparatus for retrieving data. Background Technology

[0002] The tag data is characterized by a large number of tags and a high frequency of data changes. The annual production volume of tag data is large, and it usually needs to be stored for five to ten years. Therefore, the tag data needs to be stored in multiple archive files, and it is very difficult to quickly retrieve the required tag data from multiple archive files.

[0003] In existing technologies, multiple archive files are first indexed based on the tag number and time. Then, the first-level index pages of the archive files are traversed. After locating the first-level index page, the first-level index entries within that page are traversed, and finally, the tag number data is read. Retrieving tag number data using existing technologies results in low retrieval efficiency. Summary of the Invention

[0004] In view of this, this application provides a method and apparatus for retrieving data, thereby improving the efficiency of tag data retrieval.

[0005] The data retrieval method provided in this application is implemented as follows:

[0006] In the first and second level index pages of the first number, find the first and second level index entries. The first and second level index entries include the time range information of the first level index page and the storage location information of the first level index page. The time range information indicates the target time point.

[0007] Based on the storage location information of the first-level index page, obtain the first-level index page;

[0008] From the first-level index page, find the first-level index item, which includes the target time point;

[0009] Based on the first-level index item, obtain the data for the first digit at the target time point.

[0010] Optionally, the time range information in the first and second level index entries includes the start time of the first position data and the end time of the last position data in the first level index page, with the target time point located between the start time and the end time.

[0011] Optionally, the storage location information in the first and second-level index entries includes the identifier of the first archive file and the first location identifier. Based on the storage location information of the first-level index page, obtaining the first-level index page includes:

[0012] Obtain the first archive file based on its identifier;

[0013] Based on the first location identifier, the first level index page is determined from the first archive file.

[0014] Optionally, the first and second level index pages are stored in the second archive file.

[0015] Optionally, the first and second-level index pages also include the identifier of the second and second-level index pages with the first number and the identifier of the third and second-level index pages with the first number, where the second and second-level index pages are the pages preceding the first and second-level index pages and the third and second-level index pages are the pages following the first and second-level index pages.

[0016] Optionally, before searching for the first and second-level index entries in the first and second-level index pages of the first-digit number, the method further includes:

[0017] Based on the target time point, search for the first and second-level index pages among the multiple second-level index pages of the first index number.

[0018] Optionally, based on the target time point, the first and second-level index pages are searched among the multiple second-level index pages of the first number, including:

[0019] In response to the fact that the time range information in the third-level index page where the first digit is determined does not include the target time point, the first-level index page is determined based on the identifier of the first-level index page in the third-level index page.

[0020] Optionally, in the first and second-level index pages of the first-order number, before searching for the first and second-level index entries, the method further includes:

[0021] Receive a storage request, which indicates that the data with the first digit at the target time point be saved;

[0022] Create a first-level index page based on the data of the first digit at the target time point and the target time point;

[0023] First and second-level index items are created based on the time range information and storage location information of the first-level index page.

[0024] Optionally, the method further includes:

[0025] Insert the second-level index entry into the first-level index page with the first-order number to obtain the second-level index page;

[0026] Update the time range information in the first and second level index entries to the time range information in the second level index page.

[0027] This application also provides a data retrieval device, including: a search unit and an acquisition unit;

[0028] The lookup unit is used to search for a first-level index item in the first-level index page of the first-level index number. The first-level index item includes the time range information of the first-level index page and the storage location information of the first-level index page. The time range information indicates a time range including a target time point. The lookup unit is used to search for a first-level index item from the first-level index page. The first-level index item includes the target time point.

[0029] The acquisition unit is used to acquire the first-level index page based on the storage location information of the first-level index page, and to obtain the data of the first digit at the target time point according to the first-level index item.

[0030] This application also provides a computer device, including: a processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computer device to implement a method for retrieving data.

[0031] Therefore, the beneficial effects of this application are: it provides a method and apparatus for retrieving data, which employs the following method: In the first and second level index pages of the first-order number, a first-level index item is searched. The first-level index item includes the time range information of the first-level index page and the storage location information of the first-level index page. The time range information indicates a time range including a target time point. Based on the storage location information of the first-level index page, the first-level index page is obtained. From the first-level index page, a first-level index item is searched. The first-level index item includes the target time point. Based on the first-level index item, the data of the first-order number at the target time point is obtained. By reading one page of the second-level index page, which is equivalent to reading multiple pages of the first-level index page, the first-level index page can be quickly located, thereby achieving rapid retrieval of the data of the first-order number at the target time point and improving the efficiency of data retrieval. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0033] Figure 1 This is a flowchart of the first embodiment of this application;

[0034] Figure 2 This is a schematic diagram of an index page according to this application;

[0035] Figure 3 This is a flowchart of the second embodiment of this application;

[0036] Figure 4 This is a flowchart of the third embodiment of this application;

[0037] Figure 5 This is a schematic diagram of one type of data retrieval in this application;

[0038] Figure 6 This is a schematic diagram of an apparatus according to this application;

[0039] Figure 7 This is a schematic diagram of a computer device according to this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] The inventors discovered that archive files store the start and end times of all tag data within them. Regardless of whether the archive files are divided into fixed-size or fixed-time segments, there will be temporal overlap between multiple archive files. When retrieving tag data, it is impossible to directly locate the archive file containing the tag data, requiring multiple reads of the primary index page. This application addresses this by creating secondary index entries for the primary index page. By reading one page of the secondary index page, it becomes equivalent to reading multiple pages of the primary index page, thereby reducing the number of primary index page reads and improving the efficiency of tag data retrieval.

[0042] In the embodiments of this application, the device for retrieving data may include, but is not limited to, computer devices.

[0043] A computer device may include: a processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computer device to implement a method for retrieving data.

[0044] Please see Figure 1 The specific steps of the first embodiment of this application are as follows:

[0045] S101: The computer searches for the first and second level index entries in the first and second level index pages with the first number.

[0046] The first and second-level index entries include the time range information of the first-level index page and the storage location information of the first-level index page. The time range information indicates the target time point.

[0047] The time range information includes the start time of the first position data and the end time of the last position data in the first-level index page, and the target time point is located between the start time and the end time.

[0048] The tag number is the input / output point in the industrial control field, used to collect signals from any device in the industrial control field. The signal can be temperature, pressure, flow rate, or other signals set according to requirements. The first tag number can be any tag number.

[0049] Tag number data can be data from a specific moment in time, or it can be data from a continuous period of time, stored in data blocks. Tag number data may include timestamps, quality codes, and numerical values. The timestamp indicates when the data was generated, the quality code indicates the reliability of the data, and the numerical value represents the reading of the instrument used to test the tag number. Tag number data can be stored in a primary index page for easy retrieval.

[0050] Secondary index entries are stored in a second archive file, which is organized by pages. Each page is a secondary index page, and all secondary index entries within the same secondary index page belong to the same index number. Each secondary index entry points to a primary index page. In other words, the primary and secondary index pages are stored in the second archive file.

[0051] Please see Figure 2 In addition to the index entries, index pages can also include `prev` and `next` fields to connect multiple index pages with the same index number within the same archive file. Index pages with the same index number within the same archive file are linked together in a doubly linked list, and index pages from different archive files are independent of each other. In some implementations, secondary index pages can also include identifiers for the second-level index page with the first index number and the third-level index page with the first index number. The second-level index page is the page preceding the first-level index page, and the third-level index page is the page following the first-level index page. Both the second-level and third-level index pages are index pages with the first index number.

[0052] The first and second-level index pages are second-level index pages that contain first and second-level index entries. The first and second-level index entries are second-level index entries whose time range includes the target time point.

[0053] In other implementations, before searching for the 5th first- or second-level index entry in the first- or second-level index page of the first-number index, the computer searches multiple second-level index pages of the first-number index based on the target time point.

[0054] Find the first and second-level index pages.

[0055] In other implementations, the computer, before searching for the first-level index entry in the first-level index page for the first-number, determines the time range information in the third-level index page for the first-number.

[0056] The information does not include the target time point. Based on the identifier of the first and second level index pages in the third and second level index pages, the first and second level index pages are determined to be 0.

[0057] The third-level index page is the page following the first-level index page. Optionally, the third-level index page can be the latest second-level index page with the first digit number.

[0058] S102: The computer retrieves the first-level index page based on its storage location information.

[0059] 5. The storage location information of the first-level index page includes the identifier of the first archive file and the first bit.

[0060] The first archive file identifier is used to indicate that the first level index page is stored in the first archive file, and the first position identifier is used to indicate the position of the first level index page stored in the first archive file.

[0061] In some implementations, the computer obtains the first archive file based on its identifier and determines the first level index page from the first archive file based on its first location identifier.

[0062] 0S103: The computer searches for the first-level index item from the first-level index page.

[0063] The first-level index entries include the target time point.

[0064] The first-level index page is a first-level index page that contains first-level index entries, and the first-level index entries are first-level index entries that contain the target time point.

[0065] S104: The computer obtains the data for the first digit at the target time point based on the first-level index entry. 5. The first-level index entry indicates the data for the first digit at the target time point.

[0066] In some implementations, if the tag number data is stored in data blocks, the computer obtains the first data block based on the first-level index entry. The first data block contains the data of the first tag number at the target time point.

[0067] In the first embodiment of this application, reading one page of the secondary index is equivalent to reading multiple pages of the primary index, thereby enabling rapid location of the first primary index page and rapid retrieval of data with the first digit at the target time point. This reduces the number of disk I / O reads and improves the efficiency of data retrieval.

[0068] Since there are situations where it is necessary to insert reference data between existing reference data, such as importing historical reference data or resuming historical reference data after a disconnection, the second embodiment describes this situation.

[0069] Please see Figure 3 The specific steps of the second embodiment of this application are as follows:

[0070] S301: The computer inserts a second-level index entry into the first-level index page with the first-number digit, and obtains the second-level index page.

[0071] S302: The computer updates the time range information in the first and second level index entries to the time range information in the second level index page.

[0072] S303: Based on the target time point, the computer searches for the first and second level index pages among multiple second level index pages with the first number.

[0073] S304: The computer searches for the first and second level index entries in the first and second level index pages with the first number.

[0074] The first and second-level index entries include the time range information of the second-level index page and the storage location information of the second-level index page. The time range information indicates the target time point.

[0075] The storage location information of the second-level index page includes the identifier of the first archive file and the first location identifier. The identifier of the first archive file is used to indicate that the second-level index page is stored in the first archive file, and the first location identifier is used to indicate the location of the second-level index page stored in the first archive file.

[0076] The time range information includes the start time of the first position data and the end time of the last position data in the second-level index page, with the target time point located between the start time and the end time.

[0077] S305: The computer obtains the first archive file based on the identifier of the first archive file.

[0078] S306: The computer determines the second-level index page from the first archive file based on the first location identifier.

[0079] S307: The computer searches for the first-level index entry from the second-level index page.

[0080] S308: The computer obtains the data of the first digit at the target time point based on the first-level index entry.

[0081] In the second embodiment of this application, when the first-level index item in the first-level index page changes, the corresponding second-level index item of the first-level index page is updated, so that the content of the first-level index page obtained when querying the second-level index item is the updated content.

[0082] The third embodiment describes a situation where new tag data cannot be saved in the existing first-level index page when it is written to disk, and in combination with the need to read multiple second-level index pages to find the first and second-level index pages.

[0083] Please see Figures 4 to 5 The specific steps of the third embodiment of this application are as follows:

[0084] S401: The computer receives a storage request, which indicates that the data with the first digit at the target time point be saved.

[0085] In some implementations, the computer receives a storage request that instructs the storage of data with a second bit at a first time point (the first time point can be any time point including the target time point).

[0086] The second digit can be any digit other than the first digit.

[0087] S402: The computer creates a first-level index page based on the data of the first digit at the target time point and the target time point.

[0088] In some implementations, the computer creates a second-level index page based on the data at the first time point using the second identifier and the first time point itself.

[0089] S403: The computer creates first and second-level index entries based on the time range information and storage location information of the first-level index page.

[0090] In some implementations, the computer creates second- and second-level index entries based on the time range information and storage location information of the second-level index page.

[0091] S404: In response to the computer determining that the time range information in the third-level index page with the first digit does not include the target time point, the computer determines the first-level index page based on the identifier of the first-level index page in the third-level index page.

[0092] In some implementations, the fourth-level index page is the latest second-level index page with the first number. The computer responds in advance to determine that the time range information in the fourth-level index page with the first number does not include the target time point. Based on the identifier of the third-level index page in the fourth-level index page, the computer determines the third-level index page, thereby judging whether the time range information in the third-level index page includes the target time point.

[0093] In other implementations, the computer reads from the latest secondary index page with the first number, and sequentially checks whether the time range information in each secondary index page includes the target time point, until it is determined that the time range information of a secondary index page includes the target time point. Then, subsequent operations are performed based on the secondary index page whose time range information includes the target time point.

[0094] S405: The computer searches for the first and second level index entries in the first and second level index pages with the first number.

[0095] The first and second-level index entries include the time range information of the first-level index page and the storage location information of the first-level index page. The time range information indicates the target time point.

[0096] The storage location information of the first-level index page includes the identifier of the first archive file and the first location identifier. The identifier of the first archive file is used to indicate that the first-level index page is stored in the first archive file, and the first location identifier is used to indicate the location of the first-level index page stored in the first archive file.

[0097] The time range information includes the start time of the first position data and the end time of the last position data in the first-level index page, and the target time point is located between the start time and the end time.

[0098] S406: The computer obtains the first archive file based on the identifier of the first archive file.

[0099] S407: The computer determines the first level index page from the first archive file based on the first location identifier.

[0100] S408: The computer searches for the first-level index item from the first-level index page.

[0101] S409: The computer obtains the data of the first digit at the target time point based on the first-level index entry.

[0102] In the third embodiment of this application, a corresponding secondary index item is created when a new primary index page is added, so that each primary index page has a corresponding secondary index item. By querying the secondary index item, the position data in the primary index page that you want to retrieve can be quickly retrieved.

[0103] Please see Figure 6 This application provides a data retrieval device 600, including a search unit 601 and an acquisition unit 602.

[0104] Search unit 601: Used to search for a first-level index item in the first-level index page of the first-level index number. The first-level index item includes the time range information of the first-level index page and the storage location information of the first-level index page. The time range information indicates a time range including a target time point. It is used to search for a first-level index item from the first-level index page. The first-level index item includes the target time point.

[0105] Optionally, the search unit 601 is also used to search for the first secondary index page among multiple secondary index pages of the first number based on the target time point.

[0106] Acquisition unit 602: used to acquire the first-level index page based on the storage location information of the first-level index page, and to obtain the data of the first digit at the target time point according to the first-level index item.

[0107] Optionally, the acquisition unit 602 is further configured to obtain the first archive file based on the identifier of the first archive file, and to determine the first level index page from the first archive file based on the first position identifier.

[0108] Optionally, a data retrieval device 600 further includes: a determining unit 603, a receiving unit 604, a creating unit 605, an inserting unit 606, and an updating unit 607.

[0109] Determining unit 603: In response to the determination that the time range information in the third-level index page containing the first digit does not include the target time point, determining the first-level index page based on the identifier of the first-level index page in the third-level index page.

[0110] Receiving unit 604: Used to receive storage requests, which indicate that the data with the first digit at the target time point should be saved.

[0111] Creation unit 605: Used to create a first-level index page based on the data of the first digit at the target time point, and to create first and second-level index items based on the time range information and storage location information of the first-level index page.

[0112] Insertion unit 606: used to insert a second-level index item into the first-level index page of the first-level index page, thereby obtaining the second-level index page.

[0113] Update unit 607: Used to update the time range information in the first and second level index entries to the time range information of the second level index page.

[0114] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0115] It should be noted that the data retrieval device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of a data retrieval device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the data retrieval device and the data retrieval method provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0116] Figure 7 This is a schematic diagram of the structure of a computer device 700 provided in an embodiment of this application.

[0117] The computer device 700 includes at least one processor 701, a memory 702, and at least one network interface 703.

[0118] Processor 701 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the embodiments of this application. For example, processor 701 includes application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. A PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0119] Memory 702 may be, for example, read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Optionally, memory 702 exists independently and is connected to processor 701 via internal connection 704. Alternatively, memory 702 and processor 701 may be integrated together.

[0120] Network interface 703 uses any transceiver-like device for communicating with other devices or communication networks. Network interface 703 includes, for example, at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.

[0121] In some embodiments, processor 701 includes one or more CPUs, such as Figure 7 CPU0 and CPU1 are shown in the diagram.

[0122] In some embodiments, the computer device 700 may optionally include multiple processors, such as Figure 7 The processors 701 and 705 are shown. Each of these processors is, for example, a single-core processor (CPU) or a multi-core processor (CPU). A processor here may optionally refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0123] In some embodiments, the computer device 700 further includes an internal connection 704. The processor 701, memory 702, and at least one network interface 703 are connected via the internal connection 704. The internal connection 704 includes pathways for transmitting information between the aforementioned components. Optionally, the internal connection 704 is a single board or a bus. Optionally, the internal connection 704 may be divided into an address bus, a data bus, a control bus, etc.

[0124] In some embodiments, the computer device 700 further includes an input / output interface 706. The input / output interface 706 is connected to an internal connection 704.

[0125] In some embodiments, the input / output interface 706 is used to connect to an input device to receive commands or data input by a user through the input device, as described in the above embodiments. Input devices include, but are not limited to, keyboards, touchscreens, microphones, mice, or sensing devices, etc.

[0126] In some embodiments, the input / output interface 706 is also used to connect to an output device. The input / output interface 706 outputs intermediate and / or final results generated by the processor 701 executing the above method embodiments through the output device. The output device includes, but is not limited to, a display, printer, projector, etc.

[0127] Optionally, the processor 701 implements the method in the above embodiments by reading program code stored in the memory 702, or the processor 701 implements the method in the above embodiments by internally stored program code. When the processor 701 implements the method in the above embodiments by reading program code stored in the memory 702, the memory 702 stores program code 710 that implements the method provided in the embodiments of this application.

[0128] For more details on how processor 701 implements the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.

[0129] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0130] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for retrieving data, characterized in that, The method includes: In the first and second level index pages of the first number, search for the first and second level index entries. The first and second level index entries include the time range information of the first level index page and the storage location information of the first level index page. The time range information indicates a time range including the target time point. The first secondary index page is an index page dedicated to the first bit number, and the secondary index items stored in this page all correspond to the first bit number; The time range information in each secondary index entry is used to indicate the continuous time period covered by the corresponding primary index page; Based on the storage location information of the first-level index page, obtain the first-level index page; The storage location information of the first-level index page includes the identifier of the first archive file and the first location identifier; obtaining the first-level index page based on the storage location information of the first-level index page includes: obtaining the first archive file based on the identifier of the first archive file; and determining the first-level index page from the first archive file based on the first location identifier. From the first-level index page, find the first-level index item, which includes the target time point; Based on the first-level index entry, obtain the data of the first digit at the target time point.

2. The method according to claim 1, characterized in that, The time range information in the first secondary index item includes the start time of the first position data and the end time of the last position data in the first primary index page, and the target time point is located within the time between the start time and the end time.

3. The method according to claim 1, characterized in that, The first secondary index page is stored in the second archive file.

4. The method according to any one of claims 1 to 3, characterized in that, The first secondary index page also includes an identifier for the second secondary index page of the first position number and an identifier for the third secondary index page of the first position number. The second secondary index page is the page preceding the first secondary index page, and the third secondary index page is the page following the first secondary index page.

5. The method according to claim 1, characterized in that, Before searching for the first-level index item in the first-level index page of the first-level index number, the method further includes: Based on the target time point, the first secondary index page is searched among the multiple secondary index pages of the first number.

6. The method according to claim 5, characterized in that, The step of searching for the first secondary index page among multiple secondary index pages of the first digit based on the target time point includes: In response to the determination that the time range information in the third-level index page of the first bit number does not include the target time point, the first-level index page is determined based on the identifier of the first-level index page in the third-level index page.

7. The method according to claim 1, characterized in that, Before searching for the first-level index item in the first-level index page of the first-level index number, the method further includes: Receive a storage request, the storage request indicating that the data of the first bit number at the target time point be saved; Based on the data of the first digit at the target time point and the target time point, create the first level index page; Based on the time range information and storage location information of the first-level index page, the first-level index item is created.

8. The method according to claim 1, characterized in that, The method further includes: Insert a second-level index item into the first-level index page of the first position number to obtain the second-level index page; Update the time range information in the first secondary index item to the time range information in the second primary index page.

9. A device for retrieving data, characterized in that, The device includes: a searching unit and an acquiring unit; The search unit is configured to search for a first-level index item in the first-level index page of the first-position number. The first-level index item includes time range information of the first-level index page and storage location information of the first-level index page. The time range information indicates a target time point. The first-level index page is a dedicated index page for the first position number, and all second-level index items stored in this page correspond to the first position number. The time range information in each second-level index item indicates the continuous time period covered by the corresponding first-level index page. The search unit is further configured to search for a first-level index item from the first-level index page, the first-level index item including the target time point. The acquisition unit is configured to acquire the first-level index page based on the storage location information of the first-level index page; wherein the storage location information of the first-level index page includes the identifier of the first archive file and the first location identifier; the acquisition unit is specifically configured to: obtain the first archive file based on the identifier of the first archive file; determine the first-level index page from the first archive file based on the first location identifier; the acquisition unit is further configured to obtain the data of the first digit at the target time point according to the first-level index item.

10. A computer device, characterized in that, The computer device includes: a processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computer device to implement the method of any one of claims 1-8.