WO2021115002A1 - Method and apparatus for processing blockchain transaction record - Google Patents

Method and apparatus for processing blockchain transaction record Download PDF

Info

Publication number
WO2021115002A1
WO2021115002A1 PCT/CN2020/127877 CN2020127877W WO2021115002A1 WO 2021115002 A1 WO2021115002 A1 WO 2021115002A1 CN 2020127877 W CN2020127877 W CN 2020127877W WO 2021115002 A1 WO2021115002 A1 WO 2021115002A1
Authority
WO
WIPO (PCT)
Prior art keywords
block height
attribute
attribute value
account
change
Prior art date
Application number
PCT/CN2020/127877
Other languages
French (fr)
Chinese (zh)
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 WO2021115002A1 publication Critical patent/WO2021115002A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • the embodiment of the present invention relates to the field of financial technology (Fintech), and in particular to a method and device for processing blockchain (Blockchain) transaction records.
  • Fetech financial technology
  • Blockchain blockchain
  • a state table is stored in the blockchain system.
  • the state table is used to save the latest state data of each account and the block height corresponding to the latest state data.
  • the blockchain system receives a transaction and causes the state data of an account
  • the status data of the account after the change and the current block height will be updated to the status table.
  • the status table can be directly queried from the status table to find the transaction that caused the status data to change. Block.
  • the embodiment of the present invention provides a method and device for processing block chain transaction records, which are used to query the block where the attribute value of each attribute of the account was last changed.
  • An embodiment of the present invention provides a method for processing blockchain transaction records, including:
  • the transaction to be executed is used to change the attribute value of the first attribute of the first account
  • the first attribute value and the current block height are updated to the status table;
  • the status table records the status data of multiple accounts, and the status data of the account is the latest attribute value of each attribute of the multiple attributes of the account The block height corresponding to the latest attribute value.
  • the setting status table includes the status data of multiple accounts, and the status data of each account is the latest attribute value of each attribute of the multiple attributes of the account and the block height corresponding to the latest attribute value. In this way, The block height corresponding to the last modification of the attribute value of each attribute of the account can be determined.
  • the method further includes:
  • the first history table records modification records of multiple change accounts under the current block height, and the change account belongs to the attribute whose attribute value has changed Account, the modification record of the changed account includes the attribute value of the changed account under the current block height, the attribute value after the change, and the index corresponding to the attribute value after the change Block height, the index block height is the block height corresponding to the latest change of the attribute value after the change before this change;
  • the first attribute, the first attribute value, and the index block height corresponding to the first attribute value are added to the first history table as the first modification record of the first account.
  • the first history table is acquired, and the first attribute, the first attribute value, and the index block height corresponding to the first attribute value are added to the first history table as the first modification record of the first account,
  • the first history table does not record the full amount of data, but only records the modification records of the changed account at the current block level, that is, only records the modification records of multiple changed accounts at the current block level, and one account
  • the attribute value of only one attribute changes, and the attribute value of other attributes does not change, only the modification record of the attribute whose attribute value has changed is recorded, and the attribute whose attribute value does not change is not recorded. Record, thereby further reducing the amount of recorded data in the history table.
  • the method further includes:
  • the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height;
  • first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height, and determine the second account’s height in sequence from high to bottom. The corresponding block height when the attribute value of the second attribute is changed, until the first second block height that is less than the specified block height is determined;
  • the attribute value of the second attribute of the second account in the history table corresponding to the second block height is determined as the query result.
  • the method further includes:
  • the latest attribute value of the second attribute in the status table is determined as the query result.
  • the method further includes:
  • the second query instruction is used to obtain the latest N modification records of the second attribute of the second account
  • the N modification records are determined as the query result.
  • the determining the block height corresponding to the change of the attribute value of the second attribute of the second account includes:
  • the second modification record includes the attribute value of the second attribute after the M-th change and The attribute value of the second attribute corresponds to the block height of the latest change before the Mth change.
  • the history table corresponding to each block height can be set, and each history table contains the attribute, attribute value, and index block height corresponding to the change account.
  • the index block height is used to indicate the upper limit of the attribute value of the modification record.
  • the block height when it was modified once, and then the history table corresponding to the block height when it was last modified is determined, and the modification record when the block height was last modified is determined from the history table corresponding to the block height when it was last modified.
  • This cyclic process can quickly find the modification record of a certain attribute. Because the modification record of the change account in the history table only includes the information of the attribute whose attribute value has changed, the amount of record data in the history table is further reduced, and when querying It is also for the change of a certain attribute, this method can improve the query speed.
  • each status table there are multiple status tables; the service types corresponding to each status table are different;
  • the history table corresponding to each block height records the modification record of the change account in each state table of the block height; the history table includes the identifier of each state table.
  • the provided history table can correspond to the block height, so the history table corresponding to each block height will not be too large, and the history table corresponds to the modification record of the change account in multiple state tables, so that the entire block The number of history tables in the chain system will not be too much, which will further improve the query speed.
  • an embodiment of the present invention also provides a processing device for blockchain transaction records, including:
  • the processing unit is configured to determine the first attribute value of the first attribute after the execution of the transaction to be executed; update the first attribute value and the current block height to a status table; how much is recorded in the status table
  • the status data of each account is the latest attribute value of each attribute among the multiple attributes of the account and the block height corresponding to the latest attribute value.
  • the obtaining unit is further configured to obtain a first history table corresponding to the current block height after the processing unit updates the first attribute value and the current block height to a status table;
  • a history table records the modification records of multiple change accounts of the current block level, the change account is the account to which the attribute value has changed, and the modification record of the change account includes the change account in The attribute value of the attribute value changed under the current block height, the attribute value after the change, and the index block height corresponding to the attribute value after the change, and the index block height is the attribute after the change The value of the block height corresponding to the latest change before this change;
  • the processing unit is further configured to add the first attribute, the first attribute value, and the index block height corresponding to the first attribute value as the first modification record of the first account to the first History table.
  • processing unit is further configured to:
  • the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height;
  • first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height, and determine the second account’s height in sequence from high to bottom. The corresponding block height when the attribute value of the second attribute is changed, until the first second block height that is less than the specified block height is determined;
  • the attribute value of the second attribute of the second account in the history table corresponding to the second block height is determined as the query result.
  • processing unit is further configured to:
  • the latest attribute value of the second attribute in the status table is determined as the query result.
  • processing unit is further configured to:
  • the second query instruction is used to obtain the latest N modification records of the second attribute of the second account
  • the N modification records are determined as the query result.
  • processing unit is specifically configured to:
  • the second modification record includes the attribute value of the second attribute after the M-th change and The attribute value of the second attribute corresponds to the block height of the latest change before the Mth change.
  • each status table there are multiple status tables; the service types corresponding to each status table are different;
  • the history table corresponding to each block height records the modification record of the change account in each state table of the block height; the history table includes the identifier of each state table.
  • an embodiment of the present invention also provides a computing device, including:
  • processor, memory, and communication interface among them, the processor, memory and communication interface are connected by a bus;
  • the processor is configured to read the program in the memory and execute the above-mentioned method for processing blockchain transaction records;
  • the memory is used to store one or more executable programs, and can store data used by the processor when performing operations.
  • the embodiment of the present invention also provides a non-transitory computer-readable storage medium, in which computer instructions are stored in the non-transitory computer-readable storage medium, and when it runs on a computer, the computer executes the above-mentioned blockchain transaction.
  • the processing method of the record is not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, the embodiment of the present invention.
  • an embodiment of the present invention also provides a computer program product containing instructions.
  • the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium.
  • the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned blockchain transaction record processing method.
  • FIG. 1 is a schematic diagram of a process for updating a status table according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an update history table provided by an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a process for querying the attribute value of a specific block height according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a flow chart for querying a modification record of a certain attribute according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a processing device for blockchain transaction records according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a computing device provided by this application.
  • the method for processing blockchain transaction records provided by the embodiment of the present invention is applicable to a blockchain system.
  • the blockchain system is a P2P (Peer to Peer) network composed of multiple blockchain nodes. Can communicate directly with each other.
  • the data generated by a blockchain node can be broadcast to multiple blockchain nodes at the same time, and it can also query and obtain data from any other node.
  • state table in the blockchain system, and the state table is created by a smart contract of the same business type, that is, there can be multiple state tables in the blockchain system, and each state table corresponds to a different business type.
  • the status data of multiple accounts are recorded in the status table, where the status data of any account is the latest attribute value of each attribute of the multiple attributes of the account and the block height corresponding to the latest attribute value .
  • the index Key of the state table is SHA256 (table name + "_" + primary key) to ensure global uniqueness.
  • Each attribute corresponds to a block height, which is used to record the block when the attribute value corresponding to the attribute was modified last time high.
  • the name of the state table is "t_Balance", and the state table includes accounts Alice, Bob, and Henry.
  • the attributes of each account are Balance (account balance) and Age (age).
  • the state table can be as shown in Table 1. Take Alice as an example, the index Key of the state table is SHA256 ("t_Balance_Alice"), the latest value of Balance corresponding to Alice is 100, and the corresponding block height when last modified is 2; the latest value of Age corresponding to Alice is 37 , The corresponding block height is 2.
  • the block height corresponding to the latest attribute value of each attribute of the account can be determined when it was modified last time.
  • FIG. 1 exemplarily shows the flow of a method for processing blockchain transaction records provided by an embodiment of the present invention, and the flow may be executed by a processing device for blockchain transaction records.
  • the process specifically includes:
  • Step 101 Obtain a transaction to be executed
  • Step 102 Determine the first attribute value of the first attribute after executing the transaction to be executed
  • Step 103 Update the first attribute value and the current block height to the status table.
  • the transaction to be executed is used to change the attribute value of the first attribute of the first account, and the attribute value of the first attribute becomes the first attribute value after the transaction to be executed is executed.
  • Table 1 Take Table 1 as an example.
  • Alice is the first account, Balance and Age Both are the first attribute.
  • Alice's Balance will become 500, which is the first attribute value.
  • Alice's Age will become 38, and 38 is the first attribute value.
  • the Balance_Blocknum corresponding to the Alice primary key in the original table 1 is changed to 25, and the Balance corresponding to the Alice primary key is changed to 500; the Age-Blocknum corresponding to the Alice primary key is changed. If it is 25, the Age corresponding to Alice's primary key becomes 38, and the updated Table 1 can be as shown in Table 2.
  • a history table can also be set for recording The modification record of the account's attributes.
  • the incoming creation instruction includes whether to generate a history table.
  • the history table may not be generated to reduce storage overhead.
  • a creation record of a status table can be recorded to indicate whether the history table corresponding to the status table has been created.
  • the creation record can also be stored in the form of a table, as shown in Table 3, which can include The name of the state table and whether to generate a history table.
  • a state table when a state table is created, it is determined whether to write the modification record corresponding to the state table into the history table. That is to say, the history table here is pre-created, and multiple states The modification record corresponding to the table is written into the history table.
  • the incoming creation instruction includes whether to write the modification record into the history table. For those who do not care about historical data, the modification record may not be written into the history table to reduce storage overhead.
  • a creation record of a status table can be recorded to indicate whether the modification record of the status table is written into the history table.
  • the creation record can also be stored in the form of a table, as shown in Table 4. It can include the table name of the status table and whether to write the modification record into the history table.
  • each block height may be set to correspond to a history table, and the table name of the history table may be identified according to the block height, such as "t_history_block height".
  • the history table corresponding to each block height does not record the full amount of data, but only records the modification record of the change account corresponding to the block height.
  • the structure of each history table is the same, thereby establishing a chained data relationship of multiple history tables.
  • each status table corresponds to a different business type
  • the modification records of the change accounts of each status table are written into the same history table, it can be based on the status.
  • the identification of the table is distinguished, and the history table includes the identification of each state table, such as the table name of each state table.
  • the history table corresponding to each block height records the modification record of the change account in each state table of the block height.
  • the history table records the modification records of multiple change accounts corresponding to the block level.
  • the change account is understood as the account to which the attribute value of the corresponding block level is changed.
  • the modification record of the changed account includes the change account in The attribute value of the corresponding block height changed, the attribute value after the change, and the index block height corresponding to the attribute value after the change.
  • the index block height is the latest value of the attribute value after the change before the change Change the corresponding block height.
  • the fields that can be included in the history table include the primary key, attribute, attribute value, and index block height of the attribute value of the state table.
  • the field of the history table also includes the identifier of the corresponding state table, such as the table name of the state table.
  • the index Key of the history table is SHA256 (the table of the state table). Name + "_" + primary key of the state table + "_" + attributes).
  • the table name of the history table is "t_history_10", that is, the history table corresponding to the block height of 10, and the history table can be as shown in Table 5.
  • the history table includes the accounts Bob and Henry. Take Bob as an example.
  • the index Key of the history table is SHA256 ("t_Balance_Bob_Balance").
  • the value of Bob's Balance in the state table t_Balance at block height 10 is 200. The last change was Occurs when the block is 8 high.
  • the corresponding modification record may also be updated to the corresponding history table.
  • the flowchart shown in FIG. 2 can be used.
  • Step 201 Obtain a first history table corresponding to the current block height
  • Step 202 Add the first attribute, the first attribute value, and the index block height corresponding to the first attribute value as the first modification record of the first account to the first history table.
  • the first history table is the history table corresponding to the current block height.
  • the first history table records the modification records of multiple change accounts of the current block height.
  • the change account is the account to which the attribute whose attribute value is changed belongs.
  • the modification record of the changed account includes the attribute value of the changed account under the current block height, the attribute value after the change, and the index block height corresponding to the attribute value after the change.
  • the index block height is after the change The block height corresponding to the last time the attribute value was changed.
  • the status data of an account is newly added, it is equivalent to adding a piece of data to the status table.
  • the status data of Adam is added to the status table t_Balance, then The status table t_Balance of Table 2 is updated as shown in Table 7.
  • two new modification records will be added to the history table t_history_70.
  • the two new modification records can be shown in Table 8.
  • prevblocknum of -1 means that the status data of the account corresponding to the modification record is newly added. of.
  • the first history table is obtained, and the first attribute, the first attribute value, and the index block height corresponding to the first attribute value are added to the first history table as the first modification record of the first account.
  • the first history table does not record the full amount of data, but only records the modification records of the change account of the current block level, that is, only records the modification records of multiple change accounts under the current block level, and if one Among the multiple attributes corresponding to the account, if the attribute value of only one attribute changes, and the attribute value of other attributes does not change, only the modification record of the attribute whose attribute value has changed is recorded, and the attribute whose attribute value does not change is not recorded. , Thereby further reducing the amount of data recorded in the history table.
  • it can support querying the attribute value of a certain attribute of the account at a specified block height.
  • FIG. 3 an exemplary method for querying attribute values of a specific block height provided by an embodiment of the present invention is shown.
  • the specific process includes:
  • Step 301 Receive a first query instruction
  • Step 302 If it is determined that the first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height and determine the attribute value change of the second attribute of the second account in sequence from the high to the bottom. The block height corresponding to the time, until the second block height is determined;
  • Step 303 Determine the attribute value of the second attribute of the second account in the history table corresponding to the second block height as the query result.
  • the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height.
  • the latest attribute of the second attribute is determined from the status table.
  • the first block height corresponding to the value here, the first block height is the block height corresponding to the latest attribute value of the second attribute, that is, the block height where the attribute value of the second attribute was last modified.
  • a block height is greater than the specified block height, start from the first block height, and determine the block height corresponding to the second attribute value of the second account at each change from high to low, until the first one is determined.
  • the block height is less than the specified block height, and the attribute value of the second attribute of the second account in the history table corresponding to the block height is determined as the query result.
  • the second account's first block height before the specified block height can be determined.
  • the value after the latest change of the attribute value of the second attribute is the latest attribute value of the second attribute, and the latest attribute value of the second attribute can be used as the query result.
  • the block height corresponding to the attribute value of the second attribute of the second account at each change it may be based on the attribute value of the second attribute of the second account at the M-th change.
  • the third block height corresponds to the third block height; then determine the second modification record of the second account from the history table corresponding to the third block height; wherein, the second modification record is included in the Mth block.
  • the block height corresponding to the attribute value of the second attribute of the second account when determining the block height corresponding to the attribute value of the second attribute of the second account each time it is changed, it can be based on the block corresponding to the attribute value of the second attribute of the second account at the time of this change. High, obtain the history table of the block height corresponding to this change, and then determine the modification record of the block height corresponding to this change according to the history table of the corresponding block height at the time of this change, so as to modify The block height corresponding to the last change is determined in the record. In this way, the block height corresponding to each change of the attribute value of the second attribute of the second account is determined sequentially from high to low.
  • the account Alice is taken as an example.
  • the first query instruction received is "Query Alice's Age at block height 520", assuming that the current block height is 10000.
  • the obtained state table t_Balance is shown in Table 9.
  • the block height of the latest attribute value corresponding to Age is 800. If it is greater than 520, the history table corresponding to the block height of 800 will be obtained.
  • the table name is t_history_800.
  • the history table corresponding to the block height 800 is shown in Table 10, it can be determined that Alice's Age has been updated when the block height is 500, and the block height 500 is less than the block height 520, then the block height is determined to be 500
  • the updated Age value is the value to be queried, then the history table corresponding to the block height 500 is obtained.
  • the table name of the history table is t_history_500. Assuming that the history table corresponding to the block height 500 is as shown in Table 11, you can It is determined that the value of Alice's Age at the block height of 500 is 39, that is, the value to be queried is 39.
  • the history table corresponding to the block height of 800 is as shown in Table 12, it can be determined that Alice's Age has been updated when the block height is 530, and the block height 530 is greater than the block height 520, then the corresponding block height 530 is obtained History table.
  • the name of the history table is t_history_530.
  • the history table corresponding to the block height 530 is shown in Table 13, it can be determined that Alice's Age has been updated at the block height of 25, and the block height of 25 is not greater than the block. If the height is 520, it is determined that the updated Age value at the block height of 25 is the value to be queried, and then the history table corresponding to the block height of 25 is obtained.
  • the table name of the history table is t_history_25, assuming the history table corresponding to the block height of 25 As shown in Table 14, it can be determined that the value of Alice's Age at the block height of 25 is 38, that is, the value to be queried is 38.
  • the Age corresponding to the block height of 500 can be determined
  • the value of 40 is the data to be queried.
  • it can also support querying the recent modification records of a certain attribute of the account.
  • a method for querying multiple modification records of a certain attribute provided by an embodiment of the present invention is exemplarily shown.
  • the specific process includes:
  • Step 401 Receive a second query instruction
  • Step 402 Starting from the first block height corresponding to the latest attribute value of the second attribute in the status table, sequentially determine the block height corresponding to the second attribute value change of the second account and the corresponding block height from the high to the bottom. The modification record for the second attribute of the second account until N modification records are determined;
  • Step 403 Determine N modification records as the query result.
  • the second query instruction is used to obtain the latest N modification records of the second attribute of the second account.
  • the latest attribute value of the second attribute is determined from the status table.
  • the first block height is the block height corresponding to the latest attribute value of the second attribute, that is, the block height where the attribute value of the second attribute was last modified.
  • the block height determines from high to low the block height corresponding to the second attribute value of the second account each time it is changed, and each time it is determined that the second attribute value of the second account is changing
  • the block height corresponding to the time is high
  • the history table corresponding to the block height is obtained at the same time to obtain the modification record corresponding to this change until the N modification record is determined, and the N modification record is determined as the query result .
  • the block height corresponding to the attribute value of the second attribute of the second account at each change it may be based on the attribute value of the second attribute of the second account at the M-th change.
  • the third block height corresponds to the third block height; then determine the second modification record of the second account from the history table corresponding to the third block height; wherein, the second modification record is included in the Mth block.
  • the block height corresponding to the attribute value of the second attribute of the second account when determining the block height corresponding to the attribute value of the second attribute of the second account each time it is changed, it can be based on the block corresponding to the attribute value of the second attribute of the second account at the time of this change. High, obtain the history table of the block height corresponding to this change, and then determine the modification record of the block height corresponding to this change according to the history table of the corresponding block height at the time of this change, so as to modify The block height corresponding to the last change is determined in the record. In this way, the block height corresponding to each change of the attribute value of the second attribute of the second account is determined sequentially from high to low.
  • the received second query instruction is "query the last three modification records of Alice's Age".
  • the obtained state table t_Balance is shown in Table 9
  • the latest attribute value corresponding to Age is 40
  • the block height corresponding to the latest attribute value 40 is 800
  • the block height corresponding to 800 will be obtained.
  • History table The name of the history table is t_history_800.
  • the modification record of Alice's Age when the block height is 800 can be determined.
  • the modification record is the most recent According to the index block height 500 in the modification record, the history table corresponding to the block height 500 is obtained.
  • the table name of the history table is t_history_500. Assume that the history table corresponding to the block height 500 is shown in Table 11. Then you can determine the modification record of Alice's Age when the block height is 500. This modification record is the last-to-last modification record, and then obtain the block height 25 corresponding to the index block height 25 in the modification record. History table. The name of the history table is t_history_25. Assuming that the history table corresponding to a block height of 25 is shown in Table 14, you can determine the modification record of Alice's Age when the block height is 25. The modification record is the most recent The last three modification records of Alice’s Age can be obtained in the history table corresponding to block height 800, block height 500, and block height 25 respectively, and the last three times of Alice’s Age can be obtained. Change to 38 ⁇ 39 ⁇ 40.
  • the history table corresponding to each block height can be set, and each history table contains the attribute, attribute value, and index block height corresponding to the change account.
  • the index block height is used to indicate the upper limit of the attribute value of the modification record.
  • the block height when it was modified once, and then the history table corresponding to the block height when it was last modified is determined, and the modification record when the block height was last modified is determined from the history table corresponding to the block height when it was last modified. This cyclic process can quickly find the modification record of a certain attribute.
  • the history table provided by the embodiment of the present invention may correspond to the block height, so the history table corresponding to each block height is not too large, which further improves the query speed.
  • FIG. 5 exemplarily shows the structure of a block chain transaction record processing device provided by an embodiment of the present invention, and the device can execute the flow of the block chain transaction record processing method.
  • the device includes:
  • the obtaining unit 501 is configured to obtain a transaction to be executed; the transaction to be executed is used to change the attribute value of the first attribute of the first account;
  • the processing unit 502 is configured to determine the first attribute value of the first attribute after the execution of the transaction to be executed; update the first attribute value and the current block height to a status table; the status table records The status data of the multiple accounts.
  • the status data of the account is the latest attribute value of each attribute in the multiple attributes of the account and the block height corresponding to the latest attribute value.
  • the obtaining unit 501 is further configured to obtain the first history table corresponding to the current block height after the processing unit 502 updates the first attribute value and the current block height to the status table;
  • the first history table records the modification records of multiple change accounts of the current block height, the change account is the account to which the attribute value has changed, and the modification record of the change account includes the change
  • the attribute value of the account under the current block height is changed, the attribute value after the change, and the index block height corresponding to the attribute value after the change, and the index block height is the post-change attribute value
  • the attribute value of is the block height corresponding to the latest change before this change;
  • the processing unit 502 is further configured to use the first attribute, the first attribute value, and the index block height corresponding to the first attribute value as the first modification record of the first account, and add it to the first account.
  • a history table is further configured to use the first attribute, the first attribute value, and the index block height corresponding to the first attribute value as the first modification record of the first account, and add it to the first account.
  • processing unit 502 is further configured to:
  • the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height;
  • first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height, and determine the second account’s height in sequence from high to bottom. The corresponding block height when the attribute value of the second attribute is changed, until the first second block height that is less than the specified block height is determined;
  • the attribute value of the second attribute of the second account in the history table corresponding to the second block height is determined as the query result.
  • processing unit 502 is further configured to:
  • the latest attribute value of the second attribute in the status table is determined as the query result.
  • processing unit 502 is further configured to:
  • the second query instruction is used to obtain the latest N modification records of the second attribute of the second account
  • the N modification records are determined as the query result.
  • processing unit 502 is specifically configured to:
  • the second modification record includes the attribute value of the second attribute after the M-th change and The attribute value of the second attribute corresponds to the block height of the latest change before the Mth change.
  • each status table there are multiple status tables; the service types corresponding to each status table are different;
  • the history table corresponding to each block height records the modification record of the change account in each state table of the block height; the history table includes the identifier of each state table.
  • this application also provides a computing device.
  • the computing device includes at least one processor 620 for implementing the blocks in the related embodiments of FIGS. 1 to 4 provided by the embodiments of this application.
  • the processing method of chain transaction records are provided by the embodiments of this application.
  • the computing device 600 may also include at least one memory 630 for storing program instructions and/or data.
  • the memory 630 and the processor 620 are coupled.
  • the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the processor 620 may cooperate with the memory 630 to operate.
  • the processor 620 may execute program instructions stored in the memory 630. At least one of the at least one memory may be included in the processor.
  • each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
  • the processor in the embodiment of the present application may be an integrated circuit chip with signal processing capability.
  • the steps of the foregoing method embodiments may be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processing circuit (digital signal processor, DSP), a dedicated integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP digital signal processing circuit
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • Programming logic devices discrete gates or transistor logic devices, discrete hardware components.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electrically available Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • static random access memory static random access memory
  • dynamic RAM dynamic RAM
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory synchronous DRAM, SDRAM
  • double data rate synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
  • enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
  • synchronous connection dynamic random access memory serial DRAM, SLDRAM
  • direct rambus RAM direct rambus RAM
  • the computing device 600 may further include a communication interface 610 for communicating with other devices through a transmission medium, so that the device used in the computing device 600 can communicate with other devices.
  • the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface.
  • the transceiver when the communication interface is a transceiver, the transceiver may include an independent receiver and an independent transmitter; it may also be a transceiver with integrated transceiver functions, or an interface circuit.
  • the computing device 600 may also include a communication line 640.
  • the communication interface 610, the processor 620, and the memory 630 may be connected to each other through a communication line 640;
  • the communication line 640 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (extended industry standard architecture). , Referred to as EISA) bus and so on.
  • the communication line 640 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
  • embodiments of the present invention also provide a non-transitory computer-readable storage medium.
  • the non-transitory computer-readable storage medium stores computer instructions. When it runs on a computer, the computer executes FIGS. 1 to 1 Fig. 4 is a processing method of blockchain transaction records in a related embodiment.
  • inventions of the present application provide a computer program product.
  • the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium.
  • the computer program includes program instructions. When executed by a computer, the computer is caused to execute the blockchain transaction record processing method in the related embodiments of FIGS. 1 to 4.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Abstract

A method and apparatus for processing a blockchain transaction record. The method comprises: acquiring a transaction to be executed (101), wherein the transaction to be executed is used for changing the attribute value of a first attribute of a first account; determining a first attribute value of the first attribute after the transaction to be executed is executed (102); and updating the first attribute value and the current block height to a state table (103), wherein the state table records state data of a plurality of accounts, and the state data of each account refers to the latest attribute value of each attribute of a plurality of attributes of the account and a block height corresponding to the latest attribute value. The method is used for querying a block in which the attribute value of each attribute of an account was last changed.

Description

一种区块链交易记录的处理方法及装置Method and device for processing block chain transaction records
相关申请的交叉引用Cross-references to related applications
本申请要求在2019年12月12日提交中国专利局、申请号为201911277152.5、申请名称为“一种区块链交易记录的处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201911277152.5, and the application name is "a method and device for processing blockchain transaction records" on December 12, 2019, the entire content of which is by reference Incorporated in this application.
技术领域Technical field
本发明实施例涉及金融科技(Fintech)领域,尤其涉及一种区块链(Blockchain)交易记录的处理方法及装置。The embodiment of the present invention relates to the field of financial technology (Fintech), and in particular to a method and device for processing blockchain (Blockchain) transaction records.
背景技术Background technique
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,但由于金融行业的安全性、实时性要求,也对技术提出的更高的要求。With the development of computer technology, more and more technologies are applied in the financial field. The traditional financial industry is gradually transforming to Fintech. However, due to the security and real-time requirements of the financial industry, higher technology is also proposed. Requirements.
区块链系统中存储有状态表,该状态表用于保存各账户的最新状态数据和最新状态数据对应的块高,比如,区块链系统接收到一笔交易,导致某个账户的状态数据发生变化,则会将该账户的发生变化后的状态数据以及当前块高更新至状态表中,在后续需要查询时,可以直接从状态表中查询到导致该状态数据发生变化的交易在哪一个区块上。A state table is stored in the blockchain system. The state table is used to save the latest state data of each account and the block height corresponding to the latest state data. For example, the blockchain system receives a transaction and causes the state data of an account When a change occurs, the status data of the account after the change and the current block height will be updated to the status table. When subsequent queries are required, the status table can be directly queried from the status table to find the transaction that caused the status data to change. Block.
但现有技术中,一个账户的状态数据中有多个属性,如年龄、所在公司、家庭住址、账户余额等,每变化一次账户的某个属性值,则会更新该账户的状态数据和块高。但该多个属性中,有些属性对应的属性值的变化频率较低,比如年龄,而有些属性对应的属性值的变化频率较高,比如账户余额,但在查询时,比如当前状态表中记录的是最新一笔交易导致的某个账户的账户余额发生变化,则如果想查询该账户的年龄属性最新一次发生变化是在哪一个区块上,则不能从状态表中直接查询到,需要重放交易,以确定该账户的年龄属性最新一次发生变化所在的区块。However, in the prior art, there are multiple attributes in the status data of an account, such as age, company, home address, account balance, etc. Every time a certain attribute value of the account is changed, the status data and block of the account will be updated. high. However, among the multiple attributes, some attributes corresponding to attribute values change frequently, such as age, while some attributes corresponding to attribute values change frequently, such as account balance, but when querying, such as records in the current status table The account balance of an account changes due to the latest transaction. If you want to query the block on which the account’s age attribute was last changed, you can’t query it directly from the status table, and you need to re-check it. Place a transaction to determine the block where the age attribute of the account was last changed.
发明内容Summary of the invention
本发明实施例提供一种区块链交易记录的处理方法及装置,用以查询账户的每个属性的属性值最新一次发生变化时所在的区块。The embodiment of the present invention provides a method and device for processing block chain transaction records, which are used to query the block where the attribute value of each attribute of the account was last changed.
本发明实施例提供的一种区块链交易记录的处理方法,包括:An embodiment of the present invention provides a method for processing blockchain transaction records, including:
获取待执行交易;所述待执行交易用于变更第一账户的第一属性的属性值;Acquiring a transaction to be executed; the transaction to be executed is used to change the attribute value of the first attribute of the first account;
确定执行所述待执行交易之后的所述第一属性的第一属性值;Determining the first attribute value of the first attribute after the execution of the transaction to be executed;
将所述第一属性值和当前块高更新至状态表中;所述状态表中记录有多个账户的状态数据,账户的状态数据是所述账户的多个属性中各属性的最新属性值和所述最新属性值对应的块高。The first attribute value and the current block height are updated to the status table; the status table records the status data of multiple accounts, and the status data of the account is the latest attribute value of each attribute of the multiple attributes of the account The block height corresponding to the latest attribute value.
上述技术方案中,设置状态表中包括多个账户的状态数据,每个账户的 状态数据是该账户的多个属性中各属性的最新属性值和最新属性值对应的块高,通过该方式,可以确定出账户的每个属性的属性值最新一次被修改时所对应的块高。In the above technical solution, the setting status table includes the status data of multiple accounts, and the status data of each account is the latest attribute value of each attribute of the multiple attributes of the account and the block height corresponding to the latest attribute value. In this way, The block height corresponding to the last modification of the attribute value of each attribute of the account can be determined.
可选的,所述将所述第一属性值和当前块高更新至状态表中之后,还包括:Optionally, after updating the first attribute value and the current block height to the status table, the method further includes:
获取所述当前块高对应的第一历史表;所述第一历史表中记录有所述当前块高下的多个变更账户的修改记录,所述变更账户是属性值发生变更的属性所属的账户,所述变更账户的修改记录中包括所述变更账户在所述当前块高下的所述属性值发生变更的属性、发生变更后的属性值和所述发生变更后的属性值对应的索引块高,所述索引块高是所述发生变更后的属性值在本次变更之前的最新一次变更所对应的块高;Acquire a first history table corresponding to the current block height; the first history table records modification records of multiple change accounts under the current block height, and the change account belongs to the attribute whose attribute value has changed Account, the modification record of the changed account includes the attribute value of the changed account under the current block height, the attribute value after the change, and the index corresponding to the attribute value after the change Block height, the index block height is the block height corresponding to the latest change of the attribute value after the change before this change;
将所述第一属性、所述第一属性值和所述第一属性值对应的索引块高作为所述第一账户的第一修改记录,增加至所述第一历史表中。The first attribute, the first attribute value, and the index block height corresponding to the first attribute value are added to the first history table as the first modification record of the first account.
上述技术方案中,获取该第一历史表,并将第一属性、第一属性值和第一属性值对应的索引块高作为第一账户的第一修改记录,增加至第一历史表中,其中,该第一历史表中不记录全量数据,而是仅记录当前块高下的变更账户的修改记录,也即,只记录当前块高下的多个变更账户的修改记录,而且,一个账户对应的多个属性中,如果只有一个属性的属性值发生变化,其他属性的属性值不发生变化,则只记录该属性值发生变化的属性的修改记录,不记录属性值不发生变化的属性的记录,从而进一步减少历史表的记录数据的量。In the above technical solution, the first history table is acquired, and the first attribute, the first attribute value, and the index block height corresponding to the first attribute value are added to the first history table as the first modification record of the first account, Among them, the first history table does not record the full amount of data, but only records the modification records of the changed account at the current block level, that is, only records the modification records of multiple changed accounts at the current block level, and one account Among the corresponding multiple attributes, if the attribute value of only one attribute changes, and the attribute value of other attributes does not change, only the modification record of the attribute whose attribute value has changed is recorded, and the attribute whose attribute value does not change is not recorded. Record, thereby further reducing the amount of recorded data in the history table.
可选的,所述方法还包括:Optionally, the method further includes:
接收第一查询指令;所述第一查询指令用于获取第二账户的第二属性在指定块高上的属性值;Receiving a first query instruction; the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height;
若确定所述状态表中所述第二属性的最新属性值对应的第一块高大于所述指定块高,则从所述第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高,直至确定出第一个小于所述指定块高的第二块高;If it is determined that the first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height, and determine the second account’s height in sequence from high to bottom. The corresponding block height when the attribute value of the second attribute is changed, until the first second block height that is less than the specified block height is determined;
将所述第二块高对应的历史表中所述第二账户的第二属性的属性值确定为查询结果。The attribute value of the second attribute of the second account in the history table corresponding to the second block height is determined as the query result.
可选的,所述方法还包括:Optionally, the method further includes:
若确定所述第一块高不大于所述指定块高,则将所述状态表中所述第二属性的最新属性值确定为所述查询结果。If it is determined that the first block height is not greater than the specified block height, the latest attribute value of the second attribute in the status table is determined as the query result.
可选的,所述方法还包括:Optionally, the method further includes:
接收第二查询指令;所述第二查询指令用于获取第二账户的第二属性的最新的N次修改记录;Receiving a second query instruction; the second query instruction is used to obtain the latest N modification records of the second attribute of the second account;
从所述状态表中所述第二属性的最新属性值对应的第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高及各块高对应的所述第二账户关于所述第二属性的修改记录,直至确定出N次修改记录;Starting from the first block height corresponding to the latest attribute value of the second attribute in the status table, determine the block height and each block corresponding to the second attribute value of the second account when the attribute value of the second account is changed from high to bottom. The modification record of the second account corresponding to the high on the second attribute until N modification records are determined;
将所述N次修改记录确定为查询结果。The N modification records are determined as the query result.
可选的,所述确定所述第二账户的第二属性的属性值变更时所对应的块高,包括:Optionally, the determining the block height corresponding to the change of the attribute value of the second attribute of the second account includes:
根据所述第二账户的第二属性的属性值在第M次变更时所对应的第三块高,获取所述第三块高对应的历史表;Acquiring a history table corresponding to the third block height according to the third block height corresponding to the second attribute value of the second account at the M-th change;
从所述第三块高对应的历史表中确定所述第二账户的第二修改记录;所述第二修改记录中包括在所述第M次变更后的所述第二属性的属性值和所述第二属性的属性值在所述第M次变更之前的最新一次变更时所对应的块高。Determine the second modification record of the second account from the history table corresponding to the third block height; the second modification record includes the attribute value of the second attribute after the M-th change and The attribute value of the second attribute corresponds to the block height of the latest change before the Mth change.
上述技术方案中,可以通过设置各块高对应的历史表,且每个历史表中有变更账户对应的属性、属性值和索引块高,索引块高用于指示所在修改记录的属性值的上一次被修改时的块高,进而确定出上一次被修改时的块高对应的历史表,从上一次被修改时的块高对应的历史表中确定出上一次被修改时的修改记录,通过该循环过程,可以快速找到某个属性的修改记录,由于历史表中变更账户的修改记录中仅包括属性值发生变化的属性的信息,进一步减少历史表的记录数据的量,而且在查询的时候也是针对的某个属性的变更,该种方式可以提高查询速度。In the above technical solution, the history table corresponding to each block height can be set, and each history table contains the attribute, attribute value, and index block height corresponding to the change account. The index block height is used to indicate the upper limit of the attribute value of the modification record. The block height when it was modified once, and then the history table corresponding to the block height when it was last modified is determined, and the modification record when the block height was last modified is determined from the history table corresponding to the block height when it was last modified. This cyclic process can quickly find the modification record of a certain attribute. Because the modification record of the change account in the history table only includes the information of the attribute whose attribute value has changed, the amount of record data in the history table is further reduced, and when querying It is also for the change of a certain attribute, this method can improve the query speed.
可选的,所述状态表有多个;每个状态表对应的业务类型不同;Optionally, there are multiple status tables; the service types corresponding to each status table are different;
每个块高对应的历史表中记录有所述块高下的各个状态表中变更账户的修改记录;所述历史表中包括每个状态表的标识。The history table corresponding to each block height records the modification record of the change account in each state table of the block height; the history table includes the identifier of each state table.
上述技术方案中,提供的历史表可以是和块高对应,所以每个块高对应的历史表不会太大,而且历史表对应多个状态表中变更账户的修改记录,从而使得整个区块链系统中历史表的数量不会太多,进一步提高查询速度。In the above technical solution, the provided history table can correspond to the block height, so the history table corresponding to each block height will not be too large, and the history table corresponds to the modification record of the change account in multiple state tables, so that the entire block The number of history tables in the chain system will not be too much, which will further improve the query speed.
相应的,本发明实施例还提供了一种区块链交易记录的处理装置,包括:Correspondingly, an embodiment of the present invention also provides a processing device for blockchain transaction records, including:
获取单元,用于获取待执行交易;所述待执行交易用于变更第一账户的第一属性的属性值;An acquiring unit for acquiring a transaction to be executed; the transaction to be executed is used to change the attribute value of the first attribute of the first account;
处理单元,用于确定执行所述待执行交易之后的所述第一属性的第一属性值;将所述第一属性值和当前块高更新至状态表中;所述状态表中记录有多个账户的状态数据,账户的状态数据是所述账户的多个属性中各属性的最新属性值和所述最新属性值对应的块高。The processing unit is configured to determine the first attribute value of the first attribute after the execution of the transaction to be executed; update the first attribute value and the current block height to a status table; how much is recorded in the status table The status data of each account is the latest attribute value of each attribute among the multiple attributes of the account and the block height corresponding to the latest attribute value.
可选的,所述获取单元还用于在所述处理单元将所述第一属性值和当前块高更新至状态表中之后,获取所述当前块高对应的第一历史表;所述第一历史表中记录有所述当前块高下的多个变更账户的修改记录,所述变更账户是属性值发生变更的属性所属的账户,所述变更账户的修改记录中包括所述变更账户在所述当前块高下的所述属性值发生变更的属性、发生变更后的属性值和所述发生变更后的属性值对应的索引块高,所述索引块高是所述发生变更后的属性值在本次变更之前的最新一次变更所对应的块高;Optionally, the obtaining unit is further configured to obtain a first history table corresponding to the current block height after the processing unit updates the first attribute value and the current block height to a status table; A history table records the modification records of multiple change accounts of the current block level, the change account is the account to which the attribute value has changed, and the modification record of the change account includes the change account in The attribute value of the attribute value changed under the current block height, the attribute value after the change, and the index block height corresponding to the attribute value after the change, and the index block height is the attribute after the change The value of the block height corresponding to the latest change before this change;
所述处理单元还用于将所述第一属性、所述第一属性值和所述第一属性值对应的索引块高作为所述第一账户的第一修改记录,增加至所述第一历史表中。The processing unit is further configured to add the first attribute, the first attribute value, and the index block height corresponding to the first attribute value as the first modification record of the first account to the first History table.
可选的,所述处理单元还用于:Optionally, the processing unit is further configured to:
接收第一查询指令;所述第一查询指令用于获取第二账户的第二属性在指定块高上的属性值;Receiving a first query instruction; the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height;
若确定所述状态表中所述第二属性的最新属性值对应的第一块高大于所述指定块高,则从所述第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高,直至确定出第一个小于所述指定块高的第二块高;If it is determined that the first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height, and determine the second account’s height in sequence from high to bottom. The corresponding block height when the attribute value of the second attribute is changed, until the first second block height that is less than the specified block height is determined;
将所述第二块高对应的历史表中所述第二账户的第二属性的属性值确定为查询结果。The attribute value of the second attribute of the second account in the history table corresponding to the second block height is determined as the query result.
可选的,所述处理单元还用于:Optionally, the processing unit is further configured to:
若确定所述第一块高不大于所述指定块高,则将所述状态表中所述第二属性的最新属性值确定为所述查询结果。If it is determined that the first block height is not greater than the specified block height, the latest attribute value of the second attribute in the status table is determined as the query result.
可选的,所述处理单元还用于:Optionally, the processing unit is further configured to:
接收第二查询指令;所述第二查询指令用于获取第二账户的第二属性的最新的N次修改记录;Receiving a second query instruction; the second query instruction is used to obtain the latest N modification records of the second attribute of the second account;
从所述状态表中所述第二属性的最新属性值对应的第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高及各块高对应的所述第二账户关于所述第二属性的修改记录,直至确定出N次修改记录;Starting from the first block height corresponding to the latest attribute value of the second attribute in the status table, determine the block height and each block corresponding to the second attribute value of the second account when the attribute value of the second account is changed from high to bottom. The modification record of the second account corresponding to the high on the second attribute until N modification records are determined;
将所述N次修改记录确定为查询结果。The N modification records are determined as the query result.
可选的,所述处理单元具体用于:Optionally, the processing unit is specifically configured to:
根据所述第二账户的第二属性的属性值在第M次变更时所对应的第三块高,获取所述第三块高对应的历史表;Acquiring a history table corresponding to the third block height according to the third block height corresponding to the second attribute value of the second account at the M-th change;
从所述第三块高对应的历史表中确定所述第二账户的第二修改记录;所述第二修改记录中包括在所述第M次变更后的所述第二属性的属性值和所述第二属性的属性值在所述第M次变更之前的最新一次变更时所对应的块高。Determine the second modification record of the second account from the history table corresponding to the third block height; the second modification record includes the attribute value of the second attribute after the M-th change and The attribute value of the second attribute corresponds to the block height of the latest change before the Mth change.
可选的,所述状态表有多个;每个状态表对应的业务类型不同;Optionally, there are multiple status tables; the service types corresponding to each status table are different;
每个块高对应的历史表中记录有所述块高下的各个状态表中变更账户的修改记录;所述历史表中包括每个状态表的标识。The history table corresponding to each block height records the modification record of the change account in each state table of the block height; the history table includes the identifier of each state table.
相应的,本发明实施例还提供了一种计算设备,包括:Correspondingly, an embodiment of the present invention also provides a computing device, including:
处理器、存储器、通信接口;其中,处理器、存储器与通信接口之间通过总线连接;Processor, memory, and communication interface; among them, the processor, memory and communication interface are connected by a bus;
所述处理器,用于读取所述存储器中的程序,执行上述区块链交易记录的处理方法;The processor is configured to read the program in the memory and execute the above-mentioned method for processing blockchain transaction records;
所述存储器,用于存储一个或多个可执行程序,可以存储所述处理器在执行操作时所使用的数据。The memory is used to store one or more executable programs, and can store data used by the processor when performing operations.
相应的,本发明实施例还提供了一种非暂态计算机可读存储介质,非暂态计算机可读存储介质中存储计算机指令,当其在计算机上运行时,使得计算机执行上述区块链交易记录的处理方法。Correspondingly, the embodiment of the present invention also provides a non-transitory computer-readable storage medium, in which computer instructions are stored in the non-transitory computer-readable storage medium, and when it runs on a computer, the computer executes the above-mentioned blockchain transaction. The processing method of the record.
相应的,本发明实施例还提供一种包含指令的计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计 算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述区块链交易记录的处理方法。Correspondingly, an embodiment of the present invention also provides a computer program product containing instructions. The computer program product includes a calculation program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned blockchain transaction record processing method.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative work, other drawings can be obtained based on these drawings.
图1为本发明实施例提供的一种更新状态表的流程示意图;FIG. 1 is a schematic diagram of a process for updating a status table according to an embodiment of the present invention;
图2为本发明实施例提供的一种更新历史表的流程示意图;FIG. 2 is a schematic flowchart of an update history table provided by an embodiment of the present invention;
图3为本发明实施例提供的一种查询特定块高的属性值的流程示意图;FIG. 3 is a schematic diagram of a process for querying the attribute value of a specific block height according to an embodiment of the present invention;
图4为本发明实施例提供的一种查询某个属性的修改记录的流程示意图;4 is a schematic diagram of a flow chart for querying a modification record of a certain attribute according to an embodiment of the present invention;
图5为本发明实施例提供的一种区块链交易记录的处理装置的结构示意图;FIG. 5 is a schematic structural diagram of a processing device for blockchain transaction records according to an embodiment of the present invention;
图6为本申请提供的一种计算设备的结构示意图。FIG. 6 is a schematic structural diagram of a computing device provided by this application.
具体实施方式Detailed ways
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
本发明实施例提供区块链交易记录的处理方法适用于区块链系统,区块链系统是由多个区块链节点组成的P2P(Peer to Peer,对等)网络,区块链节点之间可以互相直接通信。一个区块链节点产生的数据,可以同时向多个区块链节点发送广播,也可以向其他任意节点查询和获取数据。The method for processing blockchain transaction records provided by the embodiment of the present invention is applicable to a blockchain system. The blockchain system is a P2P (Peer to Peer) network composed of multiple blockchain nodes. Can communicate directly with each other. The data generated by a blockchain node can be broadcast to multiple blockchain nodes at the same time, and it can also query and obtain data from any other node.
区块链系统中存在状态表,状态表是由与之相同业务类型的智能合约创建的,也即区块链系统中可以存在多个状态表,每个状态表对应不同的业务类型。There is a state table in the blockchain system, and the state table is created by a smart contract of the same business type, that is, there can be multiple state tables in the blockchain system, and each state table corresponds to a different business type.
针对一个状态表来说,该状态表中记录有多个账户的状态数据,其中,任一个账户的状态数据是该账户的多个属性中各属性的最新属性值和最新属性值对应的块高。状态表的索引Key为SHA256(表名+“_”+主键),以保证全局唯一性,每个属性都对应有块高,用于记录该属性对应的属性值在上一次被修改时的块高。For a status table, the status data of multiple accounts are recorded in the status table, where the status data of any account is the latest attribute value of each attribute of the multiple attributes of the account and the block height corresponding to the latest attribute value . The index Key of the state table is SHA256 (table name + "_" + primary key) to ensure global uniqueness. Each attribute corresponds to a block height, which is used to record the block when the attribute value corresponding to the attribute was modified last time high.
比如,状态表的表名为“t_Balance”,状态表中包括账户Alice、Bob、Henry,每个账户的属性有Balance(账户余额)和Age(年龄),状态表可以如表1所示。以Alice为例,状态表的索引Key为SHA256(“t_Balance_Alice”),Alice对应的Balance的最新值为100,对应的上一次被修改时的块高为2;Alice对应的Age的最新值为37,对应的上一次被修改时的块高为2。For example, the name of the state table is "t_Balance", and the state table includes accounts Alice, Bob, and Henry. The attributes of each account are Balance (account balance) and Age (age). The state table can be as shown in Table 1. Take Alice as an example, the index Key of the state table is SHA256 ("t_Balance_Alice"), the latest value of Balance corresponding to Alice is 100, and the corresponding block height when last modified is 2; the latest value of Age corresponding to Alice is 37 , The corresponding block height is 2.
表1Table 1
Figure PCTCN2020127877-appb-000001
Figure PCTCN2020127877-appb-000001
通过本发明实施例提供的状态表,可以确定出账户的每个属性的最新属性值在上一次被修改时所对应的块高。Through the status table provided by the embodiment of the present invention, the block height corresponding to the latest attribute value of each attribute of the account can be determined when it was modified last time.
图1示例性的示出了本发明实施例提供的一种区块链交易记录的处理方法的流程,该流程可以由区块链交易记录的处理装置执行。FIG. 1 exemplarily shows the flow of a method for processing blockchain transaction records provided by an embodiment of the present invention, and the flow may be executed by a processing device for blockchain transaction records.
如图1所示,该流程具体包括:As shown in Figure 1, the process specifically includes:
步骤101,获取待执行交易;Step 101: Obtain a transaction to be executed;
步骤102,确定执行待执行交易之后的第一属性的第一属性值;Step 102: Determine the first attribute value of the first attribute after executing the transaction to be executed;
步骤103,将第一属性值和当前块高更新至状态表中。Step 103: Update the first attribute value and the current block height to the status table.
本发明实施例中,待执行交易用于变更第一账户的第一属性的属性值,执行该待执行交易后该第一属性的属性值变为第一属性值。以表1为例,在当前块高为25的时候,获取到一笔为“Alice的Balance增加400、Alice的Age增加1”的待执行交易时,则Alice即为第一账户,Balance和Age均为第一属性,执行完成该笔交易后,Alice的Balance会变为500,则500即为第一属性值,同样,Alice的Age会变为38,则38也为第一属性值。在将500和38和当前块高分别更新至状态表中时,则将原表1中的Alice主键对应的Balance_Blocknum变为25,Alice主键对应的Balance变为500;Alice主键对应的Age–Blocknum变为25,Alice主键对应的Age变为38,更新后的表1可以如表2所示。In the embodiment of the present invention, the transaction to be executed is used to change the attribute value of the first attribute of the first account, and the attribute value of the first attribute becomes the first attribute value after the transaction to be executed is executed. Take Table 1 as an example. When the current block height is 25, when a pending transaction of "Alice's Balance increases by 400 and Alice's Age increases by 1" is obtained, Alice is the first account, Balance and Age Both are the first attribute. After the transaction is executed, Alice's Balance will become 500, which is the first attribute value. Similarly, Alice's Age will become 38, and 38 is the first attribute value. When 500 and 38 and the current block height are updated to the status table respectively, the Balance_Blocknum corresponding to the Alice primary key in the original table 1 is changed to 25, and the Balance corresponding to the Alice primary key is changed to 500; the Age-Blocknum corresponding to the Alice primary key is changed. If it is 25, the Age corresponding to Alice's primary key becomes 38, and the updated Table 1 can be as shown in Table 2.
表2Table 2
Figure PCTCN2020127877-appb-000002
Figure PCTCN2020127877-appb-000002
本发明实施例中,为实现可以查询每个账户的每个属性的历史属性值,比如查询在特定块高上的某个账户的某个属性的属性值,还可以设置历史表, 用于记录账户的属性的修改记录。In the embodiment of the present invention, in order to realize that the historical attribute value of each attribute of each account can be queried, such as querying the attribute value of a certain attribute of a certain account at a specific block height, a history table can also be set for recording The modification record of the account's attributes.
一种实现方式中,可以是在创建某个状态表时,确定是否生成该状态表对应的历史表。具体的,当执行创建状态表的时候,传入的创建指令中包括是否生成历史表,其中,对不关注历史数据的,可以不生成历史表,以减少存储开销。在区块链数据库里,可以记录一条状态表的创建记录,用于表征是否创建了该状态表对应的历史表,该创建记录也可以是以表的形式存储,如表3所示,可以包括状态表的表名和是否生成历史表。In an implementation manner, when a certain state table is created, it is determined whether to generate a history table corresponding to the state table. Specifically, when performing the creation of the state table, the incoming creation instruction includes whether to generate a history table. For those who do not care about historical data, the history table may not be generated to reduce storage overhead. In the blockchain database, a creation record of a status table can be recorded to indicate whether the history table corresponding to the status table has been created. The creation record can also be stored in the form of a table, as shown in Table 3, which can include The name of the state table and whether to generate a history table.
表3table 3
状态表的表名Table name of the state table 是否生成历史修改记录表Whether to generate historical modification record table
t_Balancet_Balance TrueTrue
t_Membert_Member TrueTrue
t_Ordert_Order FalseFalse
另一种实现方式中,在创建某个状态表时,确定是否将该状态表对应的修改记录写入历史表,也就是说,此处的历史表是预先创建好的,会将多个状态表对应的修改记录写入该历史表中。具体的,当执行创建状态表的时候,传入的创建指令中包括是否将修改记录写入历史表,其中,对不关注历史数据的,可以不将修改记录写入历史表,以减少存储开销。在区块链数据库里,可以记录一条状态表的创建记录,用于表征是否将该状态表的修改记录写入历史表,该创建记录也可以是以表的形式存储,如表4所示,可以包括状态表的表名和是否将修改记录写入历史表。In another implementation, when a state table is created, it is determined whether to write the modification record corresponding to the state table into the history table. That is to say, the history table here is pre-created, and multiple states The modification record corresponding to the table is written into the history table. Specifically, when the creation of the state table is executed, the incoming creation instruction includes whether to write the modification record into the history table. For those who do not care about historical data, the modification record may not be written into the history table to reduce storage overhead. . In the blockchain database, a creation record of a status table can be recorded to indicate whether the modification record of the status table is written into the history table. The creation record can also be stored in the form of a table, as shown in Table 4. It can include the table name of the status table and whether to write the modification record into the history table.
表4Table 4
状态表的表名Table name of the state table 是否将修改记录写入历史表Whether to write modification records into the history table
t_Balancet_Balance TrueTrue
t_Membert_Member TrueTrue
t_Ordert_Order FalseFalse
本发明实施例中,可以是设置每个块高对应一个历史表,历史表的表名可以根据块高进行标识,如“t_history_块高”。每个块高对应的历史表中不记录全量数据,而是仅记录对应块高下的变更账户的修改记录。可以如下所示,每个历史表的结构相同,从而建立多个历史表的链式数据关系。In the embodiment of the present invention, each block height may be set to correspond to a history table, and the table name of the history table may be identified according to the block height, such as "t_history_block height". The history table corresponding to each block height does not record the full amount of data, but only records the modification record of the change account corresponding to the block height. As shown below, the structure of each history table is the same, thereby establishing a chained data relationship of multiple history tables.
Figure PCTCN2020127877-appb-000003
Figure PCTCN2020127877-appb-000003
本发明实施例中,由于状态表可以有多个,且每个状态表对应的业务类型不同,在将各状态表的变更账户的修改记录写入至同一个历史表中时,可以是根据状态表的标识进行区分,历史表中包括每个状态表的标识,如每个状态表的表名称。每个块高对应的历史表中记录有该块高下的各个状态表中变更账户的修改记录。In the embodiment of the present invention, since there can be multiple status tables, and each status table corresponds to a different business type, when the modification records of the change accounts of each status table are written into the same history table, it can be based on the status. The identification of the table is distinguished, and the history table includes the identification of each state table, such as the table name of each state table. The history table corresponding to each block height records the modification record of the change account in each state table of the block height.
历史表中记录有对应块高下的多个变更账户的修改记录,其中,变更账 户即理解为对应块高下的属性值发生变更的属性所属的账户,变更账户的修改记录中包括变更账户在对应块高下的该属性值发生变更的属性、发生变更后的属性值和发生变更后的属性值对应的索引块高,索引块高是发生变更后的属性值在本次变更之前的最新一次变更所对应的块高。The history table records the modification records of multiple change accounts corresponding to the block level. Among them, the change account is understood as the account to which the attribute value of the corresponding block level is changed. The modification record of the changed account includes the change account in The attribute value of the corresponding block height changed, the attribute value after the change, and the index block height corresponding to the attribute value after the change. The index block height is the latest value of the attribute value after the change before the change Change the corresponding block height.
历史表中可以包括的字段有状态表的主键、属性、属性值、属性值的索引块高。当是多个状态表对应一个历史表时,该历史表的字段中还包括对应的状态表的标识,如状态表的表名,相应的,该历史表的索引Key为SHA256(状态表的表名+“_”+状态表的主键+“_”+属性)。The fields that can be included in the history table include the primary key, attribute, attribute value, and index block height of the attribute value of the state table. When multiple state tables correspond to a history table, the field of the history table also includes the identifier of the corresponding state table, such as the table name of the state table. Correspondingly, the index Key of the history table is SHA256 (the table of the state table). Name + "_" + primary key of the state table + "_" + attributes).
比如,历史表的表名为“t_history_10”,即块高10时对应的历史表,该历史表可以如表5。该历史表中包括账户Bob、Henry,以Bob为例,历史表的索引Key为SHA256(“t_Balance_Bob_Balance”),状态表t_Balance中Bob的Balance在块高10时的值为200,上一次变更是在块高8时发生的。For example, the table name of the history table is "t_history_10", that is, the history table corresponding to the block height of 10, and the history table can be as shown in Table 5. The history table includes the accounts Bob and Henry. Take Bob as an example. The index Key of the history table is SHA256 ("t_Balance_Bob_Balance"). The value of Bob's Balance in the state table t_Balance at block height 10 is 200. The last change was Occurs when the block is 8 high.
表5table 5
Figure PCTCN2020127877-appb-000004
Figure PCTCN2020127877-appb-000004
基于上述描述,本发明实施例在将第一属性值和当前块高更新至状态表中之后,还可以将对应的修改记录更新至对应的历史表中。具体实现中,可以如图2示出的流程图。Based on the foregoing description, in the embodiment of the present invention, after the first attribute value and the current block height are updated to the status table, the corresponding modification record may also be updated to the corresponding history table. In specific implementation, the flowchart shown in FIG. 2 can be used.
步骤201,获取当前块高对应的第一历史表;Step 201: Obtain a first history table corresponding to the current block height;
步骤202,将第一属性、第一属性值和第一属性值对应的索引块高作为第一账户的第一修改记录,增加至第一历史表中。Step 202: Add the first attribute, the first attribute value, and the index block height corresponding to the first attribute value as the first modification record of the first account to the first history table.
此处,第一历史表即当前块高下对应的历史表,该第一历史表中记录有当前块高下的多个变更账户的修改记录,变更账户是属性值发生变更的属性所属的账户,变更账户的修改记录中包括变更账户在当前块高下的属性值发生变更的属性、发生变更后的属性值和发生变更后的属性值对应的索引块高,索引块高是发生变更后的属性值在上一次变更时所对应的块高。Here, the first history table is the history table corresponding to the current block height. The first history table records the modification records of multiple change accounts of the current block height. The change account is the account to which the attribute whose attribute value is changed belongs. , The modification record of the changed account includes the attribute value of the changed account under the current block height, the attribute value after the change, and the index block height corresponding to the attribute value after the change. The index block height is after the change The block height corresponding to the last time the attribute value was changed.
仍以上述获取到一笔为“Alice的Balance增加400、Alice的Age增加1”的交易继续举例,在执行完成上述交易后,不仅将状态表中Alice的主键对应的Balance–Blocknum、Alice主键对应的Balance、Alice的主键对应的Age–Blocknum、Alice主键对应的Age更新,还会在块高为25的历史表中增加两个条修改记录,分别是“状态表t_Balance中Alice的Balance在块高25时的 值为500,上一次修改是在块高2时修改的”,以及“状态表t_Balance中Alice的Age在块高25时的值为38,上一次修改是在块高2时修改的”,在历史表t_history_25中新增两条修改记录可以如表6所示。Still taking the above example of a transaction that is "Alice's Balance increases by 400 and Alice's Age increases by 1", after the execution of the above transaction, not only the Balance–Blocknum corresponding to the primary key of Alice in the state table, and the primary key of Alice are corresponding The Age-Blocknum corresponding to the primary key of Alice and the Age update corresponding to the primary key of Alice will also add two modification records in the history table with a block height of 25, which are "Alice's Balance in the state table t_Balance is in the block height The value at 25 is 500, and the last modification was modified at block height 2." and "Alice’s Age in the state table t_Balance has a value of 38 at block height 25. The last modification was modified at block height 2. ", adding two new modification records to the history table t_history_25 can be as shown in Table 6.
表6Table 6
Figure PCTCN2020127877-appb-000005
Figure PCTCN2020127877-appb-000005
本发明实施例中,如果是新增一个账户的状态数据,则相当于在状态表中增加一条数据,比如,在当前块高为70的时候,在状态表t_Balance中增加Adam的状态数据,则将表2的状态表t_Balance更新为表7所示。同时还会在历史表t_history_70中新增两条修改记录,新增的两条修改记录可以如表8所示,其中,prevblocknum为-1指的是该修改记录对应的账户的状态数据是新增的。In the embodiment of the present invention, if the status data of an account is newly added, it is equivalent to adding a piece of data to the status table. For example, when the current block height is 70, the status data of Adam is added to the status table t_Balance, then The status table t_Balance of Table 2 is updated as shown in Table 7. At the same time, two new modification records will be added to the history table t_history_70. The two new modification records can be shown in Table 8. Among them, prevblocknum of -1 means that the status data of the account corresponding to the modification record is newly added. of.
表7Table 7
Figure PCTCN2020127877-appb-000006
Figure PCTCN2020127877-appb-000006
表8Table 8
Figure PCTCN2020127877-appb-000007
Figure PCTCN2020127877-appb-000007
Figure PCTCN2020127877-appb-000008
Figure PCTCN2020127877-appb-000008
上述实施例中,获取该第一历史表,并将第一属性、第一属性值和第一属性值对应的索引块高作为第一账户的第一修改记录,增加至第一历史表中,其中,该第一历史表中不记录全量数据,而是仅记录当前块高下的变更账户的修改记录,也即,只记录当前块高下的多个变更账户的修改记录,而且,如果一个账户对应的多个属性中,如果只有一个属性的属性值发生变化,其他属性的属性值不发生变化,则只记录该属性值发生变化的属性的修改记录,不记录属性值不发生变化的属性的记录,从而进一步减少历史表的记录数据的量。In the above embodiment, the first history table is obtained, and the first attribute, the first attribute value, and the index block height corresponding to the first attribute value are added to the first history table as the first modification record of the first account. Among them, the first history table does not record the full amount of data, but only records the modification records of the change account of the current block level, that is, only records the modification records of multiple change accounts under the current block level, and if one Among the multiple attributes corresponding to the account, if the attribute value of only one attribute changes, and the attribute value of other attributes does not change, only the modification record of the attribute whose attribute value has changed is recorded, and the attribute whose attribute value does not change is not recorded. , Thereby further reducing the amount of data recorded in the history table.
一种实现方式中,可以支持查询账户的某个属性在指定块高上的属性值。In one implementation, it can support querying the attribute value of a certain attribute of the account at a specified block height.
如图3中,示例性的示出了本发明实施例提供的一种特定块高的属性值的查询方式,具体流程包括:As shown in Figure 3, an exemplary method for querying attribute values of a specific block height provided by an embodiment of the present invention is shown. The specific process includes:
步骤301,接收第一查询指令;Step 301: Receive a first query instruction;
步骤302,若确定状态表中第二属性的最新属性值对应的第一块高大于指定块高,则从第一块高开始,从高到底依次确定第二账户的第二属性的属性值变更时所对应的块高,直至确定出第二块高;Step 302: If it is determined that the first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height and determine the attribute value change of the second attribute of the second account in sequence from the high to the bottom. The block height corresponding to the time, until the second block height is determined;
步骤303,将第二块高对应的历史表中第二账户的第二属性的属性值确定为查询结果。Step 303: Determine the attribute value of the second attribute of the second account in the history table corresponding to the second block height as the query result.
本发明实施例中,第一查询指令用于获取第二账户的第二属性在指定块高上的属性值,在接收到第一查询指令后,先从状态表中确定第二属性的最新属性值对应的第一块高,此处,第一块高即第二属性的最新属性值所对应的块高,也即是第二属性的属性值在最新一次修改时所在的块高,若第一块高大于指定块高,则从第一块高开始,从高到低依次确定该第二账户的第二属性的属性值在每次变更时所对应的块高,直至确定出第一个小于该指定块高的块高,并将该块高对应的历史表中的第二账户的第二属性的属性值确定为查询结果。In the embodiment of the present invention, the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height. After the first query instruction is received, the latest attribute of the second attribute is determined from the status table. The first block height corresponding to the value, here, the first block height is the block height corresponding to the latest attribute value of the second attribute, that is, the block height where the attribute value of the second attribute was last modified. If a block height is greater than the specified block height, start from the first block height, and determine the block height corresponding to the second attribute value of the second account at each change from high to low, until the first one is determined The block height is less than the specified block height, and the attribute value of the second attribute of the second account in the history table corresponding to the block height is determined as the query result.
此外,从状态表中确定第二属性的最新属性值对应的第一块高之后,若确定第一块高不大于指定块高,则可以确定在该指定块高之前的该第二账户的第二属性的属性值的最新一次变更后的值即为第二属性的最新属性值,也就可以将该第二属性的最新属性值作为查询结果。In addition, after the first block height corresponding to the latest attribute value of the second attribute is determined from the status table, if it is determined that the first block height is not greater than the specified block height, the second account's first block height before the specified block height can be determined. The value after the latest change of the attribute value of the second attribute is the latest attribute value of the second attribute, and the latest attribute value of the second attribute can be used as the query result.
本发明实施例中,在确定第二账户的第二属性的属性值在每次变更时所对应的块高时,可以是根据第二账户的第二属性的属性值在第M次变更时所对应的第三块高,获取第三块高对应的历史表;再从第三块高对应的历史表中确定第二账户的第二修改记录;其中,该第二修改记录中包括在第M次变更后的第二属性的属性值和该第二属性的属性值在第M次变更之前的最新一次变更时所对应的块高(相当于第M次变更后的第二属性的属性值的索引块高)。也就是说,在确定第二账户的第二属性的属性值在每次变更时所对应的 块高时,可以是根据第二账户的第二属性的属性值在本次变更时所对应的块高,获取本次变更时所对应的块高的历史表,进而根据本次变更时所对应的块高的历史表,从中确定出本次变更时所对应的块高的修改记录,以从修改记录中确定上一次变更时所对应的块高。通过该方式,从高到低依次确定出第二账户的第二属性的属性值在每次变更时所对应的块高。In the embodiment of the present invention, when determining the block height corresponding to the attribute value of the second attribute of the second account at each change, it may be based on the attribute value of the second attribute of the second account at the M-th change. Corresponding to the third block height, obtain the history table corresponding to the third block height; then determine the second modification record of the second account from the history table corresponding to the third block height; wherein, the second modification record is included in the Mth block The attribute value of the second attribute after the second change and the corresponding block height of the attribute value of the second attribute at the latest change before the Mth change (equivalent to the value of the attribute value of the second attribute after the Mth change) Index block height). That is to say, when determining the block height corresponding to the attribute value of the second attribute of the second account each time it is changed, it can be based on the block corresponding to the attribute value of the second attribute of the second account at the time of this change. High, obtain the history table of the block height corresponding to this change, and then determine the modification record of the block height corresponding to this change according to the history table of the corresponding block height at the time of this change, so as to modify The block height corresponding to the last change is determined in the record. In this way, the block height corresponding to each change of the attribute value of the second attribute of the second account is determined sequentially from high to low.
为了更好的说明本发明实施例,仅以账户Alice为例,比如,接收到的第一查询指令是“查询Alice在块高520上的Age”,假设,当前块高为10000。则获取到的状态表t_Balance如表9所示,读取该状态表t_Balance后确定Age对应的最新属性值的块高为800,大于520,则会获取块高800对应的历史表,历史表的表名即为t_history_800,假设块高800对应的历史表如表10所示,则可以确定Alice的Age在块高为500有过更新的,且块高500小于块高520,则确定块高500处更新后的Age的取值即为待查询的值,则获取块高500对应的历史表,历史表的表名即为t_history_500,假设块高500对应的历史表如表11所示,则可以确定Alice的Age在块高为500处的取值为39,也即待查询值为39。In order to better illustrate the embodiment of the present invention, only the account Alice is taken as an example. For example, the first query instruction received is "Query Alice's Age at block height 520", assuming that the current block height is 10000. Then the obtained state table t_Balance is shown in Table 9. After reading the state table t_Balance, it is determined that the block height of the latest attribute value corresponding to Age is 800. If it is greater than 520, the history table corresponding to the block height of 800 will be obtained. The table name is t_history_800. Assuming that the history table corresponding to the block height 800 is shown in Table 10, it can be determined that Alice's Age has been updated when the block height is 500, and the block height 500 is less than the block height 520, then the block height is determined to be 500 The updated Age value is the value to be queried, then the history table corresponding to the block height 500 is obtained. The table name of the history table is t_history_500. Assuming that the history table corresponding to the block height 500 is as shown in Table 11, you can It is determined that the value of Alice's Age at the block height of 500 is 39, that is, the value to be queried is 39.
表9Table 9
Figure PCTCN2020127877-appb-000009
Figure PCTCN2020127877-appb-000009
表10Table 10
Figure PCTCN2020127877-appb-000010
Figure PCTCN2020127877-appb-000010
表11Table 11
Figure PCTCN2020127877-appb-000011
Figure PCTCN2020127877-appb-000011
上述例子中,假设块高800对应的历史表如表12所示,则可以确定Alice的Age在块高为530有过更新的,且块高530大于块高520,则获取块高530对应的历史表,历史表的表名即为t_history_530,假设块高530对应的历史 表如表13所示,则可以确定Alice的Age在块高为25处有过更新的,且块高25不大于块高520,则确定块高25处更新后的Age的取值即为待查询的值,则获取块高25对应的历史表,历史表的表名即为t_history_25,假设块高25对应的历史表如表14所示,则可以确定Alice的Age在块高为25处的取值为38,也即待查询值为38。In the above example, assuming that the history table corresponding to the block height of 800 is as shown in Table 12, it can be determined that Alice's Age has been updated when the block height is 530, and the block height 530 is greater than the block height 520, then the corresponding block height 530 is obtained History table. The name of the history table is t_history_530. Assuming that the history table corresponding to the block height 530 is shown in Table 13, it can be determined that Alice's Age has been updated at the block height of 25, and the block height of 25 is not greater than the block. If the height is 520, it is determined that the updated Age value at the block height of 25 is the value to be queried, and then the history table corresponding to the block height of 25 is obtained. The table name of the history table is t_history_25, assuming the history table corresponding to the block height of 25 As shown in Table 14, it can be determined that the value of Alice's Age at the block height of 25 is 38, that is, the value to be queried is 38.
表12Table 12
Figure PCTCN2020127877-appb-000012
Figure PCTCN2020127877-appb-000012
表13Table 13
Figure PCTCN2020127877-appb-000013
Figure PCTCN2020127877-appb-000013
表14Table 14
Figure PCTCN2020127877-appb-000014
Figure PCTCN2020127877-appb-000014
上述例子中,假设获取到的状态表t_Balance如表15所示,读取该状态表t_Balance后确定Age对应的最新属性值的块高为500,不大于520,则可以确定块高500对应的Age的取值40即为待查询数据。In the above example, assuming that the obtained state table t_Balance is shown in Table 15, after reading the state table t_Balance, it is determined that the block height of the latest attribute value corresponding to Age is 500 and not greater than 520, then the Age corresponding to the block height of 500 can be determined The value of 40 is the data to be queried.
表15Table 15
Figure PCTCN2020127877-appb-000015
Figure PCTCN2020127877-appb-000015
另一种实现方式中,还可以支持查询账户的某个属性的最近几次修改记 录。如图4中,示例性的示出了本发明实施例提供的一种查询某个属性的多次修改记录的方式,具体流程包括:In another implementation, it can also support querying the recent modification records of a certain attribute of the account. As shown in Fig. 4, a method for querying multiple modification records of a certain attribute provided by an embodiment of the present invention is exemplarily shown. The specific process includes:
步骤401,接收第二查询指令;Step 401: Receive a second query instruction;
步骤402,从状态表中第二属性的最新属性值对应的第一块高开始,从高到底依次确定第二账户的第二属性的属性值变更时所对应的块高及各块高对应的第二账户关于第二属性的修改记录,直至确定出N次修改记录;Step 402: Starting from the first block height corresponding to the latest attribute value of the second attribute in the status table, sequentially determine the block height corresponding to the second attribute value change of the second account and the corresponding block height from the high to the bottom. The modification record for the second attribute of the second account until N modification records are determined;
步骤403,将N次修改记录确定为查询结果。Step 403: Determine N modification records as the query result.
本发明实施例中,第二查询指令用于获取第二账户的第二属性的最新的N次修改记录,在接收到第二查询指令后,先从状态表中确定第二属性的最新属性值对应的第一块高,此处,第一块高即第二属性的最新属性值所对应的块高,也即是第二属性的属性值在最新一次修改时所在的块高,从第一块高开始,从高到低依次确定该第二账户的第二属性的属性值在每次变更时所对应的块高,并在每次确定出第二账户的第二属性的属性值在变更时所对应的块高时,同时获取该块高对应的历史表,以从中获取到此次变更时对应的修改记录,直至确定出N次修改记录,并将该N次修改记录确定为查询结果。In the embodiment of the present invention, the second query instruction is used to obtain the latest N modification records of the second attribute of the second account. After the second query instruction is received, the latest attribute value of the second attribute is determined from the status table. Corresponding to the first block height, here, the first block height is the block height corresponding to the latest attribute value of the second attribute, that is, the block height where the attribute value of the second attribute was last modified. Starting from the block height, determine from high to low the block height corresponding to the second attribute value of the second account each time it is changed, and each time it is determined that the second attribute value of the second account is changing When the block height corresponding to the time is high, the history table corresponding to the block height is obtained at the same time to obtain the modification record corresponding to this change until the N modification record is determined, and the N modification record is determined as the query result .
本发明实施例中,在确定第二账户的第二属性的属性值在每次变更时所对应的块高时,可以是根据第二账户的第二属性的属性值在第M次变更时所对应的第三块高,获取第三块高对应的历史表;再从第三块高对应的历史表中确定第二账户的第二修改记录;其中,该第二修改记录中包括在第M次变更后的第二属性的属性值和该第二属性的属性值在第M次变更之前的最新一次变更时所对应的块高(相当于第M次变更后的第二属性的属性值的索引块高)。也就是说,在确定第二账户的第二属性的属性值在每次变更时所对应的块高时,可以是根据第二账户的第二属性的属性值在本次变更时所对应的块高,获取本次变更时所对应的块高的历史表,进而根据本次变更时所对应的块高的历史表,从中确定出本次变更时所对应的块高的修改记录,以从修改记录中确定上一次变更时所对应的块高。通过该方式,从高到低依次确定出第二账户的第二属性的属性值在每次变更时所对应的块高。In the embodiment of the present invention, when determining the block height corresponding to the attribute value of the second attribute of the second account at each change, it may be based on the attribute value of the second attribute of the second account at the M-th change. Corresponding to the third block height, obtain the history table corresponding to the third block height; then determine the second modification record of the second account from the history table corresponding to the third block height; wherein, the second modification record is included in the Mth block The attribute value of the second attribute after the second change and the corresponding block height of the attribute value of the second attribute at the latest change before the Mth change (equivalent to the value of the attribute value of the second attribute after the Mth change) Index block height). That is to say, when determining the block height corresponding to the attribute value of the second attribute of the second account each time it is changed, it can be based on the block corresponding to the attribute value of the second attribute of the second account at the time of this change. High, obtain the history table of the block height corresponding to this change, and then determine the modification record of the block height corresponding to this change according to the history table of the corresponding block height at the time of this change, so as to modify The block height corresponding to the last change is determined in the record. In this way, the block height corresponding to each change of the attribute value of the second attribute of the second account is determined sequentially from high to low.
比如,接收到的第二查询指令是“查询Alice的Age的最近三次修改记录”。假设,获取到的状态表t_Balance如表9所示,读取该状态表t_Balance后确定Age对应的最新属性值为40,最新属性值40对应的块高为800,则会获取块高800对应的历史表,该历史表的表名即为t_history_800,假设块高800对应的历史表如表10所示,则可以确定出Alice的Age在块高为800时的修改记录,该修改记录为目前最近的一次修改记录,进而根据该条修改记录中的索引块高500获取块高500对应的历史表,该历史表的表名即为t_history_500,假设块高500对应的历史表如表11所示,则可以确定出Alice的Age在块高为500时的修改记录,该修改记录为目前最近的倒数第二次修改记录,进而再根据该条修改记录中的索引块高25获取块高25对应的历史表,该历史表的表名即为t_history_25,假设块高25对应的历史表如表14所示,则可以确定出Alice的Age在块高为25时的修改记录,该修改记录为目前最近的倒数第三次修改记录,从而获取到该Alice的Age的最近三次修改记 录,分别在块高800、块高500、块高25对应的历史表中,而且可以获取到Alice的Age的最近三次变更为38→39→40。For example, the received second query instruction is "query the last three modification records of Alice's Age". Assuming that the obtained state table t_Balance is shown in Table 9, after reading the state table t_Balance, it is determined that the latest attribute value corresponding to Age is 40, and the block height corresponding to the latest attribute value 40 is 800, and the block height corresponding to 800 will be obtained. History table. The name of the history table is t_history_800. Assuming that the history table corresponding to the block height of 800 is shown in Table 10, the modification record of Alice's Age when the block height is 800 can be determined. The modification record is the most recent According to the index block height 500 in the modification record, the history table corresponding to the block height 500 is obtained. The table name of the history table is t_history_500. Assume that the history table corresponding to the block height 500 is shown in Table 11. Then you can determine the modification record of Alice's Age when the block height is 500. This modification record is the last-to-last modification record, and then obtain the block height 25 corresponding to the index block height 25 in the modification record. History table. The name of the history table is t_history_25. Assuming that the history table corresponding to a block height of 25 is shown in Table 14, you can determine the modification record of Alice's Age when the block height is 25. The modification record is the most recent The last three modification records of Alice’s Age can be obtained in the history table corresponding to block height 800, block height 500, and block height 25 respectively, and the last three times of Alice’s Age can be obtained. Change to 38→39→40.
上述实施例中,可以通过设置各块高对应的历史表,且每个历史表中有变更账户对应的属性、属性值和索引块高,索引块高用于指示所在修改记录的属性值的上一次被修改时的块高,进而确定出上一次被修改时的块高对应的历史表,从上一次被修改时的块高对应的历史表中确定出上一次被修改时的修改记录,通过该循环过程,可以快速找到某个属性的修改记录,由于历史表中变更账户的修改记录中仅包括属性值发生变化的属性的信息,进一步减少历史表的记录数据的量,而且在查询的时候也是针对的某个属性的变更,该种方式可以提高查询速度。本发明实施例提供的历史表可以是和块高对应,所以每个块高对应的历史表不会太大,进一步提高查询速度。In the above embodiment, the history table corresponding to each block height can be set, and each history table contains the attribute, attribute value, and index block height corresponding to the change account. The index block height is used to indicate the upper limit of the attribute value of the modification record. The block height when it was modified once, and then the history table corresponding to the block height when it was last modified is determined, and the modification record when the block height was last modified is determined from the history table corresponding to the block height when it was last modified. This cyclic process can quickly find the modification record of a certain attribute. Because the modification record of the change account in the history table only includes the information of the attribute whose attribute value has changed, the amount of record data in the history table is further reduced, and when querying It is also for the change of a certain attribute, this method can improve the query speed. The history table provided by the embodiment of the present invention may correspond to the block height, so the history table corresponding to each block height is not too large, which further improves the query speed.
基于同一发明构思,图5示例性的示出了本发明实施例提供的一种区块链交易记录的处理装置的结构,该装置可以执行区块链交易记录的处理方法的流程。Based on the same inventive concept, FIG. 5 exemplarily shows the structure of a block chain transaction record processing device provided by an embodiment of the present invention, and the device can execute the flow of the block chain transaction record processing method.
所述装置包括:The device includes:
获取单元501,用于获取待执行交易;所述待执行交易用于变更第一账户的第一属性的属性值;The obtaining unit 501 is configured to obtain a transaction to be executed; the transaction to be executed is used to change the attribute value of the first attribute of the first account;
处理单元502,用于确定执行所述待执行交易之后的所述第一属性的第一属性值;将所述第一属性值和当前块高更新至状态表中;所述状态表中记录有多个账户的状态数据,账户的状态数据是所述账户的多个属性中各属性的最新属性值和所述最新属性值对应的块高。The processing unit 502 is configured to determine the first attribute value of the first attribute after the execution of the transaction to be executed; update the first attribute value and the current block height to a status table; the status table records The status data of the multiple accounts. The status data of the account is the latest attribute value of each attribute in the multiple attributes of the account and the block height corresponding to the latest attribute value.
可选的,所述获取单元501还用于在所述处理单元502将所述第一属性值和当前块高更新至状态表中之后,获取所述当前块高对应的第一历史表;所述第一历史表中记录有所述当前块高下的多个变更账户的修改记录,所述变更账户是属性值发生变更的属性所属的账户,所述变更账户的修改记录中包括所述变更账户在所述当前块高下的所述属性值发生变更的属性、发生变更后的属性值和所述发生变更后的属性值对应的索引块高,所述索引块高是所述发生变更后的属性值在本次变更之前的最新一次变更所对应的块高;Optionally, the obtaining unit 501 is further configured to obtain the first history table corresponding to the current block height after the processing unit 502 updates the first attribute value and the current block height to the status table; The first history table records the modification records of multiple change accounts of the current block height, the change account is the account to which the attribute value has changed, and the modification record of the change account includes the change The attribute value of the account under the current block height is changed, the attribute value after the change, and the index block height corresponding to the attribute value after the change, and the index block height is the post-change attribute value The attribute value of is the block height corresponding to the latest change before this change;
所述处理单元502还用于将所述第一属性、所述第一属性值和所述第一属性值对应的索引块高作为所述第一账户的第一修改记录,增加至所述第一历史表中。The processing unit 502 is further configured to use the first attribute, the first attribute value, and the index block height corresponding to the first attribute value as the first modification record of the first account, and add it to the first account. A history table.
可选的,所述处理单元502还用于:Optionally, the processing unit 502 is further configured to:
接收第一查询指令;所述第一查询指令用于获取第二账户的第二属性在指定块高上的属性值;Receiving a first query instruction; the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height;
若确定所述状态表中所述第二属性的最新属性值对应的第一块高大于所述指定块高,则从所述第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高,直至确定出第一个小于所述指定块高的第二块高;If it is determined that the first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height, and determine the second account’s height in sequence from high to bottom. The corresponding block height when the attribute value of the second attribute is changed, until the first second block height that is less than the specified block height is determined;
将所述第二块高对应的历史表中所述第二账户的第二属性的属性值确定为查询结果。The attribute value of the second attribute of the second account in the history table corresponding to the second block height is determined as the query result.
可选的,所述处理单元502还用于:Optionally, the processing unit 502 is further configured to:
若确定所述第一块高不大于所述指定块高,则将所述状态表中所述第二属性的最新属性值确定为所述查询结果。If it is determined that the first block height is not greater than the specified block height, the latest attribute value of the second attribute in the status table is determined as the query result.
可选的,所述处理单元502还用于:Optionally, the processing unit 502 is further configured to:
接收第二查询指令;所述第二查询指令用于获取第二账户的第二属性的最新的N次修改记录;Receiving a second query instruction; the second query instruction is used to obtain the latest N modification records of the second attribute of the second account;
从所述状态表中所述第二属性的最新属性值对应的第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高及各块高对应的所述第二账户关于所述第二属性的修改记录,直至确定出N次修改记录;Starting from the first block height corresponding to the latest attribute value of the second attribute in the status table, determine the block height and each block corresponding to the second attribute value of the second account when the attribute value of the second account is changed from high to bottom. The modification record of the second account corresponding to the high on the second attribute until N modification records are determined;
将所述N次修改记录确定为查询结果。The N modification records are determined as the query result.
可选的,所述处理单元502具体用于:Optionally, the processing unit 502 is specifically configured to:
根据所述第二账户的第二属性的属性值在第M次变更时所对应的第三块高,获取所述第三块高对应的历史表;Acquiring a history table corresponding to the third block height according to the third block height corresponding to the second attribute value of the second account at the M-th change;
从所述第三块高对应的历史表中确定所述第二账户的第二修改记录;所述第二修改记录中包括在所述第M次变更后的所述第二属性的属性值和所述第二属性的属性值在所述第M次变更之前的最新一次变更时所对应的块高。Determine the second modification record of the second account from the history table corresponding to the third block height; the second modification record includes the attribute value of the second attribute after the M-th change and The attribute value of the second attribute corresponds to the block height of the latest change before the Mth change.
可选的,所述状态表有多个;每个状态表对应的业务类型不同;Optionally, there are multiple status tables; the service types corresponding to each status table are different;
每个块高对应的历史表中记录有所述块高下的各个状态表中变更账户的修改记录;所述历史表中包括每个状态表的标识。The history table corresponding to each block height records the modification record of the change account in each state table of the block height; the history table includes the identifier of each state table.
基于同一发明构思,本申请还提供一种计算设备,如图6所示,该计算设备包括至少一个处理器620,用于实现本申请实施例提供的图1至图4相关实施例中区块链交易记录的处理方法。Based on the same inventive concept, this application also provides a computing device. As shown in FIG. 6, the computing device includes at least one processor 620 for implementing the blocks in the related embodiments of FIGS. 1 to 4 provided by the embodiments of this application. The processing method of chain transaction records.
计算设备600还可以包括至少一个存储器630,用于存储程序指令和/或数据。存储器630和处理器620耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器620可能和存储器630协同操作。处理器620可能执行存储器630中存储的程序指令。所述至少一个存储器中的至少一个可以包括于处理器中。The computing device 600 may also include at least one memory 630 for storing program instructions and/or data. The memory 630 and the processor 620 are coupled. The coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 620 may cooperate with the memory 630 to operate. The processor 620 may execute program instructions stored in the memory 630. At least one of the at least one memory may be included in the processor.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
应注意,本申请实施例中的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理电路(digital signal processor,DSP)、专用集成芯片 (application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be noted that the processor in the embodiment of the present application may be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the foregoing method embodiments may be completed by hardware integrated logic circuits in the processor or instructions in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processing circuit (digital signal processor, DSP), a dedicated integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electrically available Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of exemplary but not restrictive description, many forms of RAM are available, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), and synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) ) And direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that the memories of the systems and methods described herein are intended to include, but are not limited to, these and any other suitable types of memories.
计算设备600还可以包括通信接口610,用于通过传输介质和其它设备进行通信,从而用于计算设备600中的装置可以和其它设备进行通信。在本申请实施例中,通信接口可以是收发器、电路、总线、模块或其它类型的通信接口。在本申请实施例中,通信接口为收发器时,收发器可以包括独立的接收器、独立的发射器;也可以集成收发功能的收发器、或者是接口电路。The computing device 600 may further include a communication interface 610 for communicating with other devices through a transmission medium, so that the device used in the computing device 600 can communicate with other devices. In the embodiment of the present application, the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface. In the embodiment of the present application, when the communication interface is a transceiver, the transceiver may include an independent receiver and an independent transmitter; it may also be a transceiver with integrated transceiver functions, or an interface circuit.
计算设备600还可以包括通信线路640。其中,通信接口610、处理器620以及存储器630可以通过通信线路640相互连接;通信线路640可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述通信线路640可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The computing device 600 may also include a communication line 640. Among them, the communication interface 610, the processor 620, and the memory 630 may be connected to each other through a communication line 640; the communication line 640 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (extended industry standard architecture). , Referred to as EISA) bus and so on. The communication line 640 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
基于同一发明构思,本发明实施例还提供了一种非暂态计算机可读存储介质,非暂态计算机可读存储介质中存储计算机指令,当其在计算机上运行时,使得计算机执行图1至图4相关实施例中区块链交易记录的处理方法。Based on the same inventive concept, embodiments of the present invention also provide a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions. When it runs on a computer, the computer executes FIGS. 1 to 1 Fig. 4 is a processing method of blockchain transaction records in a related embodiment.
基于同一发明构思,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算 机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行图1至图4相关实施例中区块链交易记录的处理方法。Based on the same inventive concept, embodiments of the present application provide a computer program product. The computer program product includes a calculation program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When executed by a computer, the computer is caused to execute the blockchain transaction record processing method in the related embodiments of FIGS. 1 to 4.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.

