WO2020211569A1 - 一种数据记录的索引创建方法 - Google Patents

一种数据记录的索引创建方法 Download PDF

Info

Publication number
WO2020211569A1
WO2020211569A1 PCT/CN2020/078419 CN2020078419W WO2020211569A1 WO 2020211569 A1 WO2020211569 A1 WO 2020211569A1 CN 2020078419 W CN2020078419 W CN 2020078419W WO 2020211569 A1 WO2020211569 A1 WO 2020211569A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
block
data record
location information
data block
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.)
Ceased
Application number
PCT/CN2020/078419
Other languages
English (en)
French (fr)
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.)
Advanced New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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
Priority claimed from CN201910313734.8A external-priority patent/CN110188096B/zh
Priority claimed from CN201910313710.2A external-priority patent/CN110162662B/zh
Priority claimed from CN201910314543.3A external-priority patent/CN110162526B/zh
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to TW109110761A priority Critical patent/TW202040387A/zh
Priority to US16/885,958 priority patent/US10990705B2/en
Publication of WO2020211569A1 publication Critical patent/WO2020211569A1/zh
Priority to US17/239,819 priority patent/US11126751B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Definitions

  • the embodiments of this specification relate to the field of information technology, and in particular to a method, device, and equipment for creating an index for data records.
  • the ledger records the relevant data records that the relevant users need to save.
  • centralized database service providers In practical applications, centralized database service providers generally dock with corporate users, and the data records that corporate users need to store often have different business attributes. For example, the source of the data record, the user, the belonging project, etc.
  • the blockchain ledger the storage of data records related to the same business attribute is often scattered, and it is inconvenient to perform statistics, verification, and query on data records related to the same business attribute.
  • the embodiment of this specification provides a method for creating an index in a centralized blockchain ledger.
  • the embodiment of this specification provides an index creation method for data records, which is applied to a centralized database service provider that stores data through a blockchain ledger, including:
  • each data block contains at least one data record
  • each data block contains the hash value of the previous data block and the data record contained in itself Determine the hash value of the own data block
  • the block height of the data block increases monotonically based on the sequence of the block time.
  • the embodiment of this specification provides a query method for data records in a blockchain ledger based on the aforementioned index, including:
  • mapping is performed from a pre-created index table, and the location information corresponding to the specific value of the business attribute in the index table is determined;
  • the embodiment of this specification also provides a method for verifying data records in a blockchain ledger based on the aforementioned index, including:
  • the embodiment of this specification also provides a data record index creation device, which is applied to a centralized database service provider that stores data through a block chain ledger, including:
  • An acquiring module to acquire a designated identification field in a data record, where the designated identification field is used to identify the business attribute of the data record;
  • a determining module to determine the 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 writing module to establish a correspondence between the designated identification field and location information, and write an index with the designated identification field as the primary key
  • each data block contains at least one data record
  • each data block contains the hash value of the previous data block and the data record contained in itself Determine the hash value of the own data block
  • the block height of the data block increases monotonically based on the sequence of the block time.
  • an embodiment of the present specification also provides a query device for data records in a blockchain ledger based on the aforementioned index, including:
  • the instruction receiving module receives query instructions containing specific values of business attributes
  • the location information acquisition module performs matching from a pre-created index table, and determines the location information corresponding to the specific value of the business attribute in the index table;
  • the data record obtaining module obtains the corresponding data record from the ledger according to the location information, and returns the obtained corresponding data record to the query instruction sender.
  • an embodiment of this specification also provides a verification device for data records in a blockchain ledger based on the aforementioned index, including:
  • the instruction receiving module receives the verification instruction containing the specific value of the business attribute
  • the location information obtaining module performs matching from a pre-created index table, and determines the location information corresponding to the specific value of the business attribute in the index table;
  • the verification module performs integrity verification on the data record and/or data block corresponding to the 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.
  • the index is sorted, and operations such as statistics, query, and verification of data records can be performed according to the index, which improves operation efficiency.
  • Fig. 1 is a schematic diagram of a process for generating a block chain ledger provided by an embodiment of the specification
  • Figure 2 is a schematic diagram of the system architecture involved in an embodiment of the specification
  • FIG. 3 is a schematic flowchart of a method for creating an index for data records provided by an embodiment of this specification
  • FIG. 4 is a schematic flowchart of a method for querying data records in a blockchain ledger provided by an embodiment of this specification
  • FIG. 5 is a schematic flowchart of a method for verifying data records in a blockchain ledger provided by an embodiment of the specification
  • FIG. 6 is a schematic structural diagram of a data recording index creation device provided by an embodiment of this specification.
  • FIG. 7 is a schematic structural diagram of a data record query device provided by an embodiment of this specification.
  • FIG. 8 is a schematic structural diagram of a data recording verification device provided by an embodiment of this specification.
  • Fig. 9 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 the process of generating a block chain ledger provided by the embodiment of this specification, including:
  • S101 Receive a data record to be stored, and determine a hash value of each data record.
  • 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 preset block 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.
  • the N here 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 a strong timing characteristic.
  • the block height of the data block increases monotonically based on the sequence of the block time.
  • the block height can be a serial number, at this time the block height of the Nth data block is N; the block height can also be generated in other ways.
  • 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 sequence in the block. In the Er tree, 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, and the hash value of the data block is determined by the content and sequence 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 data block (including the modification of the data record content or sequence in the data block) will cause the hash value of the data block calculated during verification and 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 based on its own data record and the hash value of the previous data block. The hash value of the block.
  • FIG. 2 is a schematic diagram of the system architecture involved in the 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 that the database service party connects to is a financial product company
  • the data record can be the personal user’s financial management records in the financial product company
  • the organization to be connected can be a government department, where the data record is the government department’s Expense details of the managed public project; or, the database service provider is connected to a hospital, and the data record is the patient’s medical record; or the database service provider is connected to a third-party payment agency, and the data record can be an individual user Payment records through the agency, etc.
  • the embodiment of this specification provides a method for creating an index of data records, which is applied to a centralized database service provider that stores data through a block chain ledger. It can be created without knowing the business details of the docking organization.
  • the inverted index with business attributes as the main key facilitates the business processing of the docking organization and improves user experience.
  • FIG. 3 is a schematic flowchart of a method for creating an index of data records provided by an embodiment of this specification. The process specifically includes the following steps:
  • S301 Obtain a designated identification field in a data record, where the designated identification field is used to identify a business attribute of the data record.
  • 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, unique project 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.
  • the specific location and acquisition method of the designated identification field may be negotiated in advance by the database server and the docking organization.
  • the designated identification field 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
  • the header containing business attributes 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 designation of each data record from the header Identification field.
  • 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.
  • a data block usually contains multiple transactions. Therefore, in the embodiment of this specification, the location information specifically refers to which data block in the ledger is in 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 clearly 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 serial number can also be used to clarify the location information of the data record in the data block in which it is located.
  • 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, the block height of the data block is adopted Format, etc.), in different formats, the content of the location information will be different, which does not constitute a limitation to this solution.
  • S305 Establish a corresponding relationship between the designated identification field and the location information, and write an index with the designated identification field as the primary 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.
  • an obtaining method can be created synchronously, that is, when the data record is received, the business attribute is directly analyzed, and when the data block is written into the ledger , Create an index synchronously. Another way is that after the data block is written into the ledger, there is no need to create an index immediately, but when the database has free resources, an index is created asynchronously for each data record in the newly written data block of the ledger , In the asynchronous creation mode, it is helpful for the database server to save resources.
  • the location information can also be recorded in the order of data records in the ledger. Arranging them in sequence is conducive to user 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), and for data records in the same data block, it can be reflected in the data record The order in the block is reflected one after another.
  • FIG. 4 is a schematic flowchart of a method for querying data records in a blockchain ledger provided by an embodiment of this specification, including:
  • S401 Receive a query instruction including a specific value of a business attribute.
  • query requests can be sent in the form of instructions.
  • the query request can come from the docking organization or the users served by the organization.
  • S403 Perform matching from a pre-created index table according to the specific value of the user service attribute, and determine the location information corresponding to the specific value of the service attribute in the index table.
  • the user enters the query command, Retrieve (0X123456, &v, FULL), that is, the location information (2,08) of the data record corresponding to the business attribute "0X123456" can be obtained from the index table (2,08), (2 ,10), (300,89), (300,999), and then obtain the corresponding data record according to the location information query, and return it to the user.
  • retrieve (0X123456, &v, FULL)
  • the location information (2,08) of the data record corresponding to the business attribute "0X123456" can be obtained from the index table (2,08), (2 ,10), (300,89), (300,999), and then obtain the corresponding data record according to the location information query, and return it to the user.
  • S405 Obtain corresponding data records from the ledger according to the location information, and return the obtained corresponding data records to the query instruction sender.
  • the solution provided by the embodiment of this specification is based on a pre-created inverted index with business attributes as the main key and position information as the value, so that the corresponding position can be queried from the index directly based on the business attributes contained in the query instruction Information, and then get the corresponding data record based on the location information.
  • index records scattered data records in the ledger are associated based on business attributes, and data records corresponding to the same business attribute can be conveniently inquired.
  • the query can also include a block height parameter used to specify the data block interval, for example, the user enters a query command, Retrieve (0X123456, &v, 100), used to query the data of the specified user 0X123456 before the block height 100 recording.
  • a query command retrieve (0X123456, &v, 100)
  • retrieve 0X123456, &v, 100
  • the data records corresponding to the position information (2,08) and (2,10) are obtained.
  • a segment of data block can also be determined by the height of two data blocks, for example, the user enters a query command, Retrieve (0X123456, &v, 200, 1000), which is used to query the specified user 0X123456 in the ledger with a block height of 200 to a block height of 1000
  • retrieve (0X123456, &v, 200, 1000)
  • the location information corresponding to the block height 300 is the target location information, and the target location information (300,89), (300,999) is obtained.
  • the corresponding data record is the location information corresponding to the block height 300 is the target location information, and the target location information (300,89), (300,999) is obtained.
  • the block height of the data block may be large integer data (generally monotonically increasing 12 to 15-bit integer data) obtained by symmetric encryption based on the block timestamp of the data block, for example, a 13-bit The big integer. Since the large integer is obtained based on time symmetric encryption, when the block time of the data block is required, the block time can be obtained by the same symmetric decryption.
  • the block height is monotonically increasing based on the block time, so even if large integer data is used, the difference between them is still from small to large, reflecting the order between the data blocks. For example, if the block time of the next data block is "20xx-01-19 03:16:07.235125", the preset symmetric encryption algorithm can be used to convert it into another larger integer "1547838848125” .
  • the database server can provide a conversion method from time to large integer so that the user can obtain the block height parameter corresponding to the time) to determine the data block interval, it actually determines the corresponding
  • the query period of time that is, the user can query based on the time period. For example, the user can query the data records generated by himself in a month or a day based on his ID (ie business attribute) and the current time, or query a specified time
  • the data records generated between segments do not need to traverse and query from data blocks, which improves efficiency.
  • FIG. 5 is a schematic flowchart of a method for verifying data records in a blockchain ledger provided by an embodiment of this specification, including:
  • S501 Receive a verification instruction containing a specific value of a business attribute; generally speaking, a verification request can be sent in the form of an instruction.
  • the verification request can come from the docking organization, or it can come from the users that the organization serves.
  • S503 Perform matching from a pre-created index table according to the specific value of the user's service attribute, and determine the location information corresponding to the specific value of the service attribute in the index table.
  • the user enters the verification instruction, Verify (0X123456, &v, FULL), that is, the location information of the data record corresponding to the specific value "0X123456" of the business attribute can be matched from the index table (2, 08) , (2,10), (300,89) and (300,999).
  • S505 Perform integrity verification on the data record and/or data block corresponding to the location information.
  • the database server can learn from the index the data records corresponding to the location information (2,08), (2,10), (300,89), (300,999), and the two block heights of 2 and 300. Data blocks are verified for integrity.
  • the way to verify the integrity of the data record is to obtain the data record, determine the hash of the record, and the hash value of other data records in the data block where the data record is located, to form a Merkel tree, and verify Can the root hash of the Merkel tree be regenerated?
  • the verification method for the data block is to recalculate the hash value of the own data block according to the hash value of the previous data block and its own data record, and verify whether the hash value is consistent with the previously calculated hash value.
  • the result returned during verification is a "yes" or "no" metadata.
  • the database server can also add the server's signature to the verification result. It can be seen that through the index provided by the embodiment of this specification, in the process of verification in the blockchain ledger, the basic database service party is unaware of the specific business content, and the decoupling of data storage and business content is realized. , It can connect with different business organizations at the same time, and the adaptability is wider.
  • the verification can also include a block height parameter used to specify the data block interval, for example, the user enters a verification instruction, Verify (0X123456, &v, 100), used to verify the data of the specified user 0X123456 before the block height 100 Whether the record is complete.
  • Verify (0X123456, &v, 100)
  • the data records corresponding to the location information (2,08) and (2,10) are obtained and integrity verification is performed.
  • a segment of data block can also be determined by the height of two data blocks, for example, the user enters a verification instruction, Verify (0X123456, &v, 200, 1000), which is used to verify that the specified user 0X123456 is in the ledger with a block height of 200 to a block height of 1000
  • Verify (0X123456, &v, 200, 1000)
  • the location information corresponding to the block height 300 is the target location information, and the target location information (300, 89), (300, 999) The corresponding data is recorded and verified.
  • the block height of the data block may be large integer data (generally monotonically increasing 12 to 15-bit integer data) obtained by symmetric encryption based on the block timestamp of the data block, for example, a 13-bit The big integer. Since the large integer is obtained based on time symmetric encryption, when the block time of the data block is required, the block time can be obtained by the same symmetric decryption.
  • the block height is monotonically increasing based on the block time, so that even if large integer data is used, the difference between them is still from small to large, reflecting the order between the data blocks. For example, if the block time of the next data block is "20xx-01-19 03:16:07.235125", the preset symmetric encryption algorithm can be used to convert it into another larger integer "1547838848125” .
  • the database server can provide a conversion method from time to large integer so that the user can obtain the block height parameter corresponding to the time) to determine the data block interval, it actually determines the corresponding
  • the time period that needs to be verified that is, the user can verify based on the specified time period, for example, the user can verify the integrity of the data record generated by himself in a month or a day based on his ID (ie business attribute) and the current time, or Verify the data records generated during a specified time period without having to perform traversal verification from the data block, improving efficiency.
  • the embodiment of this specification also provides an index creation device for data records, which is applied to a centralized database service provider that stores data through a block chain ledger, as shown in FIG.
  • the structure diagram of a data record index creation device provided by the embodiment of the specification includes:
  • the obtaining module 601 obtains a designated identification field in a data record, where the designated identification field is used to identify the business attribute of the data record;
  • the determining module 603 determines the 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;
  • the writing module 605 establishes the correspondence between the designated identification field and location information, and writes the index with the designated identification field as the primary key;
  • each data block contains at least one data record
  • each data block contains the hash value of the previous data block and the data record contained in itself Determine the hash value of the own data block
  • the block height of the data block increases monotonically based on the sequence of the block time.
  • the acquiring module 601 when receiving the data record sent by the user, acquires the designated identification field in the data record; or, determines the data record contained in the data block in the ledger, and determines the data record contained in the data block. For any data record of, get its designated identification field.
  • the writing module 605 when the primary key in the index does not include the designated identification field, creates an index record with the designated identification field as the primary key in the index table; when the index is When the primary key of contains the designated identification field, the location information is written into the index record where the designated identification field is located.
  • the writing module 605 determines the time stamp of the data record, and sequentially writes the position information of the data record into the value of the index record in the same index record according to the sequence of the time stamp.
  • the centralized database service provider also includes a data block generation module 607, which receives the data records to be stored and determines the hash value of each data record.
  • the data record contains a designated identification field;
  • each data record to be written in the data block is determined, and the Nth data block containing the hash value of the data block and the data record is generated, which specifically includes:
  • the hash value and block height of the initial data block are given based on a preset method
  • 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 embodiment of this specification also provides a query device for data records in a blockchain ledger based on the aforementioned index, as shown in FIG. 7, which is a data record provided by the embodiment of this specification.
  • the structure diagram of the query device including:
  • the instruction receiving module 701 receives a query instruction containing specific values of business attributes
  • the location information obtaining module 703 is configured to perform matching from a pre-created index table according to the specific value of the user's business attribute, and determine the location information corresponding to the specific value of the business attribute in the index table;
  • the data record obtaining module 705 obtains corresponding data records from the ledger according to the location information, and returns the obtained corresponding data records to the query instruction sender.
  • the instruction receiving module 701 receives a query instruction including a block height parameter for specifying the query interval; correspondingly, the data record acquisition module 705 determines that the block height falls within the location information corresponding to the specific value of the business attribute The target location information in the query interval is used to obtain the data record corresponding to the target location information.
  • the embodiment of this specification also provides a verification device for data records in a blockchain ledger based on the aforementioned index, as shown in FIG. 8, which is a data record provided by the embodiment of this specification.
  • the structure diagram of the verification device including:
  • the instruction receiving module 801 receives the verification instruction containing the specific value of the business attribute
  • the location information obtaining module 803 according to the specific value of the user's business attribute, performs matching from a pre-created index table, and determines the location information corresponding to the specific value of the business attribute in the index table;
  • the verification module 805 performs integrity verification on the data record and/or data block corresponding to the location information.
  • the instruction receiving module 801 receives a verification instruction including a block height parameter for specifying a verification interval; correspondingly, the verification module 805 determines that the block height falls within the location information corresponding to the specific value of the business attribute The target location information in the verification interval performs integrity verification on the data record and/or data block corresponding to the target location information.
  • the embodiment of this specification also provides 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. 3 when the program is executed.
  • the recorded index creation method is also provided.
  • 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.
  • the query method of the record is also provided.
  • the embodiments of this specification also provide a computer device, which includes at least a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the data shown in FIG. 5 when the program is executed. Recorded verification method.
  • FIG. 9 shows a more specific hardware structure diagram of a computing device provided by an embodiment of this specification.
  • 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 in a general-purpose CPU (Central Processing Unit, central processing unit), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits for execution related Program to implement the technical solutions provided in the embodiments of this specification.
  • a general-purpose CPU Central Processing Unit, central processing unit
  • microprocessor microprocessor
  • application specific integrated circuit Application Specific Integrated Circuit, ASIC
  • ASIC Application Specific Integrated Circuit
  • the memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory, 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 the present specification are implemented through 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 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, etc.
  • 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 device may also include the necessary equipment for normal operation.
  • the above-mentioned device may also include only the components necessary to implement the solutions of the embodiments of the present specification, rather than all the components shown in the figures.
  • the embodiment of this 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 method for creating an index of data records shown in FIG. 3 is implemented.
  • the embodiment of this 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 record query method shown in FIG. 4 is implemented.
  • 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 record verification method shown in FIG. 5 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)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

公开了一种数据记录的索引创建方法、装置及设备。通过本说明书实施例所提供的方案,对于写入账本的数据记录,确定出数据记录的业务属性,以及在账本中的存储位置,建立起二者的对应关系,创建以业务属性为主键的倒排索引,进而可以根据该索引进行数据记录的统计、查询、验证等操作,提高了操作效率。

Description

一种数据记录的索引创建方法 技术领域
本说明书实施例涉及信息技术领域,尤其涉及一种数据记录的索引创建方法、装置及设备。
背景技术
在中心化的数据库服务方以块链式的账本对外提供服务时,账本中记录了相关用户所需要保存的相关数据记录。
在实际应用中,中心化的数据库服务方一般对接的是企业用户,而企业用户需要进行存储的数据记录往往具有不同的业务属性。例如,数据记录的来源、用户、所属项目等等。在块链式账本中对于同一业务属性相关的数据记录的存储往往是分散的,对于同一业务属性相关的数据记录进行统计、验证、查询等等均不便。
基于此,需要一种关于数据记录的业务属性的索引创建方案。
发明内容
有鉴于此,本说明书实施例提供了一种在中心化的块链式账本中创建索引的方法。
一方面,本说明书实施例提供了一种数据记录的索引创建方法,应用于通过块链式账本存储数据的中心化的数据库服务提供方中,包括:
获取数据记录中的指定标识字段,所述指定标识字段用于标识所述数据记录的业务属性;
确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;
建立所述指定标识字段和位置信息的对应关系,写入以所述指定标识字段为主键的索引;
其中,在所述块链式账本中,除初始数据块以外,每一数据块中包含至少一条数据记录,每一数据块中包含由前一数据块的哈希值和自身所包含的数据记录确定的自身数据块的哈希值,数据块的块高基于成块时间的先后顺序单调递增。
另一方面,本说明书实施例提供了一种基于前述索引的块链式账本中数据记录的查询方法,包括:
接收包含业务属性具体值的查询指令;
根据所述用户业务属性的具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
根据所述位置信息从所述账本中获取对应的数据记录,并返回获取得到的对应的数据记录至查询指令发送方。
再一方面,本说明书实施例还提供了一种基于前述索引的块链式账本中数据记录的验证方法,包括:
接收包含业务属性具体值的验证指令;
根据所述用户业务属性具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
对所述位置信息所对应的数据记录和/或数据块进行完整性验证。
与一方面对应的,本说明书实施例还提供一种数据记录的索引创建装置,应用于通过块链式账本存储数据的中心化的数据库服务提供方中,包括:
获取模块,获取数据记录中的指定标识字段,所述指定标识字段用于标识所述数据记录的业务属性;
确定模块,确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;
写入模块,建立所述指定标识字段和位置信息的对应关系,写入以所述指定标识字段为主键的索引;
其中,在所述块链式账本中,除初始数据块以外,每一数据块中包含至少一条数据记录,每一数据块中包含由前一数据块的哈希值和自身所包含的数据记录确定的自身数据块的哈希值,数据块的块高基于成块时间的先后顺序单调递增。
与另一方面对应的,本说明书实施例还提供一种基于前述索引的块链式账本中数据记录的查询装置,包括:
指令接收模块,接收包含业务属性具体值的查询指令;
位置信息获取模块,根据所述用户业务属性的具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
数据记录获取模块,根据所述位置信息从所述账本中获取对应的数据记录,并返回获取得到的对应的数据记录至查询指令发送方。
与再一方面对应的,本说明书实施例还提供一种基于前述索引的块链式账本中数据记录的验证装置,包括:
指令接收模块,接收包含业务属性具体值的验证指令;
位置信息获取模块,根据所述用户业务属性具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
验证模块,对所述位置信息所对应的数据记录和/或数据块进行完整性验证。
通过本说明书实施例所提供的方案,对于写入账本的数据记录,确定出数据记录的业务属性,以及在账本中的存储位置,建立起二者的对应关系,创建以业务属性为主键的倒排索引,进而可以根据该索引进行数据记录的统计、查询、验证等操作,提高了操作效率。
附图说明
图1为本说明书实施例所提供的一种生成块链式账本的流程示意图;
图2为本说明书实施例所涉及的系统架构示意图;
图3是本说明书实施例提供的一种数据记录的索引创建方法的流程示意图;
图4为本说明书实施例所提供的一种块链式账本中数据记录的查询方法的流程示意图;
图5为本说明书实施例所提供的一种块链式账本中数据记录的验证方法的流程示意图;
图6是本说明书实施例提供的一种数据记录的索引创建装置的结构示意图;
图7是本说明书实施例提供的一种数据记录的查询装置的结构示意图;
图8是本说明书实施例提供的一种数据记录的验证装置的结构示意图;
图9是用于配置本说明书实施例方法的一种设备的结构示意图。
具体实施方式
为了使本领域技术人员更好地理解本说明书实施例中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于保护的范围。
首先对本说明书实施例中所涉及的中心化下的块链式的账本予以说明。在中心化的数据库服务提供方,块链式的账本通过如下方式生成,如图1所示,图1为本说明书实施例所提供的一种生成块链式账本的流程示意图,包括:
S101,接收待存储的数据记录,确定各数据记录的哈希值。
此处的待存储的数据记录,可以是客户端个人用户的各种消费记录,也可以是应用服务器基于用户的指令,在执行业务逻辑时产生的业务结果、中间状态以及操作记录等等。具体的业务场景可以包括消费记录、审计日志、供应链条、政府监管记录、医疗记录等等。
S103,当达到预设的成块条件时,确定待写入数据块中的各数据记录,生成包含数据块的哈希值和数据记录的第N个数据块。
所述预设的成块条件包括:待存储的数据记录数量达到数量阈值,例如,每接收到一千条数据记录时,生成一个新数据块,将一千条数据记录写入块中;或者,距离上一次成块时刻的时间间隔达到时间阈值,例如,每隔5分钟,生成一个新数据块,将在这5分钟内接收到的数据记录写入块中。
此处的N指的是数据块的序号,换言之,在本说明书实施例中,数据块是以块链的形式,基于成块时间的顺序先后排列,具有很强的时序特征。其中,数据块的块高基于成块时间的先后顺序单调递增。块高可以是 序号,此时第N个数据块的块高即为N;块高也可以其它方式生成。
当N=1时,即此时的数据块为为初始数据块。初始数据块的哈希值和块高基于预设方式给定。例如,初始数据块中不包含数据记录,哈希值则为任一给定的哈希值,块高blknum=0;又例如,初始数据块的生成触发条件与其它数据块的触发条件一致,但是初始数据块的哈希值由对初始数据块中的所有内容取哈希确定。
当N>1时,由于前一数据块的内容和哈希值已经确定,则此时,可以基于前一数据块(即第N-1个数据块)的哈希值生成当前数据块(第N个数据块)的哈希值,例如,一种可行的方式为,确定每一条将要写入第N个块中的数据记录的哈希值,按照在块中的排列顺序,生成一个默克尔树,将默克尔树的根哈希值和前一数据块的哈希值拼接在一起,再次采用哈希算法,生成当前块的哈希值。又例如,还可以按照块中数据记录的顺序进行拼接并取哈希得到整体数据记录的哈希值,拼接前一数据块的哈希值和整体数据记录的哈希值,并对拼接得到的字串进行哈希运算,生成数据块的哈希值。
用户在上传数据成功后,即可以得到对应的数据记录的哈希值以及所处的数据块的哈希值,并保存,并且可以基于该哈希值发起完整性验证。具体的验证方式即为在数据库中重新计算数据记录自身的哈希值以及所处的数据块的哈希值,与本地所保存的进行对比。
通过前述的数据块的生成方式,每一个数据块通过哈希值确定,数据块的哈希值由数据块中的数据记录的内容、顺序以及前一数据块的哈希值决定。用户可以随时基于数据块的哈希值发起验证,对于数据块中任何内容(包括对于数据块中数据记录内容或者顺序的修改)的修改都会造成在验证时计算得到的数据块的哈希值和数据块生成时的哈希值不一致,而导致验证失败,从而实现了中心化下的不可篡改。
在对于块链式的账本进行验证时,一般而言,即指定一段数据块进行连续的完整性验证,或者从初始数据块开始进行连续的完整性验证。验证的方式即为获取前一数据块的哈希值,并采用与生成数据块的哈希值时的同样算法,根据自身的数据记录和前一数据块的哈希值,重新计算一遍自身数据块的哈希值。
前述部分对于本说明书实施例所涉及的块链式的账本进行了说明。在实际应用中,数据库服务方面向的常常为各种机构,各机构则可以将它们与第三方用户(包括其它机构或者个人)之间所产生的数据记录在数据库服务方进行存储。如图2所示,图2为本说明书实施例所涉及的系统架构示意图。在该示意图中,一个企业机构可以面向多名用户,而每个用户均可以通过其对应的企业机构向数据库服务提供方进行查询。
例如,数据库服务方对接的机构是某金融产品公司,数据记录可以是个人用户在该金融产品公司的理财记录;或者,对接的机构可以是政府部门,其中的数据记录是政府部门对于该部门所管理的公共项目的开销明细;或者,数据库服务方对接的机构是某个医院,其中的数据记录是病人的病历;或者,数据库服务方对接的机构是第三方支付机构,数据记录可以是个人用户通过该机构的支付记录,等等。
如前所述,这些数据记录在写入账本时虽然已经有了较强的时序特征,但是对于用户而言,其数据记录通常是分散式的存储在多个数据块中的。例如,医院对于所有病人的病历记录按照时间产生的顺序,依次上传。而对于医院的某个用户而言,其病史可能有多条,时间间隔又比较大,如果医院或者该用户需要从账本中将该用户的数据记录挑选出来,则需要根据之前在存储时所确定的每条病历记录的哈希值从账本中进行查询,很不方便。
基于此,本说明书实施例提供一种数据记录的索引创建方法,应用于通过块链式账本存储数据的中心化的数据库服务提供方中,可以实现在 不必了解对接机构的业务详情时,创建出以业务属性为主键的倒排索引,方便对接机构的业务处理,提高用户体验。
以下结合附图,详细说明本说明书各实施例提供的技术方案。如图3所示,图3是本说明书实施例提供的一种数据记录的索引创建方法的流程示意图,该流程具体包括如下步骤:
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)
…… ……
通过本说明书实施例所提供的方案,对于写入账本的数据记录,确定出数据记录的业务属性,以及在账本中的存储位置,建立起二者的对应关系,创建以业务属性为主键的倒排索引,不必了解用户的业务详情,从索引中即可以基于业务属性对于数据记录进行相应统计,以及后续的查询和验证。
在针对数据记录进行某些统计时,则只需直接依据索引表进行就可以了。例如,对接机构想要统计各用户的数据记录的数量,或者,用户想要知道自身与对接机构的数据记录数量,此时,直接统计在索引表中的各Key值之后的Value数量就可以了。
在一种实施例中,数据库服务方在获取数据记录中的指定标识字段时,一种获取方式可以同步创建,即接收到数据记录的时候即直接解析得到业务属性,在数据块写入账本时,同步创建索引。另一种方式则为,在数据块写入账本以后,并不需要立即创建索引,而是在数据库有空余资源的时候,再针对新写入账本的数据块中的每条数据记录异步创建索引,在异步创建的方式下,有利于数据库服务方节省资源。
在索引表中,由于一个业务属性可以对应于多个位置信息(即对应于多个数据记录),在将位置信息写入索引中时,还可以将位置信息按照数据记录在账本中的先后顺序依次进行排列,有利于用户的查询以及验证。数据记录在账本中的先后顺序即可以数据记录被写入账本的时间戳(即数据块的成块时间戳,以及)来体现,以及,对于同一数据块中的数据记录,则可以通过在数据块中的排序先后来体现。
在索引表被创建以后,即可以基于该索引表进行状态查询以及统计。如图4所示,图4为本说明书实施例所提供的一种块链式账本中数据记录的查询方法的流程示意图,包括:
S401,接收包含业务属性具体值的查询指令。一般而言,查询请求可以以指令的形式予以发送。查询请求可以来自于对接机构,也可以是来自于机构的所服务的用户。
S403,根据所述用户业务属性的具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息。
例如,在表1被创建之后,用户输入查询指令,Retrieve(0X123456,&v,FULL),即可以从索引表中取得业务属性“0X123456”相应的数据记录的位置信息(2,08),(2,10),(300,89),(300,999),进而根据位置信息查询得到相应的数据记录,并返回至用户。
S405,根据所述位置信息从所述账本中获取对应的数据记录,并返 回获取得到的对应的数据记录至查询指令发送方。
通过本说明书实施例所提供的方案,基于预先创建的以业务属性为主键,以位置信息为值的倒排索引,从而可以直接基于查询指令中所包含的业务属性从索引中进行查询对应的位置信息,进而基于位置信息得到相应的数据记录。在前述方式中,通过索引记录,将账本中零散的数据记录基于业务属性关联到一起,可以便利的查询得到同一业务属性所对应的数据记录。
进一步地,在查询时还可以包含用于指定数据块区间的块高参数,例如,用户输入查询指令,Retrieve(0X123456,&v,100),用于查询指定的用户0X123456在块高100之前的数据记录。从而,得到位置信息(2,08),(2,10)所对应的数据记录。
以及,还可以由两个数据块高确定一段数据块,例如,用户输入查询指令,Retrieve(0X123456,&v,200,1000),用于查询指定的用户0X123456在账本中块高200至块高1000之间的数据记录,可以看到块高300落入区间[200,1000],因此块高300所对应的位置信息即为目标位置信息,从而得到目标位置信息(300,89),(300,999)所对应的数据记录。
在一种实施方式中,数据块的块高可以是基于数据块的成块时间戳对称加密得到的大整型数据(一般为单调递增的12至15位整型数据),例如,一个13位的大整数。由于大整型是基于时间对称加密得到的,从而在需要数据块的成块时间时,可以同样的对称解密获得成块时间。
例如,对于成块时间“20xx-01-19 03:14:07.938576”,在经过对称加密之后,可以转换为一个大整型“1547838847938”,由于整型数据随时间单调递增,因此,“1547838847938”,此时即可以做为该数据块的块高,用于标识该数据块。
在本说明书,块高基于成块时间单调递增,这样即使采用了大整型 数据,但是它们之间的仍然从小到大地,反映了各数据块之间的顺序。例如,若接下来一个数据块的成块时间为“20xx-01-19 03:16:07.235125”,则可以采用预设的对称加密算法将其转换为另一更大的大整型“1547838848125”。
在这种方式下,当用户输入块高参数(数据库服务方可以提供时间至大整型的转换方式,以便用户得到时间对应的块高参数)来确定数据块区间时,实际上是确定了相应的查询时间段,即用户可以基于时间段进行查询,例如,用户可以基于自身ID(即业务属性)以及当前时间查询自身在一个月或者一天内所产生的数据记录,或者查询某个指定的时间段之间所产生的数据记录,而不必从数据块中进行遍历查询,提高效率。
在索引被创建之后,还可以基于该索引表进行数据记录的完整性验证。完整性验证的作用在于验证一个数据记录或者数据记录所处的数据块是否发生过改动。如图5所示,图5为本说明书实施例所提供的一种块链式账本中数据记录的验证方法的流程示意图,包括:
S501,接收包含业务属性具体值的验证指令;一般而言,验证请求可以以指令的形式予以发送。验证请求可以来自于对接机构,也可以是来自于对机构所服务的用户。
S503,根据所述用户业务属性具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息。
例如,在表1被创建之后,用户输入验证指令,Verify(0X123456,&v,FULL),即可以从索引表中匹配得业务属性具体值“0X123456”相应的数据记录的位置信息(2,08),(2,10),(300,89)和(300,999)。
S505,对所述位置信息所对应的数据记录和/或数据块进行完整性验证。
数据库服务方即可以从索引中得知对于位置信息(2,08),(2,10), (300,89),(300,999)所对应的数据记录,以及对块高为2和300的两个数据块进行完整性验证。
对于数据记录的完整性验证的方式即为获取所述数据记录,确定所述记录的哈希,以及数据记录所处的数据块中的其它数据记录的哈希值,形成默克尔树,验证能否重新生成该默克尔树的根哈希。对于数据块的验证方式即为根据前一数据块的哈希值以及自身数据记录,重新计算自身数据块的哈希值,验证与之前计算得到的哈希值是否一致。
验证时返回的结果是一个“是”或者“否”的元数据,此时数据库服务方还可以在验证结果中添加服务方的签名。可以看出,通过本说明书实施例所提供的索引,在块链式账本中进行证的过程中,数据库基础服务方对于具体的业务内容是无感知的,实现了数据存储和业务内容的解耦,可以同时对接不同的业务机构,适应性更广。
通过本说明书实施例所提供的方案,基于预先创建的以业务属性为主键,以位置信息为值的倒排索引,从而可以直接基于验证指令中所包含的业务属性从索引中进行匹配对应的位置信息,进而基于位置信息得到与业务属性相关的数据记录和数据块,进而在验证时可以对业务属性相关的数据记录和数据块进行跳跃式的完整性验证,更为灵活,效率更高。
进一步地,在验证时还可以包含用于指定数据块区间的块高参数,例如,用户输入验证指令,Verify(0X123456,&v,100),用于验证指定的用户0X123456在块高100之前的数据记录是否完整。从而,得到位置信息(2,08),(2,10)所对应的数据记录并进行完整性验证。
以及,还可以由两个数据块高确定一段数据块,例如,用户输入验证指令,Verify(0X123456,&v,200,1000),用于验证指定的用户0X123456在账本中块高200至块高1000之间的数据记录,可以看到块高300落入区间[200,1000],因此块高300所对应的位置信息即为目标位置信息,从而得 到目标位置信息(300,89),(300,999)所对应的数据记录并进行验证。
在一种实施方式中,数据块的块高可以是基于数据块的成块时间戳对称加密得到的大整型数据(一般为单调递增的12至15位整型数据),例如,一个13位的大整数。由于大整型是基于时间对称加密得到的,从而在需要数据块的成块时间时,可以同样的对称解密获得成块时间。
例如,对于成块时间“20xx-01-19 03:14:07.938576”,在经过对称加密之后,可以转换为一个大整型“1547838847938”,由于整型数据随时间单调递增,因此,“1547838847938”,此时即可以做为该数据块的块高,用于标识该数据块。
在本说明书,块高基于成块时间单调递增,这样即使采用了大整型数据,但是它们之间的仍然从小到大地,反映了各数据块之间的顺序。例如,若接下来一个数据块的成块时间为“20xx-01-19 03:16:07.235125”,则可以采用预设的对称加密算法将其转换为另一更大的大整型“1547838848125”。
在这种方式下,当用户输入块高参数(数据库服务方可以提供时间至大整型的转换方式,以便用户得到时间对应的块高参数)来确定数据块区间时,实际上是确定了相应的需要验证的时间段,即用户可以基于指定时间段进行验证,例如,用户可以基于自身ID(即业务属性)以及当前时间验证自身在一个月或者一天内所产生的数据记录的完整性,或者验证某个指定的时间段之间所产生的数据记录,而不必从数据块中进行遍历式的验证,提高效率。
与一方面对应的,本说明书实施例还提供一种数据记录的索引创建装置,应用于通过块链式账本存储数据的中心化的数据库服务提供方中,如图6所示,图6是本说明书实施例提供的一种数据记录的索引创建装置 的结构示意图,包括:
获取模块601,获取数据记录中的指定标识字段,所述指定标识字段用于标识所述数据记录的业务属性;
确定模块603,确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;
写入模块605,建立所述指定标识字段和位置信息的对应关系,写入以所述指定标识字段为主键的索引;
其中,在所述块链式账本中,除初始数据块以外,每一数据块中包含至少一条数据记录,每一数据块中包含由前一数据块的哈希值和自身所包含的数据记录确定的自身数据块的哈希值,数据块的块高基于成块时间的先后顺序单调递增。
进一步地,所述获取模块601,接收到用户所发送的数据记录时,获取数据记录中的指定标识字段;或者,确定账本中的数据块所包含的数据记录,针对所述数据块中所包含的任一数据记录,获取其指定标识字段。
进一步地,所述写入模块605,当所述索引中的主键不包含所述指定标识字段时,在所述索引表中创建以所述指定标识字段为主键的索引记录;当所述索引中的主键包含所述指定标识字段时,将所述位置信息写入所述指定标识字段所处的索引记录。
进一步地,所述写入模块605,确定数据记录的时间戳,在同一索引记录中按照时间戳的先后顺序,将数据记录的位置信息依序写入索引记录的值。
进一步地,在中心化的数据库服务提供方,还包括数据块生成模块607,接收待存储的数据记录,确定各数据记录的哈希值,其中,数据记录中包含指定标识字段;当达到预设的成块条件时,确定待写入数据块中的各数据记录,生成包含数据块的哈希值和数据记录的第N个数据块,具体 包括:
当N=1时,初始数据块的哈希值和块高基于预设方式给定;
当N>1时,根据待写入数据块中的各数据记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和各数据记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增。
进一步地,所述预设的成块条件包括:待存储的数据记录数量达到数量阈值;或者,距离上一次成块时刻的时间间隔达到时间阈值。
与另一方面对应的,本说明书实施例还提供一种基于前述索引的块链式账本中数据记录的查询装置,如图7所示,图7是本说明书实施例提供的一种数据记录的查询装置的结构示意图,包括:
指令接收模块701,接收包含业务属性具体值的查询指令;
位置信息获取模块703,根据所述用户业务属性的具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
数据记录获取模块705,根据所述位置信息从所述账本中获取对应的数据记录,并返回获取得到的对应的数据记录至查询指令发送方。
进一步地,所述指令接收模块701,接收包含用于指定查询区间的块高参数的查询指令;相应的,数据记录获取模块705,确定业务属性具体值所对应的位置信息中,块高落入所述查询区间的目标位置信息,获取目标位置信息所对应的数据记录。
与再一方面对应的,本说明书实施例还提供一种基于前述索引的块链式账本中数据记录的验证装置,如图8所示,图8是本说明书实施例提供的一种数据记录的验证装置的结构示意图,包括:
指令接收模块801,接收包含业务属性具体值的验证指令;
位置信息获取模块803,根据所述用户业务属性具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
验证模块805,对所述位置信息所对应的数据记录和/或数据块进行完整性验证。
进一步地,所述指令接收模块801,接收包含用于指定验证区间的块高参数的验证指令;相应的,所述验证模块805,确定业务属性具体值所对应的位置信息中,块高落入所述验证区间的目标位置信息,对目标位置信息所对应的数据记录和/或数据块进行完整性验证。
本说明书实施例还提供一种计算机设备,其至少包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现图3所示的数据记录的索引创建方法。
本说明书实施例还提供一种计算机设备,其至少包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现图4所示的数据记录的查询方法。
本说明书实施例还提供一种计算机设备,其至少包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现图5所示的数据记录的验证方法。
图9示出了本说明书实施例所提供的一种更为具体的计算设备硬件结构示意图,该设备可以包括:处理器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,但是在具体实施过程中,该设备还可以包括实现正常运行所必需的其他组件。此外,本领域的技术人员可以理解的是,上述设备中也可以仅包含实现本说明书实施例方案所必需的组件,而不必包含图中所示的全部组件。
本说明书实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现图3所示的数据记录的索引创建方法。
本说明书实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现图4所示的数据记录的查询方法。
本说明书实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现图5所示的数据记录的验证方法。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本说明书实施例可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本说明书实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本说明书实施例各个实施例或者实施例的某些部分所述的方法。
上述实施例阐明的系统、方法、模块或单元,具体可以由计算机芯 片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于方法实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的方法实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,在实施本说明书实施例方案时可以把各模块的功能在同一个或多个软件和/或硬件中实现。也可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本说明书实施例的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本说明书实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本说明书实施例的保护范围。

Claims (23)

  1. 一种数据记录的索引创建方法,应用于通过块链式账本存储数据的中心化的数据库服务提供方中,包括:
    获取数据记录中的指定标识字段,所述指定标识字段用于标识所述数据记录的业务属性;
    确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;
    建立所述指定标识字段和位置信息的对应关系,写入以所述指定标识字段为主键的索引;
    其中,在所述块链式账本中,除初始数据块以外,每一数据块中包含至少一条数据记录,每一数据块中包含由前一数据块的哈希值和自身所包含的数据记录确定的自身数据块的哈希值,数据块的块高基于成块时间的先后顺序单调递增。
  2. 如权利要求1所述的方法,获取数据记录中的指定标识字段,包括:
    接收到用户所发送的数据记录时,获取数据记录中的指定标识字段;或者,
    确定账本中的数据块所包含的数据记录,针对所述数据块中所包含的任一数据记录,获取其指定标识字段。
  3. 如权利要求1所述的方法,写入以所述指定标识字段为主键的索引,包括:
    当所述索引中的主键不包含所述指定标识字段时,在所述索引表中创建以所述指定标识字段为主键的索引记录;
    当所述索引中的主键包含所述指定标识字段时,将所述位置信息写入所述指定标识字段所处的索引记录。
  4. 如权利要求3所述的方法,将所述位置信息写入所述指定标识字段所处的索引记录,包括:
    确定数据记录的时间戳;
    在同一索引记录中按照时间戳的先后顺序,将数据记录的位置信息依序写入索引记录的值。
  5. 如权利要求1所述的方法,在中心化的数据库服务提供方,数据块通过如下方式预先生成:
    接收待存储的数据记录,确定各数据记录的哈希值,其中,数据记录中包含指定标识字段;
    当达到预设的成块条件时,确定待写入数据块中的各数据记录,生成包含数据块的哈希值和数据记录的第N个数据块,具体包括:
    当N=1时,初始数据块的哈希值和块高基于预设方式给定;
    当N>1时,根据待写入数据块中的各数据记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和各数据记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增。
  6. 如权利要求5所述的方法,所述预设的成块条件包括:
    待存储的数据记录数量达到数量阈值;或者,
    距离上一次成块时刻的时间间隔达到时间阈值。
  7. 一种基于权利要求1至6任一所述索引的块链式账本中数据记录的查询方法,包括:
    接收包含业务属性具体值的查询指令;
    根据所述用户业务属性的具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
    根据所述位置信息从所述账本中获取对应的数据记录,并返回获取得到的对应的数据记录至查询指令发送方。
  8. 如权利要求7所述的方法,接收包含业务属性具体值的查询指令,包括:接收包含用于指定查询区间的块高参数的查询指令;
    相应的,根据所述位置信息从所述账本中获取对应的数据记录,包括: 确定业务属性具体值所对应的位置信息中,块高落入所述查询区间的目标位置信息,获取目标位置信息所对应的数据记录。
  9. 一种基于权利要求1至6任一所述索引的块链式账本中数据记录的验证方法,包括:
    接收包含业务属性具体值的验证指令;
    根据所述用户业务属性具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
    对所述位置信息所对应的数据记录和/或数据块进行完整性验证。
  10. 如权利要求9所述的方法,接收包含业务属性具体值的验证指令,包括:接收包含用于指定验证区间的块高参数的验证指令;
    相应的,对所述位置信息所对应的数据记录和/或数据块进行完整性验证,包括:确定业务属性具体值所对应的位置信息中,块高落入所述验证区间的目标位置信息,对目标位置信息所对应的数据记录和/或数据块进行完整性验证。
  11. 一种数据记录的索引创建装置,应用于通过块链式账本存储数据的中心化的数据库服务提供方中,包括:
    获取模块,获取数据记录中的指定标识字段,所述指定标识字段用于标识所述数据记录的业务属性;
    确定模块,确定所述数据记录在账本中的位置信息,所述位置信息包括数据记录所处的数据块的块高,以及,在所处的数据块中的偏移量;
    写入模块,建立所述指定标识字段和位置信息的对应关系,写入以所述指定标识字段为主键的索引;
    其中,在所述块链式账本中,除初始数据块以外,每一数据块中包含至少一条数据记录,每一数据块中包含由前一数据块的哈希值和自身所包含的数据记录确定的自身数据块的哈希值,数据块的块高基于成块时间的先后顺序单调递增。
  12. 如权利要求11所述的装置,所述获取模块,接收到用户所发送的 数据记录时,获取数据记录中的指定标识字段;或者,确定账本中的数据块所包含的数据记录,针对所述数据块中所包含的任一数据记录,获取其指定标识字段。
  13. 如权利要求11所述的装置,所述写入模块,当所述索引中的主键不包含所述指定标识字段时,在所述索引表中创建以所述指定标识字段为主键的索引记录;当所述索引中的主键包含所述指定标识字段时,将所述位置信息写入所述指定标识字段所处的索引记录。
  14. 如权利要求13所述的装置,所述写入模块,确定数据记录的时间戳;在同一索引记录中按照时间戳的先后顺序,将数据记录的位置信息依序写入索引记录的值。
  15. 如权利要求11所述的装置,在中心化的数据库服务提供方,还包括数据块生成模块,接收待存储的数据记录,确定各数据记录的哈希值,其中,数据记录中包含指定标识字段;当达到预设的成块条件时,确定待写入数据块中的各数据记录,生成包含数据块的哈希值和数据记录的第N个数据块,具体包括:
    当N=1时,初始数据块的哈希值和块高基于预设方式给定;
    当N>1时,根据待写入数据块中的各数据记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和各数据记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增。
  16. 如权利要求15所述的装置,所述预设的成块条件包括:待存储的数据记录数量达到数量阈值;或者,距离上一次成块时刻的时间间隔达到时间阈值。
  17. 一种基于权利要求1至6任一所述索引的块链式账本中数据记录的查询装置,包括:
    指令接收模块,接收包含业务属性具体值的查询指令;
    位置信息获取模块,根据所述用户业务属性的具体值,从预先创建的 索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
    数据记录获取模块,根据所述位置信息从所述账本中获取对应的数据记录,并返回获取得到的对应的数据记录至查询指令发送方。
  18. 如权利要求17所述的装置,所述指令接收模块,接收包含用于指定查询区间的块高参数的查询指令;相应的,数据记录获取模块,确定业务属性具体值所对应的位置信息中,块高落入所述查询区间的目标位置信息,获取目标位置信息所对应的数据记录。
  19. 一种基于权利要求1至6任一所述索引的块链式账本中数据记录的验证装置,包括:
    指令接收模块,接收包含业务属性具体值的验证指令;
    位置信息获取模块,根据所述用户业务属性具体值,从预先创建的索引表中进行匹配,确定在所述索引表中所述业务属性具体值所对应的位置信息;
    验证模块,对所述位置信息所对应的数据记录和/或数据块进行完整性验证。
  20. 如权利要求19所述的装置,所述指令接收模块,接收包含用于指定验证区间的块高参数的验证指令;相应的,所述验证模块,确定业务属性具体值所对应的位置信息中,块高落入所述验证区间的目标位置信息,对目标位置信息所对应的数据记录和/或数据块进行完整性验证。
  21. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求1至6任一项所述的方法。
  22. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求7至8任一项所述的方法。
  23. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在 处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求9至10任一项所述的方法。
PCT/CN2020/078419 2019-04-18 2020-03-09 一种数据记录的索引创建方法 Ceased WO2020211569A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
TW109110761A TW202040387A (zh) 2019-04-18 2020-03-30 資料記錄的索引創建方法
US16/885,958 US10990705B2 (en) 2019-04-18 2020-05-28 Index creation for data records
US17/239,819 US11126751B2 (en) 2019-04-18 2021-04-26 Index creation for data records

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN201910314543.3 2019-04-18
CN201910313710.2 2019-04-18
CN201910313734.8A CN110188096B (zh) 2019-04-18 2019-04-18 一种数据记录的索引创建方法、装置及设备
CN201910313734.8 2019-04-18
CN201910313710.2A CN110162662B (zh) 2019-04-18 2019-04-18 一种块链式账本中数据记录的验证方法、装置及设备
CN201910314543.3A CN110162526B (zh) 2019-04-18 2019-04-18 一种块链式账本中数据记录的查询方法、装置及设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/885,958 Continuation US10990705B2 (en) 2019-04-18 2020-05-28 Index creation for data records

Publications (1)

Publication Number Publication Date
WO2020211569A1 true WO2020211569A1 (zh) 2020-10-22

Family

ID=72836964

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078419 Ceased WO2020211569A1 (zh) 2019-04-18 2020-03-09 一种数据记录的索引创建方法

Country Status (2)

Country Link
TW (1) TW202040387A (zh)
WO (1) WO2020211569A1 (zh)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112447291A (zh) * 2020-11-23 2021-03-05 四川大学华西医院 基于区块链的医联体数据之间的共享方法
CN112486914A (zh) * 2020-11-27 2021-03-12 神州灵云(北京)科技有限公司 一种数据包存储与快查方法与系统
CN112506918A (zh) * 2020-11-03 2021-03-16 深圳市宏电技术股份有限公司 数据存取方法、终端及计算机可读存储介质
CN112506940A (zh) * 2020-12-16 2021-03-16 平安银行股份有限公司 数据对账方法、装置、电子设备及存储介质
CN112527828A (zh) * 2020-12-10 2021-03-19 福建新大陆支付技术有限公司 一种税控机税控记录存储方法及检索查询方法
CN113111067A (zh) * 2021-04-25 2021-07-13 京东数科海益信息科技有限公司 数据存储方法、信息推送方法以及装置
CN113592447A (zh) * 2021-07-29 2021-11-02 远光软件股份有限公司 电力现货市场的财务结算方法、装置、存储介质和电子设备
CN113656397A (zh) * 2021-07-02 2021-11-16 阿里巴巴新加坡控股有限公司 一种针对时序数据的索引构建及查询的方法、装置
CN113705184A (zh) * 2021-09-01 2021-11-26 同盾科技有限公司 自定义报表的生成方法及装置、存储介质、电子设备
CN113760530A (zh) * 2021-01-15 2021-12-07 北京京东拓先科技有限公司 请求处理方法、装置、设备、可读存储介质、程序产品
CN114281825A (zh) * 2021-12-27 2022-04-05 深圳前海微众银行股份有限公司 一种区块链的数据查询方法及装置
CN114416747A (zh) * 2022-01-26 2022-04-29 上海数禾信息科技有限公司 基于可嵌入式组件的数据特征记录方法、装置及存储介质
CN114647665A (zh) * 2021-11-29 2022-06-21 中国银联股份有限公司 分布式系统的数据处理方法及其数据处理系统
CN114969045A (zh) * 2022-05-31 2022-08-30 京东方科技集团股份有限公司 账号创建方法、物联网多租户系统、设备、程序和介质
CN115203134A (zh) * 2022-07-08 2022-10-18 北京镜舟科技有限公司 数据更新方法、装置、电子设备及存储介质
CN115420944A (zh) * 2022-08-30 2022-12-02 江苏盛德电子仪表有限公司 一种基于蓝牙通讯的可电量分析及查询的智能电能表
CN116955363A (zh) * 2023-09-21 2023-10-27 北京四维纵横数据技术有限公司 无模式数据创建索引方法、装置、计算机设备及介质
CN118093608A (zh) * 2024-03-05 2024-05-28 沈苏科技(苏州)股份有限公司 一种面向预防接种系统的数据更新方法
CN118607005A (zh) * 2024-08-06 2024-09-06 蚂蚁科技集团股份有限公司 针对数据库的安全索引方法和装置
CN118656093A (zh) * 2024-06-12 2024-09-17 成都理工大学 一种软件基础数据升级方法及系统

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239479A (zh) * 2017-03-28 2017-10-10 阿里巴巴集团控股有限公司 一种基于区块链的数据存储以及查询的方法及装置
CN107807951A (zh) * 2017-09-18 2018-03-16 联动优势科技有限公司 一种区块链生成方法、数据验证方法、节点及系统
CN107943951A (zh) * 2017-11-24 2018-04-20 中钞信用卡产业发展有限公司杭州区块链技术研究院 一种区块链业务信息的检索方法及系统
WO2018205137A1 (en) * 2017-05-09 2018-11-15 Accenture Global Solutions Limited Data storage layer index for efficient information retrieval
CN109165224A (zh) * 2018-08-24 2019-01-08 东北大学 一种在区块链数据库上针对关键字key的索引方法
US20190042620A1 (en) * 2017-08-01 2019-02-07 International Business Machines Corporation Optimizing queries and other retrieve operations in a blockchain
CN110162526A (zh) * 2019-04-18 2019-08-23 阿里巴巴集团控股有限公司 一种块链式账本中数据记录的查询方法、装置及设备
CN110162662A (zh) * 2019-04-18 2019-08-23 阿里巴巴集团控股有限公司 一种块链式账本中数据记录的验证方法、装置及设备
CN110188096A (zh) * 2019-04-18 2019-08-30 阿里巴巴集团控股有限公司 一种数据记录的索引创建方法、装置及设备

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239479A (zh) * 2017-03-28 2017-10-10 阿里巴巴集团控股有限公司 一种基于区块链的数据存储以及查询的方法及装置
WO2018205137A1 (en) * 2017-05-09 2018-11-15 Accenture Global Solutions Limited Data storage layer index for efficient information retrieval
US20190042620A1 (en) * 2017-08-01 2019-02-07 International Business Machines Corporation Optimizing queries and other retrieve operations in a blockchain
CN107807951A (zh) * 2017-09-18 2018-03-16 联动优势科技有限公司 一种区块链生成方法、数据验证方法、节点及系统
CN107943951A (zh) * 2017-11-24 2018-04-20 中钞信用卡产业发展有限公司杭州区块链技术研究院 一种区块链业务信息的检索方法及系统
CN109165224A (zh) * 2018-08-24 2019-01-08 东北大学 一种在区块链数据库上针对关键字key的索引方法
CN110162526A (zh) * 2019-04-18 2019-08-23 阿里巴巴集团控股有限公司 一种块链式账本中数据记录的查询方法、装置及设备
CN110162662A (zh) * 2019-04-18 2019-08-23 阿里巴巴集团控股有限公司 一种块链式账本中数据记录的验证方法、装置及设备
CN110188096A (zh) * 2019-04-18 2019-08-30 阿里巴巴集团控股有限公司 一种数据记录的索引创建方法、装置及设备

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506918A (zh) * 2020-11-03 2021-03-16 深圳市宏电技术股份有限公司 数据存取方法、终端及计算机可读存储介质
CN112506918B (zh) * 2020-11-03 2024-06-04 深圳市宏电技术股份有限公司 数据存取方法、终端及计算机可读存储介质
CN112447291A (zh) * 2020-11-23 2021-03-05 四川大学华西医院 基于区块链的医联体数据之间的共享方法
CN112447291B (zh) * 2020-11-23 2023-03-28 四川大学华西医院 基于区块链的医联体数据之间的共享方法
CN112486914A (zh) * 2020-11-27 2021-03-12 神州灵云(北京)科技有限公司 一种数据包存储与快查方法与系统
CN112486914B (zh) * 2020-11-27 2024-04-12 神州灵云(北京)科技有限公司 一种数据包存储与快查方法与系统
CN112527828A (zh) * 2020-12-10 2021-03-19 福建新大陆支付技术有限公司 一种税控机税控记录存储方法及检索查询方法
CN112506940A (zh) * 2020-12-16 2021-03-16 平安银行股份有限公司 数据对账方法、装置、电子设备及存储介质
CN112506940B (zh) * 2020-12-16 2023-07-21 平安银行股份有限公司 数据对账方法、装置、电子设备及存储介质
CN113760530A (zh) * 2021-01-15 2021-12-07 北京京东拓先科技有限公司 请求处理方法、装置、设备、可读存储介质、程序产品
CN113111067A (zh) * 2021-04-25 2021-07-13 京东数科海益信息科技有限公司 数据存储方法、信息推送方法以及装置
CN113656397A (zh) * 2021-07-02 2021-11-16 阿里巴巴新加坡控股有限公司 一种针对时序数据的索引构建及查询的方法、装置
CN113592447A (zh) * 2021-07-29 2021-11-02 远光软件股份有限公司 电力现货市场的财务结算方法、装置、存储介质和电子设备
CN113705184A (zh) * 2021-09-01 2021-11-26 同盾科技有限公司 自定义报表的生成方法及装置、存储介质、电子设备
CN113705184B (zh) * 2021-09-01 2023-09-22 同盾科技有限公司 自定义报表的生成方法及装置、存储介质、电子设备
CN114647665A (zh) * 2021-11-29 2022-06-21 中国银联股份有限公司 分布式系统的数据处理方法及其数据处理系统
CN114281825A (zh) * 2021-12-27 2022-04-05 深圳前海微众银行股份有限公司 一种区块链的数据查询方法及装置
CN114416747A (zh) * 2022-01-26 2022-04-29 上海数禾信息科技有限公司 基于可嵌入式组件的数据特征记录方法、装置及存储介质
CN114969045A (zh) * 2022-05-31 2022-08-30 京东方科技集团股份有限公司 账号创建方法、物联网多租户系统、设备、程序和介质
CN115203134A (zh) * 2022-07-08 2022-10-18 北京镜舟科技有限公司 数据更新方法、装置、电子设备及存储介质
CN115420944B (zh) * 2022-08-30 2023-09-22 江苏盛德电子仪表有限公司 一种基于蓝牙通讯的可电量分析及查询的智能电能表
CN115420944A (zh) * 2022-08-30 2022-12-02 江苏盛德电子仪表有限公司 一种基于蓝牙通讯的可电量分析及查询的智能电能表
CN116955363A (zh) * 2023-09-21 2023-10-27 北京四维纵横数据技术有限公司 无模式数据创建索引方法、装置、计算机设备及介质
CN116955363B (zh) * 2023-09-21 2023-12-26 北京四维纵横数据技术有限公司 无模式数据创建索引方法、装置、计算机设备及介质
CN118093608A (zh) * 2024-03-05 2024-05-28 沈苏科技(苏州)股份有限公司 一种面向预防接种系统的数据更新方法
CN118656093A (zh) * 2024-06-12 2024-09-17 成都理工大学 一种软件基础数据升级方法及系统
CN118656093B (zh) * 2024-06-12 2025-01-24 成都理工大学 一种软件基础数据升级方法及系统
CN118607005A (zh) * 2024-08-06 2024-09-06 蚂蚁科技集团股份有限公司 针对数据库的安全索引方法和装置

