A data visualization method, apparatus, device, and computer storage medium

By monitoring blockchain block insertion events in real time through the listening module, the key and attribute values ​​of state data are determined, which solves the problem of insufficient real-time performance in existing technologies and realizes real-time visualization of state data and resource conservation.

CN116795905BActive Publication Date: 2026-02-24CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210922600.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-02
Publication Date
2026-02-24
Estimated Expiration
2042-08-02

AI Technical Summary

Technical Problem

Existing methods for visualizing state data in blockchain networks are not real-time efficient, and periodically acquiring state data consumes a significant amount of system physical and network resources.

Method used

The monitoring module monitors block-writing events in the blockchain in real time, determines the key and attribute values ​​of state data, and enables visual display.

Benefits of technology

It enables real-time monitoring and visualization of blockchain state data, saving system physical and network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116795905B_ABST
    Figure CN116795905B_ABST
Patent Text Reader

Abstract

The application discloses a data visualization method and device, equipment and a computer storage medium. The method comprises the following steps: obtaining a to-be-monitored block-in event from a block chain; monitoring the to-be-monitored block-in event in real time based on a monitoring module, determining a key value and an attribute value corresponding to state data in the case that the state data changes; and realizing the visualization display of the state data based on the key value and the attribute value. In this way, the key value and the attribute value corresponding to the state data can be determined when the state data changes by monitoring the to-be-monitored block-in event in real time, and the key value and the attribute value are used as the state data for the visualization display, so that the real-time monitoring and the visualization display of the state data in the block chain are realized, the real-time performance is high, and the system physical and network resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology application technology, and in particular to a data visualization method, apparatus, device, and computer storage medium. Background Technology

[0002] Blockchain is a distributed, shared ledger and database characterized by decentralization, immutability, full traceability, accountability, collective maintenance, and transparency. These characteristics ensure the "honesty" and "transparency" of blockchain, laying the foundation for trust. Essentially, blockchain is a decentralized database. Data in blockchain includes two types: ledger data and state data. Ledger data contains ordered, immutable records of state transitions, i.e., transaction records, and blockchain configuration records.

[0003] In related technologies, existing methods for visualizing state data in blockchain networks (such as Hyperledger Fabric) mainly obtain the world state of the blockchain through the SDK (Software Development Kit) or REST (a software architecture style - Representational State Transition) interface provided by the blockchain. Existing blockchain state data visualization methods are not real-time, and can only obtain blockchain state data at a certain time periodically. Moreover, the periodic acquisition and display of all state data results in a large amount of data to be queried, consuming a lot of system physical and network resources. Summary of the Invention

[0004] This application proposes a data visualization method, apparatus, device, and computer storage medium, which can achieve targeted visualization of status data and enable real-time data updates.

[0005] To achieve the above objectives, the technical solution of this application is implemented as follows:

[0006] In a first aspect, embodiments of this application provide a data visualization method, the method comprising:

[0007] Obtain the block events to be monitored from the blockchain;

[0008] The monitoring module performs real-time monitoring of the block event to be monitored, and determines the key value and attribute value corresponding to the state data when the state data of the block event to be monitored changes.

[0009] Based on the key value and the attribute value, the status data can be visualized.

[0010] In some embodiments, the monitoring module performs real-time monitoring of the block-in event to be monitored, and determines the key and attribute values ​​corresponding to the state data when the state data of the block-in event to be monitored changes, including:

[0011] The block event to be monitored is decoded to obtain the corresponding block information; wherein, the block information includes block header, block data and block metadata;

[0012] Based on the monitoring module, the block data is parsed and processed to obtain transaction information;

[0013] Based on the method name and position value configured in the monitoring module, obtain the key value and attribute value corresponding to the status data in the transaction information.

[0014] In some embodiments, the monitoring module is connected to a visualization system to visualize the status data based on the key value and the attribute value, including:

[0015] Send the key-value and attribute-value corresponding to the status data to the visualization system;

[0016] Control the visualization system to display the key values ​​and attribute values ​​corresponding to the status data.

[0017] In some embodiments, prior to retrieving the block event to be monitored from the blockchain, the method further includes:

