A Low-Latency Ordered Parsing Method and System for Blockchain Blocks Based on a Dual-Channel Mechanism

CN122578748APending Publication Date: 2026-08-14CHENGDU COOPER HENGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]现有技术一的不足:(1)新区块发现时刻受轮询周期限制——即使链上新区块已经生成,也需要等待下一次轮询才能被感知,链头解析时延受限于轮询周期,难以降至亚秒级

Benefits of technology

[0024]本发明的有益效果在于:1、本发明通过在场景切换时记录推送通道首个投递区块的高度H_first,并与当前期望高度游标E进行比较,能够瞬间、准确地计算出缺口区间[E,H_first-1],无需人工干预或复杂的状态检测,提高了系统的自动化程度和响应速度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122578748A_ABST
    Figure CN122578748A_ABST
Patent Text Reader

Abstract

This invention discloses a low-latency, ordered parsing method and system for blockchain blocks based on a dual-channel mechanism, relating to the field of blockchain data processing technology. The invention includes dual-channel establishment, historical catch-up processing, chain head tracking scheduling, and missing block compensation. It determines whether a historical catch-up or chain head tracking scenario is implemented by establishing a push channel and a backfill channel. Using the height of the first block in the push channel as a boundary, the backfill channel concurrently pulls blocks in batches and submits them directly in ascending order of height. In the chain head tracking scenario, a block timing scheduler is activated, using a cursor of the desired height to drive cache reordering and predecessor verification. Missing heights are precisely filled by an independent asynchronous processing unit through the backfill channel, employing an exponential backoff retry strategy. When switching scenarios, the scheduler automatically identifies height gaps and compensates them in batches, ensuring continuous connection between historical segments and chain head segments. This invention improves the real-time performance, orderliness, and reliability of blockchain data parsing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain data processing technology, specifically to a low-latency ordered parsing method and system for blockchain blocks based on a dual-channel mechanism. Background Technology

[0002] The orderly parsing of blockchain block data is a fundamental and core technical aspect of the blockchain application ecosystem. Whether it's block explorers, wallet services, on-chain data analysis platforms, or various blockchain-based data platforms and indexing services, they all rely on the timely, accurate, and continuous acquisition and parsing of blocks produced by blockchain nodes to build a localized on-chain data view. This supports real-time querying and processing of upper-layer businesses, enabling efficient, low-latency, and uninterrupted acquisition of block data from blockchain nodes while maintaining strict order at block height. This requires a low-latency, orderly parsing method and system for blockchain blocks based on a dual-channel mechanism.

[0003] Existing Technology 1: Timed Pull-Based Block Parsing Method Based on Polling Interface: Existing blockchain data parsing systems typically obtain the latest chain head height by periodically calling the query interface provided by the blockchain node, and then pull new blocks or missing blocks in order of the difference between the scan height and the chain head height. To improve throughput, such systems often initiate concurrent queries for multiple height segments simultaneously, and then pass the returned results to the downstream parsing module for processing.

[0004] The shortcomings of the existing technology are: (1) The discovery time of new blocks is limited by the polling cycle - even if a new block has been generated on the chain, it needs to wait for the next polling before it can be detected. The chain head parsing latency is limited by the polling cycle and is difficult to reduce to the sub-second level.

[0005] (2) The arrival order of concurrent pull results is uncontrolled. Although concurrent pull can improve the speed of catching up with historical blocks, the return order of different query requests is easily affected by network jitter and node load, thereby increasing the cost of out-of-order arrival and order control.

[0006] Existing Technology 2: Event-Driven Subscription-Based Block Resolution: Another type of resolution system establishes a continuous connection with blockchain nodes to receive block push events sent by the nodes in real time. This method can detect new blocks at the chain head more quickly, but usually still requires the client to handle push anomalies, missing block recovery, and order control manually.

