WO2021115002A1 - Procédé et appareil de traitement d'un enregistrement de transaction de chaîne de blocs - Google Patents

Procédé et appareil de traitement d'un enregistrement de transaction de chaîne de blocs 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
English (en)
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/fr

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.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

La présente invention concerne un procédé et un appareil de traitement d'un enregistrement de transaction de chaîne de blocs. Le procédé comprend les étapes consistant à : acquérir une transaction à exécuter (101), la transaction à exécuter étant utilisée pour modifier la valeur d'attribut d'un premier attribut d'un premier compte ; déterminer une première valeur d'attribut du premier attribut après que la transaction à exécuter est exécutée (102) ; et mettre à jour la première valeur d'attribut et la hauteur de bloc actuelle à une table d'état (103), la table d'état enregistrant des données d'état d'une pluralité de comptes et les données d'état de chaque compte se réfèrent à la dernière valeur d'attribut de chaque attribut d'une pluralité d'attributs du compte et à une hauteur de bloc correspondant à la dernière valeur d'attribut. Le procédé est utilisé pour interroger un bloc dans lequel la valeur d'attribut de chaque attribut d'un compte a été modifiée en dernier.
PCT/CN2020/127877 2019-12-12 2020-11-10 Procédé et appareil de traitement d'un enregistrement de transaction de chaîne de blocs WO2021115002A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911277152.5A CN111161064A (zh) 2019-12-12 2019-12-12 一种区块链交易记录的处理方法及装置
CN201911277152.5 2019-12-12

Publications (1)

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

Family

ID=70557016

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/127877 WO2021115002A1 (fr) 2019-12-12 2020-11-10 Procédé et appareil de traitement d'un enregistrement de transaction de chaîne de blocs

Country Status (2)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111161064A (zh) * 2019-12-12 2020-05-15 深圳前海微众银行股份有限公司 一种区块链交易记录的处理方法及装置
CN111813788A (zh) * 2020-05-20 2020-10-23 北京金山云网络技术有限公司 信息的查询方法和装置、信息的同步方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332876A (zh) * 2017-05-31 2017-11-07 深圳前海微众银行股份有限公司 区块链状态的同步方法及装置
US20180294955A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. System for processing data based on blockchain and operating method thereof
CN110471923A (zh) * 2019-08-12 2019-11-19 深圳前海微众银行股份有限公司 一种区块链交易记录的处理方法及装置
CN111161064A (zh) * 2019-12-12 2020-05-15 深圳前海微众银行股份有限公司 一种区块链交易记录的处理方法及装置

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 (zh) * 2017-05-31 2017-11-07 深圳前海微众银行股份有限公司 区块链状态的同步方法及装置
CN110471923A (zh) * 2019-08-12 2019-11-19 深圳前海微众银行股份有限公司 一种区块链交易记录的处理方法及装置
CN111161064A (zh) * 2019-12-12 2020-05-15 深圳前海微众银行股份有限公司 一种区块链交易记录的处理方法及装置

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2021027531A1 (fr) Procédé et dispositif de traitement d'enregistrement de transaction par chaîne de blocs
US10664305B1 (en) Method and apparatus for writing service data into block chain and method for determining service subset
WO2021077962A1 (fr) Procédé et appareil de synchronisation de nœud de chaîne de blocs
CN107562775B (zh) 一种基于区块链的数据处理方法及设备
WO2021115002A1 (fr) Procédé et appareil de traitement d'un enregistrement de transaction de chaîne de blocs
CN111898139B (zh) 数据读写方法及装置、电子设备
CN108959510B (zh) 一种分布式数据库的分区级连接方法和装置
WO2020215925A1 (fr) Procédé et appareil d'abonnement à un événement fondés sur une chaîne de blocs
WO2020248982A1 (fr) Procédé et dispositif de traitement de transaction dans une chaîne de blocs
WO2021051782A1 (fr) Procédé, appareil et dispositif de consensus de chaîne de blocs
US20220414155A1 (en) Database management method and apparatus based on lookup table
US20210263905A1 (en) Blockchain based hierarchical data storage
WO2019165763A1 (fr) Procédé destiné à être mis en œuvre dans des données d'interrogation
AU2019241002B2 (en) Transaction processing method and system, and server
CN112559529A (zh) 数据存储方法、装置、计算机设备及存储介质
US20160334996A1 (en) In-flash immutable object processing
CN107153680B (zh) 一种分布式内存数据库在线扩展节点的方法及系统
US20220005004A1 (en) Method and device for blockchain transaction tracing
WO2020118713A1 (fr) Circuit d'adaptation de largeur de bit, appareil d'écriture de données, appareil de lecture de données et dispositif électronique
CN106294423A (zh) 数据库分表的写入方法及装置
US10262081B2 (en) Method and apparatus for improved database searching
US20190042097A1 (en) Non-volatile memory cloning with hardware copy-on-write support
CN109710698B (zh) 一种数据汇聚方法、装置、电子设备及介质
CN107832121B (zh) 一种应用于分布式串行长事务的并发控制方法
US11748250B2 (en) Method and electronic device for data processing, and storage medium

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