Visualization method and device of interactive Merkel tree and computer equipment

By obtaining and visualizing the Merkel tree data, generating and identifying display Merkel tree instances, the problem of not being able to dynamically and intuitively display the Merkel tree structure in the prior art is solved, and deep interaction and data understanding between users and Merkel trees are achieved.

CN119621836APending Publication Date: 2025-03-14HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411776646.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The Merkel tree structure cannot be displayed dynamically and intuitively in the prior art, making it difficult for users to deeply understand and operate Merkel tree data.

Method used

By obtaining the Merkel tree data of the target block, visual processing is performed to generate a Merkel tree instance, and in response to user query information, iterates through each node in the Merkel tree instance for identification and display, realizing dynamic and intuitive display.

Benefits of technology

It solves the problem that the Merkel tree structure cannot be displayed dynamically and intuitively, and realizes in-depth interaction between users and Merkel trees, helping users to understand and manipulate Merkel tree data more intuitively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621836A_ABST
    Figure CN119621836A_ABST
Patent Text Reader

Abstract

The invention relates to an interactive Merkel tree visualization method and device and computer equipment, and the method comprises the steps: obtaining Merkel tree data of a target block; performing visualization processing on the Merkel tree data to obtain a Merkel tree instance corresponding to the Merkel tree data; responding to query information for the target block, and calling node information matched with the query information; traversing each node in the Merkel tree instance, and performing identification display on the node matched with the node information; and in response to a Merkel proof request for the node, generating a target path from a root node in the Merkel tree instance to the node for identification display, and in response to a check request for the node, calling detailed information of the node for display. Through the Merkel tree display method and device, the problem that the Merkel tree structure cannot be dynamically and visually displayed is solved, and the Merkel tree structure is dynamically and visually displayed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a visualization method, apparatus, and computer device for an interactive Merkle tree. Background Art

[0002] Blockchain technology plays an important role in finance, supply chain, Internet of Things and other fields. Merkle Tree, as a key data structure in blockchain, can ensure data integrity and verifiability, making blockchain technology more secure, efficient and scalable. However, in the existing technology, Merkle Tree is usually displayed using static graphs, and it is impossible to dynamically and intuitively display the Merkle Tree structure.

[0003] There is currently no effective solution to the problem in related technologies that the Merkle tree structure cannot be displayed dynamically and intuitively. Summary of the invention

[0004] In this embodiment, a method, apparatus and computer device for visualizing an interactive Merkle tree are provided to solve the problem in the related art that the Merkle tree structure cannot be dynamically and intuitively displayed.

[0005] In a first aspect, an interactive Merkle tree visualization method is provided in this embodiment, and the method includes:

[0006] Get the Merkle tree data of the target block;

[0007] Visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data;

[0008] In response to the query information for the target block, retrieve node information matching the query information;

[0009] Each node in the Merkle tree instance is traversed, and the node matching the node information is marked and displayed.

[0010] In some of the embodiments, the visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data includes:

[0011] The Merkle tree data is converted into a corresponding hierarchical structure object through a preset visual graphics library; the hierarchical structure object includes the position information of each node and the connection relationship between each node;

[0012] Generate the Merkle tree instance corresponding to the hierarchical structure object.

[0013] In some of the embodiments, generating the Merkle tree instance corresponding to the hierarchical structure object includes:

[0014] Adding each of the nodes to a pre-created scalable vector graphic based on the position information and category attributes of each of the nodes;

[0015] Based on the connection relationship between the nodes, connecting lines between the nodes are added to obtain the Merkle tree instance.

[0016] In some of the embodiments, after visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data, the method further includes:

[0017] Acquire the real-time input frame selection area information; the frame selection area information is used to indicate the coordinate range of the frame selection area;

[0018] Based on the coordinate range of the framed area, determining a plurality of first target nodes in the Merkle tree instance;

[0019] Each of the first target nodes is marked and displayed.

[0020] In some of the embodiments, determining a plurality of first target nodes in the Merkle tree instance based on the coordinate range of the framed area includes:

[0021] Traversing each of the nodes in the Merkle tree instance, and determining whether the position coordinates of each of the nodes intersect with the coordinate range of the frame selection area;

[0022] Add the nodes intersecting with the coordinate range of the frame selection area to a preset global variable;

[0023] Each of the nodes in the global variable is used as the first target node.

[0024] In some of the embodiments, after visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data, the method further includes:

[0025] Selecting a second target node from among the nodes;

[0026] In response to a Merkle proof request for the second target node, generating a target path from a root node in the Merkle tree instance to the second target node;

[0027] The target path is marked and displayed.

[0028] In some of the embodiments, after visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data, the method further includes:

[0029] In response to a request for viewing any of the nodes in the Merkle tree instance, retrieving detailed information of the node;

[0030] Based on the detailed information of the node, a corresponding information chart is generated for display.

[0031] In a second aspect, in this embodiment, a device for visualizing an interactive Merkle tree is provided, the device comprising: an acquisition module, a generation module, a query module, and an identification module;

[0032] The acquisition module is used to acquire the Merkle tree data of the target block;

[0033] The generating module is used to generate a Merkle tree instance corresponding to the Merkle tree data through a preset visual graphics library;

[0034] The query module is used to retrieve node information matching the query information in response to the query information for the target block;

[0035] The identification module is used to traverse each node in the Merkle tree instance and identify and display the node matching the node information.

[0036] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the interactive Merkle tree visualization method described in the first aspect is implemented.

[0037] In a fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the interactive Merkle tree visualization method described in the first aspect is implemented.

[0038] Compared with the related art, the interactive Merkle tree visualization method, apparatus and computer device provided in this embodiment obtain the Merkle tree data of the target block; visualize the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data; in response to query information for the target block, retrieve node information matching the query information; traverse each node in the Merkle tree instance, and identify and display the nodes matching the node information, thereby solving the problem of not being able to dynamically and intuitively display the Merkle tree structure and realizing the dynamic and intuitive display of the Merkle tree structure.

[0039] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0041] Figure 1 It is a hardware structure block diagram of a terminal device of an interactive Merkle tree visualization method provided in an embodiment of the present application;

[0042] Figure 2 is a flowchart of an interactive Merkle tree visualization method provided by an embodiment of the present application;

[0043] Figure 3 is a flowchart of a method for visualizing an interactive Merkle tree provided by another embodiment of the present application;

[0044] Figure 4 It is a flowchart of a method for visualizing an interactive Merkle tree provided in a preferred embodiment of the present application;

[0045] Figure 5 It is a structural block diagram of an interactive Merkle tree visualization device provided in one embodiment of the present application.

[0046] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 10, acquisition module; 20, generation module; 30, query module; 40, identification module. DETAILED DESCRIPTION

[0047] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0048] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0049] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the interactive Merkle tree visualization method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0050] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the interactive Merkel tree visualization method in the present embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0051] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0052] In this embodiment, a method for visualizing an interactive Merkle tree is provided. Figure 2 is a flowchart of the interactive Merkle tree visualization method of this embodiment, such as Figure 2 As shown, the process includes the following steps:

[0053] Step S210, obtaining the Merkle tree data of the target block;

[0054] Step S220, visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data;

[0055] Step S230, in response to the query information for the target block, retrieve node information matching the query information;

[0056] Step S240, traverse each node in the Merkle tree instance, and mark and display the nodes that match the node information.

[0057] Specifically, according to the block height or hash input in the interface, the corresponding target block is determined, and in response to the data request instruction for the target block, the Merkle tree data of the target block is retrieved. Through the preset visual graphics library, the Merkle tree data is converted into a corresponding hierarchical object, which contains the location information of each node and the connection relationship between each node. Based on the location information and category attributes of each node, each node is added to the pre-created scalable vector graphics, and the connection lines between each node are added based on the connection relationship between each node to obtain a Merkle tree instance, wherein the nodes are drawn using corresponding styles according to the different category attributes of each node, for example, different colors or graphics are used to draw nodes with different category attributes, etc., so that users can browse and operate the Merkle tree structure intuitively and clearly. The visual graphics library in this embodiment includes but is not limited to data-driven documents (Data-Driven Documents.js, D3.js) and a three-dimensional graphics library (Three.js).

[0058] Furthermore, when querying a specific node in the target block, the query information for the target block input in the interface is obtained. The query information is usually information for leaf nodes, including state data key (key) value, key value prefix, account address, etc. For example, the query information is the state data key value "user123_balance", account address "0x123abc...". The query information is sent to the backend for matching, and the node information matching the query information is returned. After receiving the node information matching the query information, each node in the Merkle tree instance is traversed, and the nodes matching the node information are marked and displayed. The marking method includes highlighting, enlarging, adding borders or shadow effects, etc., so as to quickly locate specific nodes in the Merkle tree and accurately mark them. It can be understood that if the query information entered is a key value prefix, all matching nodes are marked and displayed; if other query information is entered, the corresponding single node is marked and displayed.

[0059] It should be noted that after generating the Merkle tree instance corresponding to the Merkle tree data, the multiple nodes in the Merkle tree instance within the selected area can be batch-marked according to the selected area information input in real time; or, Merkle proof can be performed on the nodes in the Merkle tree instance to quickly and intuitively verify the integrity of the data; or, detailed information can be viewed for a certain node in the Merkle tree instance, and the detailed information of the node can be converted into a corresponding information chart for display. The above functions ensure the deep interaction between the user and the Merkle tree, which helps the user to deeply understand the Merkle tree data.

[0060] Blockchain technology plays an important role in finance, supply chain, Internet of Things and other fields. Merkle tree, as a key data structure in blockchain, can ensure data integrity and verifiability, making blockchain technology more secure, efficient and scalable. However, in existing technologies, Merkle tree is usually displayed using static graphs, and it is impossible to dynamically and intuitively display the Merkle tree structure.

[0061] Compared with the prior art, the present application obtains the Merkle tree data of the target block; visualizes the Merkle tree data to obtain the Merkle tree instance corresponding to the Merkle tree data; in response to the query information for the target block, retrieves the node information matching the query information; traverses each node in the Merkle tree instance, and identifies and displays the nodes matching the node information. Based on this, by visualizing the Merkle tree data of the target block into the corresponding Merkle tree instance to generate an interactive Merkle tree, it is possible to identify and display the matching nodes in the Merkle tree instance according to the query information for the target block, that is, accurately identify the nodes, solve the problem of not being able to dynamically and intuitively display the Merkle tree structure, and realize the dynamic and intuitive display of the Merkle tree structure.

[0062] In some of the embodiments, Figure 3 As shown, the step S220 of visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data includes the following steps:

[0063] Step S221, converting the Merkle tree data into a corresponding hierarchical structure object through a preset visual graphics library; the hierarchical structure object includes the location information of each node and the connection relationship between each node;

[0064] Step S222: Generate a Merkle tree instance corresponding to the hierarchical structure object.

[0065] In this embodiment, a preset visualization graphics library is used to draw a Merkle tree instance corresponding to the Merkle tree data, and the visualization graphics library that can be used includes but is not limited to D3.js and Three.js. Specifically, the Merkle tree data is parsed by the visualization graphics library, and the Merkle tree data is converted into a corresponding hierarchical structure object. The converted hierarchical structure object contains the location information of each node and the connection relationship between each node, and generates a Merkle tree instance corresponding to the hierarchical structure object.

[0066] Taking D3.js as an example for detailed explanation, the position information of each node in the Merkle tree is calculated through the layout function d3.tree() of D3.js, and then the hierarchy function of D3.js is used to convert the Merkle tree data in JSON format into the corresponding hierarchy object to generate the corresponding Merkle tree instance.

[0067] Through this embodiment, the Merkle tree data is converted into corresponding hierarchical objects through a preset visualization graphics library. The hierarchical objects contain the location information of each node and the connection relationship between each node, and a Merkle tree instance corresponding to the hierarchical object is generated to realize the visualization of the Merkle tree.

[0068] In some of the embodiments, generating a Merkle tree instance corresponding to the hierarchical structure object in step S222 includes the following steps:

[0069] Adding each node to a pre-created scalable vector graphic based on the position information and category attributes of each node;

[0070] Based on the connection relationship between the nodes, connecting lines are added between the nodes to obtain a Merkle tree instance.

[0071] Specifically, the location information and category attributes of each node are obtained, wherein the location information of the node is usually represented by the x-coordinate and the y-coordinate, and the category attributes of the node are account or status data, etc. According to the location information of each node, each node is added to the pre-created Scalable Vector Graphics (SVG), and the node is drawn using the corresponding style according to the different category attributes of each node, for example, different colors or graphics are used to draw nodes with different category attributes, etc. Afterwards, according to the connection relationship between different nodes, connecting lines between the nodes are added to generate a specific Merkle tree instance.

[0072] Taking D3.js as an example for detailed explanation, the corresponding elements are dynamically created on the SVG canvas in advance, that is, nodes are added based on the position information of each node, each node is drawn in a different style according to different category attributes, and connecting lines between the nodes are added according to the connection relationship between the nodes. The connecting lines use SVG elements to represent the parent-child relationship between the nodes, and the paths between the nodes are drawn by the link generation function.

[0073] Through this embodiment, each node is added to the pre-created scalable vector graphics based on the position information and category attributes of each node, and based on the connection relationship between each node, connecting lines between each node are added to obtain a Merkle tree instance, thereby realizing the visualization of the Merkle tree.

[0074] In some of the embodiments, after the Merkle tree data is visualized to obtain a Merkle tree instance corresponding to the Merkle tree data, the interactive Merkle tree visualization method further includes the following steps:

[0075] Get the real-time input frame selection area information; the frame selection area information is used to indicate the coordinate range of the frame selection area;

[0076] Based on the coordinate range of the framed area, determine multiple first target nodes in the Merkle tree instance;

[0077] Each first target node is marked and displayed.

[0078] Specifically, the real-time input frame selection area information is obtained, and the frame selection area information is used to indicate the coordinate range of the frame selection area. The corresponding frame selection area information can be input using specific coordinate values, such as inputting the coordinates of each vertex of the frame selection area, etc., and the mouse can also be used to drag the frame selection. This embodiment does not limit the specific input method.

[0079] Furthermore, in the Merkle tree instance, multiple first target nodes within the coordinate range of the selection area are determined, and each first target node is marked and displayed. For example, when batch selecting nodes using the mouse, when a mouse press event is detected, the position movement of the mouse is captured, and the coordinates and size of the selection tool are updated according to the real-time position of the mouse, until a mouse lift event is detected, and the selection operation is ended. In the process of updating the selection tool, all nodes within the selection range of the selection tool are detected as first target nodes, and each first target node is marked and displayed.

[0080] Through this embodiment, the real-time input frame selection area information is obtained, and the frame selection area information is used to indicate the coordinate range of the frame selection area. Based on the coordinate range of the frame selection area, multiple first target nodes in the Merkle tree instance are determined, and each first target node is marked and displayed to achieve batch selection of nodes to meet user needs.

[0081] In some of the embodiments, determining a plurality of first target nodes in the Merkle tree instance based on the coordinate range of the frame selection area includes the following steps:

[0082] Traverse each node in the Merkle tree instance to determine whether the position coordinates of each node intersect with the coordinate range of the selected area;

[0083] Add the nodes that intersect the coordinate range of the selected area to the preset global variables;

[0084] Make each node in the global variable the first target node.

[0085] Specifically, traverse each node in the Merkle tree instance to determine whether the position coordinates of each node intersect with the coordinate range of the selected area. If it is detected that the position coordinates of the node intersect with the coordinate range of the selected area, add the node to the preset global variable. The global variable is used to record the selected node, and finally output each node in the global variable as the first target node.

[0086] Among them, when using the mouse to select nodes in batches, as the position of the mouse changes, multiple nodes selected in the current selection area are detected in real time, the identity of each node is recorded through a global variable, and the nodes in the global variable are marked as selected, so that users can identify valid selected nodes.

[0087] Through this embodiment, each node in the Merkle tree instance is traversed to determine whether the position coordinates of each node intersect with the coordinate range of the selected area, the nodes that intersect with the coordinate range of the selected area are added to the preset global variable, and each node in the global variable is used as the first target node to achieve accurate batch selection of nodes.

[0088] In some of the embodiments, after the Merkle tree data is visualized to obtain a Merkle tree instance corresponding to the Merkle tree data, the interactive Merkle tree visualization method further includes the following steps:

[0089] Select a second target node from each node;

[0090] In response to a Merkle proof request for a second target node, generating a target path from a root node in the Merkle tree instance to the second target node;

[0091] The target path is marked and displayed.

[0092] Specifically, a second target node is selected from each node of the Merkle tree instance, and the second target node can be any node to be Merkle-proven, usually a leaf node. In response to a Merkle-proven request for the second target node, a target path from the root node in the Merkle tree instance to the second target node is calculated, each node on the target path is traversed, and each node on the target path is marked and displayed, and the marking method includes highlighting, enlarging, adding borders or shadow effects, etc.

[0093] It should be noted that the Merkel proof is used to verify data integrity and consistency. After performing the Merkel proof for the second objective, this embodiment intuitively displays the calculated verification path to visualize the Merkel proof results and help users intuitively understand the data verification process.

[0094] Through this embodiment, a second target node is selected from each node, and in response to a Merkle proof request for the second target node, a target path from the root node in the Merkle tree instance to the second target node is generated, and the target path is marked and displayed, so as to clearly display the verification path.

[0095] In some of the embodiments, after the Merkle tree data is visualized to obtain a Merkle tree instance corresponding to the Merkle tree data, the interactive Merkle tree visualization method further includes the following steps:

[0096] In response to a request to view any node in the Merkle tree instance, retrieve detailed information of the node;

[0097] Based on the detailed information of the node, the corresponding information chart is generated for display.

[0098] Specifically, when a user selects a node of interest in a Merkle tree instance, a viewing request for the node is generated, and the selection method includes but is not limited to hovering, clicking, and box selection. In response to the viewing request for the node, the detailed information of the node is retrieved, wherein the detailed information of the node includes the block number, account address, transaction sequence number, transaction hash, key value, new value, and old value, etc. Based on the detailed information of the node, a corresponding information chart is generated for display, for example, the information chart is displayed in a floating manner near the node, or a new page is generated to display the information chart, etc.

[0099] Exemplarily, a click event listener is added to each node in the Merkle tree instance. When it is detected that the user clicks "view node details", the corresponding interface is called to obtain the detailed information of the node, and a table containing the node details is generated, so that the node details can be viewed in a simple and intuitive way.

[0100] Through this embodiment, in response to a viewing request for any node in a Merkle tree instance, the detailed information of the node is retrieved, and based on the detailed information of the node, a corresponding information chart is generated for display. A node detailed information display mechanism is provided to achieve deep query that interacts with the Merkle tree.

[0101] The present embodiment is described and illustrated below through preferred embodiments.

[0102] Figure 4 is a flow chart of the interactive Merkle tree visualization method of the preferred embodiment, such as Figure 4 As shown, the interactive Merkle tree visualization method includes the following steps:

[0103] Step S410, determining the corresponding target block according to the block height or hash input in the interface, and obtaining the Merkle tree data of the target block;

[0104] Step S420, converting the Merkle tree data into a corresponding hierarchical structure object through a preset visual graphics library; the hierarchical structure object includes the location information of each node and the connection relationship between each node;

[0105] Step S430, adding each node to the pre-created scalable vector graphics based on the position information and category attributes of each node, and adding connection lines between each node based on the connection relationship between each node, to obtain a Merkle tree instance;

[0106] Step S440, in response to the query information for the target block, retrieve node information matching the query information;

[0107] Step S450, traverse each node in the Merkle tree instance, and mark and display the nodes that match the node information.

[0108] Through this embodiment, the corresponding target block is determined according to the block height or hash input in the interface, the Merkle tree data of the target block is obtained, and the Merkle tree data is converted into a corresponding hierarchical structure object through a preset visualization graphics library. The hierarchical structure object contains the location information of each node and the connection relationship between each node. Based on the location information and category attributes of each node, each node is added to the pre-created scalable vector graphics, and the connection lines between each node are added based on the connection relationship between each node to obtain a Merkle tree instance, thereby realizing the visualization of the Merkle tree data.

[0109] Furthermore, in response to query information for the target block, node information matching the query information is retrieved, each node in the Merkle tree instance is traversed, and nodes matching the node information are identified and displayed, thereby solving the problem of being unable to dynamically and intuitively display the Merkle tree structure and realizing dynamic and intuitive display of the Merkle tree structure.

[0110] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0111] In this embodiment, a visualization device for an interactive Merkle tree is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below may implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0112] Figure 5 is a structural block diagram of the interactive Merkle tree visualization device of this embodiment, such as Figure 5 As shown, the device includes: an acquisition module 10, a generation module 20, a query module 30 and an identification module 40;

[0113] An acquisition module 10 is used to acquire Merkle tree data of a target block;

[0114] A generating module 20, used to generate a Merkle tree instance corresponding to the Merkle tree data through a preset visual graphics library;

[0115] A query module 30, configured to retrieve node information matching the query information in response to the query information for the target block;

[0116] The identification module 40 is used to traverse each node in the Merkle tree instance and identify and display the nodes that match the node information.

[0117] Through the device provided by this embodiment, the Merkle tree data of the target block is obtained; the Merkle tree data is visualized to obtain a Merkle tree instance corresponding to the Merkle tree data; in response to query information for the target block, the node information matching the query information is retrieved; each node in the Merkle tree instance is traversed, and the nodes matching the node information are marked and displayed, which solves the problem that the Merkle tree structure cannot be dynamically and intuitively displayed, and realizes the dynamic and intuitive display of the Merkle tree structure.

[0118] In some of the embodiments, the generation module 20 is also used to convert the Merkle tree data into a corresponding hierarchical object through a preset visual graphics library; the hierarchical object includes the location information of each node and the connection relationship between each node; and generate a Merkle tree instance corresponding to the hierarchical object.

[0119] In some of the embodiments, the generation module 20 is further used to add each node to the pre-created scalable vector graphics based on the location information and category attributes of each node; and to add connection lines between each node based on the connection relationship between each node to obtain a Merkle tree instance.

[0120] In some of these embodiments, Figure 5 On the basis of, the device also includes a batch processing module, which is used to obtain the real-time input frame selection area information; the frame selection area information is used to indicate the coordinate range of the frame selection area; based on the coordinate range of the frame selection area, multiple first target nodes in the Merkle tree instance are determined; and each first target node is marked and displayed.

[0121] In some of the embodiments, the batch processing module is also used to traverse each node in the Merkle tree instance, determine whether the position coordinates of each node intersect with the coordinate range of the selected area; add the nodes that intersect with the coordinate range of the selected area to a preset global variable; and use each node in the global variable as the first target node.