[0007] The shortcomings of the existing technology 2 are: (1) The push channel does not guarantee the reliability of block arrival in abnormal scenarios - in the case of network interruption, node restart or message congestion, there may be missed push or silence. If there is no independent compensation path, the missing height will block subsequent parsing.

[0008] (2) Pure push route is not suitable for historical block catching up - when the scan height is significantly behind the chain head, the pure push method cannot efficiently perform large-scale historical block catching up. The catching up rate is limited by the push rate of the pusher and cannot utilize the concurrent batch pull capability.

[0009] (3) The order of push events is not the same as the order of block processing. If there is a lack of a rearrangement and predecessor verification mechanism built around the expected height, the first block may be directly submitted due to the order error in the parsing of the chain head segment or the absence of the predecessor benchmark. Summary of the Invention

[0010] To address the aforementioned technical shortcomings, the present invention aims to provide a low-latency ordered parsing method and system for blockchain blocks based on a dual-channel mechanism.

[0011] To solve the above technical problems, the present invention adopts the following technical solution: The present invention provides a low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism, including the following steps: Step 1, Dual-channel establishment: Establish a push channel and a backfill channel with the blockchain node, collect the current chain head height and the highest continuous height that has been parsed locally, analyze the current chain head height and the highest continuous height that has been parsed locally, and determine the current parsing scenario.

[0012] Step 2, Historical Catch-up Processing: In the historical catch-up scenario, the block height first received by the push channel is used as the dividing height. Blocks are concurrently and batch-pulled from the historical interval through the backfill channel. The returned blocks are directly submitted in ascending order of height until the switching conditions are met, and then the chain head tracking scheduling is executed.

[0013] Step 3, Chain Head Tracking and Scheduling: Start the push channel and initialize the block timing scheduler, set the desired height cursor and the predecessor reference block, the scheduler maintains the cache mapping and performs branch judgment and verification on the cache entries according to the desired height, if the verification is passed, the output is ordered and the cursor is advanced, and missing height triggers missing block compensation.

[0014] Step 4, Missing Block Compensation Connection: The independent asynchronous processing unit accurately pulls the missing blocks through the backfill channel, and simultaneously injects them back into the scheduler cache, adopting an exponential backoff retry strategy; when switching scenarios, the scheduler automatically identifies the height gap and triggers compensation in batches to ensure continuous connection between the historical segment and the chain head segment.

[0015] Preferably, the analysis of the current chain head height and the highest locally parsed continuous height is performed as follows: obtain the current chain head height H_head, read the highest locally parsed continuous height H_local, and calculate the chain head difference d=H_head-H_local.

[0016] A preset configurable scenario switching threshold is set. If d is greater than the preset configurable scenario switching threshold, it is determined that the current scenario is historical catch-up, and only the backfill channel is enabled. At the same time, the block consumption of the push channel is not started. If d is less than or equal to the preset configurable scenario switching threshold, it is determined that the current scenario is chain head tracking, and the push channel is started and the block timing scheduler is initialized.

[0017] Upon initial startup, the height of the first block received by the push channel is used as the boundary height H_boundary. [H_local+1,H_boundary-1] is designated as the historical catch-up interval, and [H_boundary,H_head] is designated as the chain head tracking interval. In subsequent operation, when the push channel is disconnected and reconnected, the height of the first push block received after reconnection is used as the new boundary height to redivide the interval.

[0018] Preferably, the initialization process of the block timing scheduler is as follows: set the desired height cursor E = H_local + 1, where H_local is the highest continuously resolved local height when the historical catch-up is completed.

[0019] The hash value of the block corresponding to H_local is used as the hash of the predecessor reference block, and the height of this block is used as the height of the predecessor reference block. The height of the predecessor reference block and the hash together constitute the predecessor reference, which is used for the predecessor verification of subsequent pushed blocks.

[0020] The scheduler internally maintains a cache mapping with block height as the key. The cache mapping is initially empty and is used to store blocks that have arrived through the push channel but have not yet met the conditions for continuous output.

