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

Information query method and related equipment thereof Download PDF

Info

Publication number
CN110874365A
CN110874365A CN201911142940.3A CN201911142940A CN110874365A CN 110874365 A CN110874365 A CN 110874365A CN 201911142940 A CN201911142940 A CN 201911142940A CN 110874365 A CN110874365 A CN 110874365A
Authority
CN
China
Prior art keywords
information
data interaction
target
hash
query
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
Application number
CN201911142940.3A
Other languages
Chinese (zh)
Other versions
CN110874365B (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
Original Assignee
Shenzhen Onething 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 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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an information query method, which comprises the steps of analyzing a query instruction to obtain a target Hash when the query instruction is received; calling corresponding target data interaction information by using 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 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. The invention also discloses an information inquiry device, an information inquiry system, a computer readable storage medium, a computer program product, an information storage method and an information storage system. When the technical scheme is used for inquiring the transaction information, all the transaction information related to the transaction information can be inquired based on a certain specific transaction information, so that the information integrity is effectively improved.

Description

Information query method and related equipment thereof
Technical Field
The present invention relates to the field of data interaction technologies, and in particular, to an information query method, an information query apparatus, 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 diagram illustrating a process of cross-partition transaction in a blockchain in the prior art, when two data interaction parties are deployed in different partitions of a blockchain network, that is, when two transaction parties are distributed in partitions on the blockchain according TO account addresses, the transactions performed by the two data interaction parties belong TO the same transaction on a FROM partition (a partition where an account address is transferred in the transaction) and a TO partition (a partition where an account address is received in the transaction), further, when a refund transaction (reflundtx) is generated in one cross-partition transaction, a pointer originHash may be generated for the reflndtx TO point TO a parent transaction (a transaction that generates reflundtx), so that when a transaction information query is performed, a parent transaction can be quickly found based on the corresponding pointer for one child transaction, but for one parent transaction, it cannot be quickly found whether or not a child transaction is generated, and even more cannot be found which child transactions are generated, such as the generated sub-transaction conteracttx, of a contract invocation. Therefore, when the transaction information is queried based on the existing query method, the query result obtained by the method has serious incompleteness.
Therefore, how to query all the transaction information related to the specific transaction information based on the specific transaction information to improve the information integrity is a problem to be urgently solved by those skilled in the art.
Disclosure of Invention
The invention 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, an information storage method and an information storage system, and aims to solve the problem that the transaction information query result is incomplete in the prior art.
In order to achieve the above object, the present invention provides an information query method, including:
when a query instruction is received, analyzing the query instruction to obtain a target Hash;
calling corresponding target data interaction information by using 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 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.
Preferably, the calling of the corresponding target data interaction information by using the target Hash includes:
and calling the target data interaction information in a KV storage database by using the target Hash.
Preferably, the calling the target data interaction information in the KV storage database by using the target Hash includes:
analyzing the query instruction to obtain a target interaction type of the target data interaction information;
and in the KV storage database, the target data interaction information is called under a target storage path corresponding to the target interaction type by using the target Hash.
Preferably, each data interaction terminal generating each data interaction information is a node forming a block chain network, and each data interaction terminal is deployed in a different partition of the block chain network.
In order to achieve the above object, the present invention provides an information storage method, including:
when 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;
and obtaining the Hash of the data interaction information, and correspondingly storing the data interaction information, the index information and the Hash to a preset storage space.
In order to achieve the above object, the present invention provides an information query apparatus, which includes a memory and a processor, wherein the memory stores an information query program operable on the processor, 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.
In order to achieve the above object, the present invention provides an information query system, including:
the instruction analysis module is used for analyzing the query instruction when the query instruction is received to obtain a target Hash;
the information calling module is used for calling corresponding target data interaction information by using 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 query module is used for querying 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 invention 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;
and 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 to a preset storage space.
To achieve the above object, the present invention provides a computer-readable storage medium, on which an information query program is stored, the information query program being executable by one or more processors to implement the steps of the information query method as described in any one of the above.
To achieve the above object, the present invention provides a computer program product comprising computer instructions which, when run on a computer, make the computer perform the steps of any of the above-mentioned information query methods.
The invention provides an information query method, which comprises the steps of analyzing a query instruction to obtain a target Hash when the query instruction is received; calling corresponding target data interaction information by using 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 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. It can be seen that, according to the technical scheme provided by the invention, corresponding index information is established in advance while data interaction information is generated, in addition, each piece of data interaction information generates a corresponding Hash when being generated, and when information is stored, the three pieces of data interaction information can be correspondingly stored, so that when information is queried, the corresponding data interaction information can be queried based on the specified Hash, and further index information is obtained, and as the index information comprises a data interaction source identifier and a lower-layer data interaction identifier corresponding to the data interaction information, 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 is queried based on the information query method, all transaction information related to the transaction information can be queried based on the specified transaction information, including parent transaction information generating the transaction information and child transaction information generated by the transaction information, so that the integrity of a transaction information query result is effectively ensured.
The information query device, the information query system, the computer readable storage medium, the computer program product, the information storage method and the information storage system provided by the invention all have the beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of a cross-partition transaction in a blockchain in the prior art;
FIG. 2 is a schematic flow chart of a first embodiment of the present invention;
FIG. 3 is a schematic flow chart of a second embodiment of the present invention;
FIG. 4 is a schematic flow chart of a cross-partition transaction in a blockchain according to the present invention;
fig. 5 is a schematic internal structure diagram of an information query device according to a first embodiment of the disclosure;
FIG. 6 is a block diagram showing the structure of a third embodiment of the present invention;
fig. 7 is a block diagram of a fourth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. 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 invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or 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 relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides an information query method.
Referring to fig. 2, fig. 2 is a schematic flow chart of the first embodiment of the present invention.
In a first embodiment, the method may comprise:
s10: when a query instruction is received, analyzing the query instruction to obtain a target Hash;
this step is intended to implement the parsing of the query instruction to obtain the target Hash. Specifically, when a user needs to query data interaction information, a query instruction can be input based on corresponding terminal equipment, and the query instruction is added with a Hash value of the data interaction information to be queried by the user, namely the target Hash. The target Hash is generated when data interaction information is generated by data interaction between two data interaction parties, each piece of data interaction information has the Hash which is uniquely corresponding to the data interaction information, and the Hash is equivalent to the unique identification of the data interaction information, so that the corresponding data interaction information can be inquired based on the Hash. Further, the target Hash can be obtained by analyzing the obtained query instruction, wherein for the specific implementation process of the analysis operation, reference is made to the prior art, and details are not repeated herein.
S11: calling corresponding target data interaction information by using the target Hash;
the step aims to realize the acquisition of target data interaction information, the target data interaction information is data interaction information which needs to be inquired by a user, namely data interaction information corresponding to the target Hash. Specifically, when data interaction is performed between two data interaction parties to generate target data interaction information, the target data interaction information and a correspondingly generated target Hash can be stored in a corresponding storage space together, and therefore, after the target Hash is obtained 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 the implementation of the technical scheme, and the application is not specifically limited to this, for example, the data interaction information may be transaction information generated in a refund transaction process on a block chain.
Preferably, the calling of the corresponding target data interaction information by using the target Hash may include: and calling target data interaction information in a KV storage database (Key-Value, Key Value storage database) by using the target Hash.
The embodiment of the application provides a specific storage mode related to various data information, namely data storage based on a KV storage database, namely, the data interaction information and corresponding Hash and index information of the data interaction information are correspondingly stored in the KV storage database. The KV storage database is a NoSQL (non-relational database) model, data information in the KV storage database can be organized, indexed and stored according to a key value pair form, and the KV storage database has high reading and writing performance.
Preferably, the calling target data interaction information in the KV storage database by using the target Hash 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 acquired under a target storage path corresponding to the target interaction type by using the target Hash.
Specifically, various types of data information can be stored in a KV storage database in a classified manner, for example, the transfer data information and the refund data information are respectively stored in different storage paths, or the data interaction information of different types of customers is respectively stored in different storage paths, and further, the query instruction input by the user may further include target interaction type information, so as to determine a target interaction type corresponding to the target data interaction information through data analysis, and further retrieve the target data interaction information 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 is intended to achieve the acquisition of target index information, which corresponds to target data interaction information. Specifically, when the target data interaction information is generated, target index information may be created for the target data interaction information, where the target index information includes 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, so that the corresponding target index information can be quickly and conveniently acquired after the target data interaction information is acquired. The data interaction source identification is related identification information of upper layer data interaction information corresponding to the target data interaction information, the lower layer data interaction identification 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 quickly inquired based on the identification.
S13: and 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.
The step aims to realize the query of the data interaction information, namely, all data interaction information related to the target data interaction information is obtained based on the data interaction source identification and the lower-layer data interaction identification query. Taking transaction information query as an example, after target transaction information is obtained by specifying Hash and corresponding target index information is obtained, parent transaction information (corresponding to upper layer data interaction information for generating the target data interaction information) for generating the target transaction information is obtained based on a data interaction source identifier therein, and child transaction information (corresponding to lower layer data interaction information for generating the target data interaction information) generated by the target transaction information is obtained based on a lower layer data interaction identifier therein, so that 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, data interaction information is generated by data interaction of data interaction terminals, and in the embodiment of the application, each data interaction terminal can be a node forming a block chain network and is used for realizing data interaction on a block chain; furthermore, each data interaction terminal can be deployed in different partitions of the blockchain network in the blockchain network, and specifically, area division can be realized according to address information and the like of the data interaction terminal, so that data interaction inside the partitions and data interaction across the partitions can be realized, wherein the data interaction across the partitions can be divided into data interaction across the partitions and data interaction across the partitions, and thus, data interaction in various forms based on the data interaction terminals is realized.
The information query method provided by this embodiment establishes corresponding index information in advance while generating data interaction information, and each piece of data interaction information generates a corresponding Hash when being generated, and when storing information, the three pieces of data interaction information can be stored correspondingly to each other, so that when querying information, corresponding data interaction information can be queried based on the specified Hash, and further index information is obtained, and since the index information includes a data interaction source identifier and a lower layer data interaction identifier corresponding to the data interaction information, 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 is queried based on the information query method, all transaction information related to the transaction information can be queried based on the specified transaction information, including parent transaction information generating the transaction information and child transaction information generated by the transaction information, so that the integrity of a transaction information query result is effectively ensured.
The invention provides an information storage method.
Referring to fig. 3, fig. 3 is a flow chart of a second embodiment of the invention.
In a second embodiment, the method may comprise:
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 to a preset storage space.
Based on the information query method of the previous embodiment, the storage process of each data interaction information is described in detail in the embodiment of the present application.
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 meanwhile, a corresponding Hash is generated, so that the data interaction information, the index information and the Hash are correspondingly stored into a pre-established storage space, namely the preset storage space. The index information established for the data interaction information can comprise a data interaction source identifier and a lower-layer data interaction identifier, further, when subsequent information query is carried out, various upper-layer data interaction information generating certain data interaction information can be queried in a preset storage space according to the data interaction source identifier, and various lower-layer data interaction information generating the data interaction information can be queried according to the lower-layer data interaction identifier, and therefore all data interaction information related to the data interaction information can be queried according to the index information based on the data interaction information.
Furthermore, the transaction information is stored based on the information storage method, all transaction information with the association relation can be conveniently inquired by utilizing the index information, the efficiency of transaction information inquiry is achieved, and meanwhile later-stage account checking is more convenient.
The embodiment of the more specific information query method provided by the invention takes the storage and query of transaction information as an example, and the specific implementation flow is as follows:
first, for each transaction message generated by the two parties of the transaction, i.e. the above data interaction message, a corresponding index message may be established, for example, the structure of the index message may be of the following type (not unique):
Figure BDA0002281438950000081
Figure BDA0002281438950000091
the TxEntry is index information, and the index information includes a block Hash, a block height, a transaction source, a partition of a trading place, a sorting position of the trades in the block, and a sub-trading array, wherein the sub-trading array ChildTxs is the lower-layer data interaction identifier, and may include one or more sub-trading ChildTx;
the transaction source TxRole is the data interaction source identifier, and specifically may include: the local partition initiates Txlocal, other partitions span TxCrossIn, and the local partition spans other partitions TxCrossOut;
the ZoneID of the transaction area is specifically as follows: the cross-out transaction is the ID of the partition where the To address is located, the cross-in transaction is the ID of the partition where the parent exchange is located, and the local transaction is the ID of the partition where the From address is located;
the ChildTx specifically may include the following information:
TxType (sub-transaction type, identifying RefundTx, ContractTx, etc. type sub-transactions)
TxHash (sub-trade Hash)
ZoneiD (sub exchange partition ID)
In addition, for the TxRole, if a transaction Tx, whose outbound address (From address) is divided into the current partition (assumed To be Zone0), and whose receiving address (To address) is divided into another partition (assumed To be Zone1), the transaction Tx may be packaged into a new transaction Tx1(Hash whose Hash is different From Tx) and forwarded To Zone1, TxRole of Tx on Zone0 is TxLocal, TxRole of Tx1 generated is txrossout, which means Tx1 is To be executed across To Zone1, TxRole of Tx1 on Zone1 is txrossin, which means Tx1 is executed across From Zone0 To Zone 1; if both the From and To addresses of a transaction are current partitions, then TxRole is Txlocal, and no additional cross-partition transactions are generated.
Further, the TxEntryHash of the index information can be constructed according to the TxHash of the transaction, and then KV storage (TxEntryHash- > TxEntry) is carried out on the index information. Certainly, the corresponding transaction information and the Hash thereof are stored in the KV storage database at the same time.
Further, referring to fig. 4, fig. 4 is a schematic flow chart of a cross-partition transaction in a Block chain according to the present invention, specifically, a transaction Tx01 (packed in Block0 of zone0) on zone0 needs to be executed across zone1, and converted to Tx on zone0 and sent to zone1 for execution (packed in Block1 of zone1), where originHash of Tx is Hash (Tx 01); after the Tx has finished executing, the non-consumed gas is returned to the initiator of the Tx01 transaction, and reflundtx for a retreating gas is generated to zone0 for execution, and originHash of reflundtx is hash (Tx). Correspondingly, index information is established for the corresponding transaction on each partition:
1. transaction index on Zone 0:
(1) TxEntry of Tx 01:
{TxRole:TxRoleLocal,ZoneID:0,ChildTx:{TxHash:Hash(Tx),ZoneID:1}}
it can be seen that the main index information is Block0Hash, Block0Height, ZoneID is 0, txroll is TxLocal, and the information for generating a sub-transaction Tx is: TxHash (Tx), ZoneID (1), specifically meaning Tx01 is packed in Block0 on partition 0 and contains a transaction Tx to be executed across to partition 1;
(2) TxEntry of Tx:
{TxRole:TxRoleCrossOut,ZoneID:1,ChildTx:[]}
it can be seen that the main index information is Block0Hash, Block0Height, ZoneID is 1, txroll is txprosout, which specifically indicates that Tx needs to be executed by spanning to partition 1;
(3) TxEntry of reflundtx:
{TxRole:TxRoleCrossIn,ZoneID:1,ChildTx:[]}
it can be seen that, the main index information is ZoneID is 1, txroe is txrossin, which specifically means that RefundTx strides from partition 1 to partition 0;
2. transaction index on Zone 1:
(1) TxEntry of Tx:
{TxRole:TxRoleCrossIn,ZoneID:0,ChildTx:{TxHash:Hash(RefundTx),ZoneID:0}}
it can be seen that the main index information is Block1Hash, Block1Height, ZoneID is 0, txroll is txprossin, and the information for generating a sub-transaction RefundTx is: TxHash hash, ZoneID 0, specifically meaning Tx is spanned from partition 0 into partition 1 and packed in Block1 of partition 1, and the transaction results in a refindtx that needs to be spanned back to partition 0;
(2) TxEntry of reflundtx:
{TxRole:TxRoleCrossOut,ZoneID:0,ChildTx:[]}
it can be seen that the main index information is Block1Hash, Block1Height, ZoneID is 0, txroll is txrossout, which specifically indicates that refledtx crosses from partition 1 to partition 0.
Therefore, when the transaction information is inquired subsequently, under the condition that the original transaction is not changed, the transaction information and the index information of the transaction can be quickly obtained according to the transaction type and the transaction Hash, and then the parent transaction information, the transaction source partition, the block information of the partition, the generated sub-transaction information and the like corresponding to the transaction information are found out according to the index information, namely all the transaction information related to the transaction is deduced, so that the requirements of the production environment on account reconciliation, inquiry and the like of the transaction are more conveniently developed, tested and met.
It can be seen that, in the information query method provided by this embodiment, corresponding index information is established while data interaction information is generated in advance, and each piece of data interaction information generates a corresponding Hash when being 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 further index information is obtained, because the index information includes a data interaction source identifier and a lower layer data interaction identifier corresponding to the data interaction information, 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 is queried based on the information query method, all transaction information related to the transaction information can be queried based on the specified transaction information, including parent transaction information generating the transaction information and child transaction information generated by the transaction information, so that the integrity of a transaction information query result is effectively ensured.
The invention provides an information inquiry device.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an internal structure of an information query device according to a first embodiment of the present invention.
In this embodiment, the information query apparatus 1 may be a PC (Personal Computer), a smart phone, a tablet Computer, a palmtop Computer, a portable Computer, an intelligent router, an ore machine, a network storage device, or a terminal device.
The information inquiry apparatus 1 may include a memory 11, a processor 12, and a bus 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the information querying device 1, such as a hard disk of the information querying device 1. Memory 11 may also be an external storage device of kiosk 1 in other embodiments, such as a plug-in hard drive provided on kiosk 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like. 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 can be used not only to store application software installed in the information inquiry apparatus 1 and various types of data such as a code of an information inquiry program, but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing information query programs.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
Further, the information inquiry apparatus 1 may further include a network interface, which may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), and is generally used to establish a communication connection between the information inquiry apparatus 1 and other electronic devices.
Optionally, the information query device 1 may further include a user interface, the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may also include a standard wired interface and 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 device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the information query device 1 and for displaying a visualized user interface.
Fig. 5 shows only the information inquiring apparatus 1 having the components 11-13 and the information inquiring program, and it will be understood by those skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the information inquiring apparatus 1, and may include fewer or more components than those shown, or may combine some components, or a different arrangement of components.
The invention provides an information inquiry system.
Referring to fig. 6, fig. 6 is a block diagram of a third embodiment of the present invention.
In a third embodiment, the information query system may include:
the instruction analysis module 20 is configured to, when receiving a query instruction, analyze the query instruction to obtain a target Hash;
the information calling module 21 is configured to call 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;
and the information query module 23 is configured to perform query by using the data interaction source identifier and the lower-layer data interaction identifier, and obtain all data interaction information related to the target data interaction information.
For the introduction of the system provided by the present application, please refer to the above method embodiment, which is not described herein again.
The invention provides an information storage system.
Referring to fig. 7, fig. 7 is a block diagram illustrating a fourth embodiment of the present invention.
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 correspondingly store the data interaction information, the index information, and the Hash into a preset storage space.
For the introduction of the system provided by the present application, please refer to the above method embodiment, which is not described herein again.
Embodiments of the present invention further provide a computer-readable storage medium, on which an information query program is stored, where the information query program is executable by one or more processors to implement the steps of the information query method according to any one of the above embodiments.
An embodiment of the present invention further provides a computer program product, where the computer program product includes computer instructions, and when the computer program product runs on a computer, the computer is enabled to execute the steps of the information query method according to any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with 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)), among others.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatus and system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus, system, and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits 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 an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An information query method, the method comprising:
when a query instruction is received, analyzing the query instruction to obtain a target Hash;
calling corresponding target data interaction information by using 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 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.
2. The method as claimed in claim 1, wherein said using the target Hash to retrieve the corresponding target data interaction information comprises:
and calling the target data interaction information in a KV storage database by using the target Hash.
3. The method as claimed in claim 2, wherein said using said target Hash to retrieve said target data interaction information in KV storage database comprises:
analyzing the query instruction to obtain a target interaction type of the target data interaction information;
and in the KV storage database, the target data interaction information is called under a target storage path corresponding to the target interaction type by using the target Hash.
4. The method according to any one of claims 1 to 3, wherein each data interaction terminal generating each data interaction information is a node constituting a blockchain network, and each data interaction terminal is deployed in a different partition of the blockchain network.
5. An information storage method, comprising:
when 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;
and obtaining the Hash of the data interaction information, and correspondingly storing the data interaction information, the index information and the Hash to a preset storage space.
6. An information query device, comprising a memory and a processor, wherein the memory stores an information query program operable on the processor, and the information query program, when executed by the processor, implements the steps of the information query method according to any one of claims 1 to 4.
7. An information query system, the system comprising:
the instruction analysis module is used for analyzing the query instruction when the query instruction is received to obtain a target Hash;
the information calling module is used for calling corresponding target data interaction information by using 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 query module is used for querying 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.
8. 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;
and 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 to a preset storage space.
9. A computer-readable storage medium having stored thereon an information query program executable by one or more processors to perform the steps of the information query method of any one of claims 1 to 4.
10. 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 of any one of claims 1 to 4.
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 true CN110874365A (en) 2020-03-10
CN110874365B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339106A (en) * 2020-05-18 2020-06-26 杭州趣链科技有限公司 Block chain data indexing method
CN112560112A (en) * 2020-12-15 2021-03-26 杭州趣链科技有限公司 Block chain based information shielding method, device, equipment and readable storage medium

Citations (15)

* 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
US20190266145A1 (en) * 2018-02-27 2019-08-29 Alibaba Group Holding Limited Executing transactions based on blockchain
CN110473104A (en) * 2019-08-20 2019-11-19 深圳市网心科技有限公司 A kind of transaction processing method and relevant device

Patent Citations (15)

* 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
US20190266145A1 (en) * 2018-02-27 2019-08-29 Alibaba Group Holding Limited Executing transactions based on blockchain
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
尤瑶;孔兰菊;肖宗水;郑永清;李庆忠;: "一种支持区块链交易溯源的混合索引机制", 计算机集成制造系统, no. 04 *
王千阁;何蒲;聂铁铮;申德荣;于戈;: ""区块链系统的数据存储与查询技术综述"", 《计算机科学》 *
郑浩瀚;申德荣;聂铁铮;寇月;: "面向混合索引的区块链系统的可查询性优化", 计算机科学, no. 10 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339106A (en) * 2020-05-18 2020-06-26 杭州趣链科技有限公司 Block chain data indexing method
CN112560112A (en) * 2020-12-15 2021-03-26 杭州趣链科技有限公司 Block chain based information shielding method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN110874365B (en) 2023-11-17

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
WO2021189953A1 (en) Log data processing method and apparatus, computer device, and storage medium
CN105893097A (en) Method and device for processing option information of BIOS (basic input output system)
CN111901238B (en) Dynamic routing service method, device, electronic equipment and storage medium
CN109669980B (en) Cross-database access method and device for data
CN111414374B (en) Block chain transaction concurrent processing method, device and equipment
CN108415925B (en) Electronic device, data call log generation and query method and storage medium
WO2020063851A1 (en) Method and device for searching for hosting program
CN109597979B (en) List table generation method and device, computer equipment and storage medium
CN112650759A (en) Data query method and device, computer equipment and storage medium
Holme et al. Role-similarity based functional prediction in networked systems: application to the yeast proteome
CN110874365B (en) Information query method and related equipment thereof
CN108648064A (en) The method and apparatus of the quick restocking of product information
CN114741392A (en) Data query method and device, electronic equipment and storage medium
CN113434582B (en) Service data processing method and device, computer equipment and storage medium
CN110580312B (en) Data query method, device and computer readable storage medium
CN109522334B (en) Lack material inquiring party, lack material inquiring system and electronic equipment
CN113849520B (en) Intelligent recognition method and device for abnormal SQL, electronic equipment and storage medium
CN115629951A (en) Task full-link tracking method, first node, link system and medium
CN114296696A (en) Business function operation method and device, storage medium and electronic equipment
CN112052267B (en) Data query method, equipment, server and storage medium
CN114157662A (en) Cloud platform parameter adaptation method and device, terminal equipment and storage medium
CN112612817A (en) Data processing method and device, terminal equipment and computer readable storage medium
CN112231377A (en) Data mapping method, system, device, server 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
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.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240620

Address after: 518000 Port Building 0610-E13, Maritime Center, No. 59, Linhai Avenue, Nanshan Street, Qianhai Shenzhen Hong Kong Cooperation Zone, Shenzhen, Guangdong

Patentee after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

Country or region after: China

Address before: 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

Patentee before: Xunlei Networking Technologies, Ltd.

Country or region before: China

Patentee before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.