[0122] In some of these embodiments, Figure 5 On the basis of, the device also includes a verification module for selecting a second target node from each node; generating a target path from the root node in the Merkle tree instance to the second target node in response to a Merkle proof request for the second target node; and marking and displaying the target path.

[0123] In some of these embodiments, Figure 5 On the basis of, the device also includes a viewing module for responding to a viewing request for any node in the Merkle tree instance, retrieving detailed information of the node; based on the detailed information of the node, generating a corresponding information chart for display.

[0124] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0125] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0126] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0127] S1, obtain the Merkle tree data of the target block;

[0128] S2, generating a Merkle tree instance corresponding to the Merkle tree data through a preset visualization graphics library;

[0129] S3, in response to the query information for the target block, retrieve the node information matching the query information;

[0130] S4, traverse each node in the Merkle tree instance, and mark and display the nodes that match the node information.

[0131] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0132] In addition, in combination with the interactive Merkle tree visualization method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the interactive Merkle tree visualization methods in the above embodiments is implemented.

[0133] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0134] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0135] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0136] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for visualizing an interactive Merkle tree, characterized in that: The method comprises: Get the Merkle tree data of the target block; Visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data; In response to the query information for the target block, retrieve node information matching the query information; Each node in the Merkle tree instance is traversed, and the node matching the node information is marked and displayed.

2. The interactive Merkle tree visualization method according to claim 1, characterized in that: The visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data includes: The Merkle tree data is converted into a corresponding hierarchical structure object through a preset visual graphics library; the hierarchical structure object includes the position information of each node and the connection relationship between each node; Generate the Merkle tree instance corresponding to the hierarchical structure object.

3. The interactive Merkle tree visualization method according to claim 2, characterized in that: The generating the Merkle tree instance corresponding to the hierarchical structure object comprises: Adding each of the nodes to a pre-created scalable vector graphic based on the position information and category attributes of each of the nodes; Based on the connection relationship between the nodes, connecting lines between the nodes are added to obtain the Merkle tree instance.

4. The interactive Merkle tree visualization method according to claim 1, characterized in that: After visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data, the method further includes: Acquire the real-time input frame selection area information; the frame selection area information is used to indicate the coordinate range of the frame selection area; Based on the coordinate range of the framed area, determining a plurality of first target nodes in the Merkle tree instance; Each of the first target nodes is marked and displayed.

5. The interactive Merkle tree visualization method according to claim 4, characterized in that: The determining, based on the coordinate range of the framed area, a plurality of first target nodes in the Merkle tree instance includes: Traversing each of the nodes in the Merkle tree instance, and determining whether the position coordinates of each of the nodes intersect with the coordinate range of the frame selection area; Add the nodes intersecting with the coordinate range of the frame selection area to a preset global variable; Each of the nodes in the global variable is used as the first target node.

6. The interactive Merkle tree visualization method according to claim 1, characterized in that: After visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data, the method further includes: Selecting a second target node from among the nodes; In response to a Merkle proof request for the second target node, generating a target path from a root node in the Merkle tree instance to the second target node; The target path is marked and displayed.

7. The interactive Merkle tree visualization method according to claim 1, characterized in that: After visualizing the Merkle tree data to obtain a Merkle tree instance corresponding to the Merkle tree data, the method further includes: In response to a request for viewing any of the nodes in the Merkle tree instance, retrieving detailed information of the node; Based on the detailed information of the node, a corresponding information chart is generated for display.

8. An interactive Merkle tree visualization device, characterized in that: The device comprises: an acquisition module, a generation module, a query module and an identification module; The acquisition module is used to acquire the Merkle tree data of the target block; The generating module is used to generate a Merkle tree instance corresponding to the Merkle tree data through a preset visual graphics library; The query module is used to retrieve node information matching the query information in response to the query information for the target block; The identification module is used to traverse each node in the Merkle tree instance and identify and display the node matching the node information.

9. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps of the interactive Merkle tree visualization method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the interactive Merkle tree visualization method according to any one of claims 1 to 7 are implemented.