An incremental slicing analysis method for UTXO blockchain

The incremental slicing analysis method is used to process UTXO blockchain transaction data, which solves the problem of low transaction data analysis efficiency in the existing technology, reduces time and space complexity, and is suitable for fast and efficient transaction data analysis.

CN113641755BActive Publication Date: 2024-09-27GUANGDONG WEIDING DATA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110811179.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-19
Publication Date
2024-09-27
Estimated Expiration
2041-07-19

AI Technical Summary

Technical Problem

Existing UTXO blockchain transaction data analysis methods are difficult to meet the needs of fast and efficient processing and analysis when faced with the huge number of transactions and the ever-expanding scale of transactions, resulting in high time and space complexity and difficulty in meeting the requirements of application scenarios.

Method used

Using the incremental slicing analysis method, by restoring the interruption status of the block handler and UTXO slicing program, the transactions in the block are gradually processed, the UTXO dictionary status is updated, and the data is saved according to the UTXO slicing conditions until the program deadline condition is met to avoid Build complex transaction network models.

Benefits of technology

It significantly reduces the time and space complexity, improves the efficiency of blockchain transaction analysis, is suitable for application scenarios requiring lightweight transaction flow and processing speed, and saves analysis time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113641755B
    Figure CN113641755B
Patent Text Reader

Abstract

The present invention discloses an incremental slicing analysis method for a UTXO blockchain, and relates to the fields of blockchain and information technology. First, the context environment when the program is interrupted can be restored according to the interruption status file and the UTXO slice file of the program processing block, or execution can be selected from the first block; then the next block data is obtained from the block queue, the transaction in the block is processed, and the status of the UTXO dictionary is updated and the OpReturn type output is recorded. Then, the UTXO slice data, the OpReturn type output node data, and the intermediate state of the block processing program are saved according to the UTXO slice interval condition. Finally, the above process is repeated until the program end condition is met. The present invention adopts incremental slicing analysis, which can meet the application scenarios of increasing blockchain transaction data and expanding transaction scale. Compared with traditional blockchain analysis methods, it can significantly reduce time and space complexity and improve the efficiency of blockchain transaction analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain and information technology, and in particular to an incremental slicing analysis method for a UTXO blockchain model. Background Art

[0002] The incremental slicing analysis method of the UTXO blockchain is one of the important contents of the research in the frontier disciplines such as blockchain and information technology, and is also an important part of blockchain address tracking and blockchain transaction analysis. With the increasing scale of blockchain transaction networks today, the number of transactions is huge, the scale of transactions is constantly expanding, the blockchain protocol is constantly updated, and the transaction mode is changing, making the results of traditional blockchain analysis methods less than ideal. In addition, the UTXO blockchain is also very complex and stateless. Therefore, how to quickly and efficiently process the transaction data on the blockchain and perform incremental analysis on the UTXO blockchain is a challenging topic.

[0003] The current analysis method of UTXO blockchain transaction data is mainly to parse the blockchain transaction data to build a transaction network model, such as a complex network model and a Petri network model, and then run the entire network, and then analyze the final result after execution. However, due to the huge amount of data in the blockchain, the large number of transactions, and the ever-increasing scale of transactions. The topological structure of the network model usually constructed is very complex and the processing time is also very long. In addition, the traditional method has high requirements on computer performance and storage capacity, and it is difficult to meet the requirements in terms of processing speed and operating efficiency.

[0004] In summary, the existing blockchain data analysis methods are difficult to meet the scenarios where blockchain transaction data is growing and transaction scale is expanding. Summary of the invention

[0005] In view of the defects of the prior art, the present invention adopts incremental slicing analysis to meet the application scenarios of the increasing growth of blockchain transaction data and the continuous expansion of transaction scale. Compared with the traditional blockchain analysis method, it can significantly reduce the time and space complexity and improve the efficiency of blockchain transaction analysis. The present invention proposes an incremental slicing analysis method for UTXO blockchain. First, according to the interruption status file and UTXO slice file of the program processing block, the context environment when the program is interrupted can be restored or execution can be selected from the first block; then the next block data is obtained from the block queue, the transaction in the block is processed, and the status of the UTXO dictionary is updated and the OpReturn type output is recorded. Then, according to the UTXO slice interval condition, the UTXO slice data, the OpReturn type output node data and the intermediate state of the block processing program are saved. Finally, the above process is repeated until the program deadline condition is met.