[0021] Preferably, the branch determination and verification of cache entries according to the expected height is carried out as follows: The scheduler only processes blocks whose height equals the current expected height cursor E. For blocks with a height higher than E, it only performs cache storage operations and does not perform parsing output. The scheduler uses the current expected height cursor E as an index to query the cache mapping and processes it according to the following three branches: Branch 1: If a normal block with a height equal to E exists in the cache: Take the block B_E, extract the hash value of the previous block recorded in its header as the predecessor hash, and extract its height minus 1 as the predecessor height; compare the predecessor height and predecessor hash with the height and hash of the predecessor base block respectively. If both are equal, the verification passes, and B_E is written to the ordered output channel. Update the predecessor base block with height E and hash value B_E, remove the entry from the cache, and determine whether the newly output block B_E simultaneously meets the configurable system reset trigger condition. If it does, clear the cache mapping inside the decommissioner, clear the compensation queue and retry count mapping table of the asynchronous processing unit, reset the expected height cursor E to the current highest locally resolved continuous height H_local+1, and reinitialize the predecessor base block with its height and hash. If it does not meet the condition, set E=E+1. Then continue to query the cache mapping with the updated E until there is no block with height equal to E in the cache.

[0022] Branch 2: The position corresponding to height E in the cache is marked as an empty slot: This means that no block exists at this height, so the height is skipped, and E=E+1 is set directly, while the predecessor reference remains unchanged.

[0023] Branch 3: If there is no block of height E in the cache and that position is not marked as an empty slot: Determine that height E is a missing height, generate a compensation instruction and send it to the asynchronous processing unit. While waiting for compensation, the scheduler continues to process cache operations for blocks in the cache with heights greater than E. Once the compensation block arrives, it will be redistributed in order of E. When there are no blocks in the cache with heights not significantly lower than the current expected height cursor E and no missing heights to be compensated, the scheduler enters a sleep state and waits for the configurable polling cycle to end before re-executing the branch determination process.

[0024] The beneficial effects of the present invention are as follows: 1. The present invention records the height H_first of the first delivery block of the push channel when switching scenes and compares it with the current expected height cursor E, which can instantly and accurately calculate the gap interval [E,H_first-1] without manual intervention or complex state detection, thereby improving the automation level and response speed of the system.

[0025] 2. This invention employs a batch generation method for compensation instructions, writing all integer heights within the gap interval into the compensation channel of the asynchronous processing unit at once. The asynchronous processing unit then retrieves the missing blocks in batches according to their height through the backfill channel. Compared to the existing technology's request-by-request method, this significantly reduces the number of network round trips and substantially improves gap filling efficiency.

[0026] 3. This invention injects successfully retrieved gap blocks into the scheduler cache in ascending order of height. The scheduler strictly retrieves blocks from the cache sequentially according to the expected height E for parsing and output. When processing reaches height H_first, the predecessor reference has been automatically updated to block H_first-1. After the first pushed block passes the predecessor verification, it can be seamlessly output, realizing continuous parsing of historical segments and chain head segments, completely avoiding interruptions in the parsing process.

[0027] 4. This invention performs strict predecessor verification during the output of both gap blocks and push blocks to ensure that the hash value of each block correctly corresponds to the hash value of the previous block. This mechanism effectively prevents invalid blocks, tampered blocks, and out-of-order blocks from entering the parsing process, ensuring the integrity and consistency of the node ledger data.

[0028] 5. This invention manages the data flow of the push and compensation channels through a unified scheduler, encapsulating complex scene switching and gap handling logic within the scheduler, thus simplifying the overall system architecture. Simultaneously, the automated gap identification and filling mechanism adapts to different network environments and gap sizes, significantly improving the system's robustness and adaptability. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a schematic diagram of the implementation steps of the method of the present invention. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] according to Figure 1 As shown, the present invention provides a low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism, including the following steps: Step 1, Dual-channel establishment: Establish a push channel and a backfill channel with the blockchain node, collect the current chain head height and the highest continuous height that has been parsed locally, analyze the current chain head height and the highest continuous height that has been parsed locally, and determine the current parsing scenario.

