CN115617800A - Data reading method and device, electronic equipment and storage medium - Google Patents

Data reading method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115617800A
CN115617800A CN202211274857.3A CN202211274857A CN115617800A CN 115617800 A CN115617800 A CN 115617800A CN 202211274857 A CN202211274857 A CN 202211274857A CN 115617800 A CN115617800 A CN 115617800A
Authority
CN
China
Prior art keywords
data
index
determining
target data
disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211274857.3A
Other languages
Chinese (zh)
Inventor
何永金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lianren Healthcare Big Data Technology Co Ltd
Original Assignee
Lianren Healthcare Big Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lianren Healthcare Big Data Technology Co Ltd filed Critical Lianren Healthcare Big Data Technology Co Ltd
Priority to CN202211274857.3A priority Critical patent/CN115617800A/en
Publication of CN115617800A publication Critical patent/CN115617800A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data reading method and device, electronic equipment and a storage medium. The method comprises the following steps: in response to a data query request, determining index data of target data corresponding to the data query request; and determining a sector used for storing target data corresponding to the index data in a magnetic disk according to the address index and the address offset of the index data, and reading the target data in the sector. The technical scheme of the embodiment of the invention solves the technical problem that the time consumption for reading data from the disk is long in the prior art, and realizes that the data is more quickly and effectively read in the disk, thereby shortening the time consumption for reading the data.

Description

Data reading method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data reading method and apparatus, an electronic device, and a storage medium.
Background
For reading data from a disk, in the related art, it is common to determine data conforming to a request by traversing each data in the disk after receiving a data read request. The data that conforms to the request is further read. However, this data reading method has a technical problem that it takes a long time to read data.
Disclosure of Invention
In view of the above technical problems, the present invention provides a data reading method, an apparatus, an electronic device and a storage medium, so as to achieve faster and more efficient data reading in a magnetic disk and shorten the time consumption of data reading.
According to an aspect of the present invention, there is provided a data reading method, the method including:
in response to a data query request, determining index data of target data corresponding to the data query request;
and determining a sector in the disk, which is used for storing target data corresponding to the index data, according to the address index and the address offset of the index data, and reading the target data in the sector.
Optionally, the determining, in response to a data query request, index data of target data corresponding to the data query request includes:
determining data information of target data in response to a data query request, wherein the data information comprises an index offset and an index length of the target data;
and determining the index data of the target data based on the index offset and the index length.
Optionally, the determining the index data of the target data based on the index offset and the index length includes:
determining an index address pointing to the index data on the disk based on the index offset;
and determining a file block used for storing the index data on the disk based on the index address and the index length, and reading the index data from the file block.
Optionally, the determining, based on the index offset, an index address pointing to the index data on the disk includes:
and determining an address corresponding to the index offset on the disk by adopting a binary search mode, and using the address as an index address pointing to the index data on the disk.
Optionally, the data information includes a total amount of a first byte of the target data, and the method further includes:
determining a second byte total amount of the target data, determining whether the first byte total amount and the second byte total amount are equal, and if so, determining that the target data is not damaged; if not, determining that the target data is damaged.
Optionally, the determining data information of the target data includes:
determining block description information of a file block used for storing target data on a disk, and taking the block description information as data information of the target data.
Optionally, the determining, in response to a data query request, index data of target data corresponding to the data query request includes:
and responding to the data query request, and matching index data of target data corresponding to the data query request on a disk by calling a preset bloom filter.
According to another aspect of the present invention, a data reading apparatus is provided. The device includes:
the index data determining module is used for responding to a data query request and determining index data of target data corresponding to the data query request;
and the target data reading module is used for determining a sector in the magnetic disk, which is used for storing target data corresponding to the index data, according to the address index and the address offset of the index data, and reading the target data in the sector.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a data reading method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a data reading method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, after the data query request is received, the index data of the target data corresponding to the data query request is determined, so that the query operation of the target data in the disk is reduced. After determining the index data, a sector in the disk for storing target data corresponding to the index data may be determined according to the address index and the address offset of the index data, and the target data may be read from the sector. The technical scheme of the embodiment of the invention solves the technical problem that the time consumption for reading data from the disk is long in the prior art, and realizes that the data is more quickly and effectively read in the disk, thereby shortening the time consumption for reading the data.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a data reading method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a data reading apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be appreciated that the data involved in the subject technology, including but not limited to the data itself, the acquisition or use of the data, should comply with the requirements of the corresponding laws and regulations and related regulations.
Example one
Fig. 1 is a flowchart of a data reading method according to an embodiment of the present invention, where the embodiment is applicable to a case of reading data from a magnetic disk, and the method may be executed by a data reading apparatus, where the data reading apparatus may be implemented in a form of hardware and/or software, and the data reading apparatus may be configured in an electronic device such as a computer or a server. As shown in fig. 1, the method of the present embodiment includes:
s110, responding to the data query request, and determining index data of target data corresponding to the data query request.
The data query request may be understood as a request sent by the memory to the disk for querying data from the disk and reading the data. The data query request may include index data for the target data. The target data may be one or more data stored in the disk that is consistent with the data query request. Index data may be understood as an index used to obtain target data during a data query. Illustratively, the data query request is to query a certain medical record data, the target data is a certain medical record data, and the index data of the target data is a certain medical record data. In the embodiment of the present invention, the correspondence between the target data and the index data may be one-to-one or many-to-one.
Specifically, a data query request sent by the memory is received. After the disk receives the data query request, index data of target data corresponding to the data query request on the disk can be determined.
Optionally, the determining, in response to a data query request, index data of target data corresponding to the data query request includes: and responding to the data query request, and matching the index data of the target data corresponding to the data query request on the disk by calling a preset bloom filter.
The preset bloom filter (Bloomfilter) may be understood as index data preset to determine target data corresponding to the data query request on the disk.
Specifically, a data query request sent by a memory is received. After receiving the data query request, traversing the list for storing the index data in the disk through a preset bloom filter. It is thus possible to determine whether there is index data in the disk that matches the data query request. And if so, taking the index data matched with the data query request on the disk as the index data of the target data corresponding to the data query request. It can be understood that if the information does not exist, the prompt information is generated and sent to the memory.
Optionally, the determining, in response to a data query request, index data of target data corresponding to the data query request includes: determining data information of target data in response to a data query request, wherein the data information comprises an index offset and an index length of the target data; and determining the index data of the target data based on the index offset and the index length.
The data information of the target data may be used to describe a file size, an index offset, an index length, a file encoding, a compression type of the target data, and a total number of file blocks occupied by the target data in the disk. The index offset may be understood as an offset from a base address on disk that points to the index data. The index length may be understood as the length of bytes occupied by index data of the target data. It should be noted that the target data and the index data of the target data are stored in file blocks on the disk. In other words, the target data and the disk data of the target data are stored on the disk in the form of file blocks. It should be noted that the size of the file block on the disk may be set based on the underlying storage platform (e.g., HDFS, CEPH, aws s3, etc.), and generally, the size of one file block is assumed to be 64KB by default.
Specifically, after receiving a data query request, data information of target data that meets the query request may be determined. And further analyzing the data information, determining the offset of the base address of the index data pointing to the target data on the disk relative to the description in the data information, and determining the byte length occupied by the index data on the disk.
Optionally, the determining data information of the target data includes: determining block description information of a file block for storing target data on a disk, and taking the block description information as data information of the target data. Wherein the block description information may be understood as detailed information describing a file block on the disk for storing the target data. The block description information includes the file size of the target data, the index offset, the index length, the file coding, the compression type and the total number of file blocks occupied by the target data in the disk.
Optionally, the determining index data of the target data based on the index offset and the index length includes: determining an index address pointing to the index data on the disk based on the index offset; and determining a file block used for storing the index data on the disk based on the index address and the index length, and reading the index data from the file block.
The index address may be understood as an address of index data pointing to target data on a disk. It should be noted that the number of file blocks for storing index data on the disk may be one or more.
Specifically, after determining the index offset, the index address pointing to the index data on the disk may be determined according to the base address pointing to the index data on the disk and the index offset. And further determining a file block for storing index data on the disk based on the index address and the index length. And then the index data stored in the file block can be read.
In this embodiment of the present invention, the determining, based on the index offset, an index address pointing to the index data on the disk includes: and determining an address corresponding to the index offset on the disk by adopting a binary search mode, and using the address as an index address pointing to the index data on the disk. This has the advantage that the address of the index data pointing to the target data on the disk can be located quickly, so that the index data of the target data on the disk can be read quickly later.
S120, determining a sector used for storing target data corresponding to the index data in a magnetic disk according to the address index and the address offset of the index data, and reading the target data in the sector.
The address index may be understood as an address pointing to target data corresponding to the index data on the disk. The address offset may be understood as an offset to an address on the disk that points to the target data corresponding to the index data. Alternatively, the address index may be an index on the disk that points to the last file block for storing target data corresponding to the index data.
Specifically, after determining the index data of the target data, the address pointing to the index data on the disk may be determined, that is, the address index of the index data and the address offset of the index data are determined. At this time, an address pointing to the target data corresponding to the index data on the disk may be determined, and an offset of the address pointing to the target data corresponding to the index data on the disk may be determined. And a sector on the disk for storing target data corresponding to the index data may be determined. So that the target data corresponding to the index data can be read from the sector. In an embodiment of the present invention, the data information includes a total amount of a first byte of the target data, and the method further includes: determining a second byte total amount of the target data, determining whether the first byte total amount and the second byte total amount are equal, and if so, determining that the target data is not damaged; if not, determining that the target data is damaged.
The first total byte amount may be understood as the byte amount of the target data in the case where the target data is not damaged. The second total amount of bytes may be understood as the amount of bytes of target data read from the disk.
Specifically, the byte amount of the target data read from the disk is determined, i.e., the second byte amount is determined. It may then be determined whether the second byte amount is equal to the first byte amount of the target data in the data information of the target data. If so, determining that the target data is not damaged; if not, it may be determined that the target data has been corrupted.
Optionally, if the target data is damaged, data damage prompting information for prompting that the target data is damaged may be generated and sent to the memory.
According to the technical scheme of the embodiment of the invention, after the data query request is received, the index data of the target data corresponding to the data query request is determined, so that the query operation of the target data in the disk is reduced. After determining the index data, a sector in the disk for storing target data corresponding to the index data may be determined according to the address index and the address offset of the index data, and the target data may be read in the sector. The technical scheme of the embodiment of the invention solves the technical problem that the time consumption for reading data from the disk is long in the prior art, and realizes that the data is more quickly and effectively read in the disk, thereby shortening the time consumption for reading the data.
Example two
Fig. 2 is a schematic structural diagram of a data reading apparatus according to a second embodiment of the present invention. As shown in fig. 2, the apparatus includes: an index data determination module 210 and a target data reading module 220.
The index data determining module 210 is configured to determine, in response to a data query request, index data of target data corresponding to the data query request;
the target data reading module 220 is configured to determine a sector in the disk, where the sector is used to store target data corresponding to the index data, according to the address index and the address offset of the index data, and read the target data in the sector.
According to the technical scheme of the embodiment of the invention, after the data query request is received, the index data of the target data corresponding to the data query request is determined, so that the query operation of the target data in the disk is reduced. After determining the index data, a sector in the disk for storing target data corresponding to the index data may be determined according to the address index and the address offset of the index data, and the target data may be read from the sector. The technical scheme of the embodiment of the invention solves the technical problem that the time consumption for reading data from the disk is long in the prior art, and realizes that the data can be more quickly and effectively read from the disk, thereby shortening the time consumption for reading the data.
Optionally, the index data determining module 210 is configured to determine data information of target data in response to a data query request, where the data information includes an index offset and an index length of the target data; and determining index data of the target data based on the index offset and the index length.
Optionally, the index data determining module 210 is configured to determine, based on the index offset, an index address pointing to the index data on the disk; and determining a file block used for storing the index data on the disk based on the index address and the index length, and reading the index data from the file block.
Optionally, the index data determining module 210 includes an index address determining unit, where the index address determining unit is configured to determine, in a binary search manner, an address corresponding to the index offset on the disk, and use the address as an index address pointing to the index data on the disk.
Optionally, the data information includes a first total byte amount of the target data, and the apparatus further includes a data corruption determination module, configured to determine a second total byte amount of the target data, and determine whether the first total byte amount and the second total byte amount are equal, if so, determine that the target data is not corrupted; if not, determining that the target data is damaged.
Optionally, the index data determining module 210 includes a data information determining unit, configured to determine block description information of a file block on a disk, where the file block is used to store target data, and use the block description information as data information of the target data.
Optionally, the index data determining module 210 is configured to, in response to the data query request, match index data of target data corresponding to the data query request on the disk by calling a preset bloom filter.
The data reading device provided by the embodiment of the invention can execute the data reading method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the data reading apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the present invention.
EXAMPLE III
FIG. 3 illustrates a block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as a data reading method.
In some embodiments, the data reading method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data reading method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data reading method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A data reading method, comprising:
in response to a data query request, determining index data of target data corresponding to the data query request;
and determining a sector in the disk, which is used for storing target data corresponding to the index data, according to the address index and the address offset of the index data, and reading the target data in the sector.
2. The method of claim 1, wherein the determining, in response to a data query request, index data of target data corresponding to the data query request comprises:
determining data information of target data in response to a data query request, wherein the data information comprises an index offset and an index length of the target data;
and determining the index data of the target data based on the index offset and the index length.
3. The method of claim 2, wherein determining the index data for the target data based on the index offset and the index length comprises:
determining an index address pointing to the index data on the disk based on the index offset;
and determining a file block used for storing the index data on the disk based on the index address and the index length, and reading the index data from the file block.
4. The method of claim 3, wherein determining an index address on the disk that points to the index data based on the index offset comprises:
and determining an address corresponding to the index offset on the disk by adopting a binary search mode, and using the address as an index address pointing to the index data on the disk.
5. The method of claim 2, wherein the data information comprises a first total amount of bytes of the target data, the method further comprising:
determining a second byte total amount of the target data, determining whether the first byte total amount and the second byte total amount are equal, and if so, determining that the target data is not damaged; if not, determining that the target data is damaged.
6. The method of claim 2, wherein the determining the data information of the target data comprises:
determining block description information of a file block for storing target data on a disk, and taking the block description information as data information of the target data.
7. The method of claim 1, wherein the determining, in response to a data query request, index data of target data corresponding to the data query request comprises:
and responding to the data query request, and matching the index data of the target data corresponding to the data query request on the disk by calling a preset bloom filter.
8. A data reading apparatus, comprising:
the index data determining module is used for responding to a data query request and determining index data of target data corresponding to the data query request;
and the target data reading module is used for determining a sector in the magnetic disk, which is used for storing target data corresponding to the index data, according to the address index and the address offset of the index data, and reading the target data in the sector.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data reading method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the data reading method of any one of claims 1 to 7 when executed.
CN202211274857.3A 2022-10-18 2022-10-18 Data reading method and device, electronic equipment and storage medium Pending CN115617800A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211274857.3A CN115617800A (en) 2022-10-18 2022-10-18 Data reading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211274857.3A CN115617800A (en) 2022-10-18 2022-10-18 Data reading method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115617800A true CN115617800A (en) 2023-01-17