[0018] User information is created based on the first blockchain; wherein, the user information includes access username, user certificate, channel name and chaincode name.

[0019] By configuring the user information, the monitoring module is connected to the first blockchain.

[0020] In some embodiments, before the real-time monitoring of the block event to be monitored is performed based on the listening module, the method further includes:

[0021] Configure the listening module with the method name and position value corresponding to the status data;

[0022] The method name and the position value are used to obtain the key value and the attribute value corresponding to the state data.

[0023] In some embodiments, before retrieving the block event to be monitored from the blockchain, the method further includes:

[0024] Obtain at least one block entry event in the blockchain;

[0025] The at least one incoming block event is sorted by the sorting node of the blockchain, and the sorted at least one incoming block event is stored by the accounting node of the blockchain.

[0026] In some embodiments, the method further includes obtaining the block event to be monitored from the blockchain:

[0027] When the at least one inbound event is added to the ledger node, the at least one inbound event is determined to be the inbound event to be monitored.

[0028] Secondly, embodiments of this application provide a data visualization device, characterized in that the data visualization device includes an acquisition unit, a monitoring unit, and a display unit, wherein,

[0029] The acquisition unit is configured to acquire the block events to be monitored from the blockchain;

[0030] The monitoring unit is configured to monitor the block event to be monitored in real time based on the listening module, and determine the key value and attribute value corresponding to the state data when the state data of the block event to be monitored changes.

[0031] The display unit is configured to visualize the status data based on the key value and the attribute value.

[0032] Thirdly, embodiments of this application provide an electronic device, which includes: a memory and a processor; wherein,

[0033] The memory is used to store computer programs that can run on the processor;

[0034] The processor is configured to execute the method as described in the first aspect when running the computer program.

[0035] Fourthly, embodiments of this application provide a computer storage medium storing a data visualization program, which, when executed by at least one processor, implements the method described in the first aspect.

[0036] This application provides a data visualization method, apparatus, device, and computer storage medium that obtains monitored block events from a blockchain; monitors these events in real time using a listening module; determines the key and attribute values ​​corresponding to the state data when the state data of the monitored block events changes; and visualizes the state data based on the key and attribute values. This allows for real-time monitoring and visualization of state data within the blockchain by listening to monitored block events in real time, determining the corresponding key and attribute values ​​when the state data changes, and visualizing the key and attribute values ​​as state data. This provides high real-time performance and conserves system physical and network resources. Attached Figure Description

[0037] Figure 1 A flowchart illustrating a data visualization method provided in an embodiment of this application;

[0038] Figure 2 A flowchart illustrating another data visualization method provided in an embodiment of this application;

[0039] Figure 3 A schematic diagram of the system framework of a data visualization method provided in an embodiment of this application;

[0040] Figure 4 This is a schematic diagram of the composition structure of a data visualization device provided in an embodiment of this application;

[0041] Figure 5 A schematic diagram of the composition structure of an electronic device provided in an embodiment of this application;

[0042] Figure 6 This is a schematic diagram of the composition structure of another electronic device provided in an embodiment of this application. Detailed Implementation

[0043] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.

[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0045] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first, second, third" used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0046] As we can understand it, blockchain is a distributed, shared ledger and database with characteristics such as decentralization, immutability, full traceability, accountability, collective maintenance, and transparency. These characteristics ensure the "honesty" and "transparency" of the blockchain, laying the foundation for trust. Essentially, blockchain is a decentralized database. As the underlying technology of Bitcoin, it is a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of Bitcoin network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. Data in the blockchain includes two types: ledger data and state data. Ledger data contains ordered, immutable records of state transitions, i.e., transaction records and blockchain configuration records. State data, also called world state, maintains the current state of the ledger.

[0047] In related technologies, the main method for visualizing state data in blockchain networks (such as Hyperledger Fabric) is to obtain the world state of the blockchain through the SDK (Software Development Kit) or REST (a software architecture style - Representational State Transition) interface provided by the blockchain.

[0048] For example, the world state of the blockchain can be obtained in the SDK using the following code:

[0049] byte[]response=contract.submitTransaction("ReadAllAsset");

[0050] The code above retrieves the states of all assets under this chaincode in the blockchain. The retrieved bytes are then serialized into JSON-formatted state data. Specifically, serialization can be implemented using the following code:

[0051]

[0052] The visualization system will realize the visualization of this data. Specifically, the visualization can include large screen display, graphic display, table display, etc. However, the existing blockchain state data visualization methods are not real-time and can only obtain blockchain state data at a certain time periodically. Periodically obtaining all state data for display results in a large amount of data query and consumes a lot of system physical and network resources.

[0053] Based on this, this application provides a data visualization method. The basic idea of ​​this method is as follows: First, obtain the block event to be monitored from the blockchain. Second, monitor the block event in real time using a listening module. When the state data of the block event changes, determine the key and attribute values ​​corresponding to the state data. Third, visualize the state data based on the key and attribute values. In this way, by listening to the block event in real time, determining the key and attribute values ​​corresponding to the state data when the state data changes, and visualizing the key and attribute values ​​as state data, real-time monitoring and visualization of state data in the blockchain can be achieved. This method offers high real-time performance and saves system physical and network resources.

[0054] Example 1

[0055] In one embodiment of this application, see [link to embodiment]. Figure 1 This illustrates a flowchart of a data visualization method provided in an embodiment of this application. Figure 1 As shown, the method may include:

[0056] S101: Obtain the block events to be monitored from the blockchain.

[0057] It should be noted that the data visualization method provided in this application embodiment can be applied to blockchain for data visualization. Blockchain is a distributed shared ledger and database, characterized by decentralization, immutability, full traceability, accountability, collective maintenance, and transparency. Therefore, blockchain is essentially a decentralized database, and thus cannot achieve data visualization of state data. Furthermore, due to the large volume of data, real-time updates are not possible.

[0058] It should also be noted that, in the embodiments of this application, the block event to be monitored refers to the block event that has been processed and is about to be stored. When each block event has been sorted and is about to be stored, the block event is obtained as the block event to be monitored.

[0059] In some embodiments, prior to retrieving the block event to be monitored from the blockchain, the method may further include:

[0060] User information is created based on the first blockchain; wherein, the user information includes access username, user certificate, channel name and chaincode name.

[0061] By configuring the user information, the monitoring module is connected to the first blockchain.

[0062] It should be noted that, in this embodiment of the application, after determining the access username, user certificate, channel name, and chaincode name during the creation of user information, the monitoring module can only access the first blockchain if all of these information match the access username, user certificate, channel name, and chaincode name of the monitoring module. Here, the first blockchain refers to any user blockchain within the blockchain framework.

[0063] In some embodiments, before the real-time monitoring of the block event to be monitored is performed based on the listening module, the method may further include:

[0064] Configure the listening module with the method name and position value corresponding to the status data;

[0065] The method name and the position value are used to obtain the key value and the attribute value corresponding to the state data.

[0066] It should be noted that, in the embodiments of this application, the position value corresponding to the state data is used to obtain the key value corresponding to the state data, and the method name corresponding to the state data is used to determine the attribute value corresponding to the state data. In this way, the key value is first determined by the position value, and then the association between the key value and the attribute value is determined according to the method name, thereby determining the attribute value corresponding to the state data and realizing the filtering of state data in the block event.

[0067] In some embodiments, the method may further include, before retrieving the block event to be monitored from the blockchain:

[0068] Obtain at least one block entry event in the blockchain;

[0069] The at least one incoming block event is sorted by the sorting node of the blockchain, and the sorted at least one incoming block event is stored by the accounting node of the blockchain.

[0070] It should be noted that in this embodiment of the application, the sorting node can be an Orderer node, and the accounting node can be a peer node. After the transaction message corresponding to the block entry event is successfully broadcast to the Orderer node, the Orderer node sorts the transactions. When the block containing the block entry event is added to the peer node's ledger, the listening module obtains the current block entry event and uses it as the block entry event to be monitored.

[0071] In some embodiments, obtaining the block event to be monitored from the blockchain may include:

[0072] When the at least one inbound event is added to the ledger node, the at least one inbound event is determined to be the inbound event to be monitored.

[0073] It should be noted that, in this embodiment of the application, when at least one inbound event is added to the ledger node, it indicates that the processing of at least one inbound event has been completed and storage is about to begin. Therefore, the inbound event obtained at this time is the most accurate and is also the final storage version.

[0074] In this way, the block events to be monitored are obtained from the blockchain so that the subsequent listening module can monitor the state data.

[0075] S102: Based on the monitoring module, the block event to be monitored is monitored in real time. When the state data of the block event to be monitored changes, the key value and attribute value corresponding to the state data are determined.

[0076] It should be noted that, in the embodiments of this application, the key value corresponding to the status data can be the name of an entity or person on the distributed ledger platform, and the corresponding attribute value can be the amount. Accordingly, the entity or person name and the amount have a one-to-one or one-to-many correspondence, and the corresponding attribute value can be determined based on the key value of the status data.

[0077] In some embodiments, such as Figure 2 As shown, the monitoring module performs real-time monitoring of the block-in event to be monitored. When the state data of the block-in event to be monitored changes, the key value and attribute value corresponding to the state data are determined, which may include:

[0078] S201: Decode the block event to be monitored to obtain the corresponding block information; wherein, the block information includes block header, block data and block metadata;

[0079] S202: Based on the monitoring module, the block data is parsed and processed to obtain transaction information;

[0080] S203: Based on the method name and position value configured in the monitoring module, obtain the key value and attribute value corresponding to the status data in the transaction information.

[0081] It should be noted that, in this embodiment, the block information may include a block header, block data, and block metadata: the block header contains the block number, current block hash, and previous block hash; the block data is a series of transaction data; and the block metadata mainly includes the block write time, the writer, and the signature. The block listener module obtains the data from the block and parses it into transaction information.

[0082] It should also be noted that, in the embodiments of this application, in the transaction information, the key value is first determined by the position value, and then the attribute value corresponding to the status data is determined according to the association between the key value and the attribute value, so as to achieve the filtering of status data in the block entry event.

[0083] S103: Based on the key value and the attribute value, realize the visual display of the status data.

[0084] It should be noted that key values ​​and attribute values ​​together constitute state data. Therefore, in the process of visualizing state data, it is only necessary to synchronize the corresponding key values ​​and attribute values ​​to the visualization system to achieve the visualization of state data.

[0085] In some embodiments, the monitoring module is connected to a visualization system to visualize the status data based on the key value and the attribute value, which may include:

[0086] Send the key-value and attribute-value corresponding to the status data to the visualization system;

[0087] Control the visualization system to display the key values ​​and attribute values ​​corresponding to the status data.

[0088] It should be noted that, in this embodiment of the application, before each block event is stored, the key value and attribute value corresponding to the state data are sent to the visualization system, so the visualization system can realize real-time updates of the state data.

[0089] In summary, this embodiment provides a data visualization method that obtains the block events to be monitored from the blockchain; monitors the block events in real time using a listening module; determines the key and attribute values ​​corresponding to the state data when the state data of the block events changes; and visualizes the state data based on the key and attribute values. This method enables real-time monitoring and visualization of state data in the blockchain by listening to the block events in real time, determining the key and attribute values ​​corresponding to the state data when the state data changes, and then visualizing these key and attribute values ​​as state data. It offers high real-time performance and conserves system physical and network resources.

[0090] Example 2

[0091] In some embodiments, see Figure 3 This diagram illustrates a system framework schematic of a data visualization method provided in an embodiment of this application. Figure 3 As shown, the system may include: a blockchain system 301, a listening module 302, and a visualization system 303.

[0092] Specifically, the block listening module 302 can listen for ledger recording events and send the latest status data to the visualization system 303 in real time. When listening for recording events, the transaction records in the block data are parsed, and the value corresponding to the key value executed in the transaction record (i.e., the key value in the aforementioned embodiment) is obtained through the SDK (i.e., the attribute value in the aforementioned embodiment) and sent to the visualization system 303, thereby reducing the amount of data query and saving network bandwidth and physical resources.

[0093] In some embodiments, the blockchain system is a distributed ledger platform (Hyperledger Fabric) consortium blockchain. The application client calls the Certificate Authority (CA) service through the Software Development Kit (SDK) to register and obtain an identity certificate; then, it initiates a transaction using the obtained certificate. (Note: The detailed transaction process is not an innovation and will not be elaborated here.)

