CN111324787A - Block chain data display method and device in block chain browser - Google Patents
Block chain data display method and device in block chain browser Download PDFInfo
- Publication number
- CN111324787A CN111324787A CN201811532836.0A CN201811532836A CN111324787A CN 111324787 A CN111324787 A CN 111324787A CN 201811532836 A CN201811532836 A CN 201811532836A CN 111324787 A CN111324787 A CN 111324787A
- Authority
- CN
- China
- Prior art keywords
- query
- data
- query data
- template
- blockchain
- 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.)
- Granted
Links
Images
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application provides a method and a device for displaying blockchain data in a blockchain browser, wherein the method comprises the following steps: receiving a query instruction input by a user through an interface of a block chain browser, and generating a query request according to the query instruction; the query request comprises attribute information of query data, and the query data are block chain data; sending a query request to a block chain node, wherein the attribute information of the query data is used for the block chain node to determine a display template matched with the query data and obtain the query data; obtaining the presentation template and the query data from the block link point; and displaying the query data according to the format of the display template. According to the method and the device, the blockchain browser can display the blockchain data in an intuitive form which is customized according to the service scene and is convenient for users to understand.
Description
Technical Field
The present disclosure relates to computer technologies, and in particular, to a method and an apparatus for displaying blockchain data in a blockchain browser.
Background
The block chain data is data stored in blocks linked in time series. The block chain data can be displayed through a block chain browser.
The blockchain browser is a general blockchain data presentation mode, but with the continuous development of blockchain technology, the application scenario of the blockchain is continuously expanded, and the data stored in the blockchain is gradually complex and diverse, so the blockchain browser is usually presented according to the original storage form of the data in the blockchain, and a user cannot easily understand the blockchain data of 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, so that the blockchain browser can intuitively display the blockchain data in a form 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 block chain browser, and generating a query request according to the query instruction; the query request comprises attribute information of query data, and the query data are block chain data;
sending a query request to a block chain node, wherein the attribute information of the query data is used for the block chain node to determine a display template matched with the query data and obtain the query data;
acquiring the display template and the query data from the blockchain node;
and displaying the query data according to the format of the display template.
In one possible design, 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 in which the block chain link point is located;
the displaying the query data according to the format of the display template includes:
obtaining 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 display template.
In one possible design, before obtaining the presentation template from the block link point, the method further includes:
obtaining a hash value of the presentation template from the block link point;
and determining that the display template is not stored in the terminal according to the hash value.
In one possible design, before obtaining the presentation template from the block link point, the method further includes:
obtaining a first hash value of the presentation template from the block link point;
before obtaining the query data in the format of the presentation template according to the query data in the original format and the presentation template, the method further includes:
calculating a second hash value of the presentation template;
and determining that the first hash value and the second hash value of the presentation template are the same.
In one possible design, the query data is any one of: transaction input data in the blockchain, transaction output data in the blockchain, and state data in the blockchain;
the presentation template is any one of the following: the system comprises a transaction input data display template, a transaction output data display template and a state data display template.
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 block chain browser;
acquiring the query data and determining a display 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, a block of the block chain stores a corresponding relationship between a service scene and a presentation template;
determining a display 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 service 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, sending the query data to a 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 presentation template to a terminal, wherein the hash value of the presentation template is used for the terminal to determine that the presentation template is not stored in the terminal and verify the presentation template.
In one possible design, the query data is any one of: transaction input data in the blockchain, transaction output data in the blockchain, and state data in the blockchain;
the presentation template is any one of the following: the system comprises a transaction input data display template, a transaction output data display template and a state data display template.
In a third aspect, an embodiment of the present application provides a device for presenting 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 block chain browser and generating a query request according to the query instruction; the query request comprises attribute information of query data, and the query data are block chain data;
the sending module is used for sending a query request to the block chain nodes, and the attribute information of the query data is used for the block chain nodes to determine a display template matched with the query data and obtain the query data;
an obtaining module, configured to obtain the presentation template and the query data from the block link point;
and the display module is used for displaying the query data according to the format of the display template.
In a possible design, the obtaining module is specifically configured to obtain, from the block chain node, the query data in an original format, where the original format is a storage format of the query data in a block chain where the block chain node is located;
the display module is specifically configured to obtain query data in the format of the display template according to the query data in the original format and the display template; and the number of the first and second groups,
and displaying the query data in the format of the display template.
In one possible design, the obtaining module is further configured to, prior to obtaining the reveal template from the block link point: obtaining a hash value of the presentation template from the block link point;
further comprising: 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 reveal template from the block link point: obtaining a first hash value of the presentation template from the block link point; and the number of the first and second groups,
before obtaining the query data in the format of the presentation template according to the query data in the original format and the presentation template: calculating a second hash value of the presentation template;
further comprising: a determination module to determine that the first hash value and the second hash value of the presentation template are the same.
In a fourth aspect, an embodiment of the present application provides an apparatus for presenting blockchain data in a blockchain browser, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a query request sent by a terminal, and 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 block chain browser;
the acquisition module is further used for acquiring the query data and determining a display template matched with the query data according to the attribute information of the query data;
and 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, a block of the block chain stores a corresponding relationship between a service scene and a presentation template; the acquisition module is specifically configured to:
and determining the display template corresponding to the service 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 sending module is further configured to: before sending the presentation template to a terminal: and sending the hash value of the presentation template to a terminal, wherein the hash value of the presentation template is used for the terminal to determine that the presentation template is not stored in the terminal and verify the presentation template.
In a fifth aspect, embodiments of the present application provide a readable storage medium, which includes a program or instructions, when the program or instructions are run on a computer, the method of any one of the first aspect or the second aspect is performed.
In a sixth aspect, an electronic device in an embodiment of the present application includes: a processor coupled with a 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 the first or second aspects.
According to the method and the device, the data in the format of the display template can be displayed to the user instead of the data in the original storage format in the block chain, through the setting of the display template for visually displaying the query data, which can be understood by the user, so that the block chain browser can visually display the block chain data from the perspective easily understood by the user.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a first schematic diagram of a system architecture according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a system architecture provided in the present embodiment;
fig. 3 is a first interaction diagram of a method for displaying blockchain data in a blockchain browser according to an embodiment of the present disclosure;
fig. 4 is an interaction diagram ii of a method for displaying blockchain data in a blockchain browser according to an embodiment of the present disclosure;
fig. 5 is a third interaction diagram of a method for displaying blockchain data in a blockchain browser according to an embodiment of the present disclosure;
fig. 6 is an interaction diagram four of a method for presenting blockchain data in a blockchain browser according to an embodiment of the present disclosure;
fig. 7 is a first schematic structural diagram of a device for presenting blockchain data in a blockchain browser according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a display apparatus for blockchain data in a blockchain browser according to an embodiment of the present disclosure;
fig. 9 is a third schematic structural diagram of a device for presenting blockchain data in a blockchain browser according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in 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 obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Specifically, in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. 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 multiple. The terms "first," "second," and the like in this application are used for distinguishing between similar elements 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, and 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 block chain node stores block chain data, a plurality of display templates for displaying the block chain data and the corresponding relation between the service 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 nodes, the block chain nodes determine a display template matched with the query data according to the attribute information of the query data and acquire the query data, and send the display template and the query data to the terminal, and the terminal displays the query data according to the format of the display template after receiving the query data.
The terminal may include a device for presenting blockchain data in a blockchain browser, and the device for presenting blockchain data may implement the method corresponding to the terminal in the embodiments shown in fig. 3 and fig. 4.
Fig. 2 is a schematic diagram of a system architecture provided in the 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 block chain node stores block chain data, a plurality of display templates for displaying the block chain data and the corresponding relation between the service 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 block chain node, the block chain node determines a display template matched with query data according to attribute information of the query data and obtains the query data in an original format, the display template and the query data are sent 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, the query data in the format of the display template is sent 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 the query data in the block chain where the block link point is located.
The application server may include a device for presenting blockchain data in a blockchain browser, and the device for presenting blockchain data may implement the method corresponding to the application server in the embodiments shown in fig. 5 and fig. 6.
The following describes a method for presenting 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 first method for presenting blockchain data in a blockchain browser according to an embodiment of the present invention, as shown in fig. 3, the method according to the embodiment may include:
step S101, a terminal receives a query instruction input by a user through an interface of a block chain 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 block chain data.
Specifically, a user of the terminal opens an interface of a blockchain browser on the terminal, inputs a query instruction on the interface of the blockchain browser, wherein the user can input an attribute of query data on the interface of the blockchain browser, and clicks an icon button related to the attribute of the query data to be input on the interface of the blockchain browser to input the query instruction. 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: internal state data of the intelligent contract, input data in the transaction process and output data in the transaction process.
Illustratively, the internal state data of the intelligent contract can be balance data of an account after Zhang III transfer operation. For example, the transfer amount of the transfer operation, which may be Zhang III, the account to be transferred, and the like are input data during the transaction. Whether the transfer operation, which may be for example, Zhang III, was successful is the output data during the transaction.
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 service scene of the query data, the block number, the date of writing the query data into the block chain, and the like. Wherein, the service scene of the query data comprises at least one of the following items: 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 a financial, medical, or educational system; the institution is China bank, China construction bank, the Children's Hospital of Western Ann, the first subsidiary Hospital of the university of Western Ann or the subsidiary primary school of the northwest university, etc.; the service types are account opening, account transfer, card opening, medical record, diagnosis and the like.
And step S102, the terminal sends the query request to the block chain node.
Specifically, the terminal sends the query request to a blockchain node in a blockchain in which the query data is located. Wherein, the block chain node can be an intelligent contract virtual machine.
Step S103, the block chain nodes acquire the query data according to the attribute information of the query data and determine a display template matched with the query data.
Specifically, after receiving the attribute information of the query data, the block link node acquires the query data according to the attribute information of the query data, and determines a display template matched with the query data.
The method for acquiring query data according to attribute information of the query data may refer to an existing method, where 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 block chain where block link points are located.
Further, a plurality of presentation templates are stored in the blockchain node, and it can be understood that the presentation templates corresponding to the service scenes 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 herein is a format that can be understood by the user and can visually present the query data. Here, the presenting the format corresponding to the template 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, if the service scenario of the query data is financial system plus china bank, the financial system plus china bank may correspond to an account opening information presentation template, a transfer information presentation template, a loan application information presentation template, and the like of china bank.
Further, 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, may also be stored in the block chain node. Therefore, after the attribute of the query data is received, if the attribute of the query data comprises 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.
And step S104, the block link node sends the query data and the display template matched with the query data to the terminal.
Specifically, the block link node sends the query data in the original format and the presentation template matched with the query data to the terminal.
And step S105, the terminal displays the query data according to the format of the display template.
Specifically, the presenting query data according to the format of the presentation template includes:
(1) and obtaining query data in the format of the display template according to the query data in the original format and the display template.
I.e. the query data in the original format is converted into data in the format of the presentation template.
(2) And displaying the query data in the format of the display template.
In this way, the user can see intuitive query data that the user easily understands.
In this embodiment, through the setting of the presentation template capable of being understood by the user and visually presenting the query data, the data in the format of the presentation template is presented to the user instead of the data in the original format stored in the blockchain, so that the blockchain browser can visually present the blockchain data in a perspective easily understood by the user.
It should be understood that the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 4 is an interaction diagram ii of a method for presenting blockchain data in a blockchain browser according to an embodiment of the present invention, as shown in fig. 4, the method according to the embodiment may include:
step S201, a terminal receives a query instruction input by a user through an interface of a block chain 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 block chain data.
Specifically, the specific implementation of step S201 refers to the description of step S101 in the previous embodiment, and is not described herein again.
And step S202, the terminal sends the query request to the blockchain node.
Specifically, the specific implementation of step S202 refers to the description of step S102 in the previous embodiment, and is not described herein again.
Step S203, the block link point obtains the query data in the original format according to the attribute information of the query data, determines a display template matched with the query data, and obtains a first hash value of the display template.
Specifically, in step S203 in this embodiment, besides acquiring 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 is also acquired. The rest of the specific implementation is described with reference to step S103 in the previous embodiment, and is not described herein again.
Correspondingly, the block chain node also stores the hash value of each presentation template, and is mainly used for the verification of the terminal on the received presentation template.
Step S204, the block node 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 first hash value of the presentation template is first sent to the terminal without sending the presentation template.
Step S205, the terminal determines whether the presentation template is stored according to the first hash value.
Specifically, after receiving the first hash value, the terminal determines whether the terminal stores a presentation template with a hash value as the first hash value, if so, the terminal does not need to acquire the presentation module from a block link point, so that signaling overhead is saved, and if not, step S206 is executed.
If the terminal stores the presentation template with the hash value as the first hash value, it is stated that in the query process before the query, the terminal acquires the presentation module from the block link point and caches or stores the presentation 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 block chain node.
Specifically, if the terminal determines that the presentation template is not stored, an acquisition request of the presentation template is sent to the block nodes, where the acquisition request may include the first hash value.
Step S207, the block link point acquires the display template according to the acquisition request of the display template.
Specifically, in one mode, after receiving the obtaining request, the block link obtains the presentation template whose stored hash value is the first hash value.
Step S208, the block link node sends the display template to the terminal.
Step S209, the terminal calculates a second hash value of the presentation template, and determines whether the first hash value of the presentation template is the same as the second hash value.
Specifically, the terminal acquires the presentation template, recalculates the hash value of the presentation template, namely the second hash value, once again, and if the second hash value is different from the first hash value, it indicates that the presentation module is tampered or the blockchain node sends an incorrect presentation module, and the presentation 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 presentation template are the same, the terminal obtains query data in the format of the presentation template according to the query data in the original format and the presentation template.
Specifically, if the terminal determines that the first hash value and the second hash value of the presentation template are the same, it is determined that the presentation module received by the terminal is the correct presentation module matched with the query data. Therefore, 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 specific implementation refers to the explanation in step S105 in the previous embodiment.
Step S211, the terminal displays the query data in the format of the presentation template.
In this embodiment, through the setting of the presentation template capable of being understood by the user and visually presenting the query data, the data in the format of the presentation template is presented to the user instead of the data in the original format stored in the blockchain, so that the blockchain browser can visually present the blockchain data in a perspective easily understood by the user. Meanwhile, the hash value of the display module matched with the query data can be obtained first, and the hash value is used for verifying whether the display module is correct and determining whether the display module needs to be obtained from the block link point 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-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The following describes a method for presenting 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 a third interaction diagram of a method for presenting blockchain data in a blockchain browser according to an embodiment of the present invention, as shown in fig. 5, the method according to the embodiment may include:
step S301, a terminal receives a query instruction input by a user through an interface of a block chain 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 block chain data.
Step S302, the terminal sends the query request to an application server.
Step S303, the application server sends the query request to the blockchain node.
Step S304, the block chain node acquires the query data and determines a display template matched with the query data according to the attribute information of the query data.
Step S305, the block link node sends the query data and the display template matched with the query data to the application server.
And 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.
And step S307, the application server sends the query data in the format of the display template to the terminal.
And step S308, displaying the query data in the format of the display template by the terminal.
Specifically, the difference between this embodiment and the embodiment shown in fig. 3 is that the presentation device for blockchain data in the blockchain browser is set in the application server, the terminal first sends the query request to the application server, and the application server forwards the query request to the blockchain node; and the block link node sends the query data and the display template matched with the query data to the 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 details are not described in this embodiment.
It should be understood that the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 6 is an interaction diagram of a fourth method for presenting blockchain data in a blockchain browser according to an embodiment of the present invention, as shown in fig. 6, the method according to the embodiment may include:
step S401, a terminal receives a query instruction input by a user through an interface of a block chain 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 block chain data.
Step S402, the terminal sends the query request to the application server.
Step S403, the application server sends the query request to the blockchain node.
Step S404, the block node acquires the query data in the original format, determines a display template matched with the query data, and acquires a first hash value of the display template according to the attribute information of the query data.
Step S405, the block node 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 display template is stored according to the first hash value.
Step S407, if the application server determines that the display template is not stored, send an acquisition request of the display template to the block link point.
Step S408, the block link point acquires the display template according to the acquisition request of the display template.
Step S409, the block link node sends the display template to the application server.
And 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 the query data showing the format of the template to the terminal.
Step S412, the terminal displays the format of the display template to display the query data.
Specifically, the difference between this embodiment and the embodiment shown in fig. 4 is that the presentation device of the blockchain data in the blockchain browser is disposed in the application server. The rest of the specific implementation refers to the embodiment shown in fig. 4, and details are not described in this embodiment.
It should be understood that the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The method for presenting blockchain data in a blockchain browser according to the present invention is described above with reference to the embodiments shown in fig. 3 to 6, and the apparatus for presenting blockchain data in a blockchain browser according to the present invention is described below with reference to fig. 7 to 9.
Fig. 7 is a schematic structural diagram of a device for presenting blockchain data in a blockchain browser according to an embodiment of the present invention, as shown in fig. 7, the device according to the embodiment may include: a receiving module 71, a sending 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, and the query data are block chain 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 display template matching the query data, and obtain the query data;
an obtaining module 73, configured to obtain the presentation template and the query data from the block link point;
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 block link point, the query data in an original format, where the original format is a storage format of the query data in a block chain where the block link point is located.
The presentation module 74 is specifically configured to obtain query data in the format of the presentation template according to the query data in the original format and the presentation template; and the number of the first and second groups,
and displaying the query data in the format of the display template.
The apparatus of this embodiment may be used to implement the technical solutions corresponding to the block link points in the method embodiments shown in fig. 3 to 4, and the implementation principles and technical effects thereof are similar and will not be described herein again.
Fig. 8 is a schematic structural diagram of a second display device for blockchain data in a blockchain browser according to an embodiment of the present invention, as shown in fig. 8, the device according to the present 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 presentation template from the block link point;
the determining module 75 is configured to determine that the display template is not stored in the terminal according to the hash value.
Optionally, the obtaining module 73 is further configured to, before obtaining the revealing template from the block link point: obtaining a first hash value of the presentation template from the block link point; and the number of the first and second groups,
before obtaining the query data in the format of the presentation template according to the query data in the original format 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 apparatus of this embodiment may be used to implement the technical solutions corresponding to the block link points in the method embodiments shown in fig. 3 to 4, and the implementation principles and technical effects thereof are similar and will not be described herein again.
Fig. 9 is a third schematic structural diagram of a device for presenting blockchain data in a blockchain browser according to an embodiment of the present invention, as shown in fig. 9, the device according to the present embodiment may include: an acquisition module 81 and a sending module 82.
An obtaining module 81, configured to obtain an inquiry request sent by a terminal, where the inquiry request includes attribute information of inquiry data; the terminal generates a query request according to a query instruction input by a user through a block chain browser;
the obtaining module 81 is further configured to obtain the query data according to the attribute information of the query data and determine a display template matched with the query data;
a sending module 82, configured to send the query data and the presentation template to a terminal, where the presentation template is used for the terminal to present the query data to a user.
Optionally, a corresponding relationship between a service scene and a presentation template is stored in a block of the block chain; the obtaining module 81 is specifically configured to:
and determining the display template corresponding to the service 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 presentation template to a terminal, wherein the hash value of the presentation template is used for the terminal to determine that the presentation template is not stored in the terminal and verify the presentation template.
The apparatus of this embodiment may be configured to execute the technical solutions corresponding to the terminals in the method embodiments shown in fig. 3 to fig. 4, and the implementation principles and technical effects are similar and will not be described herein again.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and referring to fig. 9, a server according to the embodiment includes: a processor 92, a memory 91 and a communication bus 93, the communication bus 93 being used to connect 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 call the computer program stored in the memory 91 to implement the method corresponding to the block link point or the terminal or the application server in the foregoing method embodiment.
Wherein the computer program may also be stored in a memory external to the electronic device.
It should be understood that in the embodiments of the present application, the processor 92 may be a CPU, and 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, etc. A general purpose processor may be a microprocessor or any conventional processor or the like.
The memory 91 may include both read-only memory and random access memory, and provides instructions and data to the processor 92. The memory 91 may also include a non-volatile random access memory. For example, the memory 91 may also store information of device types.
The memory 91 may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile 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. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (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 synchronous SDRAM (ESDRAM), synchronous link SDRAM (SLDRAM), and direct 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 the data bus. But for clarity of illustration the various buses are labeled as bus 93 in the figures.
The present invention provides a readable storage medium, which includes a program or instructions, and when the program or instructions are executed on a computer, the method described in the method corresponding to the block link point or the terminal shown in fig. 3 or fig. 4 is executed.
The embodiment of the present application provides a readable storage medium, which includes a program or an instruction, and when the program or the instruction is executed on a computer, the method described in the method corresponding to the block link point or the terminal or the application server shown in fig. 5 or fig. 6 is executed.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions 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 solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
Claims (14)
1. A method for displaying blockchain data in a blockchain browser is characterized by comprising the following steps:
receiving a query instruction input by a user through an interface of a block chain browser, and generating a query request according to the query instruction; the query request comprises attribute information of query data, and the query data are block chain data;
sending a query request to a block chain node, wherein the attribute information of the query data is used for the block chain node to determine a display template matched with the query data and obtain the query data;
acquiring the display template and the query data from the blockchain node;
and displaying the query data according to the format of the display template.
2. The method of claim 1, wherein obtaining the query data from the blockchain node comprises:
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 in which the block chain link point is located;
the displaying the query data according to the format of the display template includes:
obtaining 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 display template.
3. The method of claim 1 or 2, further comprising, prior to obtaining the reveal template from the block link point:
obtaining a hash value of the presentation template from the block link point;
and determining that the display template is not stored in the terminal according to the hash value.
4. The method of claim 1 or 2, further comprising, prior to obtaining the reveal template from the block link point:
obtaining a first hash value of the presentation template from the block link point;
before obtaining the query data in the format of the presentation template according to the query data in the original format and the presentation template, the method further includes:
calculating a second hash value of the presentation template;
and determining that the first hash value and the second hash value of the presentation template are the same.
5. The method of claim 1 or 2, wherein the query data is any one of: transaction input data in the blockchain, transaction output data in the blockchain, and state data in the blockchain;
the presentation template is any one of the following: the system comprises a transaction input data display template, a transaction output data display template and a state data display template.
6. A method for displaying blockchain data in a blockchain 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;
acquiring the query data and determining a display 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.
7. The method according to claim 6, wherein the block chain stores the corresponding relationship between the service scene and the presentation template; determining a display 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 service 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.
8. A device for presenting blockchain data in a blockchain browser, comprising:
the receiving module is used for receiving a query instruction input by a user through an interface of the block chain browser and generating a query request according to the query instruction; the query request comprises attribute information of query data, and the query data are block chain data;
the sending module is used for sending a query request to the block chain nodes, and the attribute information of the query data is used for the block chain nodes to determine a display template matched with the query data and obtain the query data;
an obtaining module, configured to obtain the presentation template and the query data from the block link point;
and the display module is used for displaying the query data according to the format of the display template.
9. The apparatus of claim 8, wherein the obtaining module is further configured to, prior to obtaining the reveal template from the block link point: obtaining a hash value of the presentation template from the block link point;
further comprising: and the determining module is used for determining that the display template is not stored in the terminal according to the hash value.
10. The method of claim 8, wherein the obtaining module is further configured to, prior to obtaining the reveal template from the block link point: obtaining a first hash value of the presentation template from the block link point; and the number of the first and second groups,
before obtaining the query data in the format of the presentation template according to the query data in the original format and the presentation template: calculating a second hash value of the presentation template;
further comprising: a determination module to determine that the first hash value and the second hash value of the presentation template are the same.
11. A device for presenting blockchain data in a blockchain browser, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a query request sent by a terminal, and 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;
the acquisition module is further used for acquiring the query data and determining a display template matched with the query data according to the attribute information of the query data;
and 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.
12. The apparatus according to claim 11, wherein the block of the block chain stores therein a correspondence between a service scene and a presentation template; the acquisition module is specifically configured to:
and determining the display template corresponding to the service 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.
13. A readable storage medium comprising a program or instructions for performing the method of any of claims 1 to 5 or 6 to 7 when the program or instructions are run on a computer.
14. An electronic device, comprising: a processor coupled with a memory;
the memory is used for storing a computer program;
the processor is used for calling the computer program stored in the memory so as to realize the method of any one of claims 1-5 or 6-7.
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 true CN111324787A (en) | 2020-06-23 |
CN111324787B 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) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111966349A (en) * | 2020-07-09 | 2020-11-20 | 杭州传化智能制造科技有限公司 | Method, device and computer equipment for developing programs based on BS (browser/server) architecture |
CN113010923A (en) * | 2021-02-26 | 2021-06-22 | 中国工商银行股份有限公司 | Block chain based letter distribution and access method and device |
CN114860806A (en) * | 2022-05-11 | 2022-08-05 | 金蝶软件(中国)有限公司 | Data query method and device of block chain, computer equipment and storage medium |
Citations (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101183371A (en) * | 2007-12-12 | 2008-05-21 | 中兴通讯股份有限公司 | Method for quick finishing large data-handling and reporting system |
CN101630328A (en) * | 2009-08-20 | 2010-01-20 | 浙江大学 | Method for graphically displaying Web service attribute |
CN104376068A (en) * | 2014-11-07 | 2015-02-25 | 北京思特奇信息技术股份有限公司 | Data representation system and method based on dynamic report template |
CN104809121A (en) * | 2014-01-24 | 2015-07-29 | 腾讯科技(深圳)有限公司 | Browser web page window display control method and device |
CN105205071A (en) * | 2014-06-24 | 2015-12-30 | 阿里巴巴集团控股有限公司 | Method and system for showing data table |
US20170075877A1 (en) * | 2015-09-16 | 2017-03-16 | Marie-Therese LEPELTIER | Methods and systems of handling patent claims |
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 |
CN107239479A (en) * | 2017-03-28 | 2017-10-10 | 阿里巴巴集团控股有限公司 | A kind of method and device of data storage and inquiry based on block chain |
CN107316207A (en) * | 2017-06-19 | 2017-11-03 | 北京小米移动软件有限公司 | A kind of method and apparatus for obtaining bandwagon 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 |
CN107491519A (en) * | 2017-08-15 | 2017-12-19 | 中国联合网络通信集团有限公司 | The querying method and device of block chain account book |
US20180069899A1 (en) * | 2016-07-08 | 2018-03-08 | Ulrich Lang | Method and system for policy management, testing, simulation, decentralization and analysis |
WO2018148037A1 (en) * | 2017-02-10 | 2018-08-16 | Selfiepay, Inc. | Systems and methods for biometric transaction management |
CN108460140A (en) * | 2018-03-13 | 2018-08-28 | 广州供电局有限公司 | Equipment-patrolling report-generating method, device, system and computer equipment |
CN108600272A (en) * | 2018-05-10 | 2018-09-28 | 阿里巴巴集团控股有限公司 | A kind of block chain data processing method, device, processing equipment and system |
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 |
CN108965416A (en) * | 2018-07-04 | 2018-12-07 | 平安科技(深圳)有限公司 | Medical data sharing method, device, computer equipment and storage medium |
CN109716346A (en) * | 2016-07-18 | 2019-05-03 | 河谷生物组学有限责任公司 | Distributed machines learning system, device and method |
-
2018
- 2018-12-14 CN CN201811532836.0A patent/CN111324787B/en active Active
Patent Citations (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101183371A (en) * | 2007-12-12 | 2008-05-21 | 中兴通讯股份有限公司 | Method for quick finishing large data-handling and reporting system |
CN101630328A (en) * | 2009-08-20 | 2010-01-20 | 浙江大学 | Method for graphically displaying Web service attribute |
CN104809121A (en) * | 2014-01-24 | 2015-07-29 | 腾讯科技(深圳)有限公司 | Browser web page window display control method and device |
CN105205071A (en) * | 2014-06-24 | 2015-12-30 | 阿里巴巴集团控股有限公司 | Method and system for showing data table |
CN104376068A (en) * | 2014-11-07 | 2015-02-25 | 北京思特奇信息技术股份有限公司 | Data representation system and method based on dynamic report template |
US20170075877A1 (en) * | 2015-09-16 | 2017-03-16 | Marie-Therese LEPELTIER | Methods and systems of handling patent claims |
US20180069899A1 (en) * | 2016-07-08 | 2018-03-08 | Ulrich Lang | Method and system for policy management, testing, simulation, decentralization and analysis |
CN109716346A (en) * | 2016-07-18 | 2019-05-03 | 河谷生物组学有限责任公司 | Distributed machines learning system, device and method |
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 |
WO2018148037A1 (en) * | 2017-02-10 | 2018-08-16 | Selfiepay, Inc. | Systems and methods for biometric transaction management |
CN107239479A (en) * | 2017-03-28 | 2017-10-10 | 阿里巴巴集团控股有限公司 | A kind of method and device of data storage and inquiry based on block chain |
CN107316207A (en) * | 2017-06-19 | 2017-11-03 | 北京小米移动软件有限公司 | A kind of method and apparatus for obtaining bandwagon 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 |
CN107491519A (en) * | 2017-08-15 | 2017-12-19 | 中国联合网络通信集团有限公司 | The querying method and device of block chain account book |
CN108460140A (en) * | 2018-03-13 | 2018-08-28 | 广州供电局有限公司 | Equipment-patrolling report-generating method, device, system and computer equipment |
CN108600272A (en) * | 2018-05-10 | 2018-09-28 | 阿里巴巴集团控股有限公司 | A kind of block chain data processing method, device, processing equipment and system |
CN108874634A (en) * | 2018-06-05 | 2018-11-23 | 迪肯区块链科技(重庆)有限公司 | A kind of method for visualizing and browser of digital cash block chain operating status |
CN108965416A (en) * | 2018-07-04 | 2018-12-07 | 平安科技(深圳)有限公司 | Medical data sharing method, device, computer equipment and storage medium |
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)
Title |
---|
"\"Draft 33.126r15_tracked_changes\"", 3GPP TSG_SA\\WG3_SECURITY * |
SIYU LIN,: "Advanced_Dynamic_Channel_Access_Strategy_in_Spectrum_Sharing_5G_Systems", 《IEEE XPLORE》 * |
李杏: "5G车联网资源分配技术研究与评估", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111966349A (en) * | 2020-07-09 | 2020-11-20 | 杭州传化智能制造科技有限公司 | Method, device and computer equipment for developing programs based on BS (browser/server) architecture |
CN111966349B (en) * | 2020-07-09 | 2022-08-09 | 杭州睿疆科技有限公司 | Method, device and computer equipment for developing programs based on BS (browser/server) architecture |
CN113010923A (en) * | 2021-02-26 | 2021-06-22 | 中国工商银行股份有限公司 | Block chain based letter distribution and access method and device |
CN114860806A (en) * | 2022-05-11 | 2022-08-05 | 金蝶软件(中国)有限公司 | Data query method and device of block chain, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111324787B (en) | 2023-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA3058227C (en) | Preventing misrepresentation of input data by participants in a secure multi-party computation | |
CN111767371A (en) | Intelligent question and answer method, device, equipment and medium | |
CN111324787A (en) | Block chain data display method and device in block chain browser | |
CN111858296B (en) | Interface testing method, device, equipment and storage medium | |
CN109165017A (en) | Data verification method, device and computer storage medium | |
CN109522705B (en) | Authority management method, device, electronic equipment and medium | |
CN109271564A (en) | Declaration form querying method and equipment | |
CN112988311A (en) | On-line experimental method based on WEB server | |
CN108632348B (en) | Service checking method and device | |
CN114564336B (en) | Data consistency verification method, device, equipment and storage medium | |
CN112748924B (en) | Inventory display method and system | |
CN113144619B (en) | Method and system for visually configuring dynamic functions | |
CN112650763A (en) | Configuration method of product quota, related equipment and storage medium | |
CN111897728A (en) | Interface debugging method and related equipment | |
CN112256688B (en) | Service data cleaning method and device and electronic equipment | |
CN115904380B (en) | Page field creation and assembly method, electronic device and computer readable storage medium | |
KR102449831B1 (en) | Electronic device for providing information regarding new text, server for identifying new text and operation method thereof | |
CN118469599A (en) | Value acquisition related information display method, device, equipment and medium | |
CN117390490A (en) | Method, apparatus, device, storage medium and product for generating report for telecommunication | |
CN117436889A (en) | Resource processing method, device, computer equipment and storage medium | |
CN114237434A (en) | Query condition configuration method and device, computer equipment and storage medium | |
CN116483410A (en) | Financial application updating method, apparatus, computer device and storage medium | |
CN115631751A (en) | Man-machine interaction method and device and electronic equipment | |
CN118245140A (en) | Interface call example generation method and device, electronic equipment and storage medium | |
CN117453076A (en) | Service processing method, device, computer 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 |