[0033] In one specific embodiment, the establishment of the push channel and backfill channel with the blockchain node is specifically as follows: the push channel is established based on the gRPC long connection streaming subscription method, the client initiates a subscription request to the blockchain node, the blockchain node continuously pushes new block events, and the push channel parses the received block events into a block data structure and delivers it to the scheduler input queue.

[0034] The backfill channel is established based on an interface that supports concurrent batch requests. The parsing client sends batch query requests to the blockchain node via HTTP or JSON-RPC protocol. The request parameters include the start height and end height. The blockchain node returns all block data within that range.

[0035] The push channel and the backfill channel operate independently. The push channel is responsible for receiving real-time blocks in the chain head tracking scenario, while the backfill channel is responsible for batch fetching in the historical catch-up scenario and precise replenishment in the missing block compensation scenario. The two achieve data aggregation and orderly output through the scheduler's cache mapping.

[0036] In one specific embodiment, the analysis of the current chain head height and the highest locally parsed continuous height is performed as follows: obtain the current chain head height H_head, read the highest locally parsed continuous height H_local, and calculate the chain head difference d=H_head-H_local.

[0037] A preset configurable scenario switching threshold is set. If d is greater than the preset configurable scenario switching threshold, it is determined that the current scenario is historical catch-up, and only the backfill channel is enabled. At the same time, the block consumption of the push channel is not started. If d is less than or equal to the preset configurable scenario switching threshold, it is determined that the current scenario is chain head tracking, and the push channel is started and the block timing scheduler is initialized.

[0038] Upon initial startup, the height of the first block received by the push channel is used as the boundary height H_boundary. [H_local+1,H_boundary-1] is designated as the historical catch-up interval, and [H_boundary,H_head] is designated as the chain head tracking interval. In subsequent operation, when the push channel is disconnected and reconnected, the height of the first push block received after reconnection is used as the new boundary height to redivide the interval.

[0039] Step 2, Historical Catch-up Processing: In the historical catch-up scenario, the block height first received by the push channel is used as the dividing height. Blocks are concurrently and batch-pulled from the historical interval through the backfill channel. The returned blocks are directly submitted in ascending order of height until the switching conditions are met, and then the chain head tracking scheduling is executed.

[0040] In one specific embodiment, the process of concurrently batch-fetching blocks from the historical interval through the backfill channel is as follows: the historical catch-up interval [H_local+1,H_boundary-1] is divided into several height segments according to a preset segment length, and each height segment is marked with a start height and an end height.

[0041] Using each height segment as the request parameter, multiple batch fetch requests are initiated simultaneously through the backfill channel. The backfill channel returns a list of blocks within the corresponding height segment based on an interface that supports concurrent batch requests.

[0042] For each height segment, the returned block list is sorted in ascending order of block height and submitted sequentially to the downstream parsing module. After submission, the end height of the height segment is used as the new H_local. When all height segments have been submitted and d ≤ the preset configurable scene switching threshold, a scene switching to the chain head is triggered.

[0043] Step 3, Chain Head Tracking and Scheduling: Start the push channel and initialize the block timing scheduler, set the desired height cursor and the predecessor reference block, the scheduler maintains the cache mapping and performs branch judgment and verification on the cache entries according to the desired height, if the verification is passed, the output is ordered and the cursor is advanced, and missing height triggers missing block compensation.

[0044] In one specific embodiment, the initialization process of the block timing scheduler is as follows: set the desired height cursor E = H_local + 1, where H_local is the highest locally resolved continuous height when the historical catch-up is completed.

[0045] The hash value of the block corresponding to H_local is used as the hash of the predecessor reference block, and the height of this block is used as the height of the predecessor reference block. The height of the predecessor reference block and the hash together constitute the predecessor reference, which is used for the predecessor verification of subsequent pushed blocks.

[0046] The scheduler internally maintains a cache mapping with block height as the key. The cache mapping is initially empty and is used to store blocks that have arrived through the push channel but have not yet met the conditions for continuous output.

[0047] In one specific embodiment, the branching and verification process for cache entries based on the expected height is as follows: The scheduler only processes blocks whose height is equal to the current expected height cursor E. For blocks with a height higher than E, only cache storage operations are performed, and no parsing output is performed. The scheduler queries the cache mapping cache using the current expected height cursor E as the index and processes it according to the following three branches: Branch 1: There is a normal block with a height equal to E in the cache: Take the block B_E, extract the hash value of the previous block recorded in its header as the predecessor hash, and extract its height minus 1 as the predecessor height; Compare the predecessor height and predecessor hash with the height and hash of the predecessor base block respectively. If both are... If all values ​​are equal, the verification passes. B_E is written to the ordered output channel, the height of the predecessor base block is updated to E, and the hash value is the hash of B_E. The entry is removed from the cache. It is then determined whether the newly output block B_E simultaneously meets the configurable system reset trigger condition. If it does, the cache mapping inside the decommissioner is cleared, the compensation queue and retry count mapping table of the asynchronous processing unit are cleared, the expected height cursor E is reset to the current highest locally resolved continuous height H_local+1, and the predecessor base is reinitialized with the height and hash of the predecessor base block. If it does not meet the condition, E=E+1. Then, the cache mapping is queried with the updated E until there is no block in the cache with a height equal to E.

[0048] Branch 2: The position corresponding to height E in the cache is marked as an empty slot: This means that no block exists at this height, so the height is skipped, and E=E+1 is set directly, while the predecessor reference remains unchanged.

[0049] Branch 3: If there is no block of height E in the cache and that position is not marked as an empty slot: Determine that height E is a missing height, generate a compensation instruction and send it to the asynchronous processing unit. While waiting for compensation, the scheduler continues to process cache operations for blocks in the cache with heights greater than E. Once the compensation block arrives, it will be redistributed in order of E. When there are no blocks in the cache with heights not significantly lower than the current expected height cursor E and no missing heights to be compensated, the scheduler enters a sleep state and waits for the configurable polling cycle to end before re-executing the branch determination process.

[0050] In one specific embodiment, the generated compensation instruction is sent to the asynchronous processing unit. The specific generation and sending process is as follows: the scheduler adds the missing height E to the queue to be compensated and sorts the queue to be compensated in ascending order of height.

[0051] The compensation queue is divided into batches according to a preset batch size, with each batch containing a number of missing heights, and a batch compensation instruction is generated.

[0052] The asynchronous processing unit receives compensation instructions in batches, and sequentially retrieves the missing heights in each batch through the backfill channel. The retrieval results are then injected back into the scheduler cache according to height.

[0053] Step 4, Missing Block Compensation Connection: The independent asynchronous processing unit accurately pulls the missing blocks through the backfill channel, and simultaneously injects them back into the scheduler cache, adopting an exponential backoff retry strategy; when switching scenarios, the scheduler automatically identifies the height gap and triggers compensation in batches to ensure continuous connection between the historical segment and the chain head segment.

[0054] In one specific embodiment, the missing block compensation process is as follows: the asynchronous processing unit receives a list of missing heights, and for each missing height h in the list, it initiates a precise retrieval request through the backfill channel, with the request parameter being the height h, and retrieves the single block corresponding to that height.

[0055] If the fetch is successful, the fetched block will be injected into the scheduler's cache mapping, with the corresponding key being height h; If the pull fails, record the current number of retries n, let n = n + 1, and wait for 2^(n-1) seconds before re-initiating the pull request, with the first retry waiting for 1 second; when n reaches the preset retry limit, abandon the compensation for the height h, mark the height as unrecoverable, and record an alarm log.

[0056] In one specific embodiment, the exponential backoff retry strategy has the following retry process: the retry process for each missing height h is counted independently, and the asynchronous processing unit maintains a retry count mapping table for each missing height.

[0057] After each failed fetch, read the number of retries n corresponding to the current missing height h, calculate the waiting time T=2^(n-1)×T_base, where T_base is the base waiting time, which is 1 second; add the retry task for the missing height h to the delay queue, and re-execute the fetch after a delay of T seconds.

[0058] If the fetch is successful, the block is injected into the scheduler cache and the height record is deleted from the retry count mapping table. When the number of retries n for a missing height reaches the preset upper limit N_max, retries for that height are stopped, and an empty slot marking instruction is sent to the scheduler. The scheduler marks the height as an empty slot in the cache.

[0059] In one specific embodiment, the scheduler automatically identifies height gaps when the scene is switched. The specific identification and filling process is as follows: After switching from the historical catch-up scene to the chain head tracking scene, the push channel begins to deliver push blocks to the scheduler.

[0060] The scheduler receives the first block delivered by the push channel and records its height as H_first; it then reads the current expected height cursor E.

[0061] If H_first equals E, the block is directly added to the cache and processed as a normal branch.

[0062] If H_first is greater than E, the gap interval is [E, H_first-1]. The scheduler generates compensation instructions for all integer heights within this interval and writes them in batches to the compensation channel of the asynchronous processing unit. The asynchronous processing unit pulls the blocks within the gap interval one by one in ascending order of height through the backfill channel. After successful pulling, the blocks are injected into the scheduler cache in sequence. The scheduler retrieves the gap blocks from the cache in sequence according to the expected height E. After the predecessor is verified, the blocks are output in order. When processing reaches the height H_first, the predecessor benchmark has been updated to the block of H_first-1. After the first pushed block passes the verification, it is seamlessly connected and output. The historical segment and the chain head segment are continuously parsed.

[0063] The examples described in this invention are not limited to the specific embodiments listed above. The examples are merely illustrative to facilitate understanding of the invention and do not constitute a limitation on the scope of protection of this invention. Any modifications, equivalent substitutions, etc., made within the spirit and principles of this invention should be included within the scope of protection.

[0064] The above description is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined in this specification, they should all fall within the protection scope of the present invention.

Claims

1. A low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism, characterized in that, Includes the following steps: Step 1: Dual-channel establishment: Establish push and backfill channels with the blockchain node, collect the current chain head height and the highest continuous height that has been resolved locally, analyze the current chain head height and the highest continuous height that has been resolved locally, and determine the current resolution scenario; Step 2, Historical Catch-up Processing: When in a historical catch-up scenario, the block height first received by the push channel is used as the dividing height. Blocks are concurrently and batch-pulled from the historical interval through the backfill channel. The returned blocks are directly submitted in ascending order of height until the switching conditions are met, after which chain head tracking scheduling is executed. Step 3, Chain Head Tracking and Scheduling: Start the push channel and initialize the block timing scheduler, set the desired height cursor and the predecessor reference block, the scheduler maintains the cache mapping and performs branch judgment and verification on the cache entries according to the desired height, if the verification is passed, the output is ordered and the cursor is advanced, and missing height triggers missing block compensation. Step 4, Missing Block Compensation Connection: The independent asynchronous processing unit accurately pulls the missing blocks through the backfill channel, and simultaneously injects them back into the scheduler cache, adopting an exponential backoff retry strategy; when switching scenarios, the scheduler automatically identifies the height gap and triggers compensation in batches to ensure continuous connection between the historical segment and the chain head segment.

2. The low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 1, characterized in that, The specific process for establishing the push and feedback channels with the blockchain nodes is as follows: The push channel is established based on the gRPC long connection streaming subscription method. It parses the subscription request initiated by the client to the blockchain node. The blockchain node continuously pushes new block events. The push channel parses the received block events into block data structure and delivers them to the scheduler input queue. The backfill channel is established based on an interface that supports concurrent batch requests. The client sends batch query requests to the blockchain node via HTTP or JSON-RPC protocol. The request parameters include the start height and the end height. The blockchain node returns all block data within that range. The push channel and the backfill channel operate independently. The push channel is responsible for receiving real-time blocks in the chain head tracking scenario, while the backfill channel is responsible for batch fetching in the historical catch-up scenario and precise replenishment in the missing block compensation scenario. The two achieve data aggregation and orderly output through the scheduler's cache mapping.

3. The low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 1, characterized in that, The analysis of the current chain head height and the highest continuously parsed height locally is performed as follows: Get the current chain head height H_head, read the highest parsed continuous height H_local locally, and calculate the chain head difference d=H_head-H_local; A preset configurable scenario switching threshold is set. If d is greater than the preset configurable scenario switching threshold, it is determined that the current scenario is historical catch-up, and only the backfill channel is enabled. At the same time, the block consumption of the push channel is not started. If d is less than or equal to the preset configurable scenario switching threshold, it is determined that the current scenario is chain head tracking, and the push channel is started and the block timing scheduler is initialized. Upon initial startup, the height of the first block received by the push channel is used as the boundary height H_boundary. [H_local+1,H_boundary-1] is designated as the historical catch-up interval, and [H_boundary,H_head] is designated as the chain head tracking interval. In subsequent operation, when the push channel is disconnected and reconnected, the height of the first push block received after reconnection is used as the new boundary height to redivide the interval.

4. The low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 1, characterized in that, The process of concurrently batch fetching blocks from historical intervals through the backfill channel is as follows: The historical catch-up interval [H_local+1,H_boundary-1] is divided into several height segments according to a preset segment length, and each height segment is marked with a start height and an end height. Using each height segment as the request parameter, multiple batch fetch requests are initiated simultaneously through the backfill channel. The backfill channel returns a list of blocks within the corresponding height segment based on an interface that supports concurrent batch requests. For each height segment, the returned block list is sorted in ascending order of block height and submitted sequentially to the downstream parsing module. After submission, the end height of the height segment is used as the new H_local. When all height segments have been submitted and d ≤ the preset configurable scene switching threshold, a scene switching to the chain head is triggered.

5. The low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 1, characterized in that, The initialization process for the block timing scheduler is as follows: Set the desired height cursor E = H_local + 1, where H_local is the highest local resolved contiguous height when the historical catch-up is completed; The hash value of the block corresponding to H_local is used as the hash of the predecessor reference block, and the height of this block is used as the height of the predecessor reference block. The height of the predecessor reference block and the hash together constitute the predecessor reference, which is used for the predecessor verification of subsequent pushed blocks. The scheduler internally maintains a cache mapping with block height as the key. The cache mapping is initially empty and is used to store blocks that have arrived through the push channel but have not yet met the conditions for continuous output.

6. The low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 5, characterized in that, The branching and verification process for cache entries based on the expected height is as follows: The scheduler only processes blocks whose height equals the current desired height cursor E. For blocks with a height higher than E, it only performs cache storage operations and does not perform parsing output. The scheduler uses the current desired height cursor E as an index to query the cache mapping and processes it according to the following three branches: Branch 1: If a normal block with height E exists in the cache: Take block B_E, extract the hash value of the previous block recorded in its header as the predecessor hash, and extract its height minus 1 as the predecessor height; compare the predecessor height and predecessor hash with the height and hash of the predecessor base block respectively. If both are equal, the verification passes, write B_E to the ordered output channel, update the height of the predecessor base block to E and the hash value of B_E, remove the entry from the cache, and determine whether the newly output block B_E simultaneously meets the configurable system reset trigger condition; if it does, clear the cache mapping inside the depressor, clear the compensation queue and retry number mapping table of the asynchronous processing unit, reset the expected height cursor E to the current highest parsed continuous height H_local+1, and reinitialize the predecessor base with the height and hash of the predecessor base block; if it does not meet the condition, let E=E+1; then continue to query the cache mapping with the updated E until there is no block with height E in the cache. Branch 2: The position corresponding to height E in the cache is marked as an empty slot: This means that no block exists at this height, so the height is skipped, and E = E + 1 is set directly, while the predecessor reference remains unchanged; Branch 3: If there is no block of height E in the cache and that position is not marked as an empty slot: Determine that height E is a missing height, generate a compensation instruction and send it to the asynchronous processing unit. While waiting for compensation, the scheduler continues to process cache operations for blocks in the cache with heights greater than E. Once the compensation block arrives, it will be redistributed in order of E. When there are no blocks in the cache with heights not significantly lower than the current expected height cursor E and no missing heights to be compensated, the scheduler enters a sleep state and waits for the configurable polling cycle to end before re-executing the branch determination process.