[0094] Visualization System 303 is a system that dynamically displays data from a data source through large screens, charts, tables, and other methods. The data source can be structured databases such as MySQL and Oracle, or unstructured databases such as MongoDB (a database based on distributed file storage) and Redis (a key-value database). Event blockchain, as a decentralized distributed database, actually uses unstructured data at its core. Currently, some visualization systems already support blockchain data sources, enabling the visualization of blockchain state data. Specifically, most of these systems use REST interfaces to call the blockchain's encapsulated SDK to obtain the state data from the blockchain, and then use the JSON data returned by the REST interface as the data source for the visualization system.

[0095] In this embodiment, we added a listening module 302 to the blockchain visualization system. The listening module is built based on the Fabric SDK.

[0096] Specifically, in some embodiments, the monitoring module 302 includes the following aspects:

[0097] Firstly, the listening module is connected to the blockchain system 301. First, the user of the current consortium chain is created in Fabric and the user's certificate is obtained. The block listening module connects to the blockchain by configuring the blockchain access username, user certificate, channel name, and chaincode name.

[0098] Secondly, in the listening module 302, the user must configure the method name for retrieving state data and the number of bits for the state 0 value in the current chaincode. For example, if the method name is SetAssetByName and the number of bits is 1,

[0099] Thirdly, when the listening module 302 detects the block entry information, it parses the transaction parameters, obtains the key value of the state data (the key value is the first parameter of the SetAssetByName method) according to the pre-configured method and position value, and uses the SDK to retrieve the state data of the current key value in the blockchain. Fabric's ledger nodes provide an event stream to publish blocks to registered listeners. Whenever a ledger node adds a validating block to its ledger, the block is published to the registered listeners.

[0100] Fourthly, in the listening module 302, a listener is registered to listen for block events in the blockchain under the current smart contract. After a transaction proposal is successfully passed, the transaction message is successfully broadcast to the Orderer node (the ordering node in the blockchain). After the orderer node sorts the transactions, when the transaction reaches its final state (when the block containing the transaction is added to the peer node's ledger), the block listening module obtains the current key value's state data and notifies the visualization system of the change in the state data.

[0101] Fifthly, the listening module 302 uses certificates to listen for block events in the blockchain via the fabric-sdk. Each block event contains a fully decoded Block object. The structure of a Block object is as follows: Figure 1 As shown, a block is divided into three parts: block header, block data, and block metadata. The block header contains the block number, current block hash, and previous block hash. The block data is a series of transaction data. The block metadata mainly contains the block write time, the person who wrote it, and the signature.

[0102] Sixthly, the listening module 302 obtains the Data in the Block and parses it into transaction information (the parsing method is not described in detail, it is a ready-made method). There are multiple transaction information in the data block of a block, and the transaction information structure is as follows:

[0103]

[0104] In some embodiments, the transaction parameter list can be {"invoke","a","b","10"}

[0105] The block listener system pre-configures the key values ​​for smart contract methods and state data, such as the following method names configured in the listener system:

[0106] config:

[0107] -method:invoke

[0108] args:1,2

[0109] -method:delete

[0110] args:1

[0111] When the above parameters are parsed, based on the configuration that the method value is invoke and the args values ​​are 1 and 2, it is determined that the transaction with the method invoke was executed in the current block event and the key value is the first and second parameters of the current transaction, which are a and b. Then, the SDK interface is called to obtain the values ​​of the state data a and b, and the values ​​of a and b are sent to the visualization system, thereby notifying the visualization system to display the latest value of the current state data.

[0112] This embodiment provides a data visualization method. The specific implementation of the aforementioned embodiments has been described in detail. It can be seen that the technical solution of the aforementioned embodiments uses a block listener to obtain the latest transition data in real time, parses transaction data from blocks, extracts transaction data parameters, and then obtains the value of the state data. Compared with existing visualization systems, obtaining data through a listener allows for real-time display of on-chain state data. By configuring smart contract methods and parameters, and using a block listener to monitor and parse transaction data in blocks, incremental state data acquisition and display saves system resources.

[0113] Example 3

[0114] Based on the same inventive concept as the foregoing embodiments, see [link to previous document]. Figure 4 This illustrates a schematic diagram of the composition of a data visualization device 40 provided in an embodiment of this application. Figure 4 As shown, the data visualization device 40 may include: an acquisition unit 401, a detection unit 402, and a display unit 403; wherein,

[0115] Acquisition unit 401 is configured to acquire block events to be monitored from the blockchain;

[0116] The monitoring unit 402 is configured to monitor the block event to be monitored in real time based on the listening module, and determine the key value and attribute value corresponding to the state data when the state data of the block event to be monitored changes.

[0117] Display unit 403 is configured to visualize the status data based on the key value and the attribute value.

[0118] In some embodiments, the monitoring unit 402 is specifically configured to decode the block event to be monitored to obtain the corresponding block information; wherein the block information includes a block header, block data, and block metadata; and based on the listening module, to parse and process the block data to obtain transaction information; and to obtain the key value and the attribute value corresponding to the status data in the transaction information according to the method name and position value configured in the listening module.

[0119] In some embodiments, the display unit 403 is specifically configured to send the key value and attribute value corresponding to the status data to the visualization system; and to control the visualization system to display the key value and attribute value corresponding to the status data.

[0120] In some embodiments, the data visualization device further includes an access unit 404 configured to create user information based on a first blockchain; wherein the user information includes an access username, user certificate, channel name, and chaincode name. The monitoring module is connected to the first blockchain by configuring the user information.

[0121] In some embodiments, the data visualization device further includes a first processing unit configured to configure the method name and position value corresponding to the state data for the monitoring module; wherein the method name and the position value are used to obtain the key value and the attribute value corresponding to the state data.

[0122] In some embodiments, the data visualization device further includes a second processing unit, configured to acquire at least one inbound event in the blockchain; sort the at least one inbound event through the sorting node of the blockchain; and store the sorted at least one inbound event through the accounting node of the blockchain.

[0123] In some embodiments, the acquisition unit 401 is specifically configured to determine that the at least one block ingestion event is the block ingestion event to be monitored when the at least one block ingestion event is added to the accounting node.

[0124] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0125] If the integrated unit is implemented as a software functional module and not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0126] Therefore, this embodiment provides a computer storage medium storing a data visualization program, which, when executed by at least one processor, implements the steps of the method described in any of the foregoing embodiments.