[0006] To achieve the above purpose, the specific technical solution of the present invention is as follows: an incremental slicing analysis method for blockchain UTXO, comprising the following steps:

[0007] (1) Obtain the interrupt status file of the most recent block processing program and the corresponding UTXO slice file, restore the context environment when the block processing program was interrupted according to the interrupt status file, and restore the context environment when the UTXO slice program was interrupted according to the UTXO slice file. If the interrupt status file and UTXO slice file of the block processing are not provided, read from the first block file to initialize the block pool, block queue and file status list;

[0008] (2) Remove the first element of the block queue, and then find the next block of the last element on the legal chain from the block pool and add it to the queue. If a forked chain occurs, the fork process needs to be performed until the block queue length meets the configuration requirements;

[0009] (3) Process the transactions in the dequeued blocks, update the status of the UTXO dictionary and record the OpReturn type output;

[0010] (4) Determine whether the UTXO slicing conditions are met. If so, save the UTXO slicing data, OpReturn type output node data, and block processing program intermediate state to the corresponding file path;

[0011] (5) Determine whether the program deadline is met. The program is terminated if either of the two ending conditions, block height and deadline, is met. If not, go to step (2).

[0012] Furthermore, in the above step (1), the context environment recovery method when the block processing program and the UTXO slicing program are interrupted includes the following steps:

[0013] Step 1.1 Enter the blockchain file path, block processing intermediate state storage path, UTXO slice storage path, OpReturn data storage path, interruption state file name, and UTXO slice file name;

[0014] Step 1.2: Check whether the interrupt status file name of the block handler and the UTXO slice file name of the slice handler are both not null. If both are not null, go to step 1.3, otherwise go to step 1.6;

[0015] Step 1.3 Obtain the intermediate state compressed file according to the storage path and file name of the intermediate state file of the block processing program, and obtain the slice state compressed file according to the storage path and file name of the UTXO slice data file;

[0016] Step 1.4 decompresses the intermediate state compressed file and the UTXO slice compressed file obtained in step 1.3, and then deserializes the decompressed intermediate state file and the UTXO slice file to obtain the context state object of the block handler and the UTXO slice object of the slice handler;

[0017] Step 1.5 first uses the context state object of the block handler obtained in step 1.4 to restore the block handler context environment. Then use the UTXO slice object obtained in 1.4 to restore the UTXO slice program context environment. When restoring the UTXO slice program, it is necessary to reload the UTXO dictionary in the interrupted state;

[0018] Step 1.6 reads the blocks in the first block file blk00000.dat into the block pool and initializes the block file status list.

[0019] Step 1.7 Get the genesis block and use it to initialize the block queue;

[0020] Step 1.8 initializes the UTXO dictionary of the slice handler.

[0021] Furthermore, the specific steps of step 1.5 include:

[0022] Step 1.5.1 traverses the file status list and reloads the unused blocks in the corresponding block file into the block pool according to the status of each file;

[0023] Step 1.5.2 restores the last processed block hash, block pool read pointer, currently loaded block file number, total number of block processing and block handler intermediate state saving time according to the context state object of the block handler;

[0024] Step 1.5.3 reinitializes the block queue based on the last processed block hash after recovery;

[0025] Furthermore, in the above step 2, the blockchain fork processing algorithm includes the following steps:

[0026] Step 2.1 Get the tail element of the block queue;

[0027] Step 2.2: Search the block pool for the next block of the tail block element on the legal chain. If found, add the block to the queue and go to step 2.4. If not found, go to step 2.3;

[0028] Step 2.3 determines whether the upper limit of the number of block files to be loaded has been reached. If the upper limit has not been reached, go to step 2.2, otherwise go to step 2.4;

[0029] Step 2.4 determines whether the block queue length meets the configuration requirements, and if so, the execution ends;

[0030] Step 2.5 determines the tail block of the block queue as a block on the forked chain and deletes it from the block pool;

[0031] Step 2.6 determines whether the length of the block queue is zero. If so, the execution is terminated. Otherwise, the tail element of the block queue is rolled back to the previous block and the process goes to step 2.1.

[0032] Furthermore, the specific steps of step 3 include:

[0033] Step 3.1 Get the first block in the block queue;

[0034] Step 3.2 traverse the next transaction in the block;

[0035] Step 3.3 determines whether it is a minting transaction. If so, execute the minting transaction and go to step 3.5;

[0036] Step 3.4 determines whether the regular transaction is legal. If it is legal, execute the regular transaction, otherwise go to step 3.2;

[0037] Step 3.5 determines whether the transaction traversal in the block is completed. If not, go to step 3.2;

[0038] Step 3.6 determines whether the UTXO slicing conditions are met. If the conditions are met, the UTXO slicing file, the intermediate state of the block processing program, and the OpReturn output data are saved;

[0039] Step 3.7 determines whether the program termination condition is met. If so, the execution ends, otherwise go to step 3.1.

[0040] Furthermore, in the above step 3.3, the specific steps of executing the minting transaction include:

[0041] Step 3.3.1 Enter the minting transaction;

[0042] Step 3.3.2 traverse the next output node of the minting transaction;

[0043] Step 3.3.3 determines whether the output amount Value of the output node is zero. If it is not zero, convert the output script hash into a byte array and go to step 3.3.6;

[0044] Step 3.3.4 determines whether the UTXO dictionary contains the current transaction output. If so, add 1 to the quantity attribute of the transaction output node corresponding to the UTXO dictionary. Otherwise, add the output to the UTXO dictionary.

[0045] Step 3.3.5 determines whether the output traversal of the minting transaction has ended. If not, go to step 3.3.2;

[0046] Step 3.3.6 determines whether the first or second byte of the output script is 0x6a. If so, add the current output node to the OpReturn list and go to step 3.3.5. Otherwise, go to step 3.3.4. The OpReturn list is a list data structure used to store OpReturn type output nodes.

[0047] Furthermore, in the above step 3.4, the specific steps of executing a regular transaction include:

[0048] Step 3.4.1 Enter regular transactions;

[0049] Step 3.4.2 traverses the next input node of the regular transaction;

[0050] Step 3.4.3 Find the corresponding transaction output node in the UTXO dictionary;

[0051] Step 3.4.4 determines whether the corresponding output node quantity attribute is greater than 1. If it is greater than 1, the quantity attribute of the corresponding output node in the UTXO dictionary is reduced by 1. Otherwise, the corresponding output node is removed from the UTXO dictionary.

[0052] Step 3.4.5 determines whether the traversal of the input nodes of the regular transaction has been completed. If not, go to step 3.4.2;

[0053] Step 3.4.6 traverses the next output node of the regular transaction;

[0054] Step 3.4.7 determines whether the output amount Value of the output node is zero. If it is not zero, convert the output script hash into a byte array and go to step 3.4.10;

[0055] Step 3.4.8 determines whether the UTXO dictionary contains the current transaction output. If it does, add 1 to the quantity attribute of the transaction output node corresponding to the UTXO dictionary. Otherwise, add the output to the UTXO dictionary.

[0056] Step 3.4.9 determines whether the output traversal of the regular transaction is completed. If not, go to step 3.4.6;

[0057] Step 3.4.10 determines whether the first or second byte of the output script is 0x6a. If so, add the current output node to the OpReturn list and go to step 3.4.9, otherwise go to step 3.4.8.

[0058] Furthermore, in the above step 4, the specific method of saving the intermediate state of the program includes the following steps:

[0059] Step 4.1 traverse the blocks in the block pool;

[0060] Step 4.2 determines whether the timestamp of the block is less than the timestamp of the last processed block. If so, delete the block from the block pool, otherwise go to step 4.1;

[0061] Step 4.3 initializes the block handler interrupt status object using the file status list, block pool object, the last processed block hash, the number of processed blocks, the block pool read pointer, the latest read block file number and the last processed block timestamp.

[0062] Step 4.4 serializes the block handler interrupt status object into a string object and writes it into a dat file, and then compresses the file using the GZip compression stream.

[0063] Step 4.5 serializes the UTXO dictionary into a string object and writes it into the dat file, then compresses the file using the GZip compression stream.

[0064] Step 4.6 serializes the OpReturn output node list into a string object and writes it into a dat file, then compresses the file using the GZip compression stream.

[0065] Beneficial effects of the present invention:

[0066] 1. The incremental slicing analysis method of blockchain UTXO in the present invention reduces the time and space complexity.

[0067] 2. The incremental slicing analysis method is an effective solution in application scenarios that have certain requirements for lightweight transaction flow analysis and processing speed and operating efficiency.

[0068] 3. This method avoids building a complex transaction network model, but directly analyzes transaction data from the UTXO slice state.

[0069] 4. The incremental slicing processing method can directly analyze blockchain transactions from a certain time point, saving a lot of time to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 UTXO blockchain incremental slice analysis method architecture diagram

[0071] Figure 2 Flowchart of program interruption state recovery method

[0072] Figure 3 Block fork processing algorithm flow chart

[0073] Figure 4 Transaction data processing and UTXO status update method flow chart

[0074] Figure 5 Execute minting transaction to update UTXO status flow chart

[0075] Figure 6 Execute regular transaction to update UTXO state flow chart DETAILED DESCRIPTION

[0076] The present invention will be further described below in conjunction with the accompanying drawings.

[0077] like Figure 1 As shown, the system architecture implementation of the present invention includes the following steps:

[0078] (1) Get the interrupt status file of the most recent block processing program and the corresponding UTXO slice file, restore the context environment when the block processing program was interrupted according to the interrupt status file, and restore the context environment when the UTXO slice program was interrupted according to the UTXO slice file. If the interrupt status file and UTXO slice file of the block processing are not provided, read from the first block file to initialize the block pool, block queue and file status list. Figure 2 As shown, the context environment recovery method when the block processing program and the UTXO slicing program are interrupted specifically includes the following steps:

[0079] (1-1) Enter the blockchain file path, block processing intermediate state storage path, UTXO slice storage path, OpReturn data storage path, interruption state file name, and UTXO slice file name;

[0080] (1-2) Determine whether the interrupt status file name of the block handler and the UTXO slice file name of the slice handler are both not null. If both are not null, go to step (1-3), otherwise go to step (1-6);

[0081] (1-3) Obtain the intermediate state compressed file according to the storage path and file name of the intermediate state file of the block processing program, and obtain the slice state compressed file according to the storage path and file name of the UTXO slice data file;

[0082] (1-4) Decompress the intermediate state compressed file and the UTXO slice compressed file obtained in step (1-3), and then deserialize the decompressed intermediate state file and the UTXO slice file to obtain the context state object of the block handler and the UTXO slice object of the slice handler;

[0083] (1-5) First, use the context state object of the block handler obtained in step (1-4) to restore the block handler context environment. Then use the UTXO slice object obtained in step (1-4) to restore the UTXO slice program context environment. When restoring the UTXO slice program, it is necessary to reload the UTXO dictionary in the interrupted state. The method for restoring the block handler context environment specifically includes the following steps:

[0084] (1-5-1) Traverse the file status list and reload the unused blocks in the corresponding block file into the block pool according to the status of each file;

[0085] (1-5-2) Restore the hash of the last processed block, the block pool read pointer, the number of the currently loaded block file, the total number of block processing, and the intermediate state saving time of the block handler according to the context state object of the block handler;

[0086] (1-5-3) Reinitialize the block queue based on the hash of the last processed block after recovery.

[0087] (1-6) Read the blocks in the first block file blk00000.dat into the block pool and initialize the block file status list;

[0088] (1-7) Get the genesis block and use it to initialize the block queue;

[0089] (1-8) Initialize the UTXO dictionary of the slice handler.

[0090] (2) Remove the first element of the block queue, and then find the next block of the last element on the legal chain from the block pool and add it to the queue. If a forked chain occurs, the fork process needs to be performed until the block queue length meets the configuration requirements. Figure 3 As shown in the figure, the blockchain fork processing algorithm specifically includes the following steps:

[0091] (2-1) Get the tail element of the block queue;

[0092] (2-2) Search the block pool for the next block of the tail block element on the legal chain. If found, add the block to the queue and go to step (2-4). If not found, go to step (2-3);

[0093] (2-3) Determine whether the upper limit of the number of blockchain files to be loaded has been reached. If the upper limit of the file loading has not been reached, go to step (2-2); otherwise, go to step (2-4);

[0094] (2-4) Determine whether the block queue length meets the configuration requirements, and if so, terminate the execution;

[0095] (2-5) The tail block in the block queue is determined to be a block on the forked chain and deleted from the block pool;

[0096] (2-6) Determine whether the length of the block queue is zero. If so, the execution is terminated. Otherwise, roll back the tail element of the block queue to the previous block and go to step (2-1).

[0097] (3) Process the transactions in the dequeued blocks, update the status of the UTXO dictionary and record the OpReturn type output node. Figure 4 As shown, the specific steps include:

[0098] (3-1) Get the first block in the block queue;

[0099] (3-2) Traverse the next transaction in the block;

[0100] (3-3) Determine whether it is a minting transaction. If it is, execute the minting transaction and go to step (3-5). Figure 5 As shown in the figure, executing a minting transaction specifically includes the following steps:

[0101] (3-3-1) Input coin minting transaction;

[0102] (3-3-2) Traverse the next output node of the minting transaction;

[0103] (3-3-3) Determine whether the output amount Value of the output node is zero. If it is not zero, convert the output script hash into a byte array and go to step (3-3-6);

[0104] (3-3-4) Determine whether the UTXO dictionary contains the current transaction output. If so, add 1 to the quantity attribute of the transaction output node in the UTXO dictionary. Otherwise, add the output to the UTXO dictionary.

[0105] (3-3-5) Determine whether the output traversal of the minting transaction is completed. If not, go to step (3-3-2);

[0106] (3-3-6) Determine whether the first or second byte of the output script is 0x6a. If so, add the current output node to the OpReturn list and go to step (3-3-5), otherwise go to step (3-3-4).

[0107] (3-4) Determine whether the regular transaction is legal. If it is legal, execute the regular transaction, otherwise go to step (3-2). Figure 6 As shown, executing a regular transaction specifically includes the following steps:

[0108] (3-4-1) Enter regular transactions;

[0109] (3-4-2) Traverse the next input node of the regular transaction;

[0110] (3-4-3) Find the corresponding transaction output node in the UTXO dictionary;

[0111] (3-4-4) Determine whether the corresponding output node quantity attribute is greater than 1. If it is greater than 1, reduce the corresponding output node quantity attribute in the UTXO dictionary by 1. Otherwise, remove the corresponding output node from the UTXO dictionary.

[0112] (3-4-5) Determine whether the traversal of the input node of the regular transaction has been completed. If not, go to step (3-4-2);

[0113] (3-4-6) Traverse the next output node of the regular transaction;

[0114] (3-4-7) Determine whether the output amount Value of the output node is zero. If it is not zero, convert the output script hash into a byte array and go to step (3-4-10);

[0115] (3-4-8) Determine whether the UTXO dictionary contains the current transaction output. If so, add 1 to the quantity attribute of the transaction output node corresponding to the UTXO dictionary. Otherwise, add the output to the UTXO dictionary.

[0116] (3-4-9) Determine whether the output traversal of the regular transaction is completed. If not, go to step (3-4-6);

[0117] (3-4-10) Determine whether the first or second byte of the output script is 0x6a. If so, add the current output node to the OpReturn list and go to step (3-4-9). Otherwise, go to step (3-4-8).

[0118] (3-5) Determine whether the transaction traversal in the block is completed. If not, go to step (3-2);

[0119] (3-6) Determine whether the UTXO slicing conditions are met. If the conditions are met, save the UTXO slicing file, the intermediate state of the block processing program, and the OpReturn output data;

[0120] (3-7) Determine whether the program termination condition is met. If so, execution is terminated; otherwise, go to step (3-1).

[0121] (4) Determine whether the UTXO slicing conditions are met. If so, save the UTXO slicing data, OpReturn type output node data, and the intermediate state of the block processing program to the corresponding file path. The specific method of saving the intermediate state of the program includes the following steps:

[0122] (4-1) Traverse the blocks in the block pool;

[0123] (4-2) Determine whether the timestamp of the block is less than the timestamp of the last processed block. If so, delete the block from the block pool; otherwise, go to step (4-1);

[0124] (4-3) Initialize the block handler interrupt status object using the file status list, block pool object, the last processed block hash, the number of processed blocks, the block pool read pointer, the most recently read block file number, and the last processed block timestamp.

[0125] (4-4) Serialize the block handler interrupt status object into a string object and write it into the dat file, and then compress the file using the GZip compression stream.

[0126] (4-5) Serialize the UTXO dictionary into a string object and write it into the dat file, then compress the file using the GZip compression stream.

[0127] (4-6) Serialize the OpReturn output node list into a string object and write it into the dat file, then compress the file using the GZip compression stream.

[0128] (5) Determine whether the program deadline is met. If the block height or deadline is reached, the program will be terminated if either condition is met. If not, go to step (2).

[0129] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. All equivalent methods or changes that do not deviate from the technical creation of the present invention should be included in the scope of protection of the present invention.

Claims

1. An incremental slicing analysis method for UTXO blockchain, It is characterized in that The steps include: Step S1. Get the interrupt status file of the most recent block processing program and the corresponding UTXO slice file, restore the context environment when the block processing program is interrupted according to the interrupt status file, and restore the context environment when the UTXO slice program is interrupted according to the UTXO slice file. If the interrupt status file and UTXO slice file of the block processing are not provided, start reading from the first block file, and initialize the block pool, block queue and file status list; The context environment recovery method when the block processing program and the UTXO slicing program are interrupted includes the following steps: Step 1.1 Enter the blockchain file path, block processing intermediate state storage path, UTXO slice storage path, OpReturn data storage path, interruption state file name, and UTXO slice file name; Step 1.2 determines whether the interrupt status file name of the block handler and the UTXO slice file name of the slice handler are both not null. If both are not null, go to step 1.3, otherwise go to step 1.6; Step 1.3 Obtain the intermediate state compressed file according to the storage path and file name of the intermediate state file of the block processing program, and obtain the slice state compressed file according to the storage path and file name of the UTXO slice data file; Step 1.4 decompresses the intermediate state compressed file and the UTXO slice compressed file obtained in step 1.3, and then deserializes the decompressed intermediate state file and the UTXO slice file to obtain the context state object of the block handler and the UTXO slice object of the slice handler; Step 1.5 first uses the context state object of the block handler obtained in step 1.4 to restore the block handler context environment; then uses the UTXO slice object obtained in 1.4 to restore the UTXO slice program context environment; when restoring the UTXO slice program, it is necessary to reload the UTXO dictionary in the interrupted state; Step 1.6 reads the blocks in the first block file blk00000.dat into the block pool and initializes the block file status list; Step 1.7 Get the genesis block and use it to initialize the block queue; Step 1.8 initializes the UTXO dictionary of the slice handler; Step S2. Remove the head element of the block queue, and then find the next block of the tail element on the legal chain from the block pool and add it to the queue. If a forked chain appears, a fork process is required until the block queue length meets the configuration requirements; Step S3. Process the transactions in the dequeued block, update the status of the UTXO dictionary and record the OpReturn type output; Step S4. Determine whether the UTXO slicing conditions are met. If so, save the UTXO slicing data, OpReturn type output node data, and block processing program intermediate state to the corresponding file path; The specific steps are as follows: Step 4.1 traverse the blocks in the block pool; Step 4.2 determines whether the timestamp of the block is less than the timestamp of the last processed block. If so, delete the block from the block pool, otherwise go to step 4.1; Step 4.3 initializes the block handler interrupt status object using the file status list, block pool object, the last processed block hash, the number of processed blocks, the block pool read pointer, the latest read block file number and the last processed block timestamp; Step 4.4 serializes the block handler interrupt status object into a string object and writes it into a dat file, and then compresses the file using the GZip compression stream; Step 4.5 serializes the UTXO dictionary into a string object and writes it into the dat file, then compresses the file using the GZip compression stream; Step 4.6 serializes the OpReturn output node list into a string object and writes it into the dat file, and then compresses the file using the GZip compression stream; Step S5. Determine whether the program termination condition is met: if so, terminate the program; if not, go to step 2; The program expiration conditions include: reaching the block height or the deadline, and the program is terminated if either condition is met.

2. According to claim 1, an incremental slicing analysis method for a UTXO blockchain, It is characterized in that The specific steps of step 1.5 include: Step 1.5.1 traverses the file status list and reloads the unused blocks in the corresponding block file into the block pool according to the status of each file; Step 1.5.2 restores the last processed block hash, block pool read pointer, currently loaded block file number, total number of block processing and block handler intermediate state saving time according to the context state object of the block handler; Step 1.5.3 reinitializes the block queue based on the last processed block hash after recovery.

3. According to the incremental slicing analysis method of the UTXO blockchain according to claim 1, It is characterized in that In step 2, the blockchain fork processing method includes the following steps: Step 2.1 Get the tail element of the block queue; Step 2.2: Search the block pool for the next block of the tail block element on the legal chain. If found, add the block to the queue and go to step 2.

4. If not found, go to step 2.

3. Step 2.3 determines whether the upper limit of the number of block files to be loaded has been reached. If the upper limit has not been reached, go to step 2.2; otherwise, go to step 2.

4. Step 2.4 determines whether the block queue length meets the configuration requirements, and if so, the execution ends; Step 2.5 determines the tail block of the block queue as a block on the forked chain and deletes it from the block pool; Step 2.6 determines whether the length of the block queue is zero. If so, the execution is terminated. Otherwise, the tail element of the block queue is rolled back to the previous block and the process goes to step 2.

1.

4. According to claim 1, an incremental slicing analysis method for a UTXO blockchain, It is characterized in that The specific steps of step 3 include: Step 3.1 Get the first block in the block queue; Step 3.2 traverse the next transaction in the block; Step 3.3 determines whether it is a minting transaction. If so, execute the minting transaction and go to step 3.5; Step 3.4 determines whether the regular transaction is legal. If it is legal, execute the regular transaction. Otherwise, go to step 3.

2. Step 3.5 determines whether the transaction traversal in the block is completed. If not, go to step 3.2; Step 3.6 determines whether the UTXO slicing conditions are met. If the conditions are met, the UTXO slicing file, the intermediate state of the block processing program, and the OpReturn output data are saved; Step 3.7 determines whether the program termination condition is met. If so, the execution ends, otherwise go to step 3.

1.

5. According to claim 4, an incremental slicing analysis method for a UTXO blockchain, It is characterized in that Step 3.3 The specific steps to execute the minting transaction include: Step 3.3.1 Enter the minting transaction; Step 3.3.2 traverse the next output node of the minting transaction; Step 3.3.3 determines whether the output amount Value of the output node is zero. If it is not zero, convert the output script hash into a byte array and go to step 3.3.6; Step 3.3.4 determines whether the UTXO dictionary contains the current transaction output. If so, add 1 to the quantity attribute of the transaction output node corresponding to the UTXO dictionary. Otherwise, add the output to the UTXO dictionary. Step 3.3.5 determines whether the output traversal of the minting transaction has ended. If not, go to step 3.3.2; Step 3.3.6 determines whether the first or second byte of the output script is 0x6a. If so, add the current output node to the OpReturn list and go to step 3.3.5, otherwise go to step 3.3.

4.

6. According to claim 4, an incremental slicing analysis method for a UTXO blockchain, It is characterized in that In step 3.4, the specific steps to perform a regular transaction include: Step 3.4.1 Enter regular transactions; Step 3.4.2 traverses the next input node of the regular transaction; Step 3.4.3 Find the corresponding transaction output node in the UTXO dictionary; Step 3.4.4 determines whether the corresponding output node quantity attribute is greater than 1. If it is greater than 1, the quantity attribute of the corresponding output node in the UTXO dictionary is reduced by 1, otherwise the corresponding output node is removed from the UTXO dictionary; Step 3.4.5 determines whether the traversal of the input nodes of the regular transaction has been completed. If not, go to step 3.4.2; Step 3.4.6 traverses the next output node of the regular transaction; Step 3.4.7 determines whether the output amount Value of the output node is zero. If it is not zero, convert the output script hash into a byte array and go to step 3.4.10; Step 3.4.8 determines whether the UTXO dictionary contains the current transaction output. If it does, add 1 to the quantity attribute of the transaction output node corresponding to the UTXO dictionary. Otherwise, add the output to the UTXO dictionary. Step 3.4.9 determines whether the output traversal of the regular transaction is completed. If not, go to step 3.4.6; Step 3.4.10 determines whether the first or second byte of the output script is 0x6a. If so, add the current output node to the OpReturn list and go to step 3.4.9, otherwise go to step 3.4.8.