Family

ID=84862400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211274857.3A Pending CN115617800A (en) 2022-10-18 2022-10-18 Data reading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115617800A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116360859A (en) * 2023-03-31 2023-06-30 摩尔线程智能科技(北京)有限责任公司 Power domain access method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116360859A (en) * 2023-03-31 2023-06-30 摩尔线程智能科技(北京)有限责任公司 Power domain access method, device, equipment and storage medium
CN116360859B (en) * 2023-03-31 2024-01-26 摩尔线程智能科技(北京)有限责任公司 Power domain access method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN115242731A (en) Message processing method, device, equipment and storage medium
CN115631273A (en) Big data duplicate removal method, device, equipment and medium
CN115617800A (en) Data reading method and device, electronic equipment and storage medium
CN114564149B (en) Data storage method, device, equipment and storage medium
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN115639966A (en) Data writing method and device, terminal equipment and storage medium
CN113868254B (en) Method, device and storage medium for removing duplication of entity node in graph database
CN112887426B (en) Information stream pushing method and device, electronic equipment and storage medium
CN115617549A (en) Thread decoupling method and device, electronic equipment and storage medium
CN115438007A (en) File merging method and device, electronic equipment and medium
CN115309730A (en) Data auditing method and device, electronic equipment and storage medium
CN115065366A (en) Compression method, device and equipment of time sequence data and storage medium
CN113326038A (en) Method, apparatus, device, storage medium and program product for providing service
CN113760765B (en) Code testing method and device, electronic equipment and storage medium
CN113434508B (en) Method and apparatus for storing information
CN115421665A (en) Data storage method, device, equipment and storage medium
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN113986134A (en) Method for storing data, method and device for reading data
CN115827588A (en) Method, device, equipment and storage medium for generating business global serial number
CN115277765A (en) Cloud platform access method and device, electronic equipment and storage medium
CN115391046A (en) Quota management method, device, equipment and medium
CN116126249A (en) Data reading method and device, electronic equipment and storage medium
CN115801763A (en) File transmission method and device, electronic equipment and storage medium
CN115510140A (en) Data extraction method, device, equipment and storage medium
CN115309568A (en) Method, device, equipment and medium for realizing multi-process file sharing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination