CN108304491A - Data query method, apparatus and electronic equipment - Google Patents

Data query method, apparatus and electronic equipment Download PDF

Info

Publication number
CN108304491A
CN108304491A CN201810018617.4A CN201810018617A CN108304491A CN 108304491 A CN108304491 A CN 108304491A CN 201810018617 A CN201810018617 A CN 201810018617A CN 108304491 A CN108304491 A CN 108304491A
Authority
CN
China
Prior art keywords
block
data
querying condition
storage system
condition
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
CN201810018617.4A
Other languages
Chinese (zh)
Other versions
CN108304491B (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.)
Ant Mining Technology Co ltd
Original Assignee
Beijing Bitmain Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Bitmain Technology Co Ltd filed Critical Beijing Bitmain Technology Co Ltd
Priority to CN201810018617.4A priority Critical patent/CN108304491B/en
Publication of CN108304491A publication Critical patent/CN108304491A/en
Application granted granted Critical
Publication of CN108304491B publication Critical patent/CN108304491B/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/24Querying
    • G06F16/242Query formulation
    • G06F16/243Natural language query formulation
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Artificial Intelligence (AREA)
  • Computer Security & Cryptography (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a kind of data query method, apparatus and electronic equipments, belong to technical field of information processing.The method includes:Obtain the first querying condition of user;According to default production standard, format conversion is carried out to the first querying condition, generates the second querying condition;Based on the second querying condition, data query is carried out in data-storage system, obtains the specified data of the second querying condition instruction.The present invention is according to default production standard, format conversion is carried out to the first querying condition, generate the second querying condition, data query is carried out in data-storage system, obtain the specified data of the second querying condition instruction, allow to be converted to the first querying condition of user the second querying condition of the default production standard for meeting data-storage system, the block data of block can be inquired according to various features, the limitation of data query is smaller, simplify the process of data query, intelligent more excellent, user's viscosity is higher.

Description

Data query method, apparatus and electronic equipment
Technical field
The present invention relates to technical field of information processing, more particularly to a kind of data query method, apparatus and electronic equipment.
Background technology
With the continuous development of information technology, the block chain technology completely new as one obtains development energetically.Block chain Technology is derived from the bit coin technology occurred in 2008, is the Floor layer Technology of bit coin.Block chain refer to a string use cryptography Method is associated the block generated, and each area block data in the block is deposited with the areas Shang Yige block data in the block in block chain It is being associated with, therefore, it is impossible to be practised fraud by distorting block data, it can be ensured that the block data on any block is public It opens transparent, improves the safety of input information.In order to ensure rapidly to generate the block in block chain, and ensure area The correctness of data in block can have the mine machine node for generating block, mine in the data-sharing systems of application block chain technology Machine node accesses the mine cell system in data-sharing systems, and passes through P2P (Peer to Peer, peer-to-peer network) network monitoring number According to the shared broadcast in shared system, shared broadcast is confirmed, and it includes the block for sharing broadcast to generate.It is above-mentioned when completing After work, mine cell system will settle accounts the work of mine machine node, so that mine machine node can be earned at acceleration The ideal money of the shared broadcast of reason.Currently, flourishing with ideal money, the ideal money quilt of more and more difference currency types It developed, therefore, the currency type of the ideal money involved in the block of block chain is also more and more, when closing a deal, Whether correct with the statistics for relevant ideal money of currently merchandising in order to confirm, user usually requires the number to block in block chain According to being inquired, and then the data inquired are verified.
In the related technology, when terminal detects that the data of block are inquired in user's request, need acquisition user defeated Any one of the characteristic value for entering the block to be checked of block address or cryptographic Hash of block to be checked etc., according to block Address or characteristic value inquire block.
In the implementation of the present invention, inventor has found that the relevant technologies have at least the following problems:
Terminal is needed when inquiring block according to block address or characteristic value in the block address and characteristic value that user provides A certain kind can not be according to block to be checked if the block address and characteristic value of user and indefinite block to be checked Other features are inquired, and cause the limitation that block is inquired higher, and the process of block inquiry is relatively complicated, intelligent relatively low, User's viscosity is not high.
Invention content
To overcome the limitation that block present in the relevant technologies is inquired higher, the process of block inquiry is relatively complicated, intelligence Energy property is relatively low, the not high problem of user's viscosity, a kind of data query method, apparatus of present invention offer and electronic equipment.
According to a first aspect of the embodiments of the present invention, a kind of data query method is provided, the method includes:
Obtain user the first querying condition, first querying condition include at least block to be checked block height, One or more in block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour;
According to default production standard, format conversion is carried out to first querying condition, generates the second querying condition, it is described Default production standard is the storage standard of data in terminal storage system, and the format of second querying condition meets described preset Production standard;
Based on second querying condition, data query is carried out in the data-storage system, is obtained described second and is looked into The specified data of inquiry condition instruction.
In another embodiment, before first querying condition for obtaining user, the method further includes:
The block data of at least one block is obtained, the block data includes at least block height, block address, block Characteristic value, Transaction Information, transaction amount and exchange hour;
At least one block data is stored to the data-storage system, the data-storage system, which is at least, to close It is any one of type database, big data platform, non-relational database.
In another embodiment, the block data for obtaining at least one block includes:
Download at least one block;
Based on block analytical tool, at least one block is parsed, obtains the area of at least one block Block number evidence.
In another embodiment, the basis presets production standard, and format conversion is carried out to first querying condition, Generating the second querying condition includes:
Determine that default transfer algorithm, the default transfer algorithm include at least segmentation methods;
Based on the default transfer algorithm, first querying condition is parsed, initial analysis condition is obtained;
According to the default production standard, the initial analysis condition is arranged, generates second querying condition.
In another embodiment, described to be based on second querying condition, into line number in the data-storage system It is investigated that asking, the specified data for obtaining the second querying condition instruction include:
Inquiry and the matched candidate data of the second querying condition in the data-storage system;
Based on the candidate data, determination includes the designated blocks of the candidate data;
The block data of the designated blocks is obtained as the specified data.
According to a second aspect of the embodiments of the present invention, a kind of data query arrangement is provided, described device includes:
Condition acquisition module, the first querying condition for obtaining user, first querying condition include at least to be checked Ask one in the block height of block, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour or It is multiple;
Conversion module, for according to production standard is preset, carrying out format conversion to first querying condition, generating second Querying condition, the default production standard are the storage standard of data in terminal storage system, the lattice of second querying condition Formula meets the default production standard;
Enquiry module carries out data query in the data-storage system, obtains for being based on second querying condition Take the specified data of the second querying condition instruction.
In another embodiment, described device further includes:
Data acquisition module, the block data for obtaining at least one block, the block data include at least block Highly, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour;
Memory module, for storing at least one block data to the data-storage system, the data are deposited Storage system is at least any one of relevant database, big data platform, non-relational database.
In another embodiment, the data acquisition module includes:
Submodule is downloaded, for downloading at least one block;
Analyzing sub-module parses at least one block, described in acquisition extremely for being based on block analytical tool The block data of a few block.
In another embodiment, the conversion module includes:
Determination sub-module, for determining that default transfer algorithm, the default transfer algorithm include at least segmentation methods;
Analyzing sub-module parses first querying condition, obtains just for being based on the default transfer algorithm Beginning analysis condition;
Submodule is arranged, for according to the default production standard, being arranged to the initial analysis condition, generates institute State the second querying condition.
In another embodiment, the enquiry module includes:
Submodule is inquired, for the inquiry in the data-storage system and the matched candidate number of second querying condition According to;
Determination sub-module, for being based on the candidate data, determination includes the designated blocks of the candidate data;
Acquisition submodule, for obtaining the block data of the designated blocks as the specified data.
According to a third aspect of the embodiments of the present invention, a kind of electronic equipment, including the number described in above-mentioned second aspect are provided According to inquiry unit.
According to a fourth aspect of the embodiments of the present invention, a kind of electronic equipment is provided, including:Memory can be held for storing Row instruction;And processor, for being communicated with the memory to execute the executable instruction to complete above-mentioned first party The operation of data query method described in face.
The technical solution that the embodiment of the present invention provides can include the following benefits:
By obtaining the first querying condition of user, according to default production standard, the first querying condition is turned into row format It changes, generates the second querying condition, be based on the second querying condition, data query is carried out in data-storage system, obtain second and look into The specified data of inquiry condition instruction so that the first querying condition of user can be converted to and meet the default of data-storage system Second querying condition of production standard, can inquire the block data of block according to various features, the limitation of data query compared with It is small, the process of data query is simplified, intelligent more excellent, user's viscosity is higher.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not It can the limitation present invention.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the present invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of data query method shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of data query method shown according to an exemplary embodiment;
Fig. 3 A are a kind of block diagrams of data query arrangement shown according to an exemplary embodiment;
Fig. 3 B are a kind of block diagrams of data query arrangement shown according to an exemplary embodiment;
Fig. 3 C are a kind of block diagrams of data query arrangement shown according to an exemplary embodiment;
Fig. 3 D are a kind of block diagrams of data query arrangement shown according to an exemplary embodiment;
Fig. 3 E are a kind of block diagrams of data query arrangement shown according to an exemplary embodiment;
Fig. 4 is a kind of block diagram of data query arrangement 400 shown according to an exemplary embodiment.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects being described in detail in claims, of the invention.
Fig. 1 is a kind of flow chart of data query method shown according to an exemplary embodiment, as shown in Figure 1, the party Method includes the following steps.
In a step 101, the first querying condition of user is obtained, the first querying condition includes at least the area of block to be checked One or more in block height, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour.
In a step 102, according to default production standard, format conversion is carried out to the first querying condition, generates the second inquiry Condition, presets the storage standard that production standard is data in terminal storage system, and the format of the second querying condition meets default life Production standard.
In step 103, it is based on the second querying condition, data query is carried out in data-storage system, second is obtained and looks into The specified data of inquiry condition instruction.
Method provided in an embodiment of the present invention is right according to default production standard by obtaining the first querying condition of user First querying condition carry out format conversion, generate the second querying condition, be based on the second querying condition, in data-storage system into Row data query obtains the specified data of the second querying condition instruction so that can be converted to the first querying condition of user Meet the second querying condition of the default production standard of data-storage system, the block counts of block can be inquired according to various features According to the limitation of data query is smaller, simplifies the process of data query, and intelligent more excellent, user's viscosity is higher.
In another embodiment, before the first querying condition for obtaining user, method further includes:
The block data of at least one block is obtained, block data includes at least block height, block address, Block Characteristic Value, Transaction Information, transaction amount and exchange hour;
At least one block data is stored to data-storage system, data-storage system be at least relevant database, Any one of big data platform, non-relational database.
In another embodiment, the block data for obtaining at least one block includes:
Download at least one block;
Based on block analytical tool, at least one block is parsed, obtains the block data of at least one block.
In another embodiment, according to default production standard, format conversion is carried out to the first querying condition, generates second Querying condition includes:
It determines default transfer algorithm, presets transfer algorithm and include at least segmentation methods;
Based on default transfer algorithm, the first querying condition is parsed, obtains initial analysis condition;
According to default production standard, initial analysis condition is arranged, generates the second querying condition.
In another embodiment, it is based on the second querying condition, carries out data query in data-storage system, obtains the Two querying conditions instruction specified data include:
Inquiry and the matched candidate data of the second querying condition in data-storage system;
Based on candidate data, determination includes the designated blocks of candidate data;
The block data of designated blocks is obtained as specified data.
The alternative embodiment that any combination forms the present invention may be used, herein no longer in above-mentioned all optional technical solutions It repeats one by one.
Fig. 2 is a kind of flow chart of data query method shown according to an exemplary embodiment, as shown in Fig. 2, the party Method includes the following steps.
In step 201, at least one block is downloaded, block analytical tool is based on, at least one block is parsed, The block data of at least one block is obtained, block data includes at least block height, block address, Block Characteristic value, transaction Information, transaction amount and exchange hour.
It was recognized by the inventor that when carrying out block data inquiry, it usually needs in user input area block address and characteristic value A certain kind, and need to be complete block address and characteristic value, and then determine block, interrogation zone whole block counts in the block According to therefore, in embodiments of the present invention, whole block datas of at least one block being stored, and then user is made to input The inquiry to whole block datas in block can be realized in either block data about block, ensures that user can be from multiple dimensions Interrogation zone block data in the block is spent, it is intelligent preferable.
In order to inquire block block data when, according to either query condition query input by user to area to be checked Block just needs to download at least one block in this way therefore, it is necessary to store at least one area block data in the block.By The block data stored in block is the data about the ideal money of different currency types, and the area of the ideal money of different currency types Block is isolated, namely the block of the ideal money of different currency types is stored in different full node servers, therefore, When downloading at least one block, terminal needs are connected with multiple full node servers, and then download in multiple full node servers Whole blocks of storage.Terminal can obtain the service of multiple full node servers when being connected with multiple full node servers Device address, and the server address of multiple full node servers is accessed, and then data connection is established with multiple full node servers, Based on data connection, whole blocks is downloaded in multiple full node servers.
After downloading the block success in multiple full node servers, in order to get each area block data in the block, It needs to parse each block, and then obtains each area's block data in the block.It, can be with base when being parsed to block In block analytical tool, at least one block got is parsed, the block data of at least one block is obtained.Its In, when being parsed to block, the blocks analytical tool such as block reptile may be used and parsed, the embodiment of the present invention To parsing the mode of block without specifically limiting.
In step 202, at least one block data is stored to data-storage system, data-storage system, which is at least, to close It is any one of type database, big data platform, non-relational database.
In embodiments of the present invention, after getting the block data of at least one block, in order to which make subsequently can basis Querying condition interrogation zone block data in the block input by user including block data, it is in the block any at least one area Block can be stored the block data of the block-identified and block of the block is corresponding to data-storage system, to ensure Correspondence between block and block data is correct, avoids obscuring at least one block and at least one block data.Its In, when being stored the block-identified correspondence between block data, data list shown in table 1 can be generated. It should be noted that since the content that the block data stored in different blocks includes is different, generating table 1 When, need to be generated according to the actual block data that stores in block, the embodiment of the present invention to the modes of memory block data not Specifically limited.
Table 1
In step 203, the first querying condition of user is obtained, the first querying condition includes at least the area of block to be checked One or more in block height, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour.
In embodiments of the present invention, due to being stored with each area whole block datas in the block in terminal, Yong Hu When the block data in the block of interrogation zone, it is only necessary to input one or more block data of block namely input by user Including at least the block height of block to be checked, block address, Block Characteristic value, Transaction Information, transaction in first querying condition One or more in the amount of money and exchange hour.
Terminal can provide data query entrance on the screen, when detecting that user triggers the data query entrance, show Show the data query page, condition types choice box and condition entry frame are included at least in the data query page.Condition types select Frame includes that block height, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour etc. are multinomial can The querying condition type of choosing obtains after detecting any one querying condition type that user selects in condition types choice box Take the first querying condition that family inputs in condition entry frame.It should be noted that during practical application, query page Condition types choice box can not be also provided on face, directly provide condition entry frame, and obtain what user inputted in condition entry frame The first querying condition got is identified in first querying condition.The embodiment of the present invention is input by user to obtaining The mode of first querying condition is without specifically limiting.
In step 204, it determines default transfer algorithm, based on default transfer algorithm, the first querying condition is parsed, Initial analysis condition is obtained, according to default production standard, initial analysis condition is arranged, generates the second querying condition, in advance If transfer algorithm includes at least segmentation methods, the format of the second querying condition meets default production standard.
In embodiments of the present invention, since the block data of block is stored in data-storage system, when getting After the querying condition of user, in order to meet the condition for inquiring data in data-storage system, need to carry out lattice to querying condition Formula is converted, and the first querying condition is converted to the second querying condition that format meets the default production standard of data-storage system, And then data query is carried out in data-storage system according to the second querying condition, and get the block data of block.Right When first querying condition carries out format conversion, first choice needs to parse based on default the first querying condition of transfer algorithm pair, obtains To initial analysis condition;Then, according to default production standard, initial analysis condition is arranged, generates the second querying condition. Wherein, the production standard that production standard is data-storage system is preset, default transfer algorithm can be segmentation methods, if default Transfer algorithm is segmentation methods, then when generating initial analysis condition based on default transfer algorithm, item is inquired to the first of user Part is segmented, and multiple words are obtained;Then, according to default production standard, obtained multiple words are used into such as " and The conjunctions such as (with) ", " or (or) " connect, and generate the second querying condition of the default production standard for meeting data-storage system.
In step 205, inquiry and the matched candidate data of the second querying condition in data-storage system, based on candidate Data, determination include the designated blocks of candidate data, obtain the block data of designated blocks as specified data.
In embodiments of the present invention, when according to the first querying condition of user and the default production standard of data-storage system After generating the second querying condition, data query can be carried out in data-storage system according to the second querying condition, and then really The fixed and matched candidate data of the second querying condition, determines designated blocks based on candidate data, obtains the block counts of designated blocks According to as specified data.Wherein, due to being stored with the block datas of whole blocks in terminal, when determining candidate data, The block data of whole blocks is compared with the second querying condition, it is determining in the block data of whole blocks to be looked into second Ask the candidate data of condition coupling.It should be noted that comparing by the block data of whole blocks and the second querying condition Clock synchronization, since the data volume of the block data stored in terminal is larger, can be suitable according to the storage of terminal-pair block data Sequence is compared, when determining that a certain block data is matched with the second querying condition, you can stops block data and the second inquiry The comparison process of condition, the block data being not yet compared will be left by no longer needing to is compared with the second querying condition, by this It is determined directly as candidate data with the matched block data of the second querying condition.The embodiment of the present invention is to determining and the second inquiry item The mode of the matched candidate data of part is without specifically limiting.
After candidate data is determined, then it represents that the block that user requires to look up includes the candidate data, at this point, Include the designated blocks of candidate data with determination, and obtains the block data of designated blocks as specified data.In reality During, due in data-storage system can by it is block-identified it is corresponding with block data storage, when determine wait After selecting data, can determine it is block-identified, based on block-identified determining designated blocks.If data-storage system uses data The mode memory block of list identifies the correspondence between block data, then can be directly by candidate data and data list In block data be compared, candidate data is determined in block lists, and determine that candidate data is corresponding in data list It is block-identified, and then according to block-identified determining designated blocks.The embodiment of the present invention specifies area to being determined based on candidate data The mode of block is without specifically limiting.
Method provided in an embodiment of the present invention is right according to default production standard by obtaining the first querying condition of user First querying condition carry out format conversion, generate the second querying condition, be based on the second querying condition, in data-storage system into Row data query obtains the specified data of the second querying condition instruction so that can be converted to the first querying condition of user Meet the second querying condition of the default production standard of data-storage system, the block counts of block can be inquired according to various features According to the limitation of data query is smaller, simplifies the process of data query, and intelligent more excellent, user's viscosity is higher.
Fig. 3 A are a kind of block diagrams of data query arrangement shown according to an exemplary embodiment.With reference to Fig. 3 A, the device Including condition acquisition module 301, conversion module 302 and enquiry module 303.
The condition acquisition module 301, the first querying condition for obtaining user, the first querying condition include at least to be checked Ask one in the block height of block, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour or It is multiple;
The conversion module 302 generates for according to production standard is preset, format conversion to be carried out to the first querying condition Two querying conditions, preset the storage standard that production standard is data in terminal storage system, and the format of the second querying condition meets Default production standard;
The enquiry module 303 carries out data query in data-storage system, obtains for being based on the second querying condition The specified data of second querying condition instruction.
Device provided in an embodiment of the present invention, it is right according to default production standard by obtaining the first querying condition of user First querying condition carry out format conversion, generate the second querying condition, be based on the second querying condition, in data-storage system into Row data query obtains the specified data of the second querying condition instruction so that can be converted to the first querying condition of user Meet the second querying condition of the default production standard of data-storage system, the block counts of block can be inquired according to various features According to the limitation of data query is smaller, simplifies the process of data query, and intelligent more excellent, user's viscosity is higher.
In another embodiment, referring to Fig. 3 B, which further includes data acquisition module 304 and memory module 305.
The data acquisition module 304, the block data for obtaining at least one block, block data include at least block Highly, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour;
The memory module 305, for storing at least one block data to data-storage system, data-storage system is extremely It is any one of relevant database, big data platform, non-relational database less.
In another embodiment, referring to Fig. 3 C, the data acquisition module 304, including submodule 3041 and parsing are downloaded Submodule 3042.
The download submodule 3041, for downloading at least one block;
The analyzing sub-module 3042 parses at least one block, obtains at least for being based on block analytical tool The block data of one block.
In another embodiment, referring to Fig. 3 D, the conversion module 302, including determination sub-module 3021, analyzing sub-module 3022 and arrange submodule 3023.
The determination sub-module 3021 presets transfer algorithm and includes at least segmentation methods for determining default transfer algorithm;
The analyzing sub-module 3022 obtains initial for based on default transfer algorithm, being parsed to the first querying condition Analysis condition;
The arrangement submodule 3023 generates second for according to production standard is preset, being arranged to initial analysis condition Querying condition.
In another embodiment, referring to Fig. 3 E, the enquiry module 303, including inquiry submodule 3031, determination sub-module 3032 and acquisition submodule 3033
The inquiry submodule 3031, for the inquiry in data-storage system and the matched candidate number of the second querying condition According to;
The determination sub-module 3032, for being based on candidate data, determination includes the designated blocks of candidate data;
The acquisition submodule 3033, for obtaining the block data of designated blocks as specified data.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 4 is a kind of block diagram of data query arrangement 400 shown according to an exemplary embodiment.For example, device 400 can To be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices are good for Body equipment, personal digital assistant etc..
With reference to Fig. 4, device 400 may include following one or more components:Processing component 402, memory 404, power supply Component 406, multimedia component 408, audio component 410, the interface 412 of I/O (Input/Output, input/output), sensor Component 414 and communication component 416.
The integrated operation of 402 usual control device 400 of processing component, such as with display, call, data communication, phase Machine operates and record operates associated operation.Processing component 402 may include that one or more processors 420 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 402 may include one or more modules, just Interaction between processing component 402 and other assemblies.For example, processing component 402 may include multi-media module, it is more to facilitate Interaction between media component 408 and processing component 402.
Memory 404 is configured as storing various types of data to support the operation in device 400.These data are shown Example includes instruction for any application program or method that are operated on device 400, contact data, and telephone book data disappears Breath, picture, video etc..Memory 404 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as SRAM (Static Random Access Memory, static RAM), EEPROM (Electrically-Erasable Programmable Read-Only Memory, the read-only storage of electrically erasable Device), EPROM (Erasable Programmable Read Only Memory, Erasable Programmable Read Only Memory EPROM), PROM (Programmable Read-Only Memory, programmable read only memory), and ROM (Read-Only Memory, it is read-only to deposit Reservoir), magnetic memory, flash memory, disk or CD.
Power supply module 406 provides electric power for the various assemblies of device 400.Power supply module 406 may include power management system System, one or more power supplys and other generated with for device 400, management and the associated component of distribution electric power.
Multimedia component 408 is included in the screen of one output interface of offer between described device 400 and user.One In a little embodiments, screen may include LCD (Liquid Crystal Display, liquid crystal display) and TP (Touch Panel, touch panel).If screen includes touch panel, screen may be implemented as touch screen, from the user to receive Input signal.Touch panel includes one or more touch sensors to sense the gesture on touch, slide, and touch panel.Institute The boundary of a touch or slide action can not only be sensed by stating touch sensor, but also be detected and the touch or slide phase The duration and pressure of pass.In some embodiments, multimedia component 408 includes that a front camera and/or postposition are taken the photograph As head.When device 400 is in operation mode, when such as screening-mode or video mode, front camera and/or rear camera can With the multi-medium data outside reception.Each front camera and rear camera can be a fixed optical lens systems Or there are focusing and optical zoom capabilities.
Audio component 410 is configured as output and/or input audio signal.For example, audio component 410 includes a MIC (Microphone, microphone), when device 400 is in operation mode, such as call model, logging mode and speech recognition mode When, microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory 404 Or it is sent via communication component 416.In some embodiments, audio component 410 further includes a loud speaker, for exporting audio Signal.
I/O interfaces 412 provide interface between processing component 402 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor module 414 includes one or more sensors, and the state for providing various aspects for device 400 is commented Estimate.For example, sensor module 414 can detect the state that opens/closes of equipment 400, the relative positioning of component, such as component For the display and keypad of device 400, sensor module 414 can be with the position of 400 1 components of detection device 400 or device Set change, the existence or non-existence that user contacts with device 400, the temperature of 400 orientation of device or acceleration/deceleration and device 400 Variation.Sensor module 414 may include proximity sensor, be configured to detect without any physical contact near The presence of object.Sensor module 414 can also include optical sensor, such as CMOS (Complementary Metal Oxide Semiconductor, complementary metal oxide) or CCD (Charge-coupled Device, charge coupled cell) image biography Sensor, for being used in imaging applications.In some embodiments, which can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate the communication of wired or wireless way between device 400 and other equipment.Device 400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary implementation In example, communication component 416 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 416 further includes that (Near Field Communication, near field are logical by NFC Letter) module, to promote short range communication.For example, RFID (Radio Frequency can be based in NFC module Identification, radio frequency identification) technology, IrDA (Infra-red Data Association, Infrared Data Association) skill Art, UWB (Ultra Wideband, ultra wide band) technology, BT (Bluetooth, bluetooth) technologies and other technologies are realized.
In the exemplary embodiment, device 400 can be by one or more ASIC (Application Specific Integrated Circuit, application specific integrated circuit), DSP (Digital signal Processor, at digital signal Manage device), DSPD (Digital signal Processor Device, digital signal processing appts), PLD (Programmable Logic Device, programmable logic device), FPGA) (Field Programmable Gate Array, field programmable gate Array), controller, microcontroller, microprocessor or other electronic components realize, for executing above-mentioned data query method.
In the exemplary embodiment, it includes the non-transitorycomputer readable storage medium instructed, example to additionally provide a kind of Such as include the memory 404 of instruction, above-metioned instruction can be executed by the processor 420 of device 400 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, RAM (Random Access Memory, random access memory Device), CD-ROM (Compact Disc Read-Only Memory, compact disc read-only memory), tape, floppy disk and light data deposit Store up equipment etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by data query arrangement When processor executes so that data query arrangement is able to carry out above-mentioned data query method.
A1, a kind of data query method, which is characterized in that the method includes:
Obtain user the first querying condition, first querying condition include at least block to be checked block height, One or more in block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour;
According to default production standard, format conversion is carried out to first querying condition, generates the second querying condition, it is described Default production standard is the storage standard of data in terminal storage system, and the format of second querying condition meets described preset Production standard;
Based on second querying condition, data query is carried out in the data-storage system, is obtained described second and is looked into The specified data of inquiry condition instruction.
A2, according to the method described in claim 1, it is characterized in that, it is described obtain user the first querying condition before, The method further includes:
The block data of at least one block is obtained, the block data includes at least block height, block address, block Characteristic value, Transaction Information, transaction amount and exchange hour;
At least one block data is stored to the data-storage system, the data-storage system, which is at least, to close It is any one of type database, big data platform, non-relational database.
A3, according to the method described in claim 2, it is characterized in that, the block data for obtaining at least one block Including:
Download at least one block;
Based on block analytical tool, at least one block is parsed, obtains the area of at least one block Block number evidence.
A4, according to the method described in claim 1, it is characterized in that, the basis presets production standard, to described first Querying condition carries out format conversion, generates the second querying condition and includes:
Determine that default transfer algorithm, the default transfer algorithm include at least segmentation methods;
Based on the default transfer algorithm, first querying condition is parsed, initial analysis condition is obtained;
According to the default production standard, the initial analysis condition is arranged, generates second querying condition.
A5, according to the method described in claim 1, it is characterized in that, it is described be based on second querying condition, described Data query is carried out in data-storage system, the specified data for obtaining the second querying condition instruction include:
Inquiry and the matched candidate data of the second querying condition in the data-storage system;
Based on the candidate data, determination includes the designated blocks of the candidate data;
The block data of the designated blocks is obtained as the specified data.
A6, a kind of data query arrangement, which is characterized in that described device includes:
Condition acquisition module, the first querying condition for obtaining user, first querying condition include at least to be checked Ask one in the block height of block, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour or It is multiple;
Conversion module, for according to production standard is preset, carrying out format conversion to first querying condition, generating second Querying condition, the default production standard are the storage standard of data in terminal storage system, the lattice of second querying condition Formula meets the default production standard;
Enquiry module carries out data query in the data-storage system, obtains for being based on second querying condition Take the specified data of the second querying condition instruction.
A7, device according to claim 6, which is characterized in that described device further includes:
Data acquisition module, the block data for obtaining at least one block, the block data include at least block Highly, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour;
Memory module, for storing at least one block data to the data-storage system, the data are deposited Storage system is at least any one of relevant database, big data platform, non-relational database.
A8, device according to claim 7, which is characterized in that the data acquisition module includes:
Submodule is downloaded, for downloading at least one block;
Analyzing sub-module parses at least one block, described in acquisition extremely for being based on block analytical tool The block data of a few block.
A9, device according to claim 6, which is characterized in that the conversion module includes:
Determination sub-module, for determining that default transfer algorithm, the default transfer algorithm include at least segmentation methods;
Analyzing sub-module parses first querying condition, obtains just for being based on the default transfer algorithm Beginning analysis condition;
Submodule is arranged, for according to the default production standard, being arranged to the initial analysis condition, generates institute State the second querying condition.
A10, the apparatus according to claim 1, which is characterized in that the enquiry module includes:
Submodule is inquired, for the inquiry in the data-storage system and the matched candidate number of second querying condition According to;
Determination sub-module, for being based on the candidate data, determination includes the designated blocks of the candidate data;
Acquisition submodule, for obtaining the block data of the designated blocks as the specified data.
A11, a kind of electronic equipment, which is characterized in that including the data query dress described in claim 6 to 10 any one It sets.
A12, a kind of electronic equipment, which is characterized in that including:Memory, for storing executable instruction;
And processor, for being communicated with the memory to execute the executable instruction to complete claim 1 To the operation of the data query method described in 5 any one.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the present invention Its embodiment.This application is intended to cover the present invention any variations, uses, or adaptations, these modifications, purposes or Person's adaptive change follows the general principle of the present invention and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the invention is not limited in the precision architectures for being described above and being shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of data query method, which is characterized in that the method includes:
The first querying condition of user is obtained, first querying condition includes at least the block height of block to be checked, block One or more in address, Block Characteristic value, Transaction Information, transaction amount and exchange hour;
According to default production standard, format conversion is carried out to first querying condition, generates the second querying condition, it is described default Production standard is the storage standard of data in terminal storage system, and the format of second querying condition meets the default production Standard;
Based on second querying condition, data query is carried out in the data-storage system, obtains the second inquiry item The specified data of part instruction.
2. according to the method described in claim 1, it is characterized in that, it is described obtain user the first querying condition before, it is described Method further includes:
The block data of at least one block is obtained, the block data includes at least block height, block address, Block Characteristic Value, Transaction Information, transaction amount and exchange hour;
At least one block data is stored to the data-storage system, the data-storage system is at least relationship type Any one of database, big data platform, non-relational database.
3. according to the method described in claim 2, it is characterized in that, the block data for obtaining at least one block includes:
Download at least one block;
Based on block analytical tool, at least one block is parsed, obtains the block counts of at least one block According to.
4. according to the method described in claim 1, it is characterized in that, the basis presets production standard, to first inquiry Condition carries out format conversion, generates the second querying condition and includes:
Determine that default transfer algorithm, the default transfer algorithm include at least segmentation methods;
Based on the default transfer algorithm, first querying condition is parsed, initial analysis condition is obtained;
According to the default production standard, the initial analysis condition is arranged, generates second querying condition.
5. according to the method described in claim 1, it is characterized in that, described be based on second querying condition, in the data Data query is carried out in storage system, the specified data for obtaining the second querying condition instruction include:
Inquiry and the matched candidate data of the second querying condition in the data-storage system;
Based on the candidate data, determination includes the designated blocks of the candidate data;
The block data of the designated blocks is obtained as the specified data.
6. a kind of data query arrangement, which is characterized in that described device includes:
Condition acquisition module, the first querying condition for obtaining user, first querying condition include at least area to be checked One or more in the block height of block, block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour;
Conversion module generates the second inquiry for according to production standard is preset, format conversion to be carried out to first querying condition Condition, the default production standard are the storage standard of data in terminal storage system, the format character of second querying condition Close the default production standard;
Enquiry module carries out data query in the data-storage system, obtains institute for being based on second querying condition State the specified data of the second querying condition instruction.
7. device according to claim 6, which is characterized in that described device further includes:
Data acquisition module, the block data for obtaining at least one block, the block data include at least block height, Block address, Block Characteristic value, Transaction Information, transaction amount and exchange hour;
Memory module, for storing at least one block data to the data-storage system, data storage system System is at least any one of relevant database, big data platform, non-relational database.
8. device according to claim 7, which is characterized in that the data acquisition module includes:
Submodule is downloaded, for downloading at least one block;
Analyzing sub-module parses at least one block, for being based on block analytical tool at least one described in acquisition The block data of a block.
9. a kind of electronic equipment, which is characterized in that including the data query arrangement described in claim 6 to 8 any one.
10. a kind of electronic equipment, which is characterized in that including:Memory, for storing executable instruction;
And processor, for being communicated with the memory to execute the executable instruction to complete claim 1 to 5 times The operation of data query method described in meaning one.
CN201810018617.4A 2018-01-09 2018-01-09 Data query method and device and electronic equipment Active CN108304491B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810018617.4A CN108304491B (en) 2018-01-09 2018-01-09 Data query method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810018617.4A CN108304491B (en) 2018-01-09 2018-01-09 Data query method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108304491A true CN108304491A (en) 2018-07-20
CN108304491B CN108304491B (en) 2021-05-11

Family

ID=62868259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810018617.4A Active CN108304491B (en) 2018-01-09 2018-01-09 Data query method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108304491B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020223901A1 (en) * 2019-05-07 2020-11-12 比特大陆科技有限公司 Data query method, and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105471931A (en) * 2014-08-06 2016-04-06 腾讯科技(北京)有限公司 Method, device and system for querying service data
CN106716421A (en) * 2016-12-30 2017-05-24 深圳前海达闼云端智能科技有限公司 Data query method, device and node apparatus
US9798771B2 (en) * 2010-08-06 2017-10-24 At&T Intellectual Property I, L.P. Securing database content
CN107463693A (en) * 2017-08-11 2017-12-12 深圳乐信软件技术有限公司 A kind of data processing method, device, terminal and computer-readable recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9798771B2 (en) * 2010-08-06 2017-10-24 At&T Intellectual Property I, L.P. Securing database content
CN105471931A (en) * 2014-08-06 2016-04-06 腾讯科技(北京)有限公司 Method, device and system for querying service data
CN106716421A (en) * 2016-12-30 2017-05-24 深圳前海达闼云端智能科技有限公司 Data query method, device and node apparatus
CN107463693A (en) * 2017-08-11 2017-12-12 深圳乐信软件技术有限公司 A kind of data processing method, device, terminal and computer-readable recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020223901A1 (en) * 2019-05-07 2020-11-12 比特大陆科技有限公司 Data query method, and server

