CN110874365B - Information query method and related equipment thereof - Google Patents

Information query method and related equipment thereof Download PDF

Info

Publication number
CN110874365B
CN110874365B CN201911142940.3A CN201911142940A CN110874365B CN 110874365 B CN110874365 B CN 110874365B CN 201911142940 A CN201911142940 A CN 201911142940A CN 110874365 B CN110874365 B CN 110874365B
Authority
CN
China
Prior art keywords
information
data interaction
target
identifier
interaction information
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
CN201911142940.3A
Other languages
Chinese (zh)
Other versions
CN110874365A (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.)
Shenzhen Onething Technology Co Ltd
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Shenzhen Xunlei Network 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 Shenzhen Onething Technology Co Ltd, Shenzhen Xunlei Network Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201911142940.3A priority Critical patent/CN110874365B/en
Publication of CN110874365A publication Critical patent/CN110874365A/en
Application granted granted Critical
Publication of CN110874365B publication Critical patent/CN110874365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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 application discloses an information query method, which comprises the steps of analyzing a query instruction when the query instruction is received, so as to obtain a target Hash; the corresponding target data interaction information is called by utilizing the target Hash; acquiring target index information corresponding to the target data interaction information; the target index information comprises a data interaction source identifier and a lower layer data interaction identifier; and inquiring by utilizing the data interaction source identifier and the lower layer data interaction identifier to obtain all data interaction information related to the target data interaction information. The application also discloses an information inquiry device, an information inquiry system, a computer readable storage medium, a computer program product and an information storage method and an information storage system. When the technical scheme is used for inquiring transaction information, all transaction information related to the transaction information can be inquired based on certain specific transaction information, and the information integrity is effectively improved.

Description

Information query method and related equipment thereof
Technical Field
The present application relates to the field of data interaction technologies, and in particular, to an information query method, and also to an information query device, an information query system, a computer readable storage medium, a computer program product, and an information storage method and an information storage system.
Background
Referring TO fig. 1, fig. 1 is a schematic flow chart of a cross-partition transaction in a blockchain in the prior art, when two data interaction sides are deployed in different partitions of the blockchain network, that is, when two transaction sides are distributed on the blockchain in a partition manner according TO account addresses, the transactions conducted by the two transaction sides belong TO the same transaction on a FROM partition (the partition where the transferred account address in the transaction is located) and a TO partition (the partition where the received account address in the transaction is located), further, when a refund transaction (RefundTx) is generated for one cross-partition transaction, a pointer originHash can be generated for the refund tx TO point TO a parent transaction (the transaction generating the refund tx), therefore, when transaction information query is conducted, for one child transaction, the parent transaction can be quickly checked based on the corresponding pointer, but for one parent transaction, whether the child transaction is generated or not can be quickly checked, and further, it is not possible TO check which child transaction is generated, such as the child transaction ContractTx generated by contract call. It can be seen that the transaction information query is performed based on the existing query method, and the obtained query result has serious incompleteness.
Therefore, how to query all transaction information related to a specific transaction information based on the transaction information to improve the information integrity is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application mainly aims to provide an information query method, an information query device, an information query system, a computer readable storage medium, a computer program product and an information storage method and an information storage system, and aims to solve the problem that transaction information query results are incomplete in the prior art.
In order to achieve the above object, the present application provides an information query method, which includes:
when a query instruction is received, analyzing the query instruction to obtain a target Hash;
the corresponding target data interaction information is called by utilizing the target Hash;
acquiring target index information corresponding to the target data interaction information; the target index information comprises a data interaction source identifier and a lower layer data interaction identifier;
and inquiring by utilizing the data interaction source identifier and the lower layer data interaction identifier to obtain all data interaction information related to the target data interaction information.
Preferably, the retrieving, by using the target Hash, corresponding target data interaction information includes:
and calling the target data interaction information in a KV storage database by using the target Hash.
Preferably, the retrieving the target data interaction information in the KV storage database by using the target Hash includes:
analyzing the query instruction to obtain the target interaction type of the target data interaction information;
and in the KV storage database, the target data interaction information is called down on a target storage path corresponding to the target interaction type by utilizing the target Hash.
Preferably, each data interaction terminal generating each data interaction information is a node forming a blockchain network, and each data interaction terminal is deployed in a different partition of the blockchain network.
To achieve the above object, the present application provides an information storage method, the method comprising:
when data interaction information is obtained, index information is established for the data interaction information; the index information comprises a data interaction source identifier and a lower layer data interaction identifier;
and acquiring the Hash of the data interaction information, and correspondingly storing the data interaction information, the index information and the Hash into a preset storage space.
In order to achieve the above object, the present application provides an information query apparatus, which includes a memory and a processor, wherein an information query program capable of running on the processor is stored in the memory, and the information query program when executed by the processor implements the steps of the information query method as described in any one of the above.
To achieve the above object, the present application provides an information query system, including:
the instruction analysis module is used for analyzing the query instruction when receiving the query instruction to obtain a target Hash;
the information calling module is used for calling corresponding target data interaction information by utilizing the target Hash;
the index acquisition module is used for acquiring target index information corresponding to the target data interaction information; the target index information comprises a data interaction source identifier and a lower layer data interaction identifier;
and the information inquiry module is used for inquiring by utilizing the data interaction source identifier and the lower layer data interaction identifier to obtain all data interaction information related to the target data interaction information.
To achieve the above object, the present application provides an information storage system comprising:
the index establishing module is used for establishing index information for the data interaction information when the data interaction information is obtained; the index information comprises a data interaction source identifier and a lower layer data interaction identifier;
the information storage module is used for acquiring the Hash of the data interaction information and correspondingly storing the data interaction information, the index information and the Hash into a preset storage space.
To achieve the above object, the present application provides a computer-readable storage medium having stored thereon an information inquiry program executable by one or more processors to implement the steps of the information inquiry method as described in any one of the above.
To achieve the above object, the present application provides a computer program product comprising computer instructions which, when run on a computer, enable the computer to perform the steps of any one of the information inquiry methods described above.
The information query method provided by the application comprises the steps of analyzing a query instruction when the query instruction is received, so as to obtain a target Hash; the corresponding target data interaction information is called by utilizing the target Hash; acquiring target index information corresponding to the target data interaction information; the target index information comprises a data interaction source identifier and a lower layer data interaction identifier; and inquiring by utilizing the data interaction source identifier and the lower layer data interaction identifier to obtain all data interaction information related to the target data interaction information. Therefore, when information is inquired, the corresponding data interaction information can be inquired based on the designated Hash, and the index information is further obtained, and because the index information comprises the data interaction source identification and the lower layer data interaction identification corresponding to the data interaction information, all data interaction information related to the data interaction information can be inquired according to the data interaction source identification and the lower layer data interaction identification; further, when the transaction information inquiry is performed based on the information inquiry method, all transaction information related to the transaction information can be inquired based on the appointed transaction information, wherein the transaction information comprises father transaction information for generating the transaction information and child transaction information generated by the transaction information, and the completeness of a transaction information inquiry result is effectively ensured.
The information query device, the system, the computer readable storage medium, the computer program product and the information storage method and the system provided by the application have the beneficial effects and are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of a cross-partition transaction in a blockchain in the prior art;
FIG. 2 is a flow chart of a first embodiment of the present application;
FIG. 3 is a flow chart of a second embodiment of the present application;
FIG. 4 is a flow chart of a cross-partition transaction in a blockchain in accordance with the present application;
fig. 5 is a schematic diagram illustrating an internal structure of an information query apparatus according to a first embodiment of the present application;
FIG. 6 is a block diagram of a third embodiment of the present application;
fig. 7 is a block diagram of a fourth embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
The application provides an information query method.
Referring to fig. 2, fig. 2 is a flow chart of a first embodiment of the present application.
In a first embodiment, the method may include:
s10: when a query instruction is received, analyzing the query instruction to obtain a target Hash;
the step aims at realizing the analysis of the query instruction so as to obtain the target Hash. Specifically, when the user needs to query the data interaction information, a query instruction can be input based on the corresponding terminal device, and a Hash value of the data interaction information which the user needs to query, namely the target Hash, is added in the query instruction. The target Hash is generated when data interaction is carried out by two data interaction parties to generate data interaction information, each piece of data interaction information has a unique corresponding Hash which is equivalent to the unique identifier of the data interaction information, and therefore, the query of the corresponding data interaction information can be realized based on the Hash. Further, the target Hash can be obtained by analyzing the obtained query instruction, wherein the specific implementation process of the analysis operation is just to refer to the prior art, and the application is not repeated here.
S11: the corresponding target data interaction information is called by utilizing the target Hash;
the step aims at achieving acquisition of target data interaction information, wherein the target data interaction information is the data interaction information which needs to be queried by a user, namely, the data interaction information corresponding to target Hash, and because each piece of data interaction information has only one corresponding Hash, the corresponding target data interaction information can be acquired based on the target Hash. Specifically, when the data interaction parties perform data interaction to generate target data interaction information, the target data interaction information and the corresponding generated target Hash can be stored into the corresponding storage space together, so that after the target Hash is acquired based on the query instruction, the corresponding target data interaction information can be queried from the storage space according to the target Hash. The specific type of the data interaction information does not affect implementation of the technical scheme, and the application is not limited to the specific type of the data interaction information, for example, transaction information generated in a refund transaction process of a blockchain, and the like.
Preferably, the retrieving, by using the target Hash, the corresponding target data interaction information may include: and calling the target data interaction information in a Key-Value storage database (KV) by utilizing the target Hash.
The embodiment of the application provides a more specific storage mode for various data information, namely, the data storage based on a KV storage database, namely, each data interaction information and corresponding Hash and index information are correspondingly stored in the KV storage database. The KV storage database is a NoSQL (non-relational database) model, and data information in the NoSQL storage database can be organized, indexed and stored in a key value pair mode, so that the KV storage database has high read-write performance.
Preferably, the retrieving, by using the target Hash, the target data interaction information in the KV storage database may include: analyzing the query instruction to obtain a target interaction type of the target data interaction information; and in the KV storage database, target data interaction information is called by utilizing the target Hash under a target storage path corresponding to the target interaction type.
Specifically, various data information can be stored in the KV storage database in a classified manner, for example, transfer data information and refund data information are respectively stored in different storage paths, or data interaction information of different types of clients is respectively stored in different storage paths, further, a query instruction input by a user can also include target interaction type information, so that a target interaction type corresponding to the target data interaction information is determined through data analysis, and then the target data interaction information is transferred down from the corresponding target storage path.
S12: acquiring target index information corresponding to the target data interaction information; the target index information comprises a data interaction source identifier and a lower layer data interaction identifier;
this step aims at achieving acquisition of target index information corresponding to target data interaction information. Specifically, when the target data interaction information is generated, target index information can be created for the target data interaction information, wherein the target index information comprises a data interaction source identifier and a lower layer data interaction identifier corresponding to the target data interaction information; further, in the information storage process, the target index information, the target data interaction information and the target Hash are correspondingly stored in the storage space together, so that after the target data interaction information is obtained, the corresponding target index information can be obtained quickly and conveniently. The data interaction source identifier is related identification information of upper layer data interaction information corresponding to the target data interaction information, the lower layer data interaction identifier is related identification information of lower layer data interaction information corresponding to the target data interaction information, and other data interaction information related to the target data interaction information can be conveniently and rapidly queried based on the identifier.
S13: and inquiring by utilizing the data interaction source identifier and the lower layer data interaction identifier to obtain all data interaction information related to the target data interaction information.
The step aims to realize the inquiry of the data interaction information, namely, all the data interaction information related to the target data interaction information is obtained based on the inquiry of the data interaction source identifier and the lower layer data interaction identifier. Taking transaction information inquiry as an example, after target transaction information is obtained by designating Hash and corresponding target index information is obtained, father transaction information (corresponding to upper layer data interaction information for generating target data interaction information) for generating the target transaction information can be obtained based on the data interaction source identification, child transaction information (corresponding to lower layer data interaction information for generating target data interaction information) for generating the target transaction information is obtained based on the lower layer data interaction identification, and therefore all transaction information related to the target transaction information can be obtained, and the integrity of the transaction information is ensured.
As a preferred embodiment, each data interaction terminal generating each data interaction information is a node forming a blockchain network, and each data interaction terminal is deployed in a different partition of the blockchain network.
Specifically, the data interaction information is generated by data interaction terminals, and in the embodiment of the application, each data interaction terminal can be a node forming a blockchain network for realizing data interaction on a blockchain; furthermore, each data interaction terminal can be deployed in different partitions of the blockchain network in the blockchain network, and particularly can realize region division according to address information and the like of the data interaction terminal, so that intra-partition data interaction and inter-partition data interaction can be realized, wherein the inter-partition data interaction can be divided into inter-entry data interaction and inter-exit data interaction, and therefore various forms of data interaction based on the data interaction terminal are realized.
According to the information query method provided by the embodiment, corresponding index information is established in advance when data interaction information is generated, and each piece of data interaction information can generate corresponding Hash when generated, and when information is stored, the three pieces of data interaction information can be stored correspondingly to each other, so that when information query is performed, the corresponding data interaction information can be queried based on the designated Hash, and further the index information is obtained; further, when the transaction information inquiry is performed based on the information inquiry method, all transaction information related to the transaction information can be inquired based on the appointed transaction information, wherein the transaction information comprises father transaction information for generating the transaction information and child transaction information generated by the transaction information, and the completeness of a transaction information inquiry result is effectively ensured.
The application provides an information storage method.
Referring to fig. 3, fig. 3 is a flow chart of a second embodiment of the present application.
In a second embodiment, the method may include:
s20: when the data interaction information is obtained, establishing index information for the data interaction information; the index information comprises a data interaction source identifier and a lower layer data interaction identifier;
s21: and acquiring the Hash of the data interaction information, and correspondingly storing the data interaction information, the index information and the Hash into a preset storage space.
Based on the information query method of the previous embodiment, the embodiment of the application introduces the storage process of each data interaction information in detail.
Specifically, after the data interaction terminal performs data interaction to generate data interaction information, corresponding index information can be directly established for the data interaction terminal, and corresponding Hash is generated at the same time, so that the data interaction information, the index information and the Hash are correspondingly stored in a pre-established storage space together, namely the pre-set storage space. The index information established for the data interaction information may include a data interaction source identifier and a lower layer data interaction identifier, and further, when the subsequent information is queried, various upper layer data interaction information generating a certain data interaction information may be queried in a preset storage space according to the data interaction source identifier, and various lower layer data interaction information generated by the data interaction information may be queried according to the lower layer data interaction identifier, so that all data interaction information related to the data interaction information may be queried based on the index information of the data interaction information.
Furthermore, the transaction information is stored based on the information storage method, all transaction information with association relation can be conveniently inquired by utilizing the index information, the high efficiency of transaction information inquiry is achieved, and meanwhile, the later reconciliation is more convenient.
The embodiment takes the storage and inquiry of transaction information as an example, and the specific implementation flow is as follows:
first, for each transaction information generated by two transaction parties, namely the data interaction information, corresponding index information can be established, for example, the structure of the index information can be the following type (not only):
the TxEntry is index information, the index information comprises a block Hash, a block height, a transaction source, a transaction center partition, a sorting position of a transaction in the block and a sub-transaction array, wherein the sub-transaction array ChildTxs is the lower layer data interaction identifier and possibly comprises one or more sub-transaction ChildTx;
the transaction source txroller is the data interaction source identifier, which may specifically include: the partition initiates Txlocal, other partitions cross-in TxCrossIn and the partition crosses-out TxCrossOut;
the partition ZoneID where the transaction is located specifically is: the cross-out transaction is the partition ID of the To address, the cross-in transaction is the partition ID of the father exchange, and the local transaction is the partition ID of the From address;
the ChildTx may specifically include the following information:
TxType (sub-transaction type, identifier RefundTx, contractTx, etc. type sub-transaction)
TxHash (sub transaction Hash)
ZoneID (sub-exchange partition ID)
In addition, for the above TxRole, if a transaction Tx, whose roll-out address (From address) is divided into a current Zone (assumed as Zone 0) and a reception address (To address) is divided into another Zone (assumed as Zone 1), the transaction Tx may be packed into a new transaction Tx1 (Hash other than Tx) and forwarded To Zone1, where Tx TxRole on Zone0 is TxLocal, and Tx1 is txcross out, indicating that Tx1 is To be performed across Zone1, tx1 on Zone1 is txcross in, indicating that Tx1 is performed across Zone1 From Zone 0; if the From address and To address of a transaction are both current partitions, txRole is Txlocal and no additional cross-partition transactions are generated.
Furthermore, txEntry Hash of the index information can be constructed according to TxHash of the transaction, and then KV storage (TxEntry Hash- > TxEntry) is carried out on the index information. Of course, the corresponding transaction information and the Hash thereof are stored in the KV storage database.
Further, referring to fig. 4, fig. 4 is a schematic flow chart of a cross-partition transaction in a Block chain provided by the present application, specifically, a transaction Tx01 (packed in a Block0 of zone 0) on zone0 needs to be executed across zone1, and the transaction Tx is converted from being executed on zone0 to being executed on zone1 (packed in a Block1 of zone 1), and the originHash of Tx is Hash (Tx 01); after the Tx is executed, returning unconsumed gas to an initiator of the Tx01 transaction, and generating a refund Tx of which the gas is returned to the zone0 to be executed, wherein the originHash of the refund Tx is Hash (Tx). Correspondingly, index information is established for corresponding transactions on the respective partitions:
1. transaction index on Zone 0:
(1) TxEntry of Tx 01:
{TxRole:TxRoleLocal,ZoneID:0,ChildTx:{TxHash:Hash(Tx),ZoneID:1}}
as can be seen, the main index information is Block0Hash, block0Height, zoneID is 0, txrow=txlocal, and the information for generating one sub transaction Tx is: txhash=hash (Tx), zoneid=1, specifically indicating that Tx01 is a Block0 that is packed on partition 0 and contains a transaction Tx to be performed across to partition 1;
(2) TxEntry of Tx:
{TxRole:TxRoleCrossOut,ZoneID:1,ChildTx:[]}
as can be seen, the main index information is Block0Hash, block0Height, zoneID is 1, txrow=txcross out, specifically, tx is needed to be executed by crossing out to partition 1;
(3) TxEntry of refndTx:
{TxRole:TxRoleCrossIn,ZoneID:1,ChildTx:[]}
as can be seen, the main index information is ZoneID of 1, txrow=txcross in, specifically indicating that refndtx is crossed from partition 1 onto partition 0;
2. transaction index on Zone 1:
(1) TxEntry of Tx:
{TxRole:TxRoleCrossIn,ZoneID:0,ChildTx:{TxHash:Hash(RefundTx),ZoneID:0}}
as can be seen, the main index information is Block1Hash, block1Height, zoneID is 0, txrow=txcross in, and the information for generating one sub transaction refindin is: txhash= Hash (RefundTx), zoneid=0, specifically indicating that Tx was crossed from partition 0 to partition 1 and was packed in Block1 of partition 1, and the transaction resulted in a request to cross back to partition 0 for refndtx;
(2) TxEntry of refndTx:
{TxRole:TxRoleCrossOut,ZoneID:0,ChildTx:[]}
as can be seen, the main index information is Block1Hash, block1Height, zoneID is 0, txrow=txcross out, specifically indicating that refndtx is spanned from partition 1 to partition 0.
Therefore, when the transaction information inquiry is carried out subsequently, under the condition of not changing the original transaction, the transaction information and the index information of the transaction can be quickly obtained according to the transaction type and the transaction Hash, and further the father transaction information, the transaction source partition, the block information of the partition, the generated child transaction information and the like corresponding to the transaction information are searched according to the index information, namely all transaction information related to the transaction is deduced, so that development, testing and meeting of the demands of production environment on transaction account checking, inquiry and the like are facilitated.
It can be seen that, in the information query method provided in this embodiment, corresponding index information is established in advance while data interaction information is generated, and each piece of data interaction information generates corresponding Hash when generated, and when information is stored, the three pieces of data interaction information can be stored correspondingly to each other, so that when information query is performed, corresponding data interaction information can be queried based on the specified Hash, and index information is further obtained, and because the index information includes a data interaction source identifier corresponding to the data interaction information and a lower layer data interaction identifier, all data interaction information related to the data interaction information can be queried according to the data interaction source identifier and the lower layer data interaction identifier; further, when the transaction information inquiry is performed based on the information inquiry method, all transaction information related to the transaction information can be inquired based on the appointed transaction information, wherein the transaction information comprises father transaction information for generating the transaction information and child transaction information generated by the transaction information, and the completeness of a transaction information inquiry result is effectively ensured.
The application provides an information inquiry device.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an internal structure of an information query apparatus according to a first embodiment of the present application.
In this embodiment, the information query apparatus 1 may be a PC (Personal Computer ), or may be a smart phone, a tablet computer, a palm computer, a portable computer, an intelligent router, a mining machine, a network storage device, or a terminal device.
The information query apparatus 1 may comprise a memory 11, a processor 12 and a bus 13.
The memory 11 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the information query device 1, such as a hard disk of the information query device 1. The memory 11 may also be an external storage device of the information query apparatus 1 in other embodiments, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the information query apparatus 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the information inquiry apparatus 1. The memory 11 may be used not only for storing application software installed in the information inquiry apparatus 1 and various types of data, such as codes of information inquiry programs, but also for temporarily storing data that has been output or is to be output.
Processor 12 may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for executing program code or processing data stored in memory 11, such as executing a kiosk or the like.
The bus 13 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 5, but not only one bus or one type of bus.
Further, the information query apparatus 1 may further comprise a network interface, which may optionally comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the information query apparatus 1 and other electronic devices.
Optionally, the information query apparatus 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or a display unit, as appropriate, for displaying information processed in the information query device 1 and for displaying a visual user interface.
Fig. 5 shows only the information query apparatus 1 with components 11-13 and the information query program, it being understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the information query apparatus 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
The application provides an information query system.
Referring to fig. 6, fig. 6 is a block diagram of a third embodiment according to the present application.
In a third embodiment, the information inquiry system may include:
the instruction parsing module 20 is configured to parse the query instruction to obtain a target Hash when the query instruction is received;
the information retrieving module 21 is configured to retrieve corresponding target data interaction information by using the target Hash;
the index obtaining module 22 is configured to obtain target index information corresponding to the target data interaction information; the target index information comprises a data interaction source identifier and a lower layer data interaction identifier;
the information query module 23 is configured to query with the data interaction source identifier and the underlying data interaction identifier, and obtain all data interaction information related to the target data interaction information.
For the description of the system provided by the present application, please refer to the above method embodiment, and the description of the present application is omitted here.
The application provides an information storage system.
Referring to fig. 7, fig. 7 is a block diagram of a fourth embodiment of the present application.
In a fourth embodiment, the information storage system may include:
the index establishing module 30 is configured to establish index information for the data interaction information when the data interaction information is obtained; the index information comprises a data interaction source identifier and a lower layer data interaction identifier;
the information storage module 31 is configured to obtain a Hash of the data interaction information, and store the data interaction information, the index information, and the Hash to a preset storage space.
For the description of the system provided by the present application, please refer to the above method embodiment, and the description of the present application is omitted here.
Embodiments of the present application also provide a computer-readable storage medium having an information query program thereon, the information query program being executable by one or more processors to implement the steps of the information query method according to any of the embodiments above.
Embodiments of the present application also provide a computer program product comprising computer instructions which, when run on a computer, cause the computer to perform the steps of the information query method described in any of the embodiments above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and system described above may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus, system and method may be implemented in other manners. For example, the system embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, indirect coupling or communication connection of devices or units, electrical, mechanical, or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that, the foregoing reference numerals of the embodiments of the present application are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (7)

1. An information query method, the method comprising:
when a query instruction is received, analyzing the query instruction to obtain a target Hash;
target data interaction information is called in a KV storage database by utilizing a target Hash;
acquiring target index information corresponding to the target data interaction information; the target index information comprises a data interaction source identifier and a lower layer data interaction identifier, wherein the data interaction source identifier is identifier information of upper layer data interaction information corresponding to the target data interaction information, and the lower layer data interaction identifier is identifier information of lower layer data interaction information corresponding to the target data interaction information; the upper layer data interaction information is parent transaction information of the target data interaction information, and the lower layer data interaction information is child transaction information of the target data interaction information;
querying by using the data interaction source identifier and the lower layer data interaction identifier to obtain all data interaction information related to the target data interaction information;
each data interaction terminal generating each data interaction information is a node forming a blockchain network, and each data interaction terminal is deployed in different partitions of the blockchain network.
2. The method of claim 1, wherein retrieving the target data interaction information in the KV storage database using the target Hash comprises:
analyzing the query instruction to obtain the target interaction type of the target data interaction information;
and in the KV storage database, the target data interaction information is called down on a target storage path corresponding to the target interaction type by utilizing the target Hash.
3. An information storage method, comprising:
when data interaction information is obtained, index information is established for the data interaction information; the index information comprises a data interaction source identifier and a lower layer data interaction identifier, wherein the data interaction source identifier is identifier information of upper layer data interaction information corresponding to the data interaction information, and the lower layer data interaction identifier is identifier information of lower layer data interaction information corresponding to the data interaction information; the upper layer data interaction information is parent transaction information of the data interaction information, and the lower layer data interaction information is child transaction information of the data interaction information;
acquiring the Hash of the data interaction information, and correspondingly storing the data interaction information, the index information and the Hash into a KV storage database;
each data interaction terminal generating each data interaction information is a node forming a blockchain network, and each data interaction terminal is deployed in different partitions of the blockchain network.
4. An information query apparatus, comprising a memory and a processor, the memory having stored thereon an information query program executable on the processor, the information query program when executed by the processor implementing the steps of the information query method of claim 1 or 2.
5. An information query system, the system comprising:
the instruction analysis module is used for analyzing the query instruction when receiving the query instruction to obtain a target Hash;
the information calling module is used for calling the target data interaction information from the KV storage database by utilizing the target Hash;
the index acquisition module is used for acquiring target index information corresponding to the target data interaction information; the target index information comprises a data interaction source identifier and a lower layer data interaction identifier, wherein the data interaction source identifier is identifier information of upper layer data interaction information corresponding to the target data interaction information, and the lower layer data interaction identifier is identifier information of lower layer data interaction information corresponding to the target data interaction information; the upper layer data interaction information is parent transaction information of the target data interaction information, and the lower layer data interaction information is child transaction information of the target data interaction information;
the information inquiry module is used for inquiring by utilizing the data interaction source identifier and the lower layer data interaction identifier to obtain all data interaction information related to the target data interaction information;
each data interaction terminal generating each data interaction information is a node forming a blockchain network, and each data interaction terminal is deployed in different partitions of the blockchain network.
6. An information storage system, the system comprising:
the index establishing module is used for establishing index information for the data interaction information when the data interaction information is obtained; the index information comprises a data interaction source identifier and a lower layer data interaction identifier, wherein the data interaction source identifier is identifier information of upper layer data interaction information corresponding to the data interaction information, and the lower layer data interaction identifier is identifier information of lower layer data interaction information corresponding to the data interaction information; the upper layer data interaction information is parent transaction information of the data interaction information, and the lower layer data interaction information is child transaction information of the data interaction information;
the information storage module is used for acquiring the Hash of the data interaction information and correspondingly storing the data interaction information, the index information and the Hash into a KV storage database;
each data interaction terminal generating each data interaction information is a node forming a blockchain network, and each data interaction terminal is deployed in different partitions of the blockchain network.
7. A computer-readable storage medium, having stored thereon an information inquiry program executable by one or more processors to implement the steps of the information inquiry method according to claim 1 or 2.
CN201911142940.3A 2019-11-20 2019-11-20 Information query method and related equipment thereof Active CN110874365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911142940.3A CN110874365B (en) 2019-11-20 2019-11-20 Information query method and related equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911142940.3A CN110874365B (en) 2019-11-20 2019-11-20 Information query method and related equipment thereof

Publications (2)

Publication Number Publication Date
CN110874365A CN110874365A (en) 2020-03-10
CN110874365B true CN110874365B (en) 2023-11-17

Family

ID=69718124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911142940.3A Active CN110874365B (en) 2019-11-20 2019-11-20 Information query method and related equipment thereof

Country Status (1)

Country Link
CN (1) CN110874365B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339106B (en) * 2020-05-18 2020-08-28 杭州趣链科技有限公司 Block chain data indexing method
CN112560112B (en) * 2020-12-15 2022-09-02 杭州趣链科技有限公司 Block chain based information shielding method, device, equipment and readable storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445993A (en) * 2016-07-11 2017-02-22 天津米游科技有限公司 Data fingerprint query method and device based on block chain
CN108897758A (en) * 2018-05-15 2018-11-27 深圳市网心科技有限公司 A kind of block chain Transaction Inquiries method, apparatus, system and storage medium
CN108984662A (en) * 2018-06-28 2018-12-11 杭州复杂美科技有限公司 A kind of block chain method of data synchronization
CN109063016A (en) * 2018-07-11 2018-12-21 物数(上海)信息科技有限公司 Block chain data storage method, device, electronic equipment, storage medium
CN109086325A (en) * 2018-06-29 2018-12-25 阿里巴巴集团控股有限公司 Data processing method and device based on block chain
CN109165224A (en) * 2018-08-24 2019-01-08 东北大学 A kind of indexing means being directed to keyword key on block chain database
CN109242500A (en) * 2018-09-20 2019-01-18 百度在线网络技术(北京)有限公司 Block chain transaction validation verification method, apparatus and storage medium
CN109255056A (en) * 2018-08-16 2019-01-22 北京京东尚科信息技术有限公司 Data referencing processing method, device, equipment and the storage medium of block chain
CN109325039A (en) * 2018-06-07 2019-02-12 海南新软软件有限公司 A kind of block chain browser and block chain information browsing method
CN109741060A (en) * 2018-12-29 2019-05-10 北京金山安全软件有限公司 Information inquiry system, method, device, electronic equipment and storage medium
CN109886694A (en) * 2019-03-26 2019-06-14 阿里巴巴集团控股有限公司 Data processing method and device and electronic equipment based on block chain
CN109934592A (en) * 2019-03-22 2019-06-25 深圳市网心科技有限公司 A kind of across the chain communication means of block chain, system, electronic equipment and storage medium
CN110135844A (en) * 2019-04-28 2019-08-16 阿里巴巴集团控股有限公司 Credit record, querying method and device and electronic equipment based on block chain
CN110473104A (en) * 2019-08-20 2019-11-19 深圳市网心科技有限公司 A kind of transaction processing method and relevant device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767158A (en) * 2018-02-27 2021-05-07 创新先进技术有限公司 Transaction execution method and device based on block chain and electronic equipment

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445993A (en) * 2016-07-11 2017-02-22 天津米游科技有限公司 Data fingerprint query method and device based on block chain
CN108897758A (en) * 2018-05-15 2018-11-27 深圳市网心科技有限公司 A kind of block chain Transaction Inquiries method, apparatus, system and storage medium
CN109325039A (en) * 2018-06-07 2019-02-12 海南新软软件有限公司 A kind of block chain browser and block chain information browsing method
CN108984662A (en) * 2018-06-28 2018-12-11 杭州复杂美科技有限公司 A kind of block chain method of data synchronization
CN109086325A (en) * 2018-06-29 2018-12-25 阿里巴巴集团控股有限公司 Data processing method and device based on block chain
CN109063016A (en) * 2018-07-11 2018-12-21 物数(上海)信息科技有限公司 Block chain data storage method, device, electronic equipment, storage medium
CN109255056A (en) * 2018-08-16 2019-01-22 北京京东尚科信息技术有限公司 Data referencing processing method, device, equipment and the storage medium of block chain
CN109165224A (en) * 2018-08-24 2019-01-08 东北大学 A kind of indexing means being directed to keyword key on block chain database
CN109242500A (en) * 2018-09-20 2019-01-18 百度在线网络技术(北京)有限公司 Block chain transaction validation verification method, apparatus and storage medium
CN109741060A (en) * 2018-12-29 2019-05-10 北京金山安全软件有限公司 Information inquiry system, method, device, electronic equipment and storage medium
CN109934592A (en) * 2019-03-22 2019-06-25 深圳市网心科技有限公司 A kind of across the chain communication means of block chain, system, electronic equipment and storage medium
CN109886694A (en) * 2019-03-26 2019-06-14 阿里巴巴集团控股有限公司 Data processing method and device and electronic equipment based on block chain
CN110135844A (en) * 2019-04-28 2019-08-16 阿里巴巴集团控股有限公司 Credit record, querying method and device and electronic equipment based on block chain
CN110473104A (en) * 2019-08-20 2019-11-19 深圳市网心科技有限公司 A kind of transaction processing method and relevant device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
一种支持区块链交易溯源的混合索引机制;尤瑶;孔兰菊;肖宗水;郑永清;李庆忠;;计算机集成制造系统(第04期);全文 *
王千阁 ; 何蒲 ; 聂铁铮 ; 申德荣 ; 于戈 ; ."区块链系统的数据存储与查询技术综述".《计算机科学》.2018,第45卷(第12期),全文. *
面向混合索引的区块链系统的可查询性优化;郑浩瀚;申德荣;聂铁铮;寇月;;计算机科学(第10期);全文 *

Also Published As

Publication number Publication date
CN110874365A (en) 2020-03-10

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN107798038B (en) Data response method and data response equipment
WO2021051546A1 (en) Link abnormality recognition method, server and computer-readable storage medium
CN109669980B (en) Cross-database access method and device for data
US20190327105A1 (en) Method and apparatus for pushing information
WO2020063851A1 (en) Method and device for searching for hosting program
CN111277635B (en) Method, equipment, device and computer medium for accessing external node to block chain
CN111414374B (en) Block chain transaction concurrent processing method, device and equipment
CN110874365B (en) Information query method and related equipment thereof
CN110457346A (en) Data query method, apparatus and computer readable storage medium
CN113132267B (en) Distributed system, data aggregation method and computer readable storage medium
CN107102995B (en) Method and device for determining SQL execution plan
CN108154024B (en) Data retrieval method and device and electronic equipment
CN111159131A (en) Performance optimization method, device, equipment and computer readable storage medium
US20060230020A1 (en) Improving Efficiency in processing queries directed to static data sets
CN112671878A (en) Block chain information subscription method, device, server and storage medium
CN112069175A (en) Data query method and device and electronic equipment
CN115481026A (en) Test case generation method and device, computer equipment and storage medium
CN114296696A (en) Business function operation method and device, storage medium and electronic equipment
CN111221847B (en) Monitoring data storage method, device and computer readable storage medium
CN113849520A (en) Intelligent identification method and device of abnormal SQL (structured query language), electronic equipment and storage medium
CN112667682A (en) Data processing method, data processing device, computer equipment and storage medium
CN109828983A (en) PG data base processing method, device, electronic equipment and storage medium
CN117827893A (en) Card number display method, device, equipment and medium
CN112988809B (en) Data query method, device, equipment and medium based on relational database

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210910

Address after: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Xunlei Networking Technologies, Ltd.

Applicant after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

Address before: 518052 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

GR01 Patent grant
GR01 Patent grant