CN106326296A - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN106326296A
CN106326296A CN201510379816.4A CN201510379816A CN106326296A CN 106326296 A CN106326296 A CN 106326296A CN 201510379816 A CN201510379816 A CN 201510379816A CN 106326296 A CN106326296 A CN 106326296A
Authority
CN
China
Prior art keywords
inquiry request
data
terminal
data inquiry
query
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201510379816.4A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510379816.4A priority Critical patent/CN106326296A/en
Priority to PCT/CN2016/070432 priority patent/WO2017000540A1/en
Publication of CN106326296A publication Critical patent/CN106326296A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • 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
    • 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
    • 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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data query method and device. The method comprises the following steps of: receiving a first data query request sent from a terminal; obtaining the unique identification of the first data query request, wherein the unique identification carries the information of the terminal; according to the unique identification and the first data query request, generating a second data query request; and according to the second data query request, executing query to obtain a query result; and sending the query result to the terminal. Through the method, the problem in a relevant art that multiple terminals can not simultaneously query the data in one piece of equipment is solved.

Description

Data query method and device
Technical field
The present invention relates to the communications field, in particular to a kind of data query method and device.
Background technology
When the network equipment is carried out data query, some can support that multiple terminal carries out data query to it.Such as, divide Group transmits the access way of net (Packet Transport Network, referred to as PTN) equipment user access device to be had: Network management platform mode, CLI control mode, SNMP WEB access.These three access terminal can arrive equipment and look into Ask data, thus realize equipment and the management of network.Different types of terminal can be concurrently accessed, with the terminal of type Can also be concurrently accessed multiple.Such as now with two webmaster terminals, two CLI terminals are concurrently accessed same PTN In equipment, and all performing inquiry data manipulation.Equipment needs to ensure that inquiry, the data of response are not conflicted.
In correlation technique, the inquiry request of multiple access terminals can be generated a series of sequential node, then according to node depends on Secondary perform inquiry.This inquiry mode is block type, when an inquiry request in commission, another inquiry is at Waiting state.Particularly when certain inquiry needs longer cycle, inquiry below all can be blocked.This mode is to looking into Ask promptness and the effectiveness of data, and Consumer's Experience has considerable influence.
For multiple terminals in correlation technique can not problem to equipment query data simultaneously, the most not yet propose effective Solution.
Summary of the invention
The invention provides a kind of data query method and device, with at least solve multiple terminals in correlation technique can not be the most right The problem of one equipment query data.
According to an aspect of the invention, it is provided a kind of data query method, including: receive the first number that terminal sends According to inquiry request;Obtaining unique mark of the first data inquiry request, wherein, unique mark carries the information of terminal; The second data inquiry request is generated according to unique mark and the first data inquiry request;Perform according to the second data inquiry request Inquiry, to obtain Query Result;And Query Result is sent to terminal.
Further, the unique mark obtaining the first data inquiry request comprises determining that the type of terminal;Determine terminal ID;Determine the ID of the object of the first data inquiry request requesting query;And according to the type of terminal, the ID of terminal with And the ID of the object of requesting query generates unique mark of the first data inquiry request.
Further, generate the first data according to the ID of the type of terminal, the ID of terminal and the object of requesting query to look into The unique mark asking request includes: obtaining the first character, wherein, the first character is that the first data inquiry request is in adaptation layer The type of the terminal mapped;Obtaining the second character, wherein, the second character is that the first data inquiry request maps in adaptation layer The ID of terminal;Obtaining the 3rd character, wherein, the 3rd character is that the first data inquiry request is asking that adaptation layer maps Seek the ID of the object of inquiry;And first character, the second character and the 3rd character generate a character according to preset rules String, and character string is identified as the unique of the first data inquiry request.
Further, before performing inquiry according to the second data inquiry request, the method also includes: to be uniquely designated Keyword, caches the first data inquiry request, is being sent after terminal by Query Result, and the method also includes: delete First data inquiry request of caching.
Further, while performing inquiry according to the second data inquiry request, the method also includes: start intervalometer, Wherein, intervalometer is for specifying the response waiting time of the second data inquiry request, and equity the second data query to be answered The time of request carries out record, wherein, if not getting Query Result within the response waiting time, then deletes caching The first data inquiry request, Query Result is being sent to while terminal, the method also includes: stop intervalometer.
Further, perform inquiry according to the second data inquiry request, include obtaining Query Result: obtain the second data The response message of inquiry request;Response message is resolved, to obtain the unique mark carried in response message;Obtain The first data inquiry request that unique mark is corresponding;And the first data inquiry request and response message are packaged, with Obtain Query Result, wherein, according to unique mark, Query Result is sent to terminal.
According to a further aspect in the invention, it is provided that a kind of data query arrangement, including: reception unit, it is used for receiving end The first data inquiry request that end sends;Acquiring unit, for obtaining unique mark of the first data inquiry request, wherein, Unique mark carries the information of terminal;Signal generating unit, for generating the according to unique mark and the first data inquiry request Two data inquiry request;Query unit, for performing inquiry according to the second data inquiry request, to obtain Query Result; And transmitting element, for Query Result is sent to terminal.
Further, acquiring unit includes: first determines module, for determining the type of terminal;Second determines module, For determining the ID of terminal;3rd determines module, for determining the ID of the object of the first data inquiry request requesting query; And generation module, generate the first number for the ID according to the type of terminal, the ID of terminal and the object of requesting query Unique mark according to inquiry request.
Further, generation module includes: first obtains submodule, for obtaining the first character, wherein, the first character It it is the type of the terminal that the first data inquiry request maps in adaptation layer;Second obtains submodule, for obtaining the second character, Wherein, the second character is the ID of the terminal that the first data inquiry request maps in adaptation layer;3rd obtains submodule, uses In obtaining the 3rd character, wherein, the 3rd character is the object of the requesting query that the first data inquiry request maps in adaptation layer ID;And generation submodule, generate one for the first character, the second character and the 3rd character according to preset rules Character string, and character string is identified as the unique of the first data inquiry request.
Further, this device also includes: buffer unit, for be uniquely designated keyword, caches the first data and looks into Ask request;And deletion unit, for deleting the first data inquiry request of caching.
By the present invention, receive the first data inquiry request that terminal sends;Obtain unique mark of the first data inquiry request Knowing, wherein, unique mark carries the information of terminal;The second number is generated according to unique mark and the first data inquiry request According to inquiry request;Inquiry is performed, to obtain Query Result according to the second data inquiry request;And Query Result is sent To terminal, solve multiple terminals in correlation technique can not problem to equipment query data simultaneously, and then by obtaining Unique mark of the first data inquiry request, generating the second data query according to unique mark and the first data inquiry request please Asking, and perform inquiry according to the second data inquiry request, to obtain Query Result, having reached multiple terminals can be simultaneously to one The effect of equipment query data.
Accompanying drawing explanation
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, the present invention Schematic description and description be used for explaining the present invention, be not intended that inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of data query method according to a first embodiment of the present invention;
Fig. 2 is the schematic diagram of the inquiry framework of data query method according to a first embodiment of the present invention;
Fig. 3 is that the uniquely identified of data query method according to a first embodiment of the present invention constitutes schematic diagram;
Fig. 4 is the schematic diagram setting up Management Information Model in data query method according to a first embodiment of the present invention;
Fig. 5 is the flow process carrying out data query in data query method according to a second embodiment of the present invention for webmaster terminal Figure;
Fig. 6 is the flow process carrying out data query in data query method according to a second embodiment of the present invention for CLI terminal Figure;
The stream of query processing is performed when Fig. 7 is to receive inquiry response in data query method according to a second embodiment of the present invention Cheng Tu;
Query processing is performed when Fig. 8 is not receive inquiry response in data query method according to a second embodiment of the present invention Flow chart;And
Fig. 9 is the structured flowchart of data query arrangement according to embodiments of the present invention.
Detailed description of the invention
Below with reference to accompanying drawing and describe the present invention in detail in conjunction with the embodiments.It should be noted that in the feelings do not conflicted Under condition, the embodiment in the application and the feature in embodiment can be mutually combined.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, " second " Etc. being for distinguishing similar object, without being used for describing specific order or precedence.
Providing a kind of data query method in the present embodiment, Fig. 1 is data query according to a first embodiment of the present invention The flow chart of method, as it is shown in figure 1, this flow process comprises the steps:
Step S102, receives the first data inquiry request that terminal sends.
Such as, the originating end of the first data inquiry request can be network management terminal, Command Line Interface (Command-Line Interface, referred to as CLI) terminal, or Simple Network Management Protocol (Simple Network Management Protocol, referred to as SNMP) WEB;The receiving terminal of the first data inquiry request is PTN device.
Step S104, obtains unique mark of the first data inquiry request, and wherein, unique mark carries the letter of terminal Breath.
Unique mark carries the information of terminal, for uniquely identifying the first data inquiry request.Receive at the same time The first number sent to multiple terminals is inquired about according to when asking, and unique mark of each first data inquiry request is somebody's turn to do for receiving It is different for the equipment of request.Therefore uniquely identifying according to this, the equipment receiving this request can be to different first Data inquiry request makes a distinction.
Step S106, generates the second data inquiry request according to unique mark and the first data inquiry request.
Second data inquiry request carries the concrete solicited message of unique identification information and the first data inquiry request simultaneously. That is, the second data inquiry request comprises information and the information of querying command of the terminal sending the first data inquiry request.
Step S108, performs inquiry according to the second data inquiry request, to obtain Query Result.
Perform inquiry according to the second data inquiry request, the Query Result of acquisition carries unique mark, namely carries Send the information of the terminal of the first data inquiry request.Therefore, when multiple terminals perform data query to certain equipment simultaneously, This equipment can determine the corresponding relation of Query Result and terminal according to the data query method of the present embodiment, and then will simultaneously Multiple queries result is sent respectively to the terminal that it is corresponding.
Step S110, sends Query Result to terminal.
According to this embodiment, by receiving the first data inquiry request that terminal sends;Obtain the first data inquiry request Unique mark, wherein, unique mark carries the information of terminal;Generate according to unique mark and the first data inquiry request Second data inquiry request;Inquiry is performed, to obtain Query Result according to the second data inquiry request;And inquiry is tied Fruit sends to terminal, and solving multiple terminals in correlation technique can not problem to equipment query data, Jin Ertong simultaneously Cross the unique mark obtaining the first data inquiry request, generate the second data according to unique mark and the first data inquiry request Inquiry request, and perform inquiry according to the second data inquiry request, to obtain Query Result, reached multiple terminals can be simultaneously Effect to equipment query data.
In order to simplify the above-mentioned uniquely identified process of generation, it is preferable that obtain the first data inquiry request uniquely identifies bag Include: determine the type of terminal;Determine the ID of terminal;Determine the ID of the object of the first data inquiry request requesting query; And generate the first data inquiry request only according to the ID of the type of terminal, the ID of terminal and the object of requesting query One mark.
The type of terminal and the ID of terminal are for identifying the information of the terminal sending the first data inquiry request.Each terminal Uniquely can identify with type and ID.Querying command object, every querying command is set up in Management Information Model A corresponding object ID, namely the ID of the object of the first data inquiry request requesting query.The type of terminal, terminal The ID three of the object of ID and requesting query combines, and can uniquely identify the first data inquiry request.
Preferably, the first data query is generated according to the ID of the type of terminal, the ID of terminal and the object of requesting query Unique mark of request includes: obtaining the first character, wherein, the first character is that the first data inquiry request reflects in adaptation layer The type of the terminal penetrated;Obtaining the second character, wherein, the second character is that the first data inquiry request maps in adaptation layer The ID of terminal;Obtaining the 3rd character, wherein, the 3rd character is the request that the first data inquiry request maps in adaptation layer The ID of the object of inquiry;And first character, the second character and the 3rd character generate a character string according to preset rules, And character string is identified as the unique of the first data inquiry request.
Each terminal is defined with terminal type (LINK_TYPE) and Termination ID (LINK_ID).Equipment receives first Data inquiry request (message) maps terminal type and Termination ID in adaptation layer.Inquiry is set up in Management Information Model Command object, every corresponding object ID (OBJECT_ID) of querying command.The first data inquiry request can be obtained exist The mapping directive object ID of adaptation layer.This inquiry is generated according to LINK_TYPE, LINK_ID, OBJECT_ID ID (QUERY_ID, namely above-mentioned unique mark), this ID is for receiving the equipment of the first data inquiry request For be unique.
Such as, it is defined previously as the character string of a regular length, from a high position to low level, is filled to LINK_TYPE respectively, LINK_ID and OBJECT_ID.
Alternatively, before performing inquiry according to the second data inquiry request, the method also includes: to be uniquely designated pass Key word, caches the first data inquiry request, is being sent after terminal by Query Result, and the method also includes: delete slow The first data inquiry request deposited.
The first data inquiry request is preserved as keyword, in case using during response using unique mark.Look into finally getting After asking result, first data inquiry request (message) of caching can be deleted, with releasing memory.
In order to improve effectiveness and the execution efficiency of data query, alternatively, performing to look into according to the second data inquiry request While inquiry, the method also includes: starting intervalometer, wherein, intervalometer is for specifying answering of the second data inquiry request Answer the waiting time, and the time of equity the second data inquiry request to be answered carries out record, wherein, if waited in response Do not get Query Result within time, then delete the first data inquiry request of caching, Query Result was sent to end While end, the method also includes: stop intervalometer.
Presetting the response waiting time (time-out time), if having received response within the response waiting time, then holding The process that row is follow-up, and Query Result is being sent while terminal, stop timer;If in the response waiting time Within do not get Query Result, then delete the first data inquiry request of caching, with releasing memory.
Preferably, perform inquiry according to the second data inquiry request, include obtaining Query Result: obtain the second data and look into Ask the response message of request;Response message is resolved, to obtain the unique mark carried in response message;Obtain only The first data inquiry request that one mark is corresponding;And the first data inquiry request and response message are packaged, with To Query Result, wherein, according to unique mark, Query Result is sent to terminal.
After performing inquiry according to the second data inquiry request and getting response message, in order to know this response message pair In which terminal, namely should identify that response message, to which terminal, can be resolved by this transmission of this response message, with Obtain the unique mark carried in response message.Uniquely identify according to this, the information of terminal can be known, and this is unique The first data inquiry request (searching in the buffer) that mark is corresponding.First data inquiry request and response message are carried out After encapsulation, the above-mentioned terminal identified can be sent it to.
Fig. 2 is the schematic diagram of the inquiry framework of data query method according to a first embodiment of the present invention.As in figure 2 it is shown, CLI terminal, webmaster terminal and SNMP WEB terminal send data inquiry request (i.e. to equipment (PTN device) simultaneously The first data inquiry request in embodiment illustrated in fig. 1), the adaptation layer of equipment first to this data inquiry request at Reason, performs follow-up command process afterwards.Follow-up command process includes that sending treated data to business module looks into Ask request (i.e. the second data inquiry request in embodiment illustrated in fig. 1), start intervalometer etc..
Fig. 3 is that the uniquely identified of data query method according to a first embodiment of the present invention constitutes schematic diagram.Such as Fig. 3 institute Showing, unique mark is by LINK_TYPE (terminal type, data volume is 8 bits), LINK_ID (Termination ID, number It is 8 bits according to amount) and OBJECT_ID (object ID, data volume is 16 bits) composition.Defined in the method only One character string being designated a regular length, be filled to respectively from a high position to low level LINK_TYPE, LINK_ID and OBJECT_ID。
Fig. 4 is the schematic diagram setting up Management Information Model in data query method according to a first embodiment of the present invention.Such as figure Shown in 4, Management Information Model is set up querying command object, the corresponding object ID of each command object (OBJECT_ID), Query Board running status can obtain this object ID, such as, OBJECT_ID=25866. It addition, for the accuracy improving data query, it is also possible to acquisition veneer position attribution (include shelf number, slot number etc., Represent with ATTRIBUTE_ID), such as, ATTRIBUTE_ID=88.
Provide below data query method according to a second embodiment of the present invention.This embodiment can be as real shown in Fig. 1 Execute the one of example preferred embodiment.In this embodiment, it is provided that webmaster terminal and CLI terminal arrive equipment simultaneously and look into Ask the multiple terminals data query method of running state of single plate.Fig. 5 is data query method according to a second embodiment of the present invention In carry out the flow chart of data query for webmaster terminal.As it is shown in figure 5, the method includes:
Step S502, receives the order of the Query Board running status of webmaster terminal.
The first data inquiry request in embodiment illustrated in fig. 1 can be this order.
Step S504, obtains and maps: INK_TYPE=5, LINK_ID=4, OBJECT_ID=25866.
According to mentioned order at adapter mappings terminal type (INK_TYPE) and Termination ID (LINK_ID), and The object ID (OBJECT_ID) of the order of Query Board running status.Wherein, the terminal type of mapping and Termination ID It is respectively as follows: LINK_TYPE=5, LINK_ID=4;The object ID that Query Board status command maps is OBJECT_ID=25866.
Step S506, calculates QUERY_ID=0x0504650A.
Unique mark in QUERY_ID i.e. embodiment illustrated in fig. 1.
Step S508, caching query request message.
The message corresponding to order of Query Board running status in this inquiry request message i.e. step S502.Please by inquiry Ask message with QUERY_ID (0x0504650A) as keyword, store in MAP mapping table.
Step S510, is issued to business module by inquiry request.
Inquiry request is sent to business module and performs inquiry.This inquiry request carries QUERY_ID, this inquiry request Namely the second data inquiry request in embodiment illustrated in fig. 1.
Step S512, starts intervalometer.
Such as, definition time-out time is 60 seconds.If having obtained inquiry response within this time, then perform shown in Fig. 7 Step in embodiment, if not obtaining inquiry response, then performs the step in embodiment illustrated in fig. 8.
Fig. 6 is the flow process carrying out data query in data query method according to a second embodiment of the present invention for CLI terminal Figure.As shown in Figure 6, the method includes:
Step S602, receives the order of the Query Board running status of CLI terminal.
The first data inquiry request in embodiment illustrated in fig. 1 can be this order.
Step S604, obtains and maps: INK_TYPE=1, LINK_ID=2, OBJECT_ID=25866.
According to mentioned order at adapter mappings terminal type (INK_TYPE) and Termination ID (LINK_ID), and The object ID (OBJECT_ID) of the order of Query Board running status.Wherein, the terminal type of mapping and Termination ID It is respectively as follows: LINK_TYPE=1, LINK_ID=2;The object ID that Query Board status command maps is OBJECT_ID=25866.
Step S606, calculates QUERY_ID=0x0102650A.
Unique mark in QUERY_ID i.e. embodiment illustrated in fig. 1.
Step S608, caching query request message.
The message corresponding to order of Query Board running status in this inquiry request message i.e. step S602.Please by inquiry Ask message with QUERY_ID (0x0102650A) as keyword, store in MAP mapping table.
Step S610, by inquiry request issuing service module.
Inquiry request is sent to business module and performs inquiry.This inquiry request carries QUERY_ID, this inquiry request Namely the second data inquiry request in embodiment illustrated in fig. 1.
Step S612, starts intervalometer.
With above-mentioned steps S512, definition time-out time is 60 seconds.If having obtained inquiry response within this time, then hold Step in row embodiment illustrated in fig. 7, if not obtaining inquiry response, then performs the step in embodiment illustrated in fig. 8.
It should be noted that in data query method according to embodiments of the present invention, above-mentioned Fig. 5 and Fig. 6 performs flow process can Carry out simultaneously, namely the method can make webmaster terminal and CLI terminal arrive equipment query running state of single plate simultaneously.
The stream of query processing is performed when Fig. 7 is to receive inquiry response in data query method according to a second embodiment of the present invention Cheng Tu.As it is shown in fig. 7, the method includes:
Step S702, receives the inquiry response of business module.
Step S704, takes out QUERY_ID.
QUERY_ID is extracted from inquiry response.
Step S706, takes out inquiry request message according to QUERY_ID from caching.
Step S708, packing reports response message.
Inquiry request message is packaged with inquiry response message, obtains Query Result, and send it to webmaster terminal Or two Query Results (if the request of two terminal transmissions has all obtained response, have then been respectively sent to by CLI terminal The terminal of its correspondence;If the request that only one of which terminal sends has obtained response, then only send Query Result to this terminal).
Step S710, stops intervalometer, deletes the inquiry request message of caching.
Specifically, if receiving the response message of QUERY_ID=0x0102650A, then from MAP table, inquiry is found Request message.It is sent to CLI terminal after it being encapsulated with response message.Stop intervalometer simultaneously, and by the inquiry of caching Request message is deleted from MAP table.Poll-final.
If receiving the response message of QUERY_ID=0x0504650A, then from MAP table, find inquiry request message. It is sent to webmaster terminal after it being encapsulated with response message.Stop intervalometer simultaneously, and by the inquiry request message of caching Delete from MAP table.Poll-final.
Query processing is performed when Fig. 8 is not receive inquiry response in data query method according to a second embodiment of the present invention Flow chart.As shown in Figure 8, the method includes:
Step S802, time-out does not receives the inquiry response of business module.
Step S804, deletes the inquiry request message of caching.
If time-out does not receives the inquiry response of business module, then the inquiry request message of caching is deleted from MAP table, And terminate inquiry.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive according to above-described embodiment Method can add the mode of required general hardware platform by software and realize, naturally it is also possible to by hardware, but a lot In the case of the former is more preferably embodiment.Based on such understanding, technical scheme is the most in other words to existing The part having technology to contribute can embody with the form of software product, and this computer software product is stored in one In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions with so that a station terminal equipment (can To be mobile phone, computer, server, or the network equipment etc.) perform the method described in each embodiment of the present invention.
Additionally providing a kind of data query arrangement in the present embodiment, this device is used for realizing above-described embodiment and being preferable to carry out Mode, had carried out repeating no more of explanation.As used below, term " module " can realize predetermined function Software and/or the combination of hardware.Although the device described by following example preferably realizes with software, but firmly Part, or the realization of the combination of software and hardware also may and be contemplated.
Fig. 9 is the structured flowchart of data query arrangement according to embodiments of the present invention, as it is shown in figure 9, this device includes: Receive unit 20, acquiring unit 40, signal generating unit 60, query unit 80 and transmitting element 100.
Receive unit 20, for receiving the first data inquiry request that terminal sends.
Acquiring unit 40, for obtaining unique mark of the first data inquiry request, wherein, unique mark carries terminal Information.
Signal generating unit 60, for generating the second data inquiry request according to unique mark and the first data inquiry request.
Query unit 80, for performing inquiry according to the second data inquiry request, to obtain Query Result.
Transmitting element 100, for sending Query Result to terminal.
Further, acquiring unit 40 includes: first determines module, for determining the type of terminal;Second determines mould Block, for determining the ID of terminal;3rd determines module, for determining the object of the first data inquiry request requesting query ID;And generation module, raw for the ID according to the type of terminal, the ID of terminal and the object of requesting query Become unique mark of the first data inquiry request.
Further, generation module includes: first obtains submodule, for obtaining the first character, wherein, the first character It it is the type of the terminal that the first data inquiry request maps in adaptation layer;Second obtains submodule, for obtaining the second character, Wherein, the second character is the ID of the terminal that the first data inquiry request maps in adaptation layer;3rd obtains submodule, uses In obtaining the 3rd character, wherein, the 3rd character is the object of the requesting query that the first data inquiry request maps in adaptation layer ID;And generation submodule, generate one for the first character, the second character and the 3rd character according to preset rules Character string, and character string is identified as the unique of the first data inquiry request.
Further, this device also includes: buffer unit, for be uniquely designated keyword, caches the first data and looks into Ask request;And deletion unit, for deleting the first data inquiry request of caching.
According to this embodiment, receive the first data inquiry request that terminal sends, acquiring unit 40 by receiving unit 20 Obtaining unique mark of the first data inquiry request, signal generating unit 60 is raw according to unique mark and the first data inquiry request The second data inquiry request, query unit 80 is become to perform inquiry according to the second data inquiry request, to obtain Query Result, And Query Result is sent to terminal by transmitting element 100, solving multiple terminals in correlation technique can not set one simultaneously The problem of inquiry data for future reference, and then unique mark of the first data inquiry request is obtained by acquiring unit 40, generate single Unit 60 generates the second data inquiry request according to unique mark and the first data inquiry request, then query unit 80 according to Second data inquiry request performs inquiry, and to obtain Query Result, having reached multiple terminals can be simultaneously to an equipment query number According to effect.
It should be noted that above-mentioned modules can be by software or hardware realizes, for the latter, Ke Yitong Cross in the following manner to realize, but be not limited to this: above-mentioned module is respectively positioned in same processor;Or, above-mentioned module position respectively In multiple processors.
Obviously, those skilled in the art should be understood that each module of the above-mentioned present invention or each step can be with general Calculating device to realize, they can concentrate on single calculating device, or be distributed in multiple calculating device and formed Network on, alternatively, they can realize, it is thus possible to by them with calculating the executable program code of device Storage is performed by calculating device in the storage device, and in some cases, can hold with the order being different from herein Step shown or described by row, or they are fabricated to respectively each integrated circuit modules, or by many in them Individual module or step are fabricated to single integrated circuit module and realize.So, the present invention is not restricted to any specific hardware Combine with software.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for the technology of this area For personnel, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, that is made is any Amendment, equivalent, improvement etc., should be included within the scope of the present invention.

Claims (10)

1. a data query method, it is characterised in that including:
Receive the first data inquiry request that terminal sends;
Obtaining unique mark of described first data inquiry request, wherein, described unique mark carries described terminal Information;
The second data inquiry request is generated according to described unique mark and described first data inquiry request;
Inquiry is performed, to obtain Query Result according to described second data inquiry request;And
Described Query Result is sent to described terminal.
Method the most according to claim 1, it is characterised in that obtain unique mark of described first data inquiry request Including:
Determine the type of described terminal;
Determine the ID of described terminal;
Determine the ID of the object of described first data inquiry request requesting query;And
The ID of the object of type, the ID of described terminal and described requesting query according to described terminal generates described Unique mark of the first data inquiry request.
Method the most according to claim 2, it is characterised in that according to type, the ID of described terminal of described terminal And the ID of the object of described requesting query generates unique mark of described first data inquiry request and includes:
Obtaining the first character, wherein, described first character is that described first data inquiry request maps in adaptation layer The type of described terminal;
Obtaining the second character, wherein, described second character is that described first data inquiry request reflects in described adaptation layer The ID of the terminal penetrated;
Obtaining the 3rd character, wherein, described 3rd character is that described first data inquiry request reflects in described adaptation layer The ID of the object of the requesting query penetrated;And
Described first character, described second character and described 3rd character generate a character string according to preset rules, And described character string is identified as the unique of described first data inquiry request.
Method the most according to claim 1, it is characterised in that
Before performing inquiry according to described second data inquiry request, described method also includes: with described unique mark Knowing is keyword, caches described first data inquiry request,
After by described Query Result transmission to described terminal, described method also includes: delete the first number of caching According to inquiry request.
Method the most according to claim 4, it is characterised in that
While performing inquiry according to described second data inquiry request, described method also includes: start intervalometer, Wherein, described intervalometer is for specifying the response waiting time of described second data inquiry request, and equity is to be answered The time of described second data inquiry request carries out record,
Wherein, if not getting described Query Result within the described response waiting time, then described caching is deleted The first data inquiry request,
Being sent while described terminal by described Query Result, described method also includes: stop described intervalometer.
Method the most according to claim 4, it is characterised in that perform inquiry according to described second data inquiry request, Include with acquisition Query Result:
Obtain the response message of described second data inquiry request;
Described response message is resolved, to obtain the described unique mark carried in described response message;
Obtain the first data inquiry request that described unique mark is corresponding;And
Described first data inquiry request and described response message are packaged, to obtain described Query Result,
Wherein, according to described unique mark, described Query Result is sent to described terminal.
7. a data query arrangement, it is characterised in that including:
Receive unit, for receiving the first data inquiry request that terminal sends;
Acquiring unit, for obtaining unique mark of described first data inquiry request, wherein, described unique mark Carry the information of described terminal;
Signal generating unit, for generating the second data query according to described unique mark and described first data inquiry request Request;
Query unit, for performing inquiry according to described second data inquiry request, to obtain Query Result;And
Transmitting element, for sending described Query Result to described terminal.
Device the most according to claim 7, it is characterised in that described acquiring unit includes:
First determines module, for determining the type of described terminal;
Second determines module, for determining the ID of described terminal;
3rd determines module, for determining the ID of the object of described first data inquiry request requesting query;And
Generation module, is used for the right of type, the ID of described terminal and described requesting query according to described terminal The ID of elephant generates unique mark of described first data inquiry request.
Device the most according to claim 8, it is characterised in that described generation module includes:
First obtains submodule, and for obtaining the first character, wherein, described first character is that described first data are looked into Ask the type of the described terminal that request maps in adaptation layer;
Second obtains submodule, and for obtaining the second character, wherein, described second character is that described first data are looked into The ID of the terminal that the request of inquiry maps in described adaptation layer;
3rd obtains submodule, and for obtaining the 3rd character, wherein, described 3rd character is that described first data are looked into Ask the ID of the object of the requesting query that request maps in described adaptation layer;And
Generate submodule, for described first character, described second character and described 3rd character according to preset rules Generate a character string, and described character string is identified as the unique of described first data inquiry request.
Device the most according to claim 7, it is characterised in that described device also includes:
Buffer unit, for being uniquely designated keyword with described, caches described first data inquiry request;And
Delete unit, for deleting the first data inquiry request of caching.
CN201510379816.4A 2015-07-01 2015-07-01 Data query method and device Withdrawn CN106326296A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510379816.4A CN106326296A (en) 2015-07-01 2015-07-01 Data query method and device
PCT/CN2016/070432 WO2017000540A1 (en) 2015-07-01 2016-01-07 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510379816.4A CN106326296A (en) 2015-07-01 2015-07-01 Data query method and device