Also Published As

Publication number Publication date
CN108304491B (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN108304475A (en) Data query method, apparatus and electronic equipment
CN105516270B (en) Information-pushing method and device
CN106447877B (en) Open method, device and the server of smart machine
CN104951935A (en) Bill splitting method and device
CN107944848A (en) Monetary settlement method, apparatus and electronic equipment
CN109039990A (en) The method and device of behavior verifying is carried out based on identifying code
CN104636453A (en) Illegal user data identification method and device
CN105426485A (en) Image combination method and device, intelligent terminal and server
CN109255128A (en) Generation method, device and the storage medium of multi-layer label
CN105335714A (en) Photograph processing method, device and apparatus
CN105549300A (en) Automatic focusing method and device
CN105207813B (en) Smart machine sort method and device
CN109634913A (en) Storage method, device and the electronic equipment of document
WO2022227562A1 (en) Identity recognition method and apparatus, and electronic device, storage medium and computer program product
CN107402767A (en) The method and apparatus for showing PUSH message
CN106535192A (en) Method and device for realizing access of smart equipment to router and mobile terminal
CN105426904A (en) Photo processing method, apparatus and device
CN108304491A (en) Data query method, apparatus and electronic equipment
CN107423757A (en) clustering processing method and device
CN106303017A (en) Alarm processing method and device
CN110213062A (en) Handle the method and device of message
CN105812530A (en) Method and device for adding contact means by using fingerprint information
CN107977842A (en) Ideal money exchanging method, device and electronic equipment
CN107071707A (en) Data transmission method and device
CN107169042A (en) A kind of method, device and the computer-readable recording medium of shared picture

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: 20180920

Address after: 26 Ying Yun street, Singapore

Applicant after: Bit continent Technology Co., Ltd.

Address before: 100029 Beijing Haidian District Austria north industrial base project 6 Building 2 level.

Applicant before: BEIJING BITMAIN TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210118

Address after: Room A1, 11 / F, punctuality building, 245-251 Hennessy Road, Hong Kong, China

Applicant after: BITMAIN TECHNOLOGY Co.,Ltd.

Address before: 26 Ying Yun street, Singapore

Applicant before: BITMAIN TECHNOLOGY Co.,Ltd.

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

Effective date of registration: 20210519

Address after: 2701, 27th floor, Central Plaza, 18 Harbour Road, Wanchai, Hong Kong, China

Patentee after: Ant Mining Technology Co.,Ltd.

Address before: Room A1, 11 / F, punctuality building, 245-251 Hennessy Road, Hong Kong, China

Patentee before: BITMAIN TECHNOLOGY Co.,Ltd.