Data storage and query method and device, storage medium and electronic equipment

A technology of data storage and query methods, applied in the field of data analysis, can solve problems such as inefficiency of data query, and achieve the effect of ensuring accuracy and continuity, ensuring high efficiency, and improving efficiency

CN114116795AActive Publication Date: 2022-03-01北京力控元通科技有限公司
8 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2022-03-01

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a data storage and query method and device, a storage medium and electronic equipment, and the method comprises the steps: obtaining to-be-stored data, and storing the to-be-stored data in a cache region of the to-be-stored data; determining an insertion position of the to-be-stored data in the cache region according to the timestamp of the to-be-stored data and a bisection method; writing the to-be-stored data inserted in the cache region into a memory file, and determining the positions of an index block and a data block in the memory file; determining the position of to-be-stored data in a to-be-stored buffer area in the memory file according to the dichotomy and the read data in the data blocks, and updating the number of the data blocks according to the position; whether residual data exist in the to-be-stored buffer area or not is judged, and a stored memory file is determined according to a judgment result; and performing data query according to the stored memory file. The accuracy and continuity of the data are ensured based on a time sequence reading mode, the index position and the data are stored separately, the reading and storage efficiency is ensured, and the query and storage efficiency is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the technical field of data analysis, in particular to a data storage and query method, device, storage medium and electronic equipment. Background technique

[0002] With the rapid development of modern technology, intelligent and automated industrial software is becoming more and more important in the industrial field, where a large amount of data will be generated in the daily production of enterprises and needs to be stored, and the time and validity of data Therefore, it is necessary to store the data generated daily in chronological order to ensure the consistency of the data and the accuracy and efficiency of the query. An efficient query algorithm is needed when storing and reading data in the enterprise. Contents of the invention

[0003] In view of this, the embodiments of the present invention provide a data storage and query method, device, storage medium and electronic equipment, so as to solve the technical prob...

Examples

Embodiment Construction

[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.

[0025] The embodiment of the present invention provides a data storage and query method, such as figure 1 As shown, the method includes the following steps:

[0026] Step S101: Obtain the data to be stored and store it in the buffer area of ​​the data to be stored. The data to be stored is real-time data added to any data point in the database. Specifi...