[0127] Based on the composition of the aforementioned data visualization device 40 and the computer storage medium, see [link to relevant documentation]. Figure 5 This illustrates a schematic diagram of the specific hardware structure of the electronic device provided in an embodiment of this application. For example... Figure 5 As shown, electronic device 50 may include: a communication interface 501, a memory 502, and a processor 503; the various components are coupled together via a bus system 504. It is understood that the bus system 504 is used to implement communication between these components. In addition to a data bus, the bus system 504 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 5 All buses are labeled as bus system 504. Among them, communication interface 501 is used for receiving and sending signals during information exchange with other external network elements;

[0128] Memory 502 is used to store computer programs that can run on processor 503;

[0129] Processor 503, when running the computer program, performs the following:

[0130] Obtain the block events to be monitored from the blockchain;

[0131] The monitoring module monitors the block events to be monitored to obtain the key and attribute values ​​corresponding to the status data; wherein, the key and attribute values ​​have a corresponding relationship.

[0132] Based on the key value and the attribute value, the status data can be visualized.

[0133] It is understood that the memory 502 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0134] The processor 503 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 503 or by instructions in software form. The processor 503 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 502, and the processor 503 reads the information in memory 502 and, in conjunction with its hardware, completes the steps of the above method.

[0135] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0136] For software implementation, the techniques described herein can be achieved through modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or externally.

[0137] Alternatively, as another embodiment, the processor 503 is further configured to perform the steps of the method described in any of the foregoing embodiments when running the computer program.

[0138] Based on the composition of the aforementioned data visualization device 40 and the computer storage medium, see [link to relevant documentation]. Figure 6 This illustrates a schematic diagram of the structural composition of another electronic device 50 provided in an embodiment of this application. For example... Figure 6 As shown, the electronic device 50 may include the data visualization device 40 as described in any of the foregoing embodiments.