Publications (1)

Publication Number Publication Date
CN106326296A true CN106326296A (en) 2017-01-11

Family

ID=57607913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510379816.4A Withdrawn CN106326296A (en) 2015-07-01 2015-07-01 Data query method and device

Country Status (2)

Country Link
CN (1) CN106326296A (en)
WO (1) WO2017000540A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273545A (en) * 2017-07-11 2017-10-20 王焱华 A kind of big data querying method
CN108093026A (en) * 2017-11-17 2018-05-29 阿里巴巴集团控股有限公司 The processing method and processing device of multi-tenant request

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488515A (en) * 2019-01-25 2020-08-04 华为技术有限公司 Information query method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030200282A1 (en) * 2002-04-18 2003-10-23 International Business Machines Corporation Optimization of database network traffic based upon data-use analysis
CN1941787A (en) * 2005-09-30 2007-04-04 乐金电子(昆山)电脑有限公司 Method for setting tag in A/V network apparatus
CN101082924A (en) * 2007-06-04 2007-12-05 徐恩麒 Hotel interactive system
CN103914520A (en) * 2014-03-18 2014-07-09 小米科技有限责任公司 Data query method, terminal equipment and server
CN104283843A (en) * 2013-07-02 2015-01-14 腾讯科技(深圳)有限公司 User login method, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8762153B2 (en) * 2008-08-18 2014-06-24 At&T Intellectual Property I, L.P. System and method for improving name dialer performance
CN101730069B (en) * 2008-10-31 2012-06-27 中国移动通信集团天津有限公司 Method, system and device for querying HLR user data
CN103685267B (en) * 2013-12-10 2017-04-12 小米科技有限责任公司 Data access method and device
CN104243565B (en) * 2014-09-04 2018-02-06 华为软件技术有限公司 The method and apparatus for obtaining configuration data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030200282A1 (en) * 2002-04-18 2003-10-23 International Business Machines Corporation Optimization of database network traffic based upon data-use analysis
CN1941787A (en) * 2005-09-30 2007-04-04 乐金电子(昆山)电脑有限公司 Method for setting tag in A/V network apparatus
CN101082924A (en) * 2007-06-04 2007-12-05 徐恩麒 Hotel interactive system
CN104283843A (en) * 2013-07-02 2015-01-14 腾讯科技(深圳)有限公司 User login method, device and system
CN103914520A (en) * 2014-03-18 2014-07-09 小米科技有限责任公司 Data query method, terminal equipment and server

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273545A (en) * 2017-07-11 2017-10-20 王焱华 A kind of big data querying method
CN108093026A (en) * 2017-11-17 2018-05-29 阿里巴巴集团控股有限公司 The processing method and processing device of multi-tenant request
WO2019095862A1 (en) * 2017-11-17 2019-05-23 阿里巴巴集团控股有限公司 Method and device for handling multi-subscriber request
TWI688247B (en) * 2017-11-17 2020-03-11 香港商阿里巴巴集團服務有限公司 Multi-tenant request processing method and device
CN108093026B (en) * 2017-11-17 2020-04-07 阿里巴巴集团控股有限公司 Method and device for processing multi-tenant request
US11115376B2 (en) 2017-11-17 2021-09-07 Advanced New Technologies Co., Ltd. Method and device for handling multi-tenant request

