WO2021073241A1 - 一种基于磁盘存储的数据读取方法、装置及设备 - Google Patents

一种基于磁盘存储的数据读取方法、装置及设备 Download PDF

Info

Publication number
WO2021073241A1
WO2021073241A1 PCT/CN2020/109273 CN2020109273W WO2021073241A1 WO 2021073241 A1 WO2021073241 A1 WO 2021073241A1 CN 2020109273 W CN2020109273 W CN 2020109273W WO 2021073241 A1 WO2021073241 A1 WO 2021073241A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
data
interval
block height
data record
Prior art date
Application number
PCT/CN2020/109273
Other languages
English (en)
French (fr)
Inventor
杨新颖
Original Assignee
蚂蚁区块链科技(上海)有限公司
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 蚂蚁区块链科技(上海)有限公司 filed Critical 蚂蚁区块链科技(上海)有限公司
Publication of WO2021073241A1 publication Critical patent/WO2021073241A1/zh
Priority to US17/723,117 priority Critical patent/US20220236910A1/en

Links

Images

Classifications

    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • 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
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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/064Management of blocks
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Definitions

  • the embodiments of this specification relate to the field of information technology, and in particular, to a method, device, and device for reading data based on disk storage.
  • the ledger On the database server side that provides services externally with a centralized block chain ledger, the ledger itself is persistently stored on the disk. Then when the user reads, it also needs to read from the disk. Due to the characteristics of the blockchain ledger, the user's data may be randomly distributed in each sector of the disk. The general reading method is more efficient. low.
  • the purpose of the embodiments of the present application is to provide a more efficient data reading solution based on disk storage.
  • a data reading method based on disk storage includes: receiving a data reading instruction sent by a client, wherein the reading instruction includes a business attribute; and obtaining the corresponding business attribute from a pre-stored index table
  • the location information set of the data record where the location information includes the block height of the data block where the data record is located, and the offset in the data block where the data record is located; the block heights are arranged in order to generate the block height Sequence, determine M mutually exclusive block height continuous block height intervals from the block height sequence; for any block height interval, read the data block corresponding to the block height interval from the disk; according to the position
  • the information set queries the data records obtained from the data blocks corresponding to the block height interval, and returns to the client.
  • an embodiment of this specification also provides a data reading device based on disk storage, including: a receiving module that receives a data reading instruction sent by a client, wherein the reading instruction includes a business attribute; a location The information acquisition module acquires the location information set corresponding to the business attribute from the pre-stored index table, where the location information includes the block height of the data block where the data record is located, and the information in the data block where the data record is located.
  • block height interval generation module which sequentially arranges the block heights to generate a block height sequence, and determines M mutually exclusive block height continuous block height intervals from the block height sequence; data block read The fetching module reads the data block corresponding to the block height interval from the disk for any block height interval; the data record reading module queries the data block corresponding to the block height interval according to the position information set Record the acquired data and return it to the client.
  • the block height corresponding to the business attribute is first sorted to obtain the block height sequence, and then several block height intervals are obtained from the block height sequence , Read continuously from the disk the full data blocks of these block heights, and then read the data records from the data blocks according to the position information, which reduces the number of disk reads and improves the input/output of the disk. (Input/Output, IO) efficiency, thereby improving the reading efficiency of the blockchain ledger in disk storage.
  • Input/Output, IO Input/Output
  • any one of the embodiments of the present specification does not need to achieve all the above-mentioned effects.
  • Figure 1 is a schematic diagram of the system architecture involved in an embodiment of the specification
  • Fig. 2 is a schematic diagram of a process for generating a block chain ledger provided by an embodiment of the specification
  • FIG. 3 is a schematic flowchart of a method for creating an index of data records according to an embodiment of this specification
  • FIG. 4 is a schematic flowchart of a data reading solution based on disk storage provided by an embodiment of this specification
  • FIG. 5 is a schematic structural diagram of a data reading device based on disk storage provided by an embodiment of this specification
  • Fig. 6 is a schematic structural diagram of a device for configuring the method of the embodiment of this specification.
  • FIG. 1 is a schematic diagram of a system architecture involved in an embodiment of the specification.
  • an enterprise organization can face multiple users, and each user can query the database service provider through its corresponding enterprise organization.
  • the organization connected to the database server is a financial product company, and the data records can be individual users’ financial management records in the financial product company; or, the connected organization can be a government department, where the data records are what the government department has for the department. Expense details of the managed public project; or, the database server is connected to a hospital, and the data record is the patient’s medical record; or the database server is connected to a third-party payment agency, and the data record can be an individual user Payment records through the agency, and so on.
  • FIG. 2 is a schematic diagram of the process of generating a block chain ledger provided by the embodiment of this specification, including S201 to S203.
  • S201 Receive a data record to be stored, and determine a hash value of each data record, where the data record contains business attributes.
  • the data records to be stored here can be various consumption records of individual users of the client, or can be business results, intermediate states, and operation records generated when the application server executes business logic based on user instructions.
  • Specific business scenarios can include consumption records, audit logs, supply chains, government supervision records, medical records, and so on.
  • the business attribute is generally unique in the interface organization.
  • the business attributes are based on different business scenarios and can include user names, user ID numbers, and driver’s licenses. Number, mobile phone number, project unique number, type of data record (such as financial package number), etc.
  • the data record is the user's consumption record
  • the business attribute at this time is the user ID (including mobile phone number, ID number, user name, etc.), or the user ID is hashed
  • the hash value obtained by the algorithm; or, for government agencies, the data record is the overhead flow of multiple public projects, then the business attribute at this time can be a unique number for each project.
  • Business attributes can be stored in a specified location in the data record, such as the head or tail of the data record.
  • S203 When a preset block forming condition is reached, determine each data record to be written in the data block, and generate an Nth data block including the hash value of the data block and the data record.
  • the preset blocking conditions include: the number of data records to be stored reaches the number threshold, for example, every time one thousand data records are received, a new data block is generated and one thousand data records are written into the block; or , The time interval from the last block formation time reaches the time threshold, for example, every 5 minutes, a new data block is generated, and the data records received within these 5 minutes are written into the block.
  • N refers to the serial number of the data block.
  • the data block is in the form of a block chain, which is arranged sequentially based on the order of the block time, and has strong timing characteristics.
  • the block height of the data block increases monotonically based on the sequence of the block time.
  • the block height can be a sequence number.
  • the block height of the Nth data block is N; the block height can also be generated in other ways, for example, the block time symmetric encryption is converted into large integer data (for example, 12-bit or 15-bit Integer) as the block height.
  • the data block at this time is the initial data block.
  • the current data block (the first data block) can be generated based on the hash value of the previous data block (that is, the N-1th data block). For example, a feasible way is to determine the hash value of each data record to be written in the Nth block, and generate a Merck according to the order in the block.
  • the root hash value of the Merkel tree and the hash value of the previous data block are spliced together, and the hash algorithm is used again to generate the hash value of the current block.
  • the hash value of the corresponding data record and the hash value of the data block can be obtained and saved, and integrity verification can be initiated based on the hash value.
  • the specific verification method is to recalculate the hash value of the data record itself and the hash value of the data block in the database, and compare with the locally stored hash value.
  • each data block is determined by a hash value
  • the hash value of the data block is determined by the content and order of the data records in the data block and the hash value of the previous data block.
  • the user can initiate verification based on the hash value of the data block at any time. Any modification of the content of the data block (including the modification of the data record content or sequence in the data block) will result in the hash value of the data block calculated during verification.
  • the hash value of the data block is inconsistent when it is generated, which causes the verification to fail, thus realizing the immutability under centralization.
  • a segment of data block is designated for continuous integrity verification, or continuous integrity verification starts from the initial data block.
  • the verification method is to obtain the hash value of the previous data block, and use the same algorithm as when generating the hash value of the data block, and recalculate its own data according to its own data record and the hash value of the previous data block.
  • the hash value of the block for verification is to obtain the hash value of the previous data block, and use the same algorithm as when generating the hash value of the data block, and recalculate its own data according to its own data record and the hash value of the previous data block.
  • FIG. 3 is a schematic flow chart of a method for creating an index of data records provided by an embodiment of this specification. The flow specifically includes the following steps S301 to S305.
  • S301 In the block chain ledger, for any data record, obtain the business attributes contained in the data record.
  • the specific location and acquisition method of the business attributes can be negotiated in advance by the database server and the docking organization.
  • the business attributes can be obtained from the specified offset in the data record, or the start and end positions can be identified by specific characters; or, the docking organization provides
  • the header containing the business attribute can be directly spliced at the beginning of each data record when uploading by the docking agency, and the database server can directly obtain the business attribute of each data record from the header .
  • S303 Determine location information of the data record in the ledger, where the location information includes the block height of the data block where the data record is located, and the offset in the data block where the data record is located.
  • a block-chain ledger is composed of multiple data blocks, and at the same time, a data block usually contains multiple data records. Therefore, in the embodiment of this specification, the location information specifically refers to which data block in the ledger is located when a data record is saved, and where it is in the data block.
  • the hash value of the data block is a hash value obtained by hash calculation based on the previous block's hash value and its own data record, which can be used to uniquely and unambiguously identify a data block.
  • the block height of the first data block is 0, and the block height is increased by 1 for each additional data block; or, the block time of the data block can be converted into a large monotonic increase Integer data (usually 12 to 15 bits) sequence, as the block height of the data block. Therefore, a data block usually has a clear block height.
  • the order of the data records has also been fixed, so the serial number of a data record in the data block is also clear.
  • the sequence number can also be used to clarify the location information of the data record in the data block in which it is located. That is, the sequence number can also be used to indicate the offset of the data recorded in the data block.
  • the address offset of each data record in the data block can also be used to identify the data records in the data block respectively.
  • the address offset of each data record is not the same.
  • the specific format of the data block can be customized (for example, the metadata information and remark information contained in the block header of the data block, and the block height of the data block is adopted Format, etc.), in different formats, the content of the location information will also be different, which does not constitute a limitation to this solution.
  • S305 Establish a corresponding relationship between the business attribute and location information, and write an index with the business attribute as the main key.
  • the index is an inverted index.
  • the primary key is the business attribute contained in the data record.
  • the specific writing method is: when the primary key in the index does not include the designated identification field, an index record with the designated identification field as the primary key is created in the index table.
  • the location information is written into the index record where the designated identification field is located. It should be noted that the writing here is not an overwriting writing, but the location information is added to the value of the index record, and it is stored in the index record alongside other location information.
  • Table 1 is an exemplary index table provided in the embodiment of this specification.
  • the Key is the specific value of the business attribute, and each array in the Value part is a piece of position information.
  • the first part of each array is the block height, and the latter part is the serial number of the data recorded in the data block, passing the block height and serial number That is, a data record can be uniquely determined. It is easy to understand that in the index table, a key can correspond to multiple location information.
  • the business attributes of the data records and the storage location in the ledger are determined, the corresponding relationship between the two is established, and the business attribute is created as the main key. Sort index, without knowing the user's business details, from the index, you can perform corresponding statistics on data records based on business attributes, as well as subsequent query and verification.
  • the location information can also be arranged in sequence according to the order in which the data is recorded in the ledger, which is conducive to the user's query and verification.
  • the sequence of data records in the ledger can be reflected by the timestamp when the data record is written into the ledger (that is, the block timestamp of the data block), and the sequence of data records in the same data block can be reflected in the The order in the data block is reflected one after another.
  • the status query and statistics of the business attributes can be performed based on the index table. For example, receiving a query request containing the specific value of a business attribute (generally, the query request can be sent in the form of an instruction).
  • a disk refers to a memory that uses magnetic recording technology to store data, including a soft disk (soft disk, floppy disk for short) or a hard disk (hard disk, hard disk for short).
  • the process of reading and writing data is generally to first issue an instruction to notify the starting sector position of the disk, and then give the number of consecutive sectors that need to be read from this initial sector (or Is one), and also gives whether the action is read or write.
  • the disk receives this instruction, it will read or write data in accordance with the requirements of the instruction.
  • continuous/random IO will appear.
  • continuous and random refers to whether the initial sector address given by this IO and the end sector address of the last IO are continuous or not much apart. If so, this IO should be regarded as a continuous IO, otherwise it is regarded as a random IO.
  • the time used by an IO seek time + data transmission time. Since the seek time is several orders of magnitude larger than the transmission time, the key factor that affects IOPS is the bottom seek time. In the case of continuous IO, because the initial sector this time is very close to the end sector last time, The magnetic head hardly needs to change lanes or the lane change time is extremely short; if the phase difference is too large, the magnetic head needs a long lane change time, and if there are many random IOs, the magnetic head keeps changing lanes and the efficiency is greatly reduced.
  • the data blocks in the ledger are generally stored in the order of serial numbers on the disk. It is assumed that a data block in the ledger and a sector in the disk occupy roughly the same size (or occupy If multiple sectors are included), reading one data block at a time is equivalent to reading one sector from the disk. As mentioned above, because the user’s data is often irregular, it may store more data in a short period of time and write several adjacent data blocks; it may also store some data records at intervals, so that it can be stored in the ledger. The inside is relatively scattered.
  • FIG. 4 is a schematic flowchart of a data reading solution based on disk storage provided by an embodiment of this specification. The process specifically includes the following steps S401 to S409.
  • S401 Receive a data read instruction sent by a client, where the read instruction includes a business attribute.
  • Data reading can come from the docking organization, or it can be from the service user of the docking organization. Therefore, the database can perform matching from the index table according to the specific value of the business attribute. For example, after Table 1 is created, the user enters a query command, Retrieve (0X123456, &v, FULL).
  • S403 Obtain a set of location information corresponding to the service attribute from a pre-stored index table, where the location information includes the block height of the data block where the data record is located, and the offset in the data block where the data record is located. the amount.
  • the database server can obtain the location information (2,08), (2,10), (300,89), (300,999) of the corresponding data record of the user "0X123456" from the index table.
  • S405 Arrange the block heights in order to generate a block height sequence, and determine M mutually exclusive block height intervals with continuous block heights from the block height sequence.
  • the block height sequence refers to the sequence in which the block heights are arranged in ascending order. For example, for location information (2,08), (2,10), (300,89), (300,999), the obtained block heights are 2 and 300, and the block height sequence "2,300" is obtained by sorting.
  • the block height sequence obtained is often as follows: "1, 2, 4, 5, 6, 9, 11, 13, 18, 23, 25, 27, 50 , 51, 53, 55, 99, 130, 131, 155."
  • the number of blocks may be tens of thousands or more. In this case, if you read each block in turn, it is obviously random IO, which is too inefficient.
  • each block height interval does not contain the same block height, that is, each block height interval does not overlap.
  • the principle of determining the block height interval is: the invalid block height in the block height interval (that is, the block height that is not in the block height sequence) should not be too much. Otherwise, too many invalid data blocks are read, which also affects the reading efficiency of data records.
  • the embodiment of this specification provides an exemplary block height interval determination method, which is specifically as follows:
  • the next one will start with the sequence number 18, because the array (18,23) The interval exceeds the preset value 3. Therefore, "18" here will not be included in the block height interval, the second block height interval will be determined as [23, 27], and the third block height interval is [50,55], the fourth block height interval is [130,131], and so on, until the last block height in the block height sequence.
  • the storage itself is not continuous with the data block, that is, the data block itself is stored in the order of block height in the disk, so it can be batched from the disk according to the order.
  • Continuous reading although there will be some invalid data blocks (that is, the data block does not contain user data records), but based on the aforementioned principle, the number of invalid data blocks in the block height interval is not many.
  • the number of track changes of the head in the disk in the IO is reduced, thereby improving the efficiency of reading data blocks.
  • the read data block will be placed in the cache or memory of the database server.
  • the efficiency of reading and writing will be greatly improved compared to the disk.
  • read and write speed there is basically no impact.
  • block heights in the block height sequence may not be completely summarized in the block height range, such as the aforementioned block heights "18" and "99", etc., for those that are not in the block height range Scattered blocks are high and cannot be discarded or read, and a single random read can still be performed.
  • step S409 Query the acquired data record from the data block corresponding to the block height interval according to the location information set, and return it to the client. Specifically, that is, in the memory, according to the block height and offset obtained in step S402, the data block obtained by the aforementioned reading can be queried one by one.
  • the block height corresponding to the business attribute is first sorted to obtain the block height sequence, and then several block height intervals are obtained from the block height sequence , Read the full data blocks of these block heights from the disk continuously, and then read the data records from the data blocks according to the position information, which reduces the number of lane changes when the disk is read, and improves the IO efficiency of the disk. This improves the reading efficiency of the block chain ledger when it is stored on the disk.
  • a transformable filtering method can also be a setting condition: the length of the block height interval is not less than a preset value. For example, the length of the block height interval is not less than 4, so that the block height intervals that contain less effective block height can also be filtered out. In this way, the grouping efficiency of the block high sequence can be improved, thereby increasing the reading speed.
  • FIG. 5 is a schematic structural diagram of a data reading device based on disk storage provided by the embodiment of this specification, including The following modules.
  • the receiving module 501 receives a data read instruction sent by the client, where the read instruction includes a business attribute.
  • the location information obtaining module 503 obtains the location information set corresponding to the business attribute from the pre-stored index table, where the location information includes the block height of the data block where the data record is located, and the data block where the data record is located. The offset in.
  • the block height interval generating module 505 sequentially arranges the block heights to generate a block height sequence, and determines M mutually exclusive block height intervals with continuous block height from the block height sequence.
  • the data block reading module 507 reads the data block corresponding to the block high interval from the disk for any block high interval.
  • the data record reading module 509 searches for the data record obtained from the data block corresponding to the block height interval according to the position information set, and returns it to the client.
  • the block height interval generation module 505 traverses the block height series, starts from the sequence number of the block height interval that has not yet been determined, and sequentially determines the interval between the two block heights, and sets the interval less than the previous one when the interval is less than the preset value.
  • One block height is used as the starting point S M of the interval; and, starting from the block height S M , the interval between the two block heights is determined in sequence, and the previous block height when the interval is greater than the preset value is used as the interval end point E M to generate the M-th block High interval [S M , E M ].
  • the block height interval generation module 505 determines the block height number K of the block height sequence in the block height interval, and when the block height number K is not lower than the preset value, generates the Mth Block height interval [S M , E M ].
  • the device further includes an index generation module 511.
  • an index generation module 511 In the block chain ledger, for any data record, obtain the business attributes contained in the data record; determine the location information of the data record in the ledger, The location information includes the block height of the data block where the data record is located, and the offset in the data block where the data record is located; the correspondence relationship between the business attribute and the location information is established, and the business attribute is written as The index of the primary key.
  • the index generating module 511 determines the time stamp of the data record; in the same index record, according to the sequence of the time stamp, the position information of the data record is written into the value of the index record in order.
  • the device further includes a data block generation module 513, which receives the data records to be stored and determines the hash value of each data record, wherein the data record contains business attributes.
  • the hash value of the block is generated to include the hash value of the Nth data block and the Nth data block of each data record, where the block height of the data block increases monotonically based on the sequence of the block time.
  • the preset blocking condition includes: the number of data records to be stored reaches the number threshold; or, the time interval from the last blocking time reaches the time threshold.
  • the embodiments of this specification also provide a computer device, which at least includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the data shown in FIG. 4 when the program is executed. Reading method.
  • the device may include a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050.
  • the processor 1010, the memory 1020, the input/output interface 1030, and the communication interface 1040 realize the communication connection between each other in the device through the bus 1050.
  • the processor 1010 may be implemented by a general CPU (Central Processing Unit, central processing unit), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., for execution related Program to realize the technical solutions provided in the embodiments of this specification.
  • CPU Central Processing Unit
  • ASIC Application Specific Integrated Circuit
  • the memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc.
  • the memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, related program codes are stored in the memory 1020 and called and executed by the processor 1010.
  • the input/output interface 1030 is used to connect an input/output module to realize information input and output.
  • the input/output/module can be configured in the device as a component (not shown in the figure), or it can be connected to the device to provide corresponding functions.
  • the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc.
  • an output device may include a display, a speaker, a vibrator, an indicator light, and the like.
  • the communication interface 1040 is used to connect a communication module (not shown in the figure) to realize the communication interaction between the device and other devices.
  • the communication module can realize communication through wired means (such as USB, network cable, etc.), or through wireless means (such as mobile network, WIFI, Bluetooth, etc.).
  • the bus 1050 includes a path to transmit information between various components of the device (for example, the processor 1010, the memory 1020, the input/output interface 1030, and the communication interface 1040).
  • the above device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device may also include the equipment necessary for normal operation. Other components.
  • the above-mentioned device may also include only the components necessary to implement the solutions of the embodiments of the present specification, and not necessarily include all the components shown in the figures.
  • the embodiment of the present specification also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the data reading method shown in FIG. 4 is implemented.
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.