7. The low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 6, characterized in that, The compensation command is generated and sent to the asynchronous processing unit. The specific generation and sending process is as follows: The scheduler adds the missing height E to the compensation queue, and sorts the compensation queue in ascending order of height. Divide the queue to be compensated into batches according to a preset batch size. Each batch contains a number of missing heights, and generate a batch compensation instruction. The asynchronous processing unit receives compensation instructions in batches, and sequentially retrieves the missing heights in each batch through the backfill channel. The retrieval results are then injected back into the scheduler cache according to height.

8. The low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 1, characterized in that, The specific compensation process for the missing block is as follows: The asynchronous processing unit receives a list of missing heights. For each missing height h in the list, it initiates a precise retrieval request through the backfill channel. The request parameter is the height h, and the unit retrieves the single block corresponding to that height. If the fetch is successful, the fetched block will be injected into the scheduler's cache mapping, with the corresponding key being height h; If the pull fails, record the current number of retries n, let n = n + 1, and wait for 2^(n-1) seconds before re-initiating the pull request, with the first retry waiting for 1 second; when n reaches the preset retry limit, abandon the compensation for the height h, mark the height as unrecoverable, and record an alarm log.

9. The low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 1, characterized in that, The exponential backoff retry strategy retry process is as follows: The retry process for each missing height h is counted independently, and the asynchronous processing unit maintains a mapping table of the number of retryes for each missing height. After each failed fetch, read the number of retries n corresponding to the current missing height h, calculate the waiting time T=2^(n-1)×T_base, where T_base is the base waiting time, which is 1 second; add the retry task for the missing height h to the delay queue, and re-execute the fetch after a delay of T seconds; If the fetch is successful, the block is injected into the scheduler cache and the height record is deleted from the retry count mapping table. When the number of retries n for a missing height reaches the preset upper limit N_max, retries for that height are stopped, and an empty slot marking instruction is sent to the scheduler. The scheduler marks the height as an empty slot in the cache.

10. A low-latency ordered parsing method for blockchain blocks based on a dual-channel mechanism according to claim 1, characterized in that, When the scene changes, the scheduler automatically identifies the height gap. The specific identification and filling process is as follows: After switching from a historical catch-up scenario to a chain-head tracking scenario, the push channel began delivering push blocks to the scheduler; The scheduler receives the first block delivered by the push channel and records its height as H_first; it then reads the current expected height cursor E. If H_first equals E, the block is directly added to the cache and processed as a normal branch. If H_first is greater than E, the gap interval is [E, H_first-1]. The scheduler generates compensation instructions for all integer heights within this interval and writes them in batches to the compensation channel of the asynchronous processing unit. The asynchronous processing unit pulls the blocks within the gap interval one by one in ascending order of height through the backfill channel. After successful pulling, the blocks are injected into the scheduler cache in sequence. The scheduler retrieves the gap blocks from the cache in sequence according to the expected height E. After the predecessor is verified, the blocks are output in order. When processing reaches the height H_first, the predecessor benchmark has been updated to the block of H_first-1. After the first pushed block passes the verification, it is seamlessly connected and output. The historical segment and the chain head segment are continuously parsed.