Also Published As

Publication number Publication date
WO2017000540A1 (en) 2017-01-05

Similar Documents

Publication Publication Date Title
CN105812351B (en) Realize the shared method and system of session
CN104125208B (en) Data transmission method and device
CN103780679B (en) Long delay remote invocation method based on http protocol
CN111416723B (en) Equipment management method and related equipment
CN105704246A (en) Network distribution device and method based on SDN architecture
CN109923847A (en) Call discovery method, apparatus, equipment and the storage medium of link
CN105228140A (en) A kind of data access method and device
CN104378452A (en) Method, device and system for domain name resolution
CN105592163B (en) A kind of communication means and system
CN108093026A (en) The processing method and processing device of multi-tenant request
CN108282508A (en) Determination method and device, information-pushing method and the device in geographical location
CN104618388B (en) Fast registration login method and corresponding resetting server, information server
CN106357539A (en) Data acquisition method and equipment
CN104144223B (en) A kind of data capture method and device
KR20210043865A (en) NGSI-LD API Wrapping Method
CN107612833A (en) A kind of URI method for routing and relevant apparatus based on storage system
CN106899621B (en) A kind of scheduling system and method
CN107665237A (en) Data structure sorter, the distribution subscription system of unstructured data and method
JP4009591B2 (en) Domain naming system (DNS) for accessing databases
CN107547346A (en) A kind of message transmitting method and device
CN106326296A (en) Data query method and device
CN105227386B (en) For dividing the method, apparatus and system of population statistics online user number
CN111431818A (en) Cross-domain request traffic distribution method and device, storage medium and computer equipment
CN110008211A (en) Data query method, apparatus, electronic equipment and storage medium
CN109413224A (en) Message forwarding 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20170111

WW01 Invention patent application withdrawn after publication