[0139] In this embodiment, for the electronic device 50, the following steps are taken: The monitoring module acquires the block events to be monitored from the blockchain; the monitoring module performs real-time monitoring of the block events; when the state data of the block events changes, the key and attribute values ​​corresponding to the state data are determined; and the state data is visualized based on the key and attribute values. This allows for real-time monitoring and visualization of state data within the blockchain by listening to the block events in real time, determining the key and attribute values ​​corresponding to the state data when the state data changes, and then visualizing the key and attribute values ​​as state data. This achieves high real-time performance and saves system physical and network resources.

[0140] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0141] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0142] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0143] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0144] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0145] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method of data visualization, characterized by, The method comprises: obtaining a to-be-monitored block-in event from a blockchain; based on a monitoring module, monitoring the to-be-monitored block-in event in real time, and in the case that the state data of the to-be-monitored block-in event changes, determining the key value and attribute value corresponding to the state data; based on the key value and the attribute value, realizing the visual display of the state data; wherein, based on the monitoring module, the to-be-monitored block-in event is monitored in real time, and in the case that the state data of the to-be-monitored block-in event changes, the key value and attribute value corresponding to the state data are determined, comprising: decoding the to-be-monitored block-in event to obtain corresponding block-in information; wherein the block-in information comprises a block header, block data and block metadata; based on the monitoring module, the block data is parsed and processed to obtain transaction information; according to the method name and bit value configured by the monitoring module, the key value and attribute value corresponding to the state data in the transaction information are obtained.

2. The method of claim 1, wherein, The monitoring module is connected with a visualization system, and based on the key value and the attribute value, the visual display of the state data is realized, comprising: sending the key value and attribute value corresponding to the state data to the visualization system; controlling the visualization system to display the key value and attribute value corresponding to the state data.

3. The method of claim 1, wherein, Before the to-be-monitored block-in event is obtained from the blockchain, the method further comprises: creating user information based on a first blockchain; wherein the user information comprises an access username, user credentials, a channel name and a chaincode name; by configuring the user information, the monitoring module is connected to the first blockchain.

4. The method of claim 3, wherein, Before the to-be-monitored block-in event is monitored in real time based on the monitoring module, the method further comprises: configuring the method name and bit value corresponding to the state data for the monitoring module; wherein, the method name and the bit value are used to obtain the key value and the attribute value corresponding to the state data.

5. The method of claim 1, wherein, Before obtaining the to-be-monitored block-in event from the blockchain, the method further comprises: obtaining at least one block-in event in the blockchain; sorting the at least one block-in event through the ordering node of the blockchain, and storing the sorted at least one block-in event through the accounting node of the blockchain.

6. The method of claim 5, wherein, Obtaining a to-be-monitored block-in event from a blockchain comprises: when the at least one block-in event is added to the accounting node, determining that the at least one block-in event is the to-be-monitored block-in event.

7. A data visualization apparatus, characterized by The data visualization device comprises an obtaining unit, a monitoring unit and a display unit, wherein, the obtaining unit is configured to obtain a to-be-monitored block-in event from a blockchain; the monitoring unit is configured to monitor the to-be-monitored block-in event in real time based on a monitoring module, and in the case that the state data of the to-be-monitored block-in event changes, determine the key value and attribute value corresponding to the state data; the display unit is configured to realize the visual display of the state data based on the key value and the attribute value; The monitoring unit is specifically configured to decode the to-be-monitored block-in event to obtain corresponding block-in information; the block-in information includes a block header, block data, and block metadata; the block data is analyzed and processed based on the monitoring module to obtain transaction information; and the key value and the attribute value corresponding to the state data in the transaction information are obtained according to the method name and the bit value configured by the monitoring module.

8. An electronic device, comprising: The electronic device comprises a memory and a processor; wherein The memory is configured to store a computer program capable of running on the processor; The processor is configured to execute the method according to any one of claims 1 to 6 when running the computer program.

9. A computer storage medium, characterized in that The computer storage medium stores a computer program, and the computer program is executed by at least one processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Blockchain monitoring system

    CN112787890A

  • Blockchain data visualization method and system, electronic equipment and storage medium

    CN114022151A