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

Data query method, apparatus and electronic equipment Download PDF

Info

Publication number
CN108304475A
CN108304475A CN201711464975.XA CN201711464975A CN108304475A CN 108304475 A CN108304475 A CN 108304475A CN 201711464975 A CN201711464975 A CN 201711464975A CN 108304475 A CN108304475 A CN 108304475A
Authority
CN
China
Prior art keywords
block
data
index
checked
storage
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
CN201711464975.XA
Other languages
Chinese (zh)
Other versions
CN108304475B (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 CN201711464975.XA priority Critical patent/CN108304475B/en
Publication of CN108304475A publication Critical patent/CN108304475A/en
Application granted granted Critical
Publication of CN108304475B publication Critical patent/CN108304475B/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/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (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:The querying condition of user is obtained, querying condition includes at least one or more in block height, block address, Transaction Information, transaction amount and the exchange hour of block to be checked;Based on querying condition, search index is generated, search index is used to inquire the storage location of block to be checked;Block to be checked is inquired according to search index, obtains the block data of block to be checked.The present invention is by acquisition including at least one or more the querying condition in the block height of block to be checked, block address, Transaction Information, transaction amount and exchange hour, generate search index, and block to be checked is inquired according to search index, obtain block data, allow to inquire the block data of block according to a variety of querying conditions, the limitation of data query is smaller, simplifies 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 Enter to be used to indicate the block height of block to be checked or the characteristic value of the block to be checked of acquisition cryptographic Hash etc., according to area Block height 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 only capable of inquiring block according to the block height and characteristic value of block when the data to block are inquired, If the block height or characteristic value of user and indefinite block to be checked, the data of block can not be inquired, data are caused The limitation of inquiry is higher, and the process of data query is relatively complicated, intelligent relatively low, and user's viscosity is not high.
Invention content
To overcome the limitation of data query present in the relevant technologies higher, the process of data query is relatively complicated, intelligence Energy property is relatively low, the not high problem of user's viscosity, and the present invention provides a kind of.
According to a first aspect of the embodiments of the present invention, a kind of data query method is provided, the method includes:
Obtain the querying condition of user, the querying condition include at least the block height of block to be checked, block address, One or more in Transaction Information, transaction amount and exchange hour;
Based on the querying condition, search index is generated, the search index is for inquiring depositing for the block to be checked Storage space is set;
The block to be checked is inquired according to the search index, obtains the block data of the block to be checked.
In another embodiment, before the 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 Characteristic value, hands over Easy information, transaction amount, exchange hour and father's block information;
The block is generated based on the block data of the block at least one area's either block in the block Storage index, the storage index is used to indicate the storage location of the block data;
The block data of the block is stored to the storage location of the storage index instruction.
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, described to be based on the querying condition, generating search index includes:
Determine that default analytical algorithm, the default analytical algorithm include at least segmentation methods;
Based on the default analytical algorithm, the querying condition is parsed, generates the search index.
In another embodiment, described that the block to be checked is inquired according to the search index, it obtains described to be checked Ask block block data include:
Obtain at least one storage index of at least one block;
Based on the search index, specified storage index is inquired at least one storage indexes, described specify is deposited Storage index is matched with the search index;
The block data of the block to be checked is obtained in the storage location of the specified storage index instruction.
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 querying condition for obtaining user, the querying condition include at least block to be checked One or more in block height, block address, Transaction Information, transaction amount and exchange hour;
First generation module generates search index, the search index is for inquiring institute for being based on the querying condition State the storage location of block to be checked;
Enquiry module obtains the block to be checked for inquiring the block to be checked according to the search index Block data.
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 Characteristic value, Transaction Information, transaction amount, exchange hour and father's block information;
Second generation module is used for at least one area's either block in the block, the block based on the block Data, generate the storage index of the block, and the storage index is used to indicate the storage location of the block data;
Memory module, for storing the block data of the block to the storage location of the storage index instruction.
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, first generation module includes:
Determination sub-module, for determining that default analytical algorithm, the default analytical algorithm include at least segmentation methods;
Analyzing sub-module parses the querying condition, is looked into described in generation for being based on the default analytical algorithm Ask index.
In another embodiment, the enquiry module includes:
Acquisition submodule is indexed, at least one storage for obtaining at least one block indexes;
Submodule is inquired, for being based on the search index, specified storage is inquired at least one storage index Index, the specified storage index are matched with the search index;
Data acquisition submodule, for obtaining the block to be checked in the storage location of the specified storage index instruction Block 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 acquisition including at least block height, block address, Transaction Information, transaction amount and the transaction of block to be checked One or more querying condition in time is based on querying condition, generates search index, and wait for according to search index inquiry Block is inquired, the block data of block to be checked is obtained so that the block data of block can be inquired according to a variety of querying conditions, The limitation of data query is smaller, simplifies the process of data query, and 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, obtain the querying condition of user, querying condition include at least block to be checked block height, One or more in block address, Transaction Information, transaction amount and exchange hour.
In a step 102, it is based on querying condition, generates search index, search index is for inquiring depositing for block to be checked Storage space is set.
In step 103, block to be checked is inquired according to search index, obtains the block data of block to be checked.
Method provided in an embodiment of the present invention, by acquisition including at least the block height of block to be checked, block address, One or more querying condition in Transaction Information, transaction amount and exchange hour is based on querying condition, generates inquiry rope Draw, and block to be checked is inquired according to search index, obtains the block data of block to be checked so that can be according to a variety of inquiries The limitation of the block data of condition query block, data query is smaller, simplifies the process of data query, intelligent more excellent, User's viscosity is higher.
In another embodiment, before the 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 Characteristic value, hands over Easy information, transaction amount, exchange hour and father's block information;
The block is generated based on the block data of the block at least one area's either block in the block Storage index, the storage index is used to indicate the storage location of the block data;
The block data of the block is stored to the storage location of the storage index instruction.
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, described to be based on the querying condition, generating search index includes:
Determine that default analytical algorithm, the default analytical algorithm include at least segmentation methods;
Based on the default analytical algorithm, the querying condition is parsed, generates the search index.
In another embodiment, described that the block to be checked is inquired according to the search index, it obtains described to be checked Ask block block data include:
Obtain at least one storage index of at least one block;
Based on the search index, specified storage index is inquired at least one storage indexes, described specify is deposited Storage index is matched with the search index;
The block data of the block to be checked is obtained in the storage location of the specified storage index instruction.
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 capture 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 Characteristic value, Transaction Information, transaction The amount of money, exchange hour and father's block information.
It was recognized by the inventor that when carrying out block data inquiry, it usually needs user inputs such as block height and block The areas such as characteristic value a certain fixed block data in the block, and then determine block according to data input by user, it obtains in block Whole block datas therefore in embodiments of the present invention, whole block datas of at least one block are stored, into And make user's input that the inquiry to whole block datas in block can be realized about the either block data of block, ensure user It can be intelligent preferable from multiple dimension interrogation zone block datas in the block.
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 area either block in the block, the block data based on block generates block Storage index, by the block data of block store to storage index instruction storage location, storage index be used to indicate block The storage location of data.
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 based on the block data of the block, can generate the storage index of the block, to store the block data of the block To the storage location of storage index instruction.Wherein, the storage index of generation can be inverted index, since inverted index is actually being answered It can be based on block data according to the attribute value of data come the storage location of searching data, therefore and generate the row's of falling rope in Draw, is indexed inverted index as the storage of block data.
After generating the storage index of at least one block, the block-identified of block can be obtained, by the block-identified of block Storage corresponding with storage index avoids to ensure that the correspondence between block and storage index is correct by least one area Block is obscured at least one storage index.It wherein, can be with when being stored the correspondence between block and storage index Generate the first index list shown in table 1.During practical application, if the storage index that terminal generates is the row's of falling rope Draw, then terminal will store index stored when, the second index list shown in table 2 can be generated, will be in block data Each data, which is set out, to be come, and by the storage corresponding with storage index of these data, guarantee can be according to any in block data Data determine storage index so that querying condition input by user can not be limited, as long as user's input and block data phase The querying condition of pass, you can block data is inquired according to querying condition.It should be noted that due in different blocks The content that the block data of storage includes is different, and therefore, when generating table 2, is needed actual according to what is stored in block Block data generates.During practical application, terminal can also generate index database, and the storage of whole blocks is indexed storage Into index database, the embodiment of the present invention is to terminal by the mode of storage index storage without specifically limiting.
Table 1
It is block-identified Storage index
Block A (3;1)
Block B (5;1)
Table 2
In step 203, obtain the querying condition of user, querying condition include at least block to be checked block height, One or more in block address, 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 in the block height of block to be checked, block address, Transaction Information, transaction amount and exchange hour in querying condition One or more.
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 the multinomial optional querying condition such as block height, block address, Transaction Information, transaction amount and exchange hour Type obtains user in condition after detecting any one querying condition type that user selects in condition types choice box The querying condition inputted in input frame.It should be noted that during practical application, item can not be also provided in query page Part type choice box directly provides condition entry frame, and obtains the querying condition that user inputs in condition entry frame, to getting Querying condition be identified.The embodiment of the present invention is to obtaining the mode of querying condition input by user without specifically limiting It is fixed.
In step 204, it determines default analytical algorithm, based on default analytical algorithm, querying condition is parsed, is generated Search index presets analytical algorithm and includes at least segmentation methods, and search index is used to inquire the storage location of block to be checked.
In embodiments of the present invention, since the block data of block is stored according to the instruction of storage index, because This, in order to be determined the storage location of block based on querying condition, is needed to querying condition after getting the querying condition of user It is parsed, generates the search index to match with the form of storage index, and then determine the storage of block according to search index Index, and the storage location for determining block is indexed according to storage, get the block data of block.It is solved to querying condition When analysis, it may be determined that default analytical algorithm, and querying condition is parsed based on default analytical algorithm.Wherein, parsing is preset Algorithm can be segmentation methods, if default analytical algorithm is segmentation methods, search index is being generated based on default analytical algorithm When, the querying condition of user is segmented, multiple words are obtained;Then, obtained multiple words are used into such as " and The conjunctions such as (with) ", " or (or) " connect, and generate the search index with the form matches of storage index.
In step 205, at least one storage index for obtaining at least one block, is based on search index, at least one Specified storage index is inquired in a storage index, and the block of block to be checked is obtained in the storage location of specified storage index instruction Data, specified storage index are matched with search index.
It in embodiments of the present invention, can be according to inquiry rope after generating search index according to the querying condition of user Draw the matched specified storage of the determining and search index to index, and then according to the storage of the specified determining block to be checked of storage index Position obtains area to be checked block data in the block.Wherein, since the storage for being stored with whole blocks in terminal indexes, When determining specified storage index, whole storage indexes is compared with search index, in whole storage indexes really The matched specified storage of fixed and search index indexes.It should be noted that being carried out by whole storage indexes and search index When comparison, since the quantity of the storage index stored in terminal is more, the storage that index can be stored according to terminal-pair is suitable Sequence is compared, when determining that a certain storage index is matched with search index, you can stop the ratio of storage index and search index To process, no longer need to the storage index for being left not yet to be compared being compared with search index, by this and search index The storage index matched is determined directly as specified storage index.The embodiment of the present invention is indexed to determining with the matched storage of search index Mode without specifically limiting.
In embodiments of the present invention, believed including at least the block height of block to be checked, block address, transaction by acquisition One or more querying condition in breath, transaction amount and exchange hour is based on querying condition, generates search index, and Block to be checked is inquired according to search index, obtains the block data of block to be checked so that can be according to a variety of querying conditions The block data of block is inquired, the limitation of data query is smaller, simplifies the process of data query, intelligent more excellent, user 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, the first generation module 302 and enquiry module 303.
The condition acquisition module 301, the querying condition for obtaining user, querying condition include at least block to be checked One or more in block height, block address, Transaction Information, transaction amount and exchange hour;
First generation module 302 generates search index, search index is to be checked for inquiring for being based on querying condition Ask the storage location of block;
The enquiry module 303 obtains the block counts of block to be checked for inquiring block to be checked according to search index According to.
Device provided in an embodiment of the present invention, by acquisition including at least the block height of block to be checked, block address, One or more querying condition in Transaction Information, transaction amount and exchange hour is based on querying condition, generates inquiry rope Draw, and block to be checked is inquired according to search index, obtains the block data of block to be checked so that can be according to a variety of inquiries The limitation of the block data of condition query block, data query is smaller, simplifies the process of data query, intelligent more excellent, User's viscosity is higher.
In another embodiment, referring to Fig. 3 B, which further includes data acquisition module 304, the second generation module 305 With memory module 306.
The data acquisition module 304, the block data for obtaining at least one block, block data include at least block Highly, Block Characteristic value, Transaction Information, transaction amount, exchange hour and father's block information;
Second generation module 305 is used for at least one area either block in the block, the block counts based on block According to the storage for generating block indexes, and storage index is used to indicate the storage location of block data;
The memory module 306, for storing the block data of block to the storage location of storage index instruction.
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, first generation module 302, including determination sub-module 3021 and parsing Submodule 3022.
The determination sub-module 3021 presets analytical algorithm and includes at least segmentation methods for determining default analytical algorithm;
The analyzing sub-module 3022 generates inquiry rope for based on default analytical algorithm, being parsed to querying condition Draw.
In another embodiment, referring to Fig. 3 E, the enquiry module 303, including index acquisition submodule 3031, inquiry Module 3032 and data acquisition submodule 3033.
The index acquisition submodule 3031, at least one storage for obtaining at least one block index;
The inquiry submodule 3032 inquires specified storage rope for being based on search index at least one storage index Draw, specified storage index is matched with search index;
The data acquisition submodule 3033, for obtaining block to be checked in the storage location of specified storage index instruction Block 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 the querying condition of user, the querying condition include at least the block height of block to be checked, block address, One or more in Transaction Information, transaction amount and exchange hour;
Based on the querying condition, search index is generated, the search index is for inquiring depositing for the block to be checked Storage space is set;
The block to be checked is inquired according to the search index, obtains the block data of the block to be checked.
A2, according to the method described in claim 1, it is characterized in that, it is described obtain user 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 Characteristic value, hands over Easy information, transaction amount, exchange hour and father's block information;
The block is generated based on the block data of the block at least one area's either block in the block Storage index, the storage index is used to indicate the storage location of the block data;
The block data of the block is stored to the storage location of the storage index instruction.
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, it is described be based on the querying condition, generate inquiry rope Draw including:
Determine that default analytical algorithm, the default analytical algorithm include at least segmentation methods;
Based on the default analytical algorithm, the querying condition is parsed, generates the search index.
A5, according to the method described in claim 1, it is characterized in that, it is described according to the search index inquiry described in wait for Block is inquired, the block data for obtaining the block to be checked includes:
Obtain at least one storage index of at least one block;
Based on the search index, specified storage index is inquired at least one storage indexes, described specify is deposited Storage index is matched with the search index;
The block data of the block to be checked is obtained in the storage location of the specified storage index instruction.
A6, a kind of data query arrangement, which is characterized in that described device includes:
Condition acquisition module, the querying condition for obtaining user, the querying condition include at least block to be checked One or more in block height, block address, Transaction Information, transaction amount and exchange hour;
First generation module generates search index, the search index is for inquiring institute for being based on the querying condition State the storage location of block to be checked;
Enquiry module obtains the block to be checked for inquiring the block to be checked according to the search index Block data.
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 Characteristic value, Transaction Information, transaction amount, exchange hour and father's block information;
Second generation module is used for at least one area's either block in the block, the block based on the block Data, generate the storage index of the block, and the storage index is used to indicate the storage location of the block data;
Memory module, for storing the block data of the block to the storage location of the storage index instruction.
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 first generation module includes:
Determination sub-module, for determining that default analytical algorithm, the default analytical algorithm include at least segmentation methods;
Analyzing sub-module parses the querying condition, is looked into described in generation for being based on the default analytical algorithm Ask index.
A10, device according to claim 6, which is characterized in that the enquiry module includes:
Acquisition submodule is indexed, at least one storage for obtaining at least one block indexes;
Submodule is inquired, for being based on the search index, specified storage is inquired at least one storage index Index, the specified storage index are matched with the search index;
Data acquisition submodule, for obtaining the block to be checked in the storage location of the specified storage index instruction Block 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 querying condition of user is obtained, the querying condition includes at least the block height, block address, transaction of block to be checked One or more in information, transaction amount and exchange hour;
Based on the querying condition, search index is generated, the search index is used to inquire the storage position of the block to be checked It sets;
The block to be checked is inquired according to the search index, obtains the block data of the block to be checked.
2. according to the method described in claim 1, it is characterized in that, it is described obtain user querying condition before, the method Further include:
The block data of at least one block is obtained, the block data includes at least block height, Block Characteristic value, transaction letter Breath, transaction amount, exchange hour and father's block information;
Depositing for the block is generated based on the block data of the block at least one area's either block in the block Storage index, the storage index are used to indicate the storage location of the block data;
The block data of the block is stored to the storage location of the storage index instruction.
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, described be based on the querying condition, generation search index packet It includes:
Determine that default analytical algorithm, the default analytical algorithm include at least segmentation methods;
Based on the default analytical algorithm, the querying condition is parsed, generates the search index.
5. according to the method described in claim 1, it is characterized in that, described inquire the area to be checked according to the search index Block, the block data for obtaining the block to be checked include:
Obtain at least one storage index of at least one block;
Based on the search index, specified storage index, the specified storage rope are inquired at least one storage index Draw and is matched with the search index;
The block data of the block to be checked is obtained in the storage location of the specified storage index instruction.
6. a kind of data query arrangement, which is characterized in that described device includes:
Condition acquisition module, the querying condition for obtaining user, the querying condition include at least the block of block to be checked Highly, one or more in block address, Transaction Information, transaction amount and exchange hour;
First generation module generates search index, the search index is for inquiring described wait for for being based on the querying condition Inquire the storage location of block;
Enquiry module obtains the block of the block to be checked for inquiring the block to be checked according to the search index Data.
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 Characteristic value, Transaction Information, transaction amount, exchange hour and father's block information;
Second generation module, for at least one area's either block in the block, based on the block data of the block, The storage index of the block is generated, the storage index is used to indicate the storage location of the block data;
Memory module, for storing the block data of the block to the storage location of the storage index instruction.
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.
CN201711464975.XA 2017-12-28 2017-12-28 Data query method and device and electronic equipment Active CN108304475B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711464975.XA CN108304475B (en) 2017-12-28 2017-12-28 Data query method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711464975.XA CN108304475B (en) 2017-12-28 2017-12-28 Data query method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108304475A true CN108304475A (en) 2018-07-20
CN108304475B CN108304475B (en) 2020-11-10

Family

ID=62867710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711464975.XA Active CN108304475B (en) 2017-12-28 2017-12-28 Data query method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108304475B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876383A (en) * 2018-08-27 2018-11-23 广东工业大学 A kind of data trade method, device and equipment based on block chain
CN109189782A (en) * 2018-08-02 2019-01-11 哈尔滨工程大学 A kind of indexing means in block chain commodity transaction inquiry
CN109213797A (en) * 2018-09-30 2019-01-15 中国联合网络通信集团有限公司 A kind of querying method and device of block chain
CN109471905A (en) * 2018-11-16 2019-03-15 华东师范大学 A kind of block chain index method for supporting time range and range of attributes compound query
CN109684408A (en) * 2018-12-07 2019-04-26 深圳市智税链科技有限公司 Data managing method, device, medium and the electronic equipment of block catenary system
CN110347748A (en) * 2019-06-20 2019-10-18 阿里巴巴集团控股有限公司 A kind of data verification method based on inverted index, system, device and equipment
CN110489413A (en) * 2019-07-15 2019-11-22 杭州复杂美科技有限公司 A kind of storage of transaction record, querying method and system, equipment and storage medium
WO2020029931A1 (en) * 2018-08-06 2020-02-13 杭州复杂美科技有限公司 Data query method and system, consensus method and system, device and storage medium
WO2020103105A1 (en) * 2018-11-22 2020-05-28 北京比特大陆科技有限公司 Data processing apparatus
WO2020223901A1 (en) * 2019-05-07 2020-11-12 比特大陆科技有限公司 Data query method, and server
CN113282662A (en) * 2021-06-03 2021-08-20 广东辰宜信息科技有限公司 Block information processing method, device, equipment and medium
CN113343292A (en) * 2021-05-28 2021-09-03 网易(杭州)网络有限公司 Transaction number processing method and device, storage medium and computer equipment
JP2023505412A (en) * 2020-02-18 2023-02-09 テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド Block processing method, data retrieval method and apparatus based on blockchain

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102346783A (en) * 2011-11-09 2012-02-08 华为技术有限公司 Data retrieval method and device
CN102915382A (en) * 2012-11-21 2013-02-06 亚信联创科技(中国)有限公司 Method and device for carrying out data query on database based on indexes
CN105740440A (en) * 2016-02-01 2016-07-06 上海凭安网络科技有限公司 Indexing method for quickening block chain query
CN106055597A (en) * 2016-05-24 2016-10-26 布比(北京)网络技术有限公司 Digital transaction system, and account information query method therefor
CN106528746A (en) * 2016-10-26 2017-03-22 江苏通付盾科技有限公司 Trade information inquiring method, device and system
CN106779527A (en) * 2016-11-10 2017-05-31 北京物资学院 Commodity circulation information inquiry system and method based on block chain
CN107247773A (en) * 2017-06-07 2017-10-13 北京邮电大学 A kind of method that inquiry is traded in distributed data base based on block chain
CN107273556A (en) * 2017-08-23 2017-10-20 上海点融信息科技有限责任公司 Block chain data index method and equipment
CN107291862A (en) * 2017-06-12 2017-10-24 腾讯科技(深圳)有限公司 Business datum storage method, device, storage medium and electronic equipment
CN107391649A (en) * 2017-07-14 2017-11-24 浙商银行股份有限公司 A kind of system and method for lifting block chain query efficiency
CN107464117A (en) * 2017-08-04 2017-12-12 平安科技(深圳)有限公司 Data managing method and block catenary system based on block chain
CN107688649A (en) * 2017-08-31 2018-02-13 江西博瑞彤芸科技有限公司 Querying method based on ideal money service platform
CN107943951A (en) * 2017-11-24 2018-04-20 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of search method and system of block chain business information

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102346783A (en) * 2011-11-09 2012-02-08 华为技术有限公司 Data retrieval method and device
CN102915382A (en) * 2012-11-21 2013-02-06 亚信联创科技(中国)有限公司 Method and device for carrying out data query on database based on indexes
CN105740440A (en) * 2016-02-01 2016-07-06 上海凭安网络科技有限公司 Indexing method for quickening block chain query
CN106055597A (en) * 2016-05-24 2016-10-26 布比(北京)网络技术有限公司 Digital transaction system, and account information query method therefor
CN106528746A (en) * 2016-10-26 2017-03-22 江苏通付盾科技有限公司 Trade information inquiring method, device and system
CN106779527A (en) * 2016-11-10 2017-05-31 北京物资学院 Commodity circulation information inquiry system and method based on block chain
CN107247773A (en) * 2017-06-07 2017-10-13 北京邮电大学 A kind of method that inquiry is traded in distributed data base based on block chain
CN107291862A (en) * 2017-06-12 2017-10-24 腾讯科技(深圳)有限公司 Business datum storage method, device, storage medium and electronic equipment
CN107391649A (en) * 2017-07-14 2017-11-24 浙商银行股份有限公司 A kind of system and method for lifting block chain query efficiency
CN107464117A (en) * 2017-08-04 2017-12-12 平安科技(深圳)有限公司 Data managing method and block catenary system based on block chain
CN107273556A (en) * 2017-08-23 2017-10-20 上海点融信息科技有限责任公司 Block chain data index method and equipment
CN107688649A (en) * 2017-08-31 2018-02-13 江西博瑞彤芸科技有限公司 Querying method based on ideal money service platform
CN107943951A (en) * 2017-11-24 2018-04-20 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of search method and system of block chain business information

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189782A (en) * 2018-08-02 2019-01-11 哈尔滨工程大学 A kind of indexing means in block chain commodity transaction inquiry
WO2020029931A1 (en) * 2018-08-06 2020-02-13 杭州复杂美科技有限公司 Data query method and system, consensus method and system, device and storage medium
CN108876383A (en) * 2018-08-27 2018-11-23 广东工业大学 A kind of data trade method, device and equipment based on block chain
CN109213797A (en) * 2018-09-30 2019-01-15 中国联合网络通信集团有限公司 A kind of querying method and device of block chain
CN109471905A (en) * 2018-11-16 2019-03-15 华东师范大学 A kind of block chain index method for supporting time range and range of attributes compound query
WO2020103105A1 (en) * 2018-11-22 2020-05-28 北京比特大陆科技有限公司 Data processing apparatus
CN109684408A (en) * 2018-12-07 2019-04-26 深圳市智税链科技有限公司 Data managing method, device, medium and the electronic equipment of block catenary system
WO2020223901A1 (en) * 2019-05-07 2020-11-12 比特大陆科技有限公司 Data query method, and server
CN110347748A (en) * 2019-06-20 2019-10-18 阿里巴巴集团控股有限公司 A kind of data verification method based on inverted index, system, device and equipment
CN110347748B (en) * 2019-06-20 2023-05-16 创新先进技术有限公司 Data verification method, system, device and equipment based on inverted index
CN110489413A (en) * 2019-07-15 2019-11-22 杭州复杂美科技有限公司 A kind of storage of transaction record, querying method and system, equipment and storage medium
JP2023505412A (en) * 2020-02-18 2023-02-09 テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド Block processing method, data retrieval method and apparatus based on blockchain
JP7441311B2 (en) 2020-02-18 2024-02-29 テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド Block processing method, data retrieval method and device based on blockchain
CN113343292A (en) * 2021-05-28 2021-09-03 网易(杭州)网络有限公司 Transaction number processing method and device, storage medium and computer equipment
CN113282662A (en) * 2021-06-03 2021-08-20 广东辰宜信息科技有限公司 Block information processing method, device, equipment and medium
CN113282662B (en) * 2021-06-03 2023-11-03 广东辰宜信息科技有限公司 Block information processing method, device, equipment and medium

Also Published As

Publication number Publication date
CN108304475B (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN108304475A (en) Data query method, apparatus and electronic equipment
CN109089133A (en) Method for processing video frequency and device, electronic equipment and storage medium
CN105516270B (en) Information-pushing method and device
CN108932253A (en) Multimedia search result methods of exhibiting and device
CN106372204A (en) Push message processing method and device
CN106447877B (en) Open method, device and the server of smart machine
CN104809157B (en) Number identification method and device
CN107944848A (en) Monetary settlement method, apparatus and electronic equipment
CN104951935A (en) Bill splitting method and device
CN104636453A (en) Illegal user data identification method and device
CN105354284B (en) Processing method and processing device, short message recognition methods and the device of template
CN105208176B (en) Contact person record processing method and processing device
CN106445189A (en) Candidate word display method and device
CN108804440A (en) The method and apparatus that video search result is provided
CN109255128A (en) Generation method, device and the storage medium of multi-layer label
CN105335714A (en) Photograph processing method, device and apparatus
CN105956067A (en) Resource searching method and apparatus
CN109634913A (en) Storage method, device and the electronic equipment of document
CN106020998A (en) Service invoke method and device
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
CN104572848A (en) Search method and search device based on browser
CN104317911A (en) File uploading method and device
CN106535192A (en) Method and device for realizing access of smart equipment to router and mobile terminal
CN107423757A (en) clustering processing method and device

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

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.

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

Effective date of registration: 20210120

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

Patentee after: BITMAIN TECHNOLOGY Co.,Ltd.

Address before: 26 Ying Yun street, Singapore

Patentee before: BITMAIN TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210513

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.