Claims (17)

  1. 一种区块链交易记录的处理方法,其特征在于,包括:A method for processing blockchain transaction records, which is characterized in that it includes:
    获取待执行交易;所述待执行交易用于变更第一账户的第一属性的属性值;Acquiring a transaction to be executed; the transaction to be executed is used to change the attribute value of the first attribute of the first account;
    确定执行所述待执行交易之后的所述第一属性的第一属性值;Determining the first attribute value of the first attribute after the execution of the transaction to be executed;
    将所述第一属性值和当前块高更新至状态表中;所述状态表中记录有多个账户的状态数据,账户的状态数据是所述账户的多个属性中各属性的最新属性值和所述最新属性值对应的块高。The first attribute value and the current block height are updated to the status table; the status table records the status data of multiple accounts, and the status data of the account is the latest attribute value of each attribute of the multiple attributes of the account The block height corresponding to the latest attribute value.
  2. 如权利要求1所述的方法,其特征在于,所述将所述第一属性值和当前块高更新至状态表中之后,还包括:The method according to claim 1, wherein after said updating the first attribute value and the current block height to the status table, the method further comprises:
    获取所述当前块高对应的第一历史表;所述第一历史表中记录有所述当前块高下的多个变更账户的修改记录,所述变更账户是属性值发生变更的属性所属的账户,所述变更账户的修改记录中包括所述变更账户在所述当前块高下的所述属性值发生变更的属性、发生变更后的属性值和所述发生变更后的属性值对应的索引块高,所述索引块高是所述发生变更后的属性值在本次变更之前的最新一次变更所对应的块高;Acquire a first history table corresponding to the current block height; the first history table records modification records of multiple change accounts under the current block height, and the change account belongs to the attribute whose attribute value has changed Account, the modification record of the changed account includes the attribute value of the changed account under the current block height, the attribute value after the change, and the index corresponding to the attribute value after the change Block height, the index block height is the block height corresponding to the latest change of the attribute value after the change before this change;
    将所述第一属性、所述第一属性值和所述第一属性值对应的索引块高作为所述第一账户的第一修改记录,增加至所述第一历史表中。The first attribute, the first attribute value, and the index block height corresponding to the first attribute value are added to the first history table as the first modification record of the first account.
  3. 如权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    接收第一查询指令;所述第一查询指令用于获取第二账户的第二属性在指定块高上的属性值;Receiving a first query instruction; the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height;
    若确定所述状态表中所述第二属性的最新属性值对应的第一块高大于所述指定块高,则从所述第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高,直至确定出第一个小于所述指定块高的第二块高;If it is determined that the first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height, and determine the second account’s height in sequence from high to bottom. The corresponding block height when the attribute value of the second attribute is changed, until the first second block height that is less than the specified block height is determined;
    将所述第二块高对应的历史表中所述第二账户的第二属性的属性值确定为查询结果。The attribute value of the second attribute of the second account in the history table corresponding to the second block height is determined as the query result.
  4. 如权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, wherein the method further comprises:
    若确定所述第一块高不大于所述指定块高,则将所述状态表中所述第二属性的最新属性值确定为所述查询结果。If it is determined that the first block height is not greater than the specified block height, the latest attribute value of the second attribute in the status table is determined as the query result.
  5. 如权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    接收第二查询指令;所述第二查询指令用于获取第二账户的第二属性的最新的N次修改记录;Receiving a second query instruction; the second query instruction is used to obtain the latest N modification records of the second attribute of the second account;
    从所述状态表中所述第二属性的最新属性值对应的第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高及各块高对应的所述第二账户关于所述第二属性的修改记录,直至确定出N次修改记录;Starting from the first block height corresponding to the latest attribute value of the second attribute in the status table, determine the block height and each block corresponding to the second attribute value of the second account when the attribute value of the second account is changed from high to bottom. The modification record of the second account corresponding to the high on the second attribute until N modification records are determined;
    将所述N次修改记录确定为查询结果。The N modification records are determined as the query result.
  6. 如权利要求3至5任一项所述的方法,其特征在于,所述确定所述第 二账户的第二属性的属性值变更时所对应的块高,包括:The method according to any one of claims 3 to 5, wherein the determining the block height corresponding to the change of the attribute value of the second attribute of the second account comprises:
    根据所述第二账户的第二属性的属性值在第M次变更时所对应的第三块高,获取所述第三块高对应的历史表;Acquiring a history table corresponding to the third block height according to the third block height corresponding to the second attribute value of the second account at the M-th change;
    从所述第三块高对应的历史表中确定所述第二账户的第二修改记录;所述第二修改记录中包括在所述第M次变更后的所述第二属性的属性值和所述第二属性的属性值在所述第M次变更之前的最新一次变更时所对应的块高。Determine the second modification record of the second account from the history table corresponding to the third block height; the second modification record includes the attribute value of the second attribute after the M-th change and The attribute value of the second attribute corresponds to the block height of the latest change before the Mth change.
  7. 如权利要求1所述的方法,其特征在于,所述状态表有多个;每个状态表对应的业务类型不同;The method according to claim 1, wherein there are multiple status tables; each of the status tables corresponds to a different service type;
    每个块高对应的历史表中记录有所述块高下的各个状态表中变更账户的修改记录;所述历史表中包括每个状态表的标识。The history table corresponding to each block height records the modification record of the change account in each state table of the block height; the history table includes the identifier of each state table.
  8. 一种区块链交易记录的处理装置,其特征在于,包括:A processing device for blockchain transaction records, which is characterized in that it comprises:
    获取单元,用于获取待执行交易;所述待执行交易用于变更第一账户的第一属性的属性值;An acquiring unit for acquiring a transaction to be executed; the transaction to be executed is used to change the attribute value of the first attribute of the first account;
    处理单元,用于确定执行所述待执行交易之后的所述第一属性的第一属性值;将所述第一属性值和当前块高更新至状态表中;所述状态表中记录有多个账户的状态数据,账户的状态数据是所述账户的多个属性中各属性的最新属性值和所述最新属性值对应的块高。The processing unit is configured to determine the first attribute value of the first attribute after the execution of the transaction to be executed; update the first attribute value and the current block height to a status table; how much is recorded in the status table The status data of each account is the latest attribute value of each attribute among the multiple attributes of the account and the block height corresponding to the latest attribute value.
  9. 如权利要求8所述的装置,其特征在于,所述获取单元还用于在所述处理单元将所述第一属性值和当前块高更新至状态表中之后,获取所述当前块高对应的第一历史表;所述第一历史表中记录有所述当前块高下的多个变更账户的修改记录,所述变更账户是属性值发生变更的属性所属的账户,所述变更账户的修改记录中包括所述变更账户在所述当前块高下的所述属性值发生变更的属性、发生变更后的属性值和所述发生变更后的属性值对应的索引块高,所述索引块高是所述发生变更后的属性值在本次变更之前的最新一次变更所对应的块高;The apparatus according to claim 8, wherein the acquiring unit is further configured to acquire the current block height corresponding to the current block height after the processing unit updates the first attribute value and the current block height to a status table. The first history table; the first history table records the modification records of multiple change accounts of the current block height, the change account is the account of the attribute whose attribute value has changed, and the change account’s The modification record includes the attribute whose attribute value is changed under the current block height of the change account, the attribute value after the change, and the index block height corresponding to the attribute value after the change, the index block High is the block height corresponding to the latest change of the attribute value after the change before this change;
    所述处理单元还用于将所述第一属性、所述第一属性值和所述第一属性值对应的索引块高作为所述第一账户的第一修改记录,增加至所述第一历史表中。The processing unit is further configured to add the first attribute, the first attribute value, and the index block height corresponding to the first attribute value as the first modification record of the first account to the first History table.
  10. 如权利要求9所述的装置,其特征在于,所述处理单元还用于:The device according to claim 9, wherein the processing unit is further configured to:
    接收第一查询指令;所述第一查询指令用于获取第二账户的第二属性在指定块高上的属性值;Receiving a first query instruction; the first query instruction is used to obtain the attribute value of the second attribute of the second account at the specified block height;
    若确定所述状态表中所述第二属性的最新属性值对应的第一块高大于所述指定块高,则从所述第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高,直至确定出第一个小于所述指定块高的第二块高;If it is determined that the first block height corresponding to the latest attribute value of the second attribute in the status table is greater than the specified block height, start from the first block height, and determine the second account’s height in sequence from high to bottom. The corresponding block height when the attribute value of the second attribute is changed, until the first second block height that is less than the specified block height is determined;
    将所述第二块高对应的历史表中所述第二账户的第二属性的属性值确定为查询结果。The attribute value of the second attribute of the second account in the history table corresponding to the second block height is determined as the query result.
  11. 如权利要求10所述的装置,其特征在于,所述处理单元还用于:The device according to claim 10, wherein the processing unit is further configured to:
    若确定所述第一块高不大于所述指定块高,则将所述状态表中所述第二属性的最新属性值确定为所述查询结果。If it is determined that the first block height is not greater than the specified block height, the latest attribute value of the second attribute in the status table is determined as the query result.
  12. 如权利要求9所述的装置,其特征在于,所述处理单元还用于:The device according to claim 9, wherein the processing unit is further configured to:
    接收第二查询指令;所述第二查询指令用于获取第二账户的第二属性的最新的N次修改记录;Receiving a second query instruction; the second query instruction is used to obtain the latest N modification records of the second attribute of the second account;
    从所述状态表中所述第二属性的最新属性值对应的第一块高开始,从高到底依次确定所述第二账户的第二属性的属性值变更时所对应的块高及各块高对应的所述第二账户关于所述第二属性的修改记录,直至确定出N次修改记录;Starting from the first block height corresponding to the latest attribute value of the second attribute in the status table, determine the block height and each block corresponding to the second attribute value of the second account when the attribute value of the second account is changed from high to bottom. The modification record of the second account corresponding to the high on the second attribute until N modification records are determined;
    将所述N次修改记录确定为查询结果。The N modification records are determined as the query result.
  13. 如权利要求10至12任一项所述的装置,其特征在于,所述处理单元具体用于:The device according to any one of claims 10 to 12, wherein the processing unit is specifically configured to:
    根据所述第二账户的第二属性的属性值在第M次变更时所对应的第三块高,获取所述第三块高对应的历史表;Acquiring a history table corresponding to the third block height according to the third block height corresponding to the second attribute value of the second account at the M-th change;
    从所述第三块高对应的历史表中确定所述第二账户的第二修改记录;所述第二修改记录中包括在所述第M次变更后的所述第二属性的属性值和所述第二属性的属性值在所述第M次变更之前的最新一次变更时所对应的块高。Determine the second modification record of the second account from the history table corresponding to the third block height; the second modification record includes the attribute value of the second attribute after the M-th change and The attribute value of the second attribute corresponds to the block height of the latest change before the Mth change.
  14. 如权利要求8所述的装置,其特征在于,所述状态表有多个;每个状态表对应的业务类型不同;The device according to claim 8, wherein there are multiple status tables; each status table corresponds to a different service type;
    每个块高对应的历史表中记录有所述块高下的各个状态表中变更账户的修改记录;所述历史表中包括每个状态表的标识。The history table corresponding to each block height records the modification record of the change account in each state table of the block height; the history table includes the identifier of each state table.
  15. 一种计算设备,其特征在于,包括处理器、存储器、通信接口,其中处理器、存储器与通信接口之间通过总线连接;A computing device, characterized by comprising a processor, a memory, and a communication interface, wherein the processor, the memory and the communication interface are connected by a bus;
    所述处理器,用于读取所述存储器中的程序,执行权利要求1至7任一所述方法;The processor is configured to read the program in the memory and execute the method according to any one of claims 1 to 7;
    所述存储器,用于存储一个或多个可执行程序,以及存储所述处理器在执行操作时所使用的数据。The memory is used to store one or more executable programs and store data used by the processor when performing operations.
  16. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行权利要求1至7任一所述方法。A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the method described in any one of claims 1 to 7 .
  17. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1至7任一所述方法。A computer program product, characterized in that the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, The computer executes the method described in any one of claims 1 to 7.
PCT/CN2020/127877 2019-12-12 2020-11-10 Method and apparatus for processing blockchain transaction record WO2021115002A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911277152.5A CN111161064A (en) 2019-12-12 2019-12-12 Processing method and device for blockchain transaction records
CN201911277152.5 2019-12-12

Publications (1)

Publication Number Publication Date
WO2021115002A1 true WO2021115002A1 (en) 2021-06-17

Family

ID=70557016

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/127877 WO2021115002A1 (en) 2019-12-12 2020-11-10 Method and apparatus for processing blockchain transaction record

Country Status (2)

Country Link
CN (1) CN111161064A (en)
WO (1) WO2021115002A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111161064A (en) * 2019-12-12 2020-05-15 深圳前海微众银行股份有限公司 Processing method and device for blockchain transaction records

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332876A (en) * 2017-05-31 2017-11-07 深圳前海微众银行股份有限公司 The synchronous method and device of block chain state
US20180294955A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. System for processing data based on blockchain and operating method thereof
CN110471923A (en) * 2019-08-12 2019-11-19 深圳前海微众银行股份有限公司 A kind of processing method and processing device of block chain transaction record
CN111161064A (en) * 2019-12-12 2020-05-15 深圳前海微众银行股份有限公司 Processing method and device for blockchain transaction records

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180294955A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. System for processing data based on blockchain and operating method thereof
CN107332876A (en) * 2017-05-31 2017-11-07 深圳前海微众银行股份有限公司 The synchronous method and device of block chain state
CN110471923A (en) * 2019-08-12 2019-11-19 深圳前海微众银行股份有限公司 A kind of processing method and processing device of block chain transaction record
CN111161064A (en) * 2019-12-12 2020-05-15 深圳前海微众银行股份有限公司 Processing method and device for blockchain transaction records

Also Published As

Publication number Publication date
CN111161064A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
WO2021027531A1 (en) Block chain transaction record processing method and device
WO2021068728A1 (en) Methods and apparatus for generating state tree of block and validating on-chain data
US10664305B1 (en) Method and apparatus for writing service data into block chain and method for determining service subset
CN107562775B (en) Data processing method and device based on block chain
CN111898139B (en) Data reading and writing method and device and electronic equipment
CN108959510B (en) Partition level connection method and device for distributed database
WO2020248982A1 (en) Method and device for transaction processing in blockchain
WO2020215925A1 (en) Event subscription method and apparatus based on blockchain
WO2021051782A1 (en) Consensus method, apparatus and device of block chain
CN112559529B (en) Data storage method, device, computer equipment and storage medium
US20220414155A1 (en) Database management method and apparatus based on lookup table
US9946461B2 (en) In-flash immutable object processing
WO2021115002A1 (en) Method and apparatus for processing blockchain transaction record
WO2021027530A1 (en) Data processing method and device based on block chain
CN107153680B (en) Method and system for on-line node expansion of distributed memory database
US20220005004A1 (en) Method and device for blockchain transaction tracing
US10725690B2 (en) Non-volatile memory cloning with hardware copy-on-write support
CN106294423A (en) Data base divides wiring method and the device of table
US10262081B2 (en) Method and apparatus for improved database searching
AU2019241002B2 (en) Transaction processing method and system, and server
CN109710698B (en) Data aggregation method and device, electronic equipment and medium
CN109408532B (en) Data acquisition method, device, computer equipment and storage medium
US11748250B2 (en) Method and electronic device for data processing, and storage medium
CN110399354B (en) Partition exchange method and device for database
CN115794806A (en) Gridding processing system, method and device for financial data and computing equipment

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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/10/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20899172

Country of ref document: EP

Kind code of ref document: A1