Landscapes

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

Abstract

公开了一种基于磁盘存储的数据读取方法、装置及设备。通过本说明书实施例所提供的方案,在数据库服务端从磁盘中读取数据时,首先将业务属性所对应的块高进行排序,得到块高序列,然后从块高序列中得到若干块高区间,从磁盘中连续读取这些块高区间所对的全量数据块,然后再从数据块中根据位置信息读取数据记录。

Description

一种基于磁盘存储的数据读取方法、装置及设备 技术领域
本说明书实施例涉及信息技术领域,尤其涉及一种基于磁盘存储的数据读取方法、装置及设备。
背景技术
在在以中心化的块链式账本对外提供服务的数据库服务端,账本本身是在磁盘中进行持久化存储的。那么在用户进行读取的时候,也需要从磁盘中进行读取,由于块链式账本的特征,用户的数据有可能是随机分布在磁盘中的各个扇区中,一般的读取方式效率较低。
基于此,需要一种在块链式账本提高效率的数据读取方案。
发明内容
本申请实施例的目的是提供一种基于磁盘存储的更为高效的数据读取方案。
为解决上述技术问题,本申请实施例是这样通过以下实现的。
一种基于磁盘存储的数据读取方法,包括:接收客户端所发送的数据读取指令,其中,所述读取指令中包含有业务属性;从预存的索引表中获取所述业务属性所对应的位置信息集合,其中,所述位置信息包含数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;对所述块高依序进行排列,生成块高序列,从所述块高序列中确定出M个互斥的块高连续的块高区间;针对任一块高区间,从磁盘中读取所述块高区间所对应的数据块;根据所述位置信息集合从所述块高区间所对应的数据块中查询获取的数据记录,并返回至客户端。
对应的,本说明书实施例还提供一种基于磁盘存储的数据读取装置,包括:接收模块,接收客户端所发送的数据读取指令,其中,所述读取指令中包含有业务属性;位置信息获取模块,从预存的索引表中获取所述业务属性所对应的位置信息集合,其中,所述位置信息包含数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;块高区间生成模块,对所述块高依序进行排列,生成块高序列,从所述块高序列中确定出M个互斥的块高连续的块高区间;数据块读取模块,针对任一块高区间,从磁盘中读取 所述块高区间所对应的数据块;数据记录读取模块,根据所述位置信息集合从所述块高区间所对应的数据块中查询获取的数据记录,并返回至客户端。
通过本说明书实施例所提供的方案,在数据库服务端从磁盘中读取数据时,首先将业务属性所对应的块高进行排序,得到块高序列,然后从块高序列中得到若干块高区间,从磁盘中连续读取这些块高区间所对的全量数据块,然后再从数据块中根据位置信息读取数据记录,减少了磁盘读取是的换道次数,提高了磁盘的输入/输出(Input/Output,IO)效率,从而提高了块链式账本在磁盘存储时的读取效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本说明书实施例。
此外,本说明书实施例中的任一实施例并不需要达到上述的全部效果。
附图说明
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1为本说明书实施例所涉及的系统架构示意图;
图2为本说明书实施例所提供的一种生成块链式账本的流程示意图;
图3为本说明书实施例提供的一种数据记录的索引创建方法的流程示意图;
图4是本说明书实施例提供的一种基于磁盘存储的数据读取方案的流程示意图;
图5是本说明书实施例提供的一种基于磁盘存储的数据读取装置的结构示意图;
图6是用于配置本说明书实施例方法的一种设备的结构示意图。
具体实施方式
为了使本领域技术人员更好地理解本说明书实施例中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于保护的范围。
首先对本说明书实施例中所涉及的块链式账本进行说明。数据库服务端面向的常常为各种机构,各机构则可以将它们与第三方用户(包括其它机构或者个人)之间所产生的数据记录在数据库服务方进行存储。如图1所示,图1为本说明书实施例所涉及的系统架构示意图。在该示意图中,一个企业机构可以面向多名用户,而每个用户均可以通过其对应的企业机构向数据库服务提供方进行查询。
例如,数据库服务端对接的机构是某金融产品公司,数据记录可以是个人用户在该金融产品公司的理财记录;或者,对接的机构可以是政府部门,其中的数据记录是政府部门对于该部门所管理的公共项目的开销明细;或者,数据库服务方对接的机构是某个医院,其中的数据记录是病人的病历;或者,数据库服务方对接的机构是第三方支付机构,数据记录可以是个人用户通过该机构的支付记录,等等。
在中心化的数据库服务端,块链式的账本通过如下方式生成,如图2所示,图2为本说明书实施例所提供的一种生成块链式账本的流程示意图,包括S201至S203。
S201,接收待存储的数据记录,确定各数据记录的哈希值,其中,数据记录中包含业务属性。
此处的待存储的数据记录,可以是客户端个人用户的各种消费记录,也可以是应用服务器基于用户的指令,在执行业务逻辑时产生的业务结果、中间状态以及操作记录等等。具体的业务场景可以包括消费记录、审计日志、供应链条、政府监管记录、医疗记录等等。
在每个与数据库服务方对接的机构中,所述业务属性在所述对接机构中,一般而言是唯一存在的,业务属性基于不同的业务场景,可以包括用户名、用户身份证号、驾照编号、手机号、项目唯一编号、数据记录的类型(例如金融包编号)等等。
例如,对于第三方支付机构而言,数据记录是用户的消费记录,此时的业务属性即为用户标识(包括手机号、身份证号、用户名等等),或者对该用户标识进行哈希算法所得到的哈希值;或者,对于政府机构而言,数据记录为多个公共项目的开销流水,则此时的业务属性可以为每个项目的唯一编号。
业务属性可以存储在数据记录中的指定位置,例如数据记录的头部或者尾部。
S203,当达到预设的成块条件时,确定待写入数据块中的各数据记录,生成包含数据块的哈希值和数据记录的第N个数据块。
所述预设的成块条件包括:待存储的数据记录数量达到数量阈值,例如,每接收到 一千条数据记录时,生成一个新数据块,将一千条数据记录写入块中;或者,距离上一次成块时刻的时间间隔达到时间阈值,例如,每隔5分钟,生成一个新数据块,将在这5分钟内接收到的数据记录写入块中。
此处的N指的是数据块的序号,换言之,在本说明书实施例中,数据块是以块链的形式,基于成块时间的顺序先后排列,具有很强的时序特征。其中,数据块的块高基于成块时间的先后顺序单调递增。块高可以是序号,此时第N个数据块的块高即为N;块高也可以其它方式生成,例如,将成块时间对称加密转换为大整型数据(例如,12位或者15位的整数)作为块高。
当N=1时,即此时的数据块为为初始数据块。初始数据块的哈希值和块高基于预设方式给定。例如,初始数据块中不包含数据记录,哈希值则为任一给定的哈希值,块高blknum=0;又例如,初始数据块的生成触发条件与其它数据块的触发条件一致,但是初始数据块的哈希值由对初始数据块中的所有内容取哈希确定。
当N>1时,由于前一数据块的内容和哈希值已经确定,则此时,可以基于前一数据块(即第N-1个数据块)的哈希值生成当前数据块(第N个数据块)的哈希值,例如,一种可行的方式为,确定每一条将要写入第N个块中的数据记录的哈希值,按照在块中的排列顺序,生成一个默克尔树,将默克尔树的根哈希值和前一数据块的哈希值拼接在一起,再次采用哈希算法,生成当前块的哈希值。又例如,还可以按照块中数据记录的顺序进行拼接并取哈希得到整体数据记录的哈希值,拼接前一数据块的哈希值和整体数据记录的哈希值,并对拼接得到的字串进行哈希运算,生成数据块的哈希值。
用户在上传数据成功后,即可以得到对应的数据记录的哈希值以及所处的数据块的哈希值,并保存,并且可以基于该哈希值发起完整性验证。具体的验证方式即为在数据库中重新计算数据记录自身的哈希值以及所处的数据块的哈希值,与本地所保存的进行对比。
通过前述的数据块的生成方式,每一个数据块通过哈希值确定,数据块的哈希值由数据块中的数据记录的内容、顺序以及前一数据块的哈希值决定。用户可以随时基于数据块的哈希值发起验证,对于数据块中任何内容(包括对于数据块中数据记录内容或者顺序的修改)的修改都会造成在验证时计算得到的数据块的哈希值和数据块生成时的哈希值不一致,而导致验证失败,从而实现了中心化下的不可篡改。
在对于块链式的账本进行验证时,一般而言,即指定一段数据块进行连续的完整性 验证,或者从初始数据块开始进行连续的完整性验证。验证的方式即为获取前一数据块的哈希值,并采用与生成数据块的哈希值时的同样算法,根据自身的数据记录和前一数据块的哈希值,重新计算一遍自身数据块的哈希值,以进行验证。
基于前述方式,可以得到一份难以篡改的块链式账本用于存储数据。为了查询数据更为便利,本说明书实施例还提供一种针对于块链式账本的索引创建方法。如图3所示,图3为本说明书实施例提供的一种数据记录的索引创建方法的流程示意图,该流程具体包括如下步骤S301至S305。
S301,在块链式账本中,针对任一数据记录,获取所述数据记录中所包含的业务属性。
业务属性的具体位置以及获取方式可以是数据库服务方和对接机构事先协商。例如,对接机构所提供的数据记录为标准结构化的数据记录时,业务属性可以从数据记录中指定偏移量获取,或者由特定字符标识起始位置和结束位置;又或者,对接机构所提供的数据记录为非结构化的数据时,在对接机构上传时可以直接在每条数据记录的开头拼接上包含业务属性的头部,数据库服务方可以直接从头部获取每条数据记录的业务属性。
S303,确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量。
如前所述,一个块链式的账本由多个数据块组成,同时,一个数据块中通常包含多个数据记录。因此,在本说明书实施例中,所述的位置信息具体指的是一条数据记录被保存时,处于账本中的哪个数据块上,以及,在该数据块中的什么位置。
在本说明书实施例所提供的数据块中,可以有多种方式用来标识不同的数据块,包括数据块的哈希值或者块高。
数据块的哈希值为根据前一区块哈希值和自身数据记录进行哈希计算而得到的哈希值,可以用于唯一、明确地标识一个数据块。在块链式的账本中,通常第一个数据块其块高为0,以后每增加一个数据块,块高加1;或者,还可以将数据块的成块时间转换为一个大的单调递增整型数据(一般为12至15位)序列,作为数据块的块高。因此,一个数据块通常有一个明确的块高。
又例如,在一个已经确定的要写入数据库的数据块,其中数据记录的排序也已经固定,因此一个数据记录在该数据块中的序号也是明确的,在数据记录的长度为固定单位时,序号同样可以用于明确该数据记录在其所处的数据块中的位置信息。即,序号同样 也可以用于指示数据记录在数据块中的偏移量。
同时,在一个数据块中,由于通常包含了多个数据记录,因此,还可以用各数据记录在该数据块中的地址偏移量来分别标识数据块中的数据记录。显而易见,在同一个数据块中,各数据记录的地址偏移量并不相同。
当然,由于在本说明书实施例所提供的方式中,数据块的具体格式是可以自定义的(例如,数据块的块头中所包含的元数据信息和备注信息,数据块的块高所采取的形式等等),在不同的格式下,位置信息的内容也会有所不同,这并不构成对本方案的限定。
S305,建立所述业务属性和位置信息的对应关系,写入以所述业务属性为主键的索引。
即,该索引是一个倒排索引。在该索引中,主键是数据记录中所包含的业务属性。具体的写入方式为,当索引中的主键不包含所述指定标识字段时,在索引表中创建以所述指定标识字段为主键的索引记录。
当所述索引中的主键包含所述指定标识字段时,将所述位置信息写入所述指定标识字段所处的索引记录。需要说明的是,此处的写入不是覆盖性的写入,而是将位置信息添加到该索引记录的值中,与其它位置信息并列存在与该索引记录中。
如表1所示,表1为本说明书实施例所提供的一种示例性索引表。其中Key即为业务属性的具体值,Value部分的每个数组即为一条位置信息,每个数组中的前部分块高,后部分为数据记录在该数据块中的序号,通过块高和序号即可以唯一的确定一条数据记录。容易理解,在索引表中,一个key可以对应于多个位置信息。
表1
Key Value
0X123456 (2,08),(2,10),(300,89),(300,999)
344X0001 (5,01),(8,22)
…… ……
通过本说明书实施例所提供的方案,对于写入账本的数据记录,确定出数据记录的业务属性,以及在账本中的存储位置,建立起二者的对应关系,创建以业务属性为主键的倒排索引,不必了解用户的业务详情,从索引中即可以基于业务属性对于数据记录进行相应统计,以及后续的查询和验证。
在该索引表中,由于一个业务属性可以对应于多个位置信息(即一条索引记录中可 以包含多个位置信息,或者说一个业务属性可以对应于多个数据记录),在将位置信息写入索引中时,还可以将位置信息按照数据记录在账本中的先后顺序依次进行排列,有利于用户的查询以及验证。数据记录在账本中的先后顺序即可以数据记录被写入账本的时间戳(即数据块的成块时间戳)来体现,以及,对于同一数据块中的数据记录的先后顺序,则可以通过在数据块中的排序先后来体现。通过对位置信息进行排序,可以便于在查询获取读取数据记录时依序获取得到相应的数据记录,提高用户体验。
在索引表被创建以后,即可以基于该索引表进行业务属性的状态查询以及统计。例如,接收包含业务属性具体值的查询请求(一般而言,查询请求可以以指令的形式予以发送)。
数据库服务端在接收到查询指令之后,即可以从根据指令从磁盘中进行数据读取。在本说明书实施例中,磁盘(disk)是指利用磁记录技术存储数据的存储器,包括软磁盘(soft disk,简称软盘)或者硬磁盘(hard disk,简称硬盘)。
在数据库服务端进行存储的过程中,读写数据的流程一般是首先发指令,通知磁盘开始扇区位置,然后给出需要从这个初始扇区往后读取的连续扇区个数(也可以是一个),同时给出动作是读还是写。磁盘收到这条指令,就会按照指令的要求,读或者写数据。
那么在这个过程中,就会出现连续/随机IO。所谓的连续和随机是指本次IO给出的初始扇区地址,和上一次IO的结束扇区地址,是不是连续的,或者相隔不多的,如果是,则本次IO应该算是一个连续IO,否则视为一次随机IO。
一个IO所用的时间=寻道时间+数据传输时间。由于寻道时间相对传输时间,大几个数量级,所以影响IOPS的关键因素,就是降底寻道时间,在连续IO的情况下,因为本次初始扇区和上次结束扇区相隔很近,则磁头几乎不用换道或换道时间极短;如果相差太大,则磁头需要很长的换道时间,如果随机IO很多,导致磁头不停换道,效率大大降低。
在本说明书实施例所涉及的账本中,账本中的数据块在磁盘中一般都是依据序号顺序存储的,假设账本中的一个数据块和磁盘中的一个扇区占用空间大小大致相当(或者占用了多个扇区),则每次读取一个数据块则相当于从磁盘中读取一个扇区。如前所述,由于用户的数据往往是没有规律的,其可能在短期内存储了较多数据,写入了相邻的若干数据块;也有可能是隔一段时间存储一些数据记录,从而在账本内比较分散。
在这种情形下,如果完全按照查询得到的块高依次进行磁盘读取,则必然是随机IO, 在数据量较大时,将会显著降低读取效率。基于此,本说明书实施例提供一种数据读取方案。如图4所示,图4是本说明书实施例提供的一种基于磁盘存储的数据读取方案的流程示意图,该流程具体包括如下步骤S401至S409。
S401,接收客户端所发送的数据读取指令,其中,所述读取指令中包含有业务属性。
数据读取可以来自于对接机构,也可以是来自于对接机构的服务用户。从而,数据库可以根据业务属性的具体值,从索引表中进行匹配。例如,在表1被创建之后,用户输入查询指令,Retrieve(0X123456,&v,FULL)。
S403,从预存的索引表中获取所述业务属性所对应的位置信息集合,其中,所述位置信息包含数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量。
数据库服务端即可以从索引表中取得用户“0X123456”相应的数据记录的位置信息(2,08),(2,10),(300,89),(300,999)。
需要说明的是,表1中为了便于理解,给出的示例中位置信息的数量较少。但是在实际应用中,一条业务属性往往对应大量的位置信息。
S405,对所述块高依序进行排列,生成块高序列,从所述块高序列中确定出M个互斥的块高连续的块高区间。
块高序列即指将块高从小到大依次排列的序列。如对于位置信息(2,08),(2,10),(300,89),(300,999),得到的块高2和300,进行排序即得到块高序列“2,300”。
当然,在实际应用中,由于数据量较多,得到的块高序列往往是如下所示:“1,2,4,5,6,9,11,13,18,23,25,27,50,51,53,55,99,130,131,155……”,其中的块高数量可能会有数万条甚至更多。在这种情形下,如果对于每个块高依次进行读取,显然,就是随机IO,效率太低。
因此,需要针对块高序列得到若干个互斥的块高连续的块高区间。所述的互斥指的是各块高区间中不包含有相同的块高,即各块高区间不会重叠。
确定块高区间的原则是:块高区间中的无效块高(即不处于块高序列中的块高)不应太多。否则,读取无效数据块太多,同样影响了数据记录的读取效率。基于该原则,本说明书实施例提供一种示例性的块高区间确定方法,具体如下:
遍历所述块高系列,从还未确定所属块高区间的序号开始,依序确定两个块高的间隔,将间隔小于预设值时的前一块高作为区间起点S M;以及,从块高S M开始,依序确 定两个块高的间隔,将当间隔大于预设值时的前一块高作为区间终点E M,生成第M个块高区间[S M,E M]。
以前述的块高序列“1,2,4,5,6,9,11,13,18,23,25,27,50,51,53,55,99,130,131,155……”为例。
在确定第一个块高区间时,从序列中的第一个块高“1”开始,依次检验数组(1,2)、(2,4)、(4、5),(5、6)……之间的间隔,如果预设的间隔距离是3,则可以知道,第一个数组(1,2)即满足该条件,从而该数组中的前一块高“1”将被作为一个区间起点S M,而数组(13,18)超过了预设间隔距离,从而该数组中的前一块高“13”将被作为区间终点E M,从而得到第一个块高区间[1,13]。
在得到第一个块高区间[1,13]之后,则可以确定13之前的所有块高都已经确定了所属块高,因此,下一个将从序号18开始,由于数组(18,23)的间隔超过了预设值3,因此,此处的“18”将不会被列入块高区间,第二个块高区间将会被确定为[23,27],第三个块高区间为[50,55],第四个块高区间为[130,131],以此类推,直至块高序列中最后一个块高。
S407,针对任一块高区间,从磁盘中读取所述块高区间所对应的数据块。
对于得到的连续的块高区间,如前所述,没有与数据块的存储本身就是连续的,即数据块在磁盘中本身就是按照块高顺序存储的,因此可以从磁盘中根据顺序进行批量的连续读取,虽然其中会有一些无效数据块(即该数据块中不包含用户的数据记录),但是基于前述的原则,块高区间中的无效数据块的数量并不多,通过连续读取降低了IO中磁盘中的磁头换道的次数,从而提高了读取数据块的效率。
读取得到的数据块将会放置于数据库服务端的缓存或者内存中,在缓存或者内存中,读写的效率比起磁盘中将要大为提高,换言之,读取得到的少量无效数据块对于内存的读写速度而言,基本不会有影响。
此外需要说明的是,块高序列中的块高并不一定完全可以被归纳至块高区间内,如前述的块高“18”以及“99”等等,对于这些不处于块高区间内的零散块高,不可丢弃不读,仍然进行单个的随机读取即可。
S409,根据所述位置信息集合从所述块高区间所对应的数据块中查询获取的数据记录,并返回至客户端。具体而言,即在内存中,根据步骤S402中所获得的块高和偏移量,从前述读取得到的数据块中逐条查询即可得到。
通过本说明书实施例所提供的方案,在数据库服务端从磁盘中读取数据时,首先将业务属性所对应的块高进行排序,得到块高序列,然后从块高序列中得到若干块高区间,从磁盘中连续读取这些块高区间所对的全量数据块,然后再从数据块中根据位置信息读取数据记录,减少了磁盘读取时的换道次数,提高了磁盘的IO效率,从而提高了块链式账本在磁盘存储时的读取效率。
在一种实施方式中,为了提高分组效率,还可以在生成块高区间的时候,通过预设条件滤除那些包含有效块高(即处于块高序列中的块高)的数量太少的块高区间。例如,预设有效块高的数量为4,则可以知道,对于块高区间[150,151]而言,由于其中仅包含两个块高,则没有必要作为一个连续区间进行读取。一种可变换的滤除方式还可以是设置条件:块高区间的长度不低于预设值。例如,块高区间的长度不低于4,从而同样可以滤除那些包含有效块高较少的块高区间。通过该方式,可以提高块高序列的分组效率,进而提高读取速度。
对应的,本说明书实施例还提供一种基于磁盘存储的数据读取装置,如图5所示,图5是本说明书实施例提供的一种基于磁盘存储的数据读取装置的结构示意图,包括以下模块。
接收模块501,接收客户端所发送的数据读取指令,其中,所述读取指令中包含有业务属性。
位置信息获取模块503,从预存的索引表中获取所述业务属性所对应的位置信息集合,其中,所述位置信息包含数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量。
块高区间生成模块505,对所述块高依序进行排列,生成块高序列,从所述块高序列中确定出M个互斥的块高连续的块高区间。
数据块读取模块507,针对任一块高区间,从磁盘中读取所述块高区间所对应的数据块。
数据记录读取模块509,根据所述位置信息集合从所述块高区间所对应的数据块中查询获取的数据记录,并返回至客户端。
进一步地,所述块高区间生成模块505,遍历所述块高系列,从还未确定所属块高区间的序号开始,依序确定两个块高的间隔,将间隔小于预设值时的前一块高作为区间起点S M;以及,从块高S M开始,依序确定两个块高的间隔,将当间隔大于预设值时的 前一块高作为区间终点E M,生成第M个块高区间[S M,E M]。
进一步地,所述块高区间生成模块505,确定块高序列在所述块高区间中的块高个数K,当所述块高个数K不低于预设值时,生成第M个块高区间[S M,E M]。
进一步地,所述装置还包括索引生成模块511,在块链式账本中,针对任一数据记录,获取所述数据记录中所包含的业务属性;确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;建立所述业务属性和位置信息的对应关系,写入以所述业务属性为主键的索引。
进一步地,所述索引生成模块511,确定数据记录的时间戳;在同一索引记录中按照时间戳的先后顺序,将数据记录的位置信息依序写入索引记录的值。
进一步地,所述装置还包括数据块生成模块513,接收待存储的数据记录,确定各数据记录的哈希值,其中,数据记录中包含业务属性。
当达到预设的成块条件时,确定待写入数据块中的各数据记录,生成包含数据块的哈希值和数据记录的第N个数据块,具体包括:当N=1时,初始数据块的哈希值和块高基于预设方式给定;当N>1时,根据待写入数据块中的各数据记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和各数据记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增。
进一步地,所述预设的成块条件包括:待存储的数据记录数量达到数量阈值;或者,距离上一次成块时刻的时间间隔达到时间阈值。
本说明书实施例还提供一种计算机设备,其至少包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现图4所示的数据读取方法。
图6示出了本说明书实施例所提供的一种更为具体的计算设备硬件结构示意图,该设备可以包括:处理器1010、存储器1020、输入/输出接口1030、通信接口1040和总线1050。其中处理器1010、存储器1020、输入/输出接口1030和通信接口1040通过总线1050实现彼此之间在设备内部的通信连接。
处理器1010可以采用通用的CPU(Central Processing Unit,中央处理器)、微处理器、应用专用集成电路(Application Specific Integrated Circuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本说明书实施例所提供的技术方案。
存储器1020可以采用ROM(Read Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、静态存储设备,动态存储设备等形式实现。存储器1020可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1020中,并由处理器1010来调用执行。
输入/输出接口1030用于连接输入/输出模块,以实现信息输入及输出。输入输出/模块可以作为组件配置在设备中(图中未示出),也可以外接于设备以提供相应功能。其中输入设备可以包括键盘、鼠标、触摸屏、麦克风、各类传感器等,输出设备可以包括显示器、扬声器、振动器、指示灯等。
通信接口1040用于连接通信模块(图中未示出),以实现本设备与其他设备的通信交互。其中通信模块可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信。
总线1050包括一通路,在设备的各个组件(例如处理器1010、存储器1020、输入/输出接口1030和通信接口1040)之间传输信息。
需要说明的是,尽管上述设备仅示出了处理器1010、存储器1020、输入/输出接口1030、通信接口1040以及总线1050,但是在具体实施过程中,该设备还可以包括实现正常运行所必需的其他组件。此外,本领域的技术人员可以理解的是,上述设备中也可以仅包含实现本说明书实施例方案所必需的组件,而不必包含图中所示的全部组件。
本说明书实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现图4所示的数据读取方法。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本说明 书实施例可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本说明书实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本说明书实施例各个实施例或者实施例的某些部分所述的方法。
上述实施例阐明的系统、方法、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于方法实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的方法实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,在实施本说明书实施例方案时可以把各模块的功能在同一个或多个软件和/或硬件中实现。也可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本说明书实施例的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本说明书实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本说明书实施例的保护范围。

Claims (15)

  1. 一种基于磁盘存储的数据读取方法,包括:
    接收客户端所发送的数据读取指令,其中,所述读取指令中包含有业务属性;
    从预存的索引表中获取所述业务属性所对应的位置信息集合,其中,所述位置信息包含数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;
    对所述块高依序进行排列,生成块高序列,从所述块高序列中确定出M个互斥的块高连续的块高区间;
    针对任一块高区间,从磁盘中读取所述块高区间所对应的数据块;
    根据所述位置信息集合从所述块高区间所对应的数据块中查询获取的数据记录,并返回至客户端。
  2. 如权利要求1所述的方法,从所述块高序列中确定出M个互斥的连续块高区间,包括:
    遍历所述块高系列,从还未确定所属块高区间的序号开始,依序确定两个块高的间隔,将间隔小于预设值时的前一块高作为区间起点S M
    以及,从块高S M开始,依序确定两个块高的间隔,将当间隔大于预设值时的前一块高作为区间终点E M,生成第M个块高区间[S M,E M]。
  3. 如权利要求2所述的方法,生成第M个块高区间[S M,E M],还包括:
    确定块高序列在所述块高区间中的块高个数K,当所述块高个数K不低于预设值时,生成第M个块高区间[S M,E M]。
  4. 如权利1所述的方法,所述预设的索引表基于如下方式预先生成:
    在块链式账本中,针对任一数据记录,获取所述数据记录中所包含的业务属性;
    确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;
    建立所述业务属性和位置信息的对应关系,写入以所述业务属性为主键的索引。
  5. 如权利要求4所述的方法,写入以所述业务属性为主键的索引,包括:
    确定数据记录的时间戳;
    在同一索引记录中按照时间戳的先后顺序,将数据记录的位置信息依序写入索引记录的值。
  6. 如权利要求4所述的方法,所述块链式账本中的数据块通过如下方式预先生成:
    接收待存储的数据记录,确定各数据记录的哈希值,其中,数据记录中包含业务属性;
    当达到预设的成块条件时,确定待写入数据块中的各数据记录,生成包含数据块的哈希值和数据记录的第N个数据块,具体包括:
    当N=1时,初始数据块的哈希值和块高基于预设方式给定;
    当N>1时,根据待写入数据块中的各数据记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和各数据记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增。
  7. 如权利要求6所述的方法,所述预设的成块条件包括:
    待存储的数据记录数量达到数量阈值;或者,距离上一次成块时刻的时间间隔达到时间阈值。
  8. 一种基于磁盘存储的数据读取装置,包括:
    接收模块,接收客户端所发送的数据读取指令,其中,所述读取指令中包含有业务属性;
    位置信息获取模块,从预存的索引表中获取所述业务属性所对应的位置信息集合,其中,所述位置信息包含数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;
    块高区间生成模块,对所述块高依序进行排列,生成块高序列,从所述块高序列中确定出M个互斥的块高连续的块高区间;
    数据块读取模块,针对任一块高区间,从磁盘中读取所述块高区间所对应的数据块;
    数据记录读取模块,根据所述位置信息集合从所述块高区间所对应的数据块中查询获取的数据记录,并返回至客户端。
  9. 如权利要求8所述的装置,所述块高区间生成模块,遍历所述块高系列,从还未确定所属块高区间的序号开始,依序确定两个块高的间隔,将间隔小于预设值时的前一块高作为区间起点S M;以及,从块高S M开始,依序确定两个块高的间隔,将当间隔大于预设值时的前一块高作为区间终点E M,生成第M个块高区间[S M,E M]。
  10. 如权利要求9所述的装置,所述块高区间生成模块,确定块高序列在所述块高区间中的块高个数K,当所述块高个数K不低于预设值时,生成第M个块高区间[S M,E M]。
  11. 如权利要求8所述的装置,还包括索引生成模块,在块链式账本中,针对任一数据记录,获取所述数据记录中所包含的业务属性;确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;建立所述业务属性和位置信息的对应关系,写入以所述业务属性为主键的索引。
  12. 如权利要求11所述的装置,所述索引生成模块,确定数据记录的时间戳;在同一索引记录中按照时间戳的先后顺序,将数据记录的位置信息依序写入索引记录的值。
  13. 如权利要求11所述的装置,还包括数据块生成模块,接收待存储的数据记录,确定各数据记录的哈希值,其中,数据记录中包含业务属性;
    当达到预设的成块条件时,确定待写入数据块中的各数据记录,生成包含数据块的哈希值和数据记录的第N个数据块,具体包括:
    当N=1时,初始数据块的哈希值和块高基于预设方式给定;
    当N>1时,根据待写入数据块中的各数据记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和各数据记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增。
  14. 如权利要求13所述的装置,所述预设的成块条件包括:待存储的数据记录数量达到数量阈值;或者,距离上一次成块时刻的时间间隔达到时间阈值。
  15. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求1至7任一项所述的方法。
PCT/CN2020/109273 2019-10-18 2020-08-14 一种基于磁盘存储的数据读取方法、装置及设备 WO2021073241A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/723,117 US20220236910A1 (en) 2019-10-18 2022-04-18 Disk storage-based data reading methods and apparatuses, and devices

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910992775.4A CN110879687B (zh) 2019-10-18 2019-10-18 一种基于磁盘存储的数据读取方法、装置及设备
CN201910992775.4 2019-10-18

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/723,117 Continuation US20220236910A1 (en) 2019-10-18 2022-04-18 Disk storage-based data reading methods and apparatuses, and devices

Publications (1)

Publication Number Publication Date
WO2021073241A1 true WO2021073241A1 (zh) 2021-04-22

Family

ID=69728022

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/109273 WO2021073241A1 (zh) 2019-10-18 2020-08-14 一种基于磁盘存储的数据读取方法、装置及设备

Country Status (3)

Country Link
US (1) US20220236910A1 (zh)
CN (1) CN110879687B (zh)
WO (1) WO2021073241A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879687B (zh) * 2019-10-18 2021-03-16 蚂蚁区块链科技(上海)有限公司 一种基于磁盘存储的数据读取方法、装置及设备
CN113296683B (zh) * 2020-04-07 2022-04-29 阿里巴巴集团控股有限公司 数据存储方法、装置、服务器和存储介质
CN112783927B (zh) * 2021-01-27 2023-03-17 浪潮云信息技术股份公司 一种数据库查询方法及系统
CN115840541B (zh) * 2023-02-23 2023-06-13 成都体育学院 一种运动数据存储方法、系统和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180139278A1 (en) * 2016-11-14 2018-05-17 International Business Machines Corporation Decentralized immutable storage blockchain configuration
CN109739843A (zh) * 2018-12-26 2019-05-10 篱笆墙网络科技有限公司 区块链数据读写方法、系统、设备及存储介质
CN110162526A (zh) * 2019-04-18 2019-08-23 阿里巴巴集团控股有限公司 一种块链式账本中数据记录的查询方法、装置及设备
CN110175188A (zh) * 2019-05-31 2019-08-27 杭州复杂美科技有限公司 一种区块链状态数据缓存和查询方法、设备及存储介质
CN110879687A (zh) * 2019-10-18 2020-03-13 支付宝(杭州)信息技术有限公司 一种基于磁盘存储的数据读取方法、装置及设备

Family Cites Families (44)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4490782A (en) * 1981-06-05 1984-12-25 International Business Machines Corporation I/O Storage controller cache system with prefetch determined by requested record's position within data block
US4533995A (en) * 1981-08-03 1985-08-06 International Business Machines Corporation Method and system for handling sequential data in a hierarchical store
US4636946A (en) * 1982-02-24 1987-01-13 International Business Machines Corporation Method and apparatus for grouping asynchronous recording operations
US4583166A (en) * 1982-10-08 1986-04-15 International Business Machines Corporation Roll mode for cached data storage
US4625081A (en) * 1982-11-30 1986-11-25 Lotito Lawrence A Automated telephone voice service system
WO1997029426A1 (fr) * 1996-02-09 1997-08-14 Sony Corporation Processeur d'informations, procede de modification de noms de fichiers, et support d'enregistrement sur lequel un programme de changement de nom de fichier est enregistre
MY138481A (en) * 2001-05-17 2009-06-30 Sony Corp Data distribution system, terminal apparatus, distribution center apparatus, highefficiency encoding method, high-efficiency encoding apparatus, encoded data decoding method, encoded data decoding apparatus, data transmission method, data transmission apparatus, sub information attaching method, sub information attaching apparatus, and recording medium
US7058783B2 (en) * 2002-09-18 2006-06-06 Oracle International Corporation Method and mechanism for on-line data compression and in-place updates
US9396103B2 (en) * 2007-06-08 2016-07-19 Sandisk Technologies Llc Method and system for storage address re-mapping for a memory device
US20090271562A1 (en) * 2008-04-25 2009-10-29 Sinclair Alan W Method and system for storage address re-mapping for a multi-bank memory device
US8527482B2 (en) * 2008-06-06 2013-09-03 Chrysalis Storage, Llc Method for reducing redundancy between two or more datasets
US8914567B2 (en) * 2008-09-15 2014-12-16 Vmware, Inc. Storage management system for virtual machines
US9460178B2 (en) * 2013-01-25 2016-10-04 Dell Products L.P. Synchronized storage system operation
CN103500224B (zh) * 2013-10-18 2016-03-16 税友软件集团股份有限公司 一种数据写入方法及装置、数据读取方法及装置
US10248681B2 (en) * 2014-07-08 2019-04-02 Sap Se Faster access for compressed time series data: the block index
CN104778015B (zh) * 2015-02-04 2018-02-16 深圳神州数码云科数据技术有限公司 一种磁盘阵列性能优化方法及系统
CN110050474A (zh) * 2016-12-30 2019-07-23 英特尔公司 用于物联网网络中的复合对象的子对象的类型命名和区块链
US11941279B2 (en) * 2017-03-10 2024-03-26 Pure Storage, Inc. Data path virtualization
US20220334725A1 (en) * 2017-03-10 2022-10-20 Pure Storage, Inc. Edge Management Service
US11675520B2 (en) * 2017-03-10 2023-06-13 Pure Storage, Inc. Application replication among storage systems synchronously replicating a dataset
US11089105B1 (en) * 2017-12-14 2021-08-10 Pure Storage, Inc. Synchronously replicating datasets in cloud-based storage systems
US10891384B2 (en) * 2017-10-19 2021-01-12 Koninklijke Kpn N.V. Blockchain transaction device and method
US11528611B2 (en) * 2018-03-14 2022-12-13 Rose Margaret Smith Method and system for IoT code and configuration using smart contracts
CN109003078B (zh) * 2018-06-27 2021-08-24 创新先进技术有限公司 基于区块链的智能合约调用方法及装置、电子设备
CN108898390B (zh) * 2018-06-27 2021-01-12 创新先进技术有限公司 基于区块链的智能合约调用方法及装置、电子设备
CN109345386B (zh) * 2018-08-31 2020-04-14 阿里巴巴集团控股有限公司 基于区块链的交易共识处理方法及装置、电子设备
CN109379397B (zh) * 2018-08-31 2019-12-06 阿里巴巴集团控股有限公司 基于区块链的交易共识处理方法及装置、电子设备
US10454498B1 (en) * 2018-10-18 2019-10-22 Pure Storage, Inc. Fully pipelined hardware engine design for fast and efficient inline lossless data compression
JP6838260B2 (ja) * 2018-11-14 2021-03-03 カウリー株式会社 ブロックチェーン制御方法
CN109714412B (zh) * 2018-12-25 2021-08-10 深圳前海微众银行股份有限公司 区块同步方法、装置、设备及计算机可读存储介质
US11018848B2 (en) * 2019-01-02 2021-05-25 Bank Of America Corporation Blockchain management platform for performing asset adjustment, cross sectional editing, and bonding
CN110264187B (zh) * 2019-01-23 2021-06-04 腾讯科技(深圳)有限公司 数据处理方法、装置、计算机设备及存储介质
CN110008203B (zh) * 2019-01-31 2023-06-06 创新先进技术有限公司 一种数据清除方法、装置及设备
CN110190963B (zh) * 2019-04-04 2020-09-01 阿里巴巴集团控股有限公司 一种针对授时证书生成请求的监控方法、装置及设备
CN110162523B (zh) * 2019-04-04 2020-09-01 阿里巴巴集团控股有限公司 数据存储方法、系统、装置及设备
US10990705B2 (en) * 2019-04-18 2021-04-27 Advanced New Technologies Co., Ltd. Index creation for data records
CN110162662B (zh) * 2019-04-18 2023-02-28 创新先进技术有限公司 一种块链式账本中数据记录的验证方法、装置及设备
US11327676B1 (en) * 2019-07-18 2022-05-10 Pure Storage, Inc. Predictive data streaming in a virtual storage system
US10783277B2 (en) * 2019-05-31 2020-09-22 Alibaba Group Holding Limited Blockchain-type data storage
US11115189B2 (en) * 2019-06-03 2021-09-07 Advanced New Technologies Co., Ltd. Verifying a blockchain-type ledger
US10963453B2 (en) * 2019-06-03 2021-03-30 Advanced New Technologies Co., Ltd. Service identifier-based data indexing
US10791122B2 (en) * 2019-07-04 2020-09-29 Alibaba Group Holding Limited Blockchain user account data
US10795874B2 (en) * 2019-07-29 2020-10-06 Alibaba Group Holding Limited Creating index in blockchain-type ledger
US11550762B2 (en) * 2021-02-24 2023-01-10 Sap Se Implementation of data access metrics for automated physical database design

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180139278A1 (en) * 2016-11-14 2018-05-17 International Business Machines Corporation Decentralized immutable storage blockchain configuration
CN109739843A (zh) * 2018-12-26 2019-05-10 篱笆墙网络科技有限公司 区块链数据读写方法、系统、设备及存储介质
CN110162526A (zh) * 2019-04-18 2019-08-23 阿里巴巴集团控股有限公司 一种块链式账本中数据记录的查询方法、装置及设备
CN110175188A (zh) * 2019-05-31 2019-08-27 杭州复杂美科技有限公司 一种区块链状态数据缓存和查询方法、设备及存储介质
CN110879687A (zh) * 2019-10-18 2020-03-13 支付宝(杭州)信息技术有限公司 一种基于磁盘存储的数据读取方法、装置及设备

Also Published As

Publication number Publication date
CN110879687A (zh) 2020-03-13
US20220236910A1 (en) 2022-07-28
CN110879687B (zh) 2021-03-16

Similar Documents

Publication Publication Date Title
WO2021073242A1 (zh) 索引创建和数据查询方法、装置及设备
WO2021073241A1 (zh) 一种基于磁盘存储的数据读取方法、装置及设备
WO2020211569A1 (zh) 一种数据记录的索引创建方法
CN110188096B (zh) 一种数据记录的索引创建方法、装置及设备
CN110162526B (zh) 一种块链式账本中数据记录的查询方法、装置及设备
CN110162662B (zh) 一种块链式账本中数据记录的验证方法、装置及设备
WO2021017422A1 (zh) 一种块链式账本中的索引创建方法、装置及设备
WO2020244237A1 (zh) 一种块链式账本中的验证方法、装置及设备
WO2020253231A1 (zh) 一种基于收据的数据存储方法、装置及设备
WO2021093461A1 (zh) 一种块链式账本中的聚合计算方法、装置及设备
WO2021057164A1 (zh) 一种块链式账本中的查询方法、装置及设备
WO2020233146A1 (zh) 数据操作记录的存储方法、系统、装置及设备
WO2021073240A1 (zh) 一种块链式账本中的数据存储方法、装置及设备
US10795874B2 (en) Creating index in blockchain-type ledger
WO2020244238A1 (zh) 多层块链式账本的数据存储方法、装置及设备
US10990705B2 (en) Index creation for data records
US20220058184A1 (en) Service identifier-based data indexing
WO2021057127A1 (zh) 一种基于多条业务属性的数据存储方法、装置及设备
US10999062B2 (en) Blockchain-type data storage
WO2021093462A1 (zh) 一种数据库中的操作记录存储方法、装置及设备
CN111444194B (zh) 一种块链式账本中索引的清除方法、装置及设备
US11115189B2 (en) Verifying a blockchain-type ledger
CN111444195B (zh) 一种块链式账本中索引的清除方法、装置及设备
CN110874486B (zh) 一种块链式账本中的数据读取方法、装置及设备
CN110717196A (zh) 一种证券交易数据的存储方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20875732

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20875732

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.01.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20875732

Country of ref document: EP

Kind code of ref document: A1