Also Published As

Publication number Publication date
TW202040387A (zh) 2020-11-01

Similar Documents

Publication Publication Date Title
WO2020211569A1 (zh) 一种数据记录的索引创建方法
WO2021073242A1 (zh) 索引创建和数据查询方法、装置及设备
CN110162662B (zh) 一种块链式账本中数据记录的验证方法、装置及设备
CN110188096B (zh) 一种数据记录的索引创建方法、装置及设备
CN110162526B (zh) 一种块链式账本中数据记录的查询方法、装置及设备
CN109902071B (zh) 业务日志存储方法、系统、装置及设备
US11126751B2 (en) Index creation for data records
WO2021017422A1 (zh) 一种块链式账本中的索引创建方法、装置及设备
WO2020244239A1 (zh) 一种基于业务标识的索引创建方法、装置及设备
CN110334094B (zh) 一种基于倒排索引的数据查询方法、系统、装置及设备
WO2021057164A1 (zh) 一种块链式账本中的查询方法、装置及设备
CN110347679B (zh) 一种基于收据的数据存储方法、装置及设备
WO2021073240A1 (zh) 一种块链式账本中的数据存储方法、装置及设备
WO2021073241A1 (zh) 一种基于磁盘存储的数据读取方法、装置及设备
WO2020244237A1 (zh) 一种块链式账本中的验证方法、装置及设备
US10999062B2 (en) Blockchain-type data storage
WO2021093461A1 (zh) 一种块链式账本中的聚合计算方法、装置及设备
WO2021057127A1 (zh) 一种基于多条业务属性的数据存储方法、装置及设备
CN110362570B (zh) 一种数据存储方法、装置及设备
CN111444194B (zh) 一种块链式账本中索引的清除方法、装置及设备
CN110717196A (zh) 一种证券交易数据的存储方法、装置及设备
CN110347748B (zh) 一种基于倒排索引的数据验证方法、系统、装置及设备
CN111444195B (zh) 一种块链式账本中索引的清除方法、装置及设备
HK40025506B (zh) 一种块链式账本中的数据读取方法、装置及设备
HK40024654A (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: 20791484

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: 20791484

Country of ref document: EP

Kind code of ref document: A1