CN111324787B - Method and device for displaying block chain data in block chain browser - Google Patents

Method and device for displaying block chain data in block chain browser Download PDF

Info

Publication number
CN111324787B
CN111324787B CN201811532836.0A CN201811532836A CN111324787B CN 111324787 B CN111324787 B CN 111324787B CN 201811532836 A CN201811532836 A CN 201811532836A CN 111324787 B CN111324787 B CN 111324787B
Authority
CN
China
Prior art keywords
query data
query
data
blockchain
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811532836.0A
Other languages
Chinese (zh)
Other versions
CN111324787A (en
Inventor
马超
位博
王帅俭
刘春伟
孙海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN201811532836.0A priority Critical patent/CN111324787B/en
Publication of CN111324787A publication Critical patent/CN111324787A/en
Application granted granted Critical
Publication of CN111324787B publication Critical patent/CN111324787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a method and a device for displaying block chain data in a block chain browser, wherein the method comprises the following steps: receiving a query instruction input by a user through an interface of a blockchain browser, and generating a query request according to the query instruction; wherein the query request includes attribute information of query data, the query data being blockchain data; sending a query request to a block link point, wherein attribute information of the query data is used for determining a display template matched with the query data by the block link point, and acquiring the query data; obtaining the presentation template and the query data from the blockchain node; and displaying the query data according to the format of the display template. The embodiment of the application enables the blockchain browser to display the blockchain data in an intuitive form which is customized according to the service scene and is convenient for users to understand.

Description

Method and device for displaying block chain data in block chain browser
Technical Field
The embodiment of the application relates to computer technology, in particular to a method and a device for displaying block chain data in a block chain browser.
Background
The blockchain data is data stored in blocks linked in time series. The presentation of the blockchain data can be realized through a blockchain browser.
The blockchain browser is a general blockchain data display mode, but with the continuous development of the blockchain technology, the application scene of the blockchain is continuously expanded, and the data stored in the blockchain is also gradually complicated and diversified, so that the blockchain browser is usually presented according to the original storage form of the data in the blockchain, and a user can not understand the blockchain data in the original storage form.
Disclosure of Invention
The embodiment of the application provides a method and a device for displaying blockchain data in a blockchain browser, which enable the blockchain browser to intuitively display the blockchain data in a form which is easy to understand by a user.
In a first aspect, an embodiment of the present application provides a method for displaying blockchain data in a blockchain browser, including:
receiving a query instruction input by a user through an interface of a blockchain browser, and generating a query request according to the query instruction; the query request comprises attribute information of query data, wherein the query data is blockchain data;
sending a query request to a block chain link point, wherein attribute information of query data is used for determining a display template matched with the query data by the block chain node, and acquiring the query data;
Acquiring the display template and the query data from the block link points;
and displaying the query data according to the format of the display template.
In one possible design, the obtaining the query data from the blockchain node includes:
acquiring the query data in an original format from the block chain link point, wherein the original format is a storage format of the query data in a block chain where the block chain node is located;
the presenting the query data according to the format of the presentation template comprises the following steps:
obtaining the query data in the format of the display template according to the query data in the original format and the display template;
and displaying the query data in the format of the presentation template.
In one possible design, prior to obtaining the presentation template from the block link points, further comprising:
obtaining a hash value of the display template from the block link point;
and according to the hash value, determining that the display template is not stored in the terminal.
In one possible design, prior to obtaining the presentation template from the block link points, further comprising:
acquiring a first hash value of the display template from the block link point;
Before the query data in the format of the presentation template is obtained according to the original format query data and the presentation template, the method further comprises the following steps:
calculating a second hash value of the presentation template;
and determining that the first hash value and the second hash value of the display template are the same.
In one possible design, the query data is any one of the following: transaction input data in the blockchain, transaction output data in the blockchain, status data in the blockchain;
the presentation template is any one of the following: transaction input data presentation templates, transaction output data presentation templates, and status data presentation templates.
In a second aspect, an embodiment of the present application provides a method for displaying blockchain data in a blockchain browser, including:
acquiring a query request sent by a terminal, wherein the query request comprises attribute information of query data; the terminal generates a query request according to a query instruction input by a user through a blockchain browser;
acquiring the query data and determining a presentation template matched with the query data according to the attribute information of the query data;
and sending the query data and the display template to a terminal, wherein the display template is used for displaying the query data to a user by the terminal.
In one possible design, the block of the blockchain stores the correspondence between the business scenario and the presentation template;
determining a presentation template matched with the query data according to the attribute information of the query data, wherein the method comprises the following steps:
and determining the display template corresponding to the business scene to which the query data belongs as the display template matched with the query data according to the attribute information of the query data and the corresponding relation.
In one possible design, the sending the query data to the terminal includes:
and sending the query data in the original format to the terminal.
In one possible design, before sending the presentation template to the terminal, the method further includes:
and sending the hash value of the display template to a terminal, wherein the hash value of the display template is used for the terminal to determine that the display template is not stored in the terminal, and verifying the display template.
In one possible design, the query data is any one of the following: transaction input data in the blockchain, transaction output data in the blockchain, status data in the blockchain;
the presentation template is any one of the following: transaction input data presentation templates, transaction output data presentation templates, and status data presentation templates.
In a third aspect, an embodiment of the present application provides a device for displaying blockchain data in a blockchain browser, including:
the receiving module is used for receiving a query instruction input by a user through an interface of the blockchain browser and generating a query request according to the query instruction; the query request comprises attribute information of query data, wherein the query data is blockchain data;
the sending module is used for sending a query request to a block chain link point, wherein the attribute information of the query data is used for determining a display template matched with the query data by the block chain node and acquiring the query data;
the acquisition module is used for acquiring the display template and the query data from the block chain link points;
and the display module is used for displaying the query data according to the format of the display template.
In one possible design, the obtaining module is specifically configured to obtain, from the blockchain link point, the query data in an original format, where the original format is a storage format of the query data in a blockchain where the blockchain node is located;
the display module is specifically configured to obtain, according to the query data in the original format and the display template, the query data in the format of the display template; the method comprises the steps of,
And displaying the query data in the format of the presentation template.
In one possible design, the obtaining module is further configured to, prior to obtaining the presentation template from the block link point: obtaining a hash value of the display template from the block link point;
further comprises: and the determining module is used for determining that the display template is not stored in the terminal according to the hash value.
In one possible design, the obtaining module is further configured to, prior to obtaining the presentation template from the block link point: acquiring a first hash value of the display template from the block link point; the method comprises the steps of,
before the query data in the format of the presentation template is obtained according to the original format query data and the presentation template: calculating a second hash value of the presentation template;
further comprises: and the determining module is used for determining that the first hash value and the second hash value of the display template are the same.
In a fourth aspect, an embodiment of the present application provides a device for displaying blockchain data in a blockchain browser, including:
the acquisition module is used for acquiring a query request sent by the terminal, wherein the query request comprises attribute information of query data; the terminal generates a query request according to a query instruction input by a user through a blockchain browser;
The acquisition module is also used for acquiring the query data according to the attribute information of the query data and determining a presentation template matched with the query data;
the sending module is used for sending the query data and the display template to a terminal, and the display template is used for displaying the query data to a user by the terminal.
In one possible design, the block of the blockchain stores the correspondence between the business scenario and the presentation template; the acquisition module is specifically configured to:
and determining the display template corresponding to the business scene to which the query data belongs as the display template matched with the query data according to the attribute information of the query data and the corresponding relation.
In one possible design, the sending module is specifically configured to:
and sending the query data in the original format to the terminal.
In one possible design, the transmitting module is further configured to: before sending the presentation template to a terminal: and sending the hash value of the display template to a terminal, wherein the hash value of the display template is used for the terminal to determine that the display template is not stored in the terminal, and verifying the display template.
In a fifth aspect, embodiments of the present application provide a readable storage medium comprising a program or instructions which, when run on a computer, perform the method of any one of the first or second aspects.
In a sixth aspect, an electronic device according to an embodiment of the present application includes: a processor coupled to the memory;
the memory is used for storing a computer program;
the processor is configured to invoke a computer program stored in the memory to implement the method according to any of the first or second aspects.
According to the method and the device for displaying the block chain data, through the setting of the display template capable of being understood by the user and intuitively displaying query data, the data in the format of the display template is displayed to the user instead of the data in the original storage format in the block chain, so that the block chain browser can intuitively display the block chain data in an angle which is easy to understand by the user.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present disclosure;
FIG. 2 is a second schematic diagram of a system architecture according to an embodiment of the present disclosure;
FIG. 3 is an interaction diagram I of a method for displaying blockchain data in a blockchain browser according to the embodiments of the present application;
FIG. 4 is an interaction diagram II of a method for displaying blockchain data in a blockchain browser according to the embodiment of the present application;
FIG. 5 is an interaction diagram III of a method for displaying blockchain data in a blockchain browser according to the embodiment of the present application;
FIG. 6 is an interaction diagram IV of a method for displaying blockchain data in a blockchain browser according to the embodiments of the present application;
FIG. 7 is a schematic diagram of a block chain data display device in a block chain browser according to an embodiment of the present application;
FIG. 8 is a second schematic structural diagram of a device for displaying blockchain data in a blockchain browser according to the embodiment of the present application;
fig. 9 is a schematic structural diagram III of a device for displaying blockchain data in a blockchain browser according to the embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Specifically, in the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural. The terms "first," "second," and the like in this application are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
Fig. 1 is a schematic diagram of a system architecture provided in an embodiment of the present application, referring to fig. 1, the system architecture includes: the system comprises a terminal and a block chain service platform, wherein the block chain service platform comprises a plurality of block chain nodes. The blockchain nodes are stored with blockchain data, a plurality of display templates for displaying the blockchain data and the corresponding relation between the business scene and the display templates.
Specifically, the terminal receives a query request instruction input by a user through an interface of the blockchain browser, and generates a query request according to the query instruction, wherein the query request comprises attribute information of query data; the terminal sends a query request to the block chain link, the block chain node determines a display template matched with the query data according to attribute information of the query data, acquires the query data, sends the display template and the query data to the terminal, and displays the query data according to the format of the display template after the terminal receives the query data.
The terminal may include a device for displaying blockchain data in a blockchain browser, and the device for displaying blockchain data may implement a method corresponding to the terminal in the embodiments shown in fig. 3 and fig. 4.
Fig. 2 is a second schematic diagram of a system architecture provided in an embodiment of the present application, referring to fig. 2, the system architecture includes: the system comprises a terminal, an application server of the terminal and a block chain service platform, wherein the block chain service platform comprises a plurality of block chain nodes. The blockchain nodes are stored with blockchain data, a plurality of display templates for displaying the blockchain data and the corresponding relation between the business scene and the display templates.
The terminal receives a query instruction input by a user through an interface of the blockchain browser, and generates a query request according to the query instruction, wherein the query request comprises attribute information of query data; the method comprises the steps that a terminal sends a query request to an application server, the application server sends the query request to a blockchain node, the blockchain node determines a display template matched with query data according to attribute information of the query data, obtains query data in an original format, and sends the display template and the query data to the application server, the application server obtains the query data in the format of the display template according to the query data in the original format and the display template, sends the query data in the format of the display template to the terminal, and the terminal displays the query data in the format of the display template. The original format is a storage format of query data in a blockchain where a blockchain node is located.
The application server may include a device for displaying blockchain data in a blockchain browser, and the device for displaying blockchain data may implement a method corresponding to the application server in the embodiments shown in fig. 5 and 6.
The following describes a method for displaying blockchain data in a blockchain browser according to the present application with reference to fig. 3 and 4 under the system architecture shown in fig. 1.
Fig. 3 is an interaction diagram of a method for displaying blockchain data in a blockchain browser according to an embodiment of the present application, where, as shown in fig. 3, the method in this embodiment may include:
step S101, a terminal receives a query instruction input by a user through an interface of a blockchain browser, and generates a query request according to the query instruction; the query request includes attribute information of query data, and the query data is blockchain data.
Specifically, a user of the terminal opens an interface of a blockchain browser on the terminal, and inputs a query instruction on the interface of the blockchain browser, wherein the user can input the query instruction by inputting the attribute of the query data on the interface of the blockchain browser and clicking an icon button on the interface of the blockchain browser, which is related to confirming the attribute of the input query data. And the terminal receives a query instruction input by a user and generates a query request according to the query instruction.
The query data is blockchain data, and may be any one of the following types of data in the blockchain data: intelligent contract internal state data, input data in the transaction process, output data in the transaction process.
For example, the internal status data for the smart contract may be balance data of an account after a three transfer operation, for example. The input data for the transaction process may be, for example, the transfer amount of a three-to-three transfer operation, the account transferred, etc. For example, the output data during the transaction may be whether a three-to-three transfer operation was successful.
Wherein the attribute of the query data may include at least one of: the identification of the user to which the query data belongs, the business scenario of the query data, the block number, the date the query data is written into the blockchain, and the like. The service scene of the query data comprises at least one of the following: the system to which the query data belongs, the mechanism in the system to which the query data belongs, and the service type of the query data. Such as financial, medical or educational systems, etc.; the institutions are China banking, china construction banking, western An children hospitals, first affiliated hospitals of Western An traffic universities or affiliated primary schools of northwest universities and the like; the service types are account opening, account transfer, card opening, medical records, diagnosis certificates and the like.
Step S102, the terminal sends the query request to the blockchain node.
Specifically, the terminal sends the query request to a blockchain node in a blockchain in which the query data is located. Wherein, the blockchain node may be an intelligent contract virtual machine.
Step S103, the block chain node acquires the query data according to the attribute information of the query data and determines a presentation template matched with the query data.
Specifically, after receiving attribute information of query data, the blockchain node acquires the query data according to the attribute information of the query data, and determines a presentation template matched with the query data.
The method for acquiring the query data according to the attribute information of the query data can refer to the existing method, wherein the acquired query data is query data in an original format, and the original format is a storage format of the query data in a blockchain where a blockchain node is located.
Further, a plurality of presentation templates are stored in the blockchain node, and it can be understood that a presentation template corresponding to a service scene corresponding to all blockchain data included in the blockchain should exist in the blockchain node, wherein one service scene corresponds to at least one presentation template. It can be understood that the format corresponding to the presentation template is a format which can be understood by a user and can intuitively present query data. Here, the format in which the template corresponds is presented includes: the layout of each item included in the presentation template on the presentation template and the expression mode of the specific information of each item included in the presentation template.
For example, the business scene of the query data is a financial system plus a China bank, and the financial system plus the China bank can correspond to an account opening information display template, a transfer information display template, a loan application information display template and the like of the China bank.
Further, the blockchain node may also store a correspondence between the presentation template and the service scene, for example, a correspondence between an identifier of the presentation template and an identifier of the service scene. Thus, after the attribute of the query data is received, if the attribute of the query data includes the service scene to which the query data belongs, the display module corresponding to the service scene can be determined according to the service scene included in the attribute of the query data.
In addition, if the attribute of the query data includes a blockchain number, the blockchain node may determine one or more presentation modules according to one or more service scenarios corresponding to the data stored in the block indicated by the blockchain number.
Step S104, the block link point sends the query data and the presentation template matched with the query data to the terminal.
Specifically, the block link point transmits the query data in the original format and the presentation template matched with the query data to the terminal.
Step S105, the terminal displays the query data according to the format of the display template.
Specifically, presenting query data in a format that presents templates, including:
(1) And obtaining the query data in the format of the display template according to the query data in the original format and the display template.
I.e., converting the query data in the original format into data in a format that reveals the templates.
(2) And presenting the query data in the format of the presentation template.
Thus, the user can see the visual query data which is easy to understand by the user.
According to the embodiment, through the setting of the display template capable of being understood by the user and intuitively displaying the query data, the data in the format of the display template is displayed to the user instead of the data in the original format stored in the blockchain, so that the blockchain browser can intuitively display the blockchain data in an angle which is easy to understand by the user.
It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of the processes should be determined by the functions and internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Fig. 4 is an interaction diagram two of a method for displaying blockchain data in a blockchain browser according to the embodiment of the present application, as shown in fig. 4, the method in this embodiment may include:
Step S201, a terminal receives a query instruction input by a user through an interface of a blockchain browser, and generates a query request according to the query instruction; the query request includes attribute information of query data, and the query data is blockchain data.
Specifically, the implementation of step S201 refers to the description of step S101 in the previous embodiment, and will not be repeated here.
Step S202, the terminal sends the query request to the blockchain node.
Specifically, the implementation of step S202 is described with reference to step S102 in the previous embodiment, which is not repeated here.
Step S203, the blockchain node acquires the query data in an original format according to the attribute information of the query data, determines a display template matched with the query data, and acquires a first hash value of the display template.
Specifically, step S203 in this embodiment obtains, in addition to obtaining the query data in the original format and determining the presentation template matching the query data according to the attribute information of the query data, a first hash value of the presentation template. The other specific implementations are described with reference to step S103 in the previous embodiment, and are not repeated here.
Accordingly, hash values of each presentation template are also stored in the blockchain node, and the hash values are mainly used for verifying the received presentation templates by the terminal.
Step S204, the block chain link point sends the query data in the original format and the first hash value of the presentation template to the terminal.
Specifically, in this embodiment, the presentation template is not transmitted first, and sending the first hash value of the display template to the terminal.
Step S205, the terminal determines whether the display template is stored according to the first hash value.
Specifically, after the terminal receives the first hash value, it is determined whether the terminal stores a presentation template with the hash value being the first hash value, if so, the presentation module does not need to be acquired from the block link point, so that signaling overhead is saved, and if not, step S206 is executed.
If the terminal stores a display template with a hash value being the first hash value, the terminal acquires the display module from the block chain link point in the query process before the query, and caches or stores the display module in the terminal.
Step S206, if the terminal determines that the display template is not stored, sending an acquisition request of the display template to the blockchain node.
Specifically, if the terminal determines that the presentation template is not stored, an acquisition request of the presentation template is sent to a blockchain node, and the acquisition request can include the first hash value.
Step S207, the block chain link points acquire the display template according to the acquisition request of the display template.
Specifically, in one manner, after the block link receives the acquisition request, the presentation template with the stored hash value being the first hash value is acquired.
Step S208, the block chain link point sends the display template to the terminal.
Step S209, the terminal calculates a second hash value of the display template, and determines whether the first hash value and the second hash value of the display template are the same.
Specifically, the terminal acquires the display template, recalculates the hash value-second hash value of the display template once, and if the second hash value is different from the first hash value, the display module is tampered or the blockchain node sends an incorrect display module, and the display module received by the terminal is unavailable.
If the second hash value is the same as the first hash value, step S210 is performed.
Step S210, if the terminal determines that the first hash value and the second hash value of the display template are the same, the terminal obtains the query data of the format of the display template according to the query data of the original format and the display template.
Specifically, if the terminal determines that the first hash value and the second hash value of the display template are the same, the display module received by the terminal is determined to be a correct display module matched with the query data. Thus, the query data in the format of the presentation template can be obtained according to the query data in the original format and the presentation template, and the description in step S105 in the previous embodiment is specifically referred to.
Step S211, the terminal displays the query data in the format of the display template.
According to the embodiment, through the setting of the display template capable of being understood by the user and intuitively displaying the query data, the data in the format of the display template is displayed to the user instead of the data in the original format stored in the blockchain, so that the blockchain browser can intuitively display the blockchain data in an angle which is easy to understand by the user. Meanwhile, the hash value of the display module matched with the query data can be acquired first to verify whether the display module is correct or not and determine whether the display module needs to be acquired from the blockchain node or not in the query process, so that the correct display of the query data is ensured and the signaling overhead is saved.
It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of the processes should be determined by the functions and internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present application.
The following describes a method for displaying blockchain data in a blockchain browser according to the present application with reference to fig. 5 and 6 under the system architecture shown in fig. 2.
Fig. 5 is an interaction diagram three of a method for displaying blockchain data in a blockchain browser according to the embodiment of the present application, where, as shown in fig. 5, the method in this embodiment may include:
step S301, a terminal receives a query instruction input by a user through an interface of a blockchain browser, and generates a query request according to the query instruction; the query request includes attribute information of query data, and the query data is blockchain data.
Step S302, the terminal sends the query request to an application server.
In step S303, the application server sends the query request to the blockchain node.
Step S304, the blockchain node acquires the query data according to the attribute information of the query data and determines a presentation template matched with the query data.
Step S305, the block link point sends the query data and the presentation template matched with the query data to the application server.
Step S306, the application server obtains the query data in the format of the display template according to the query data in the original format and the display template.
Step S307, the application server sends query data showing the format of the template to the terminal.
Step S308, the terminal displays the query data in the format of the display template.
Specifically, the difference between the present embodiment and the embodiment shown in fig. 3 is that the display device of the blockchain data in the blockchain browser is set in the application server, the terminal sends the query request to the application server, and the application server forwards the query request to the blockchain node; the block chain link point sends the query data and the display template matched with the query data to an application server, and the application server obtains the query data in the format of the display template according to the query data in the original format and the display template. The rest of the specific implementation refers to the embodiment shown in fig. 3, and will not be described in detail in this embodiment.
It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of the processes should be determined by the functions and internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Fig. 6 is an interaction diagram four of a method for displaying blockchain data in a blockchain browser according to the embodiment of the present application, where, as shown in fig. 6, the method in this embodiment may include:
Step S401, a terminal receives a query instruction input by a user through an interface of a blockchain browser, and generates a query request according to the query instruction; the query request includes attribute information of query data, and the query data is blockchain data.
Step S402, the terminal sends the query request to the application server.
In step S403, the application server sends the query request to the blockchain node.
Step S404, the blockchain node acquires the query data in an original format according to the attribute information of the query data, determines a display template matched with the query data, and acquires a first hash value of the display template.
Step S405, the block link point sends the query data in the original format and the first hash value of the presentation template to the application server.
Step S406, the application server determines whether the presentation template is stored according to the first hash value.
Step S407, if the application server determines that the presentation template is not stored, sending an acquisition request of the presentation template to the blockchain node.
Step S408, the block chain link point acquires the display template according to the acquisition request of the display template.
Step S409, the block link point sends the display template to the application server.
Step S410, the application server obtains the query data in the format of the display template according to the query data in the original format and the display template.
Step S411, the application server sends query data in the form of a presentation template to the terminal.
Step S412, the terminal displays the query data in the format of the display template.
Specifically, the present embodiment is different from the embodiment shown in fig. 4 in that the presentation device of the blockchain data in the blockchain browser is provided in the application server. The rest of the specific implementation refers to the embodiment shown in fig. 4, and will not be described in detail in this embodiment.
It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of the processes should be determined by the functions and internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present application.
The method for displaying the blockchain data in the blockchain browser of the present application is described above through the embodiments shown in fig. 3 to fig. 6, and the device for displaying the blockchain data in the blockchain browser of the present application is described below with reference to fig. 7 to fig. 9.
Fig. 7 is a schematic structural diagram of a device for displaying blockchain data in a blockchain browser according to an embodiment of the present application, and as shown in fig. 7, the device in this embodiment may include: a receiving module 71, a transmitting module 72, an obtaining module 73 and a presenting module 74.
The receiving module 71 is configured to receive a query instruction input by a user through an interface of the blockchain browser, and generate a query request according to the query instruction; the query request comprises attribute information of query data, wherein the query data is blockchain data;
a sending module 72, configured to send a query request to a block link node, where attribute information of the query data is used by the block link node to determine a presentation template matching the query data, and obtain the query data;
an acquisition module 73, configured to acquire the presentation template and the query data from the block link points;
and a display module 74, configured to display the query data according to the format of the display template.
Optionally, the obtaining module 73 is specifically configured to obtain, from the blockchain link point, the query data in a raw format, where the raw format is a storage format of the query data in a blockchain in which the blockchain node is located.
The presenting module 74 is specifically configured to obtain, according to the query data in the original format and the presenting template, the query data in the format of the presenting template; the method comprises the steps of,
and displaying the query data in the format of the presentation template.
The device of this embodiment may be used to execute the technical schemes corresponding to the block chain nodes in the method embodiments shown in fig. 3 to fig. 4, and its implementation principle and technical effects are similar, and are not repeated here.
Fig. 8 is a second schematic structural diagram of a device for displaying blockchain data in a blockchain browser according to the embodiment of the present application, as shown in fig. 8, where the device in the embodiment may further include, on the basis of the device shown in fig. 7: a determination module 75.
The obtaining module 73 is further configured to, before obtaining the presentation template from the block link point: obtaining a hash value of the display template from the block link point;
the determining module 75 is configured to determine, according to the hash value, that the presentation template is not stored in the terminal.
Optionally, the obtaining module 73 is further configured to, before obtaining the presentation template from the block link point: acquiring a first hash value of the display template from the block link point; the method comprises the steps of,
before the query data in the format of the presentation template is obtained according to the original format query data and the presentation template: calculating a second hash value of the presentation template;
the determining module 75 is further configured to determine that the first hash value and the second hash value of the presentation template are the same.
The device of this embodiment may be used to execute the technical schemes corresponding to the block chain nodes in the method embodiments shown in fig. 3 to fig. 4, and its implementation principle and technical effects are similar, and are not repeated here.
Fig. 9 is a third schematic structural diagram of a device for displaying blockchain data in a blockchain browser according to the embodiment of the present application, where, as shown in fig. 9, the device in this embodiment may include: an acquisition module 81 and a transmission module 82.
An obtaining module 81, configured to obtain a query request sent by a terminal, where the query request includes attribute information of query data; the terminal generates a query request according to a query instruction input by a user through a blockchain browser;
the obtaining module 81 is further configured to obtain the query data according to attribute information of the query data, and determine a presentation template matched with the query data;
and the sending module 82 is configured to send the query data and the presentation template to a terminal, where the presentation template is used for presenting the query data to a user by the terminal.
Optionally, the block of the block chain stores the corresponding relation between the service scene and the presentation template; the obtaining module 81 is specifically configured to:
and determining the display template corresponding to the business scene to which the query data belongs as the display template matched with the query data according to the attribute information of the query data and the corresponding relation.
In one possible design, the sending module 82 is specifically configured to:
and sending the query data in the original format to the terminal.
In one possible design, the sending module 82 is further configured to: before sending the presentation template to a terminal: and sending the hash value of the display template to a terminal, wherein the hash value of the display template is used for the terminal to determine that the display template is not stored in the terminal, and verifying the display template.
The device of this embodiment may be used to execute the technical schemes corresponding to the terminal in the embodiments of the methods shown in fig. 3 to fig. 4, and its implementation principle and technical effects are similar, and are not repeated here.
Fig. 10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, referring to fig. 9, a server in the embodiment includes: a processor 92, a memory 91 and a communication bus 93, the communication bus 93 for connecting the processor 92 and the memory 91, the processor 92 being coupled to the memory 91;
the memory 91 is used for storing a computer program;
the processor 92 is configured to invoke the computer program stored in the memory 91 to implement the method corresponding to the block chain node or the terminal or the application server in the above method embodiment.
Wherein the computer program may also be stored in a memory external to the electronic device.
It should be appreciated that in embodiments of the present application, the processor 92 may be a CPU, the processor 92 may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like.
The memory 91 may include read only memory and random access memory and provides instructions and data to the processor 92. The memory 91 may also include a nonvolatile random access memory. For example, the memory 91 may also store information of the device type.
The memory 91 may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
The bus 93 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus. But for clarity of illustration the various buses are labeled as bus 93 in the figures.
Embodiments of the present application provide a readable storage medium including a program or instructions that when executed on a computer, perform a method corresponding to a blockchain node or terminal shown in fig. 3 or 4.
Embodiments of the present application provide a readable storage medium including a program or instructions that when executed on a computer, perform a method described by a blockchain node or terminal or application server corresponding method shown in fig. 5 or 6.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (13)

1. A method for displaying block chain data in a block chain browser is characterized by comprising the following steps:
receiving a query instruction input by a user through an interface of a blockchain browser, and generating a query request according to the query instruction; the query request comprises attribute information of query data, wherein the query data is blockchain data, and the attribute information of the query data comprises a service scene of the query data;
sending a query request to a block chain link point, wherein attribute information of query data is used for determining a display template matched with the query data by the block chain node, and acquiring the query data;
Acquiring the display template and the query data from the block link points;
displaying the query data according to the format of the display template;
obtaining the query data from the blockchain node includes:
acquiring the query data in an original format from the block chain link point, wherein the original format is a storage format of the query data in a block chain where the block chain node is located;
the presenting the query data according to the format of the presentation template comprises the following steps:
obtaining the query data in the format of the display template according to the query data in the original format and the display template;
and displaying the query data in the format of the presentation template.
2. The method of claim 1, further comprising, prior to obtaining the presentation template from the block link point:
obtaining a hash value of the display template from the block link point;
and according to the hash value, determining that the display template is not stored in the terminal.
3. The method of claim 1, further comprising, prior to obtaining the presentation template from the block link point:
acquiring a first hash value of the display template from the block link point;
Before the query data in the format of the presentation template is obtained according to the original format query data and the presentation template, the method further comprises the following steps:
calculating a second hash value of the presentation template;
and determining that the first hash value and the second hash value of the display template are the same.
4. The method of claim 1, wherein the query data is any one of: transaction input data in the blockchain, transaction output data in the blockchain, status data in the blockchain;
the presentation template is any one of the following: transaction input data presentation templates, transaction output data presentation templates, and status data presentation templates.
5. A method for displaying block chain data in a block chain browser is characterized by comprising the following steps:
acquiring a query request sent by a terminal, wherein the query request comprises attribute information of query data; the terminal generates the query request according to a query instruction input by a user through a blockchain browser, and the attribute information of the query data comprises a service scene of the query data;
acquiring the query data in an original format according to the attribute information of the query data, and determining a display template matched with the query data in the original format, wherein the original format is a storage format of the query data in a blockchain where a blockchain node is located;
The query data in the original format and the display template are sent to a terminal, the display template is used for displaying the query data to a user by the terminal, the query data displayed to the user by the terminal are the query data in the format of the display template, and the query data in the format of the display template are obtained according to the query data in the original format and the display template.
6. The method of claim 5, wherein the blockchain has stored therein correspondence of business scenarios and presentation templates; determining a presentation template matched with the query data according to the attribute information of the query data, wherein the method comprises the following steps:
and determining the display template corresponding to the business scene to which the query data belongs as the display template matched with the query data according to the attribute information of the query data and the corresponding relation.
7. A block chain data presentation device in a block chain browser, comprising:
the receiving module is used for receiving a query instruction input by a user through an interface of the blockchain browser and generating a query request according to the query instruction; the query request comprises attribute information of query data, wherein the query data is blockchain data, and the attribute information of the query data comprises a service scene of the query data;
The sending module is used for sending a query request to a block chain link point, wherein the attribute information of the query data is used for determining a display template matched with the query data by the block chain node and acquiring the query data;
the acquisition module is used for acquiring the display template and the query data from the block chain link points;
the display module is used for displaying the query data according to the format of the display template;
the acquisition module is specifically configured to acquire the query data in an original format from the blockchain link point, where the original format is a storage format of the query data in a blockchain where the blockchain node is located;
the display module is specifically configured to obtain, according to the query data in the original format and the display template, the query data in the format of the display template; the method comprises the steps of,
and displaying the query data in the format of the presentation template.
8. The apparatus of claim 7, wherein the acquisition module is further configured to, prior to acquiring the presentation template from the block link point: obtaining a hash value of the display template from the block link point;
further comprises: and the determining module is used for determining that the display template is not stored in the terminal according to the hash value.
9. The apparatus of claim 7, wherein the acquisition module is further configured to, prior to acquiring the presentation template from the block link point: acquiring a first hash value of the display template from the block link point; the method comprises the steps of,
before the query data in the format of the presentation template is obtained according to the original format query data and the presentation template: calculating a second hash value of the presentation template;
further comprises: and the determining module is used for determining that the first hash value and the second hash value of the display template are the same.
10. A block chain data presentation device in a block chain browser, comprising:
the acquisition module is used for acquiring a query request sent by the terminal, wherein the query request comprises attribute information of query data; the terminal generates the query request according to a query instruction input by a user through a blockchain browser, and the attribute information of the query data comprises a service scene of the query data;
the acquisition module is further used for acquiring the query data in an original format according to the attribute information of the query data and determining a display template matched with the query data in the original format, wherein the original format is a storage format of the query data in a blockchain where the blockchain node is located;
The sending module is used for sending the query data in the original format and the display template to a terminal, wherein the display template is used for displaying the query data to a user by the terminal, the query data displayed to the user by the terminal are the query data in the format of the display template, and the query data in the format of the display template are obtained according to the query data in the original format and the display template.
11. The apparatus of claim 10, wherein a correspondence between a traffic scenario and a presentation template is stored in a block of the blockchain; the acquisition module is specifically configured to:
and determining the display template corresponding to the business scene to which the query data belongs as the display template matched with the query data according to the attribute information of the query data and the corresponding relation.
12. A readable storage medium comprising a program or instructions which, when run on a computer, performs the method of any of claims 1-4 or 5-6.
13. An electronic device, comprising: a processor coupled to the memory;
The memory is used for storing a computer program;
the processor is configured to invoke a computer program stored in the memory to implement the method of any of claims 1-4 or 5-6.
CN201811532836.0A 2018-12-14 2018-12-14 Method and device for displaying block chain data in block chain browser Active CN111324787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811532836.0A CN111324787B (en) 2018-12-14 2018-12-14 Method and device for displaying block chain data in block chain browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811532836.0A CN111324787B (en) 2018-12-14 2018-12-14 Method and device for displaying block chain data in block chain browser

Publications (2)

Publication Number Publication Date
CN111324787A CN111324787A (en) 2020-06-23
CN111324787B true CN111324787B (en) 2023-06-23

Family

ID=71170485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811532836.0A Active CN111324787B (en) 2018-12-14 2018-12-14 Method and device for displaying block chain data in block chain browser

Country Status (1)

Country Link
CN (1) CN111324787B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966349B (en) * 2020-07-09 2022-08-09 杭州睿疆科技有限公司 Method, device and computer equipment for developing programs based on BS (browser/server) architecture

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874634A (en) * 2018-06-05 2018-11-23 迪肯区块链科技(重庆)有限公司 A kind of method for visualizing and browser of digital cash block chain operating status
CN108959621A (en) * 2018-07-18 2018-12-07 百度在线网络技术(北京)有限公司 A kind of implementation method, device, equipment and the storage medium of block chain network

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183371B (en) * 2007-12-12 2010-06-09 中兴通讯股份有限公司 Method for quickly finishing large data-handling and reporting system
CN101630328B (en) * 2009-08-20 2011-05-11 浙江大学 Method for graphically displaying Web service attribute
CN104809121B (en) * 2014-01-24 2019-12-27 腾讯科技(深圳)有限公司 Method and device for controlling display of browser webpage window
CN105205071A (en) * 2014-06-24 2015-12-30 阿里巴巴集团控股有限公司 Method and system for showing data table
CN104376068B (en) * 2014-11-07 2018-04-03 北京思特奇信息技术股份有限公司 A kind of data exhibiting system and method based on dynamic statement template
US20170075877A1 (en) * 2015-09-16 2017-03-16 Marie-Therese LEPELTIER Methods and systems of handling patent claims
US10623443B2 (en) * 2016-07-08 2020-04-14 Ulrich Lang Method and system for policy management, testing, simulation, decentralization and analysis
SG11201900220RA (en) * 2016-07-18 2019-02-27 Nantomics Inc Distributed machine learning systems, apparatus, and methods
CN107018038A (en) * 2016-09-20 2017-08-04 阿里巴巴集团控股有限公司 Monitoring data querying method and server
CN107085582A (en) * 2016-10-12 2017-08-22 雷盈企业管理(上海)有限公司 Block chain digital asset visualization rendering method, system and server apparatus
CN110582789A (en) * 2017-02-10 2019-12-17 赛飞币有限公司 System and method for biometric transaction management
CN107239479B (en) * 2017-03-28 2020-03-13 创新先进技术有限公司 Block chain based data storage and query method and device
CN107316207B (en) * 2017-06-19 2021-03-16 北京小米移动软件有限公司 Method and device for acquiring display effect information
CN107368750A (en) * 2017-06-23 2017-11-21 雷虹 The implementation method and device of electronic health record based on block chain
CN107391944A (en) * 2017-07-27 2017-11-24 北京太云科技有限公司 A kind of electronic health record shared system based on block chain
CN107491519B (en) * 2017-08-15 2020-07-28 中国联合网络通信集团有限公司 Method and device for inquiring block chain account book
CN108460140A (en) * 2018-03-13 2018-08-28 广州供电局有限公司 Equipment-patrolling report-generating method, device, system and computer equipment
CN108600272B (en) * 2018-05-10 2020-08-04 阿里巴巴集团控股有限公司 Block chain data processing method, device, processing equipment and system
CN108965416B (en) * 2018-07-04 2022-04-15 平安科技(深圳)有限公司 Medical data sharing method and device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874634A (en) * 2018-06-05 2018-11-23 迪肯区块链科技(重庆)有限公司 A kind of method for visualizing and browser of digital cash block chain operating status
CN108959621A (en) * 2018-07-18 2018-12-07 百度在线网络技术(北京)有限公司 A kind of implementation method, device, equipment and the storage medium of block chain network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Draft 33.126r15_tracked_changes".3GPP tsg_sa\WG3_Security.2017,全文. *
5G车联网资源分配技术研究与评估;李杏;《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》;全文 *
Advanced_Dynamic_Channel_Access_Strategy_in_Spectrum_Sharing_5G_Systems;Siyu Lin,;《IEEE XPLORE》;全文 *

Also Published As

Publication number Publication date
CN111324787A (en) 2020-06-23

Similar Documents

Publication Publication Date Title
CN109614100B (en) Page display method, device, server, front end and storage medium
AU2019203863B2 (en) Preventing misrepresentation of input data by participants in a secure multi-party computation
JP2020517126A (en) Visual blockchain browser
CN108846753B (en) Method and apparatus for processing data
US11373179B2 (en) Method and system for secure and verifiable offline blockchain transactions
CN111460474B (en) Method, device, memory and computer for implementing decentralization predictor
WO2020207084A1 (en) Payment complaint method, device, server, and readable storage medium
KR20190022429A (en) Data display method, apparatus, terminal and storage medium
CN111046640B (en) Dynamic generation method and device for certificate
CN111897890A (en) Financial business processing method and device
CN111324787B (en) Method and device for displaying block chain data in block chain browser
CN113342249B (en) Content management method, device, equipment and storage medium capable of previewing in real time
CN111933303A (en) Event prediction method and device, electronic equipment and storage medium
CN111552715B (en) User query method and device
CN115098471A (en) Method and device for history states of twin and subscription events
CN109271564A (en) Declaration form querying method and equipment
CN114896487A (en) Method, system and medium for implementing a blockchain browser with front end interacting with blockchain
CN115017149A (en) Data processing method and device, electronic equipment and storage medium
CN111291644B (en) Method and apparatus for processing information
CN115796305B (en) Tree model training method and device for longitudinal federal learning
CN115185573A (en) Application configuration information configuration method and device, computer equipment and storage medium
CN117370693A (en) Digital resource display method, device and node
US20150030218A1 (en) Methods and Systems for Navigating Image Series
CN117155893A (en) Method, device, electronic equipment and computer readable medium for issuing information
CN116225424A (en) Universal model effect display method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant