CN105701111A - Data query method and apparatus - Google Patents

Data query method and apparatus Download PDF

Info

Publication number
CN105701111A
CN105701111A CN201410706125.6A CN201410706125A CN105701111A CN 105701111 A CN105701111 A CN 105701111A CN 201410706125 A CN201410706125 A CN 201410706125A CN 105701111 A CN105701111 A CN 105701111A
Authority
CN
China
Prior art keywords
keyword
checked
query result
service unit
data base
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
CN201410706125.6A
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 CN201410706125.6A priority Critical patent/CN105701111A/en
Priority to PCT/CN2015/076790 priority patent/WO2016082432A1/en
Publication of CN105701111A publication Critical patent/CN105701111A/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

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)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a data query method and apparatus. The method comprises the steps that each functional unit sends a to-be-queried keyword to a unified service unit via each corresponding client unit; and the service unit acquires a query result from a database by using the received to-be-queried keyword, and if the query result displays a query failure, the service unit acquires a query result from the database by using the keyword with the query failure according to a preset re-query cycle. By means of the technical scheme provided by the present invention, a re-query is performed by the service unit, which shortens a query path of the re-query and thus improves query efficiency of the re-query.

Description

A kind of method and apparatus inquiring about data
Technical field
The present invention relates to the database technology in the communications field, espespecially a kind of method and apparatus inquiring about data。
Background technology
In the various such as computer network facilities of the equipment for communicating, being frequently encountered by equipment two or more functional units all needs the situation from data base querying data。Wherein, functional unit is used for realizing specific transactions function, for instance be used for realizing two-way converting detection (BFD) function。At present, the method inquiring about data includes: each functional unit sends keyword to be checked via corresponding each customer unit to corresponding each service unit respectively;Service unit forwards the keyword to be checked that receives to data base;Database root is inquired about according to the keyword to be checked received, and Query Result is returned to service unit;The Query Result received is returned to the customer unit of correspondence by service unit;Customer unit determines whether successful inquiring according to the Query Result received, if successful inquiring, keyword of looking in Query Result is returned to the functional unit of correspondence, if inquiring about unsuccessfully, customer unit sends the keyword to be checked inquired about unsuccessfully according to the polling cycle again pre-set to service unit, to realize regularly again inquiring about keyword to be checked unsuccessfully。
In the method for current inquiry data, if inquiring about unsuccessfully, customer unit is regularly inquired about again, on the one hand, query path owing to again inquiring about is: customer unit is via corresponding service unit to data base, therefore the query path again inquired about is longer, and required query time is longer, so that again inquires about is inefficient;On the other hand, owing to similar query function again needs to realize in each customer unit, which increase and realize resource。
Summary of the invention
In order to solve above-mentioned technical problem, the invention provides a kind of inquiry data method and device, it is possible to shorten the query path again inquired about, thus improving the search efficiency again inquired about。
In order to reach the object of the invention, the invention discloses a kind of method inquiring about data, including:
Each functional unit sends keyword to be checked via corresponding each customer unit to unified service unit respectively;
Service unit adopts the keyword to be checked received to obtain Query Result from data base, if Query Result display is inquired about unsuccessfully, service unit adopts the failed keyword of inquiry to obtain Query Result from data base according to the polling cycle again pre-set。
Described service unit employing keyword to be checked obtains Query Result from data base and includes:
Described service unit forwards the keyword to be checked that receives to described data base;
Described database root is inquired about according to the keyword to be checked received, and Query Result returns to described service unit。
If described Query Result display successful inquiring, the method also includes: the keyword of looking in described Query Result is sent to described functional unit via described customer unit by described service unit。
If described Query Result display successful inquiring, the method also includes: described service unit preserves the corresponding relation looked between keyword in described keyword to be checked and described Query Result。
When obtaining for notifying the message again inquired about, the method also includes:
Described service unit determines whether there is, according to the corresponding relation preserved, the keyword described to be checked needing again to inquire about, if it does, adopt the keyword to be checked determined to obtain described Query Result from described data base。
When looking into keyword described in described message includes, described determining whether there is includes: according in described message look into keyword and described corresponding relation determines whether there is the keyword to be checked of correspondence, if it does, the keyword to be checked determined is the keyword to be checked needing again to inquire about。
When described message includes described keyword to be checked, described in determine whether there is and comprise determining that the keyword to be checked whether existing in described message in described corresponding relation, if it does, the keyword to be checked determined is the keyword to be checked needing again to inquire about。
The invention also discloses a kind of device inquiring about data, including one or more functional units and functional unit customer unit one to one, a service unit and a data base, wherein,
Functional unit, for sending keyword to be checked via corresponding customer unit to service unit;
Customer unit, for the information between forward functionality and service unit;
Service unit, for forwarding from the keyword to be checked of client to described data base;When inquiring about unsuccessfully from the Query Result display of data base, the failed keyword of inquiry is adopted to obtain Query Result from data base according to the polling cycle again pre-set;
Data base, inquires about according to the keyword to be checked from service unit, and Query Result returns to described service unit。
Described service unit is additionally operable to: when described Query Result shows successful inquiring, via described customer unit, the keyword of looking in described Query Result is sent to described functional unit。
Described service unit is additionally operable to: when described Query Result shows successful inquiring, preserve the corresponding relation looking between keyword in described keyword to be checked and described Query Result。
When obtaining for notifying the message again inquired about, described service unit is additionally operable to: the corresponding relation according to preserving determines whether there is the keyword described to be checked needing again to inquire about, when determine exist time, adopt the keyword to be checked determined to obtain described Query Result from described data base。
Looked into keyword described in including when described message, and when obtaining described message, described service unit specifically for:
According in described message look into keyword and described corresponding relation determines whether there is the keyword to be checked of correspondence, when determine exist time, adopt the keyword to be checked determined to obtain described Query Result from described data base。
When described message includes described keyword to be checked, and when obtaining described message, described service unit specifically for:
Determine the keyword to be checked whether existing in described message in described corresponding relation, when determine exist time, adopt the keyword to be checked determined to obtain described Query Result from described data base。
Compared with prior art, technical solution of the present invention includes: each functional unit sends keyword to be checked via corresponding each customer unit to unified service unit respectively;Service unit adopts the keyword to be checked received to obtain Query Result from data base, if Query Result display is inquired about unsuccessfully, service unit adopts the failed keyword of inquiry to obtain Query Result from data base according to the polling cycle again pre-set。Pass through technical solution of the present invention, it is achieved that again inquired about by service unit, on the one hand, the query path owing to again inquiring about is: service unit is to data base, and the query path therefore again inquired about is shorter, thus improve the search efficiency again inquired about;On the other hand, owing to achieving query function again in service unit, it is to avoid each client repeats to realize similar query function again, realizes resource thus saving。
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from description, or understand by implementing the present invention。The purpose of the present invention and other advantages can be realized by structure specifically noted in description, claims and accompanying drawing and be obtained。
Accompanying drawing explanation
Accompanying drawing is for providing being further appreciated by technical solution of the present invention, and constitutes a part for description, is used for explaining technical scheme, is not intended that the restriction to technical solution of the present invention together with embodiments herein。
Fig. 1 is the flow chart that the present invention inquires about the method for data;
Fig. 2 is the composition structural representation that the present invention inquires about the device of data。
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with accompanying drawing, embodiments of the invention are described in detail。It should be noted that when not conflicting, the embodiment in the application and the feature in embodiment can combination in any mutually。
Can perform in the computer system of such as one group of computer executable instructions in the step shown in the flow chart of accompanying drawing。And, although illustrate logical order in flow charts, but in some cases, it is possible to perform shown or described step with the order being different from herein。
Fig. 1 is the flow chart that the present invention inquires about the method for data, as it is shown in figure 1, include:
Step 101: each functional unit sends keyword to be checked via corresponding each customer unit to unified service unit respectively。
Wherein, implementing of step 101, belong to the conventional techniques means of those skilled in the art, be not intended to limit the scope of the invention, repeat no more herein。
This point it is emphasized that, each functional unit sends keyword to be checked via corresponding each customer unit to a unified service unit respectively。
Step 102: service unit adopts the keyword to be checked received to obtain Query Result from data base, if Query Result display is inquired about unsuccessfully, service unit adopts the failed keyword of inquiry to obtain Query Result from data base according to the polling cycle again pre-set。
Wherein, service unit adopts keyword to be checked to obtain Query Result from data base and include: service unit forwards the keyword to be checked that receives to data base;Database root is inquired about according to the keyword to be checked received, and Query Result is returned to service unit。
Wherein, what data base carried out inquiring about implements, and belongs to the conventional techniques means of those skilled in the art, is not intended to limit the scope of the invention, repeats no more herein。
Polling cycle again in step 102 can be minute level time, such as 1 minute, 5 minutes or 10 minutes etc.。
Further,
If Query Result display successful inquiring, the inventive method also includes: the keyword of looking in Query Result is sent to functional unit via customer unit by service unit。
Further,
If Query Result display successful inquiring, the inventive method also includes: service unit preserves the corresponding relation looked between keyword in keyword to be checked and Query Result。
Correspondingly,
When obtaining for notifying the message again inquired about, the inventive method also includes: service unit determines whether there is, according to the corresponding relation preserved, the keyword to be checked needing again to inquire about, if it does, adopt the keyword to be checked determined to obtain Query Result from data base;If it does not, terminate。
When message includes looking into keyword, above-mentioned determining whether there is includes: according in message look into keyword and corresponding relation determines whether there is the keyword to be checked of correspondence, if it does, the keyword to be checked determined is the keyword to be checked needing again to inquire about。
When message includes keyword to be checked, above-mentioned determining whether there is comprises determining that the keyword to be checked whether deposited in corresponding relation in the message, if it does, the keyword to be checked determined is the keyword to be checked needing again to inquire about。
Fig. 2 is the device that the present invention inquires about data, such as Fig. 2, including one or more functional units and functional unit customer unit one to one, a service unit and a data base, wherein,
Functional unit, for sending keyword to be checked via corresponding customer unit to service unit。
Customer unit, for the information between forward functionality and service unit。
Service unit, for forwarding from the keyword to be checked of client to data base;When inquiring about unsuccessfully from the Query Result display of data base, the failed keyword of inquiry is adopted to obtain Query Result from data base according to the polling cycle again pre-set。
Data base, inquires about according to the keyword to be checked from service unit, and Query Result is returned to service unit。
Further,
Service unit is additionally operable to: when Query Result shows successful inquiring, via customer unit, the keyword of looking in Query Result is sent to functional unit。
Further,
Service unit is additionally operable to: when Query Result shows successful inquiring, preserve the corresponding relation looking between keyword in keyword to be checked and Query Result。
Further,
When obtaining for notifying the message again inquired about, service unit is additionally operable to: the corresponding relation according to preserving determines whether there is the keyword to be checked needing again to inquire about, when determine exist time, adopt the keyword to be checked determined to obtain Query Result from data base。
When message includes looking into keyword, and when obtaining message, service unit specifically for: according in message look into keyword and corresponding relation determines whether there is the keyword to be checked of correspondence, when determine exist time, adopt the keyword to be checked determined to obtain Query Result from data base。
When message includes keyword to be checked, and when obtaining message, service unit specifically for: determine the keyword to be checked whether deposited in corresponding relation in the message, when determine exist time, adopt the keyword to be checked determined to obtain Query Result from data base。
Although the embodiment that disclosed herein as it has been described above, but described content is only the embodiment readily appreciating the present invention and adopt, be not limited to the present invention。Technical staff in any art of the present invention; under the premise without departing from the spirit and scope that disclosed herein; any amendment and change can be carried out in the form implemented and details, but the scope of patent protection of the present invention, still must be as the criterion with the scope that appending claims defines。

Claims (13)

1. the method inquiring about data, it is characterised in that including:
Each functional unit sends keyword to be checked via corresponding each customer unit to unified service unit respectively;
Service unit adopts the keyword to be checked received to obtain Query Result from data base, if Query Result display is inquired about unsuccessfully, service unit adopts the failed keyword of inquiry to obtain Query Result from data base according to the polling cycle again pre-set。
2. method according to claim 1, it is characterised in that described service unit employing keyword to be checked obtains Query Result from data base and includes:
Described service unit forwards the keyword to be checked that receives to described data base;
Described database root is inquired about according to the keyword to be checked received, and Query Result returns to described service unit。
3. method according to claim 1, it is characterised in that if described Query Result display successful inquiring, the method also includes: the keyword of looking in described Query Result is sent to described functional unit via described customer unit by described service unit。
4. method according to claim 3, it is characterised in that if described Query Result display successful inquiring, the method also includes: described service unit preserves the corresponding relation looked between keyword in described keyword to be checked and described Query Result。
5. method according to claim 4, it is characterised in that when obtaining for notifying the message again inquired about, the method also includes:
Described service unit determines whether there is, according to the corresponding relation preserved, the keyword described to be checked needing again to inquire about, if it does, adopt the keyword to be checked determined to obtain described Query Result from described data base。
6. method according to claim 5, it is characterised in that described message include described in looked into keyword;Described determining whether there is includes: according in described message look into keyword and described corresponding relation determines whether there is the keyword to be checked of correspondence, if it does, the keyword to be checked determined is the keyword to be checked needing again to inquire about。
7. method according to claim 5, it is characterised in that described message includes described keyword to be checked;Described determining whether there is comprises determining that the keyword to be checked whether existing in described message in described corresponding relation, if it does, the keyword to be checked determined is the keyword to be checked needing again to inquire about。
8. the device inquiring about data, it is characterised in that include one or more functional units and functional unit customer unit one to one, a service unit and a data base, wherein,
Functional unit, for sending keyword to be checked via corresponding customer unit to service unit;
Customer unit, for the information between forward functionality and service unit;
Service unit, for forwarding from the keyword to be checked of client to described data base;When inquiring about unsuccessfully from the Query Result display of data base, the failed keyword of inquiry is adopted to obtain Query Result from data base according to the polling cycle again pre-set;
Data base, inquires about according to the keyword to be checked from service unit, and Query Result returns to described service unit。
9. device according to claim 8, it is characterised in that described service unit is additionally operable to: when described Query Result shows successful inquiring, the keyword of looking in described Query Result is sent to described functional unit via described customer unit。
10. device according to claim 8, it is characterised in that described service unit is additionally operable to: when described Query Result shows successful inquiring, preserve the corresponding relation looking between keyword in described keyword to be checked and described Query Result。
11. device according to claim 10, it is characterized in that, when obtaining for notifying the message again inquired about, described service unit is additionally operable to: the corresponding relation according to preserving determines whether there is the keyword described to be checked needing again to inquire about, when determine exist time, adopt the keyword to be checked determined to obtain described Query Result from described data base。
12. device according to claim 11, it is characterised in that described message include described in looked into keyword;When obtain described message time, described service unit specifically for:
According in described message look into keyword and described corresponding relation determines whether there is the keyword to be checked of correspondence, when determine exist time, adopt the keyword to be checked determined to obtain described Query Result from described data base。
13. device according to claim 11, it is characterised in that described message includes described keyword to be checked;When obtain described message time, described service unit specifically for:
Determine the keyword to be checked whether existing in described message in described corresponding relation, when determine exist time, adopt the keyword to be checked determined to obtain described Query Result from described data base。
CN201410706125.6A 2014-11-27 2014-11-27 Data query method and apparatus Withdrawn CN105701111A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410706125.6A CN105701111A (en) 2014-11-27 2014-11-27 Data query method and apparatus
PCT/CN2015/076790 WO2016082432A1 (en) 2014-11-27 2015-04-16 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410706125.6A CN105701111A (en) 2014-11-27 2014-11-27 Data query method and apparatus

Publications (1)

Publication Number Publication Date
CN105701111A true CN105701111A (en) 2016-06-22

Family

ID=56073470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410706125.6A Withdrawn CN105701111A (en) 2014-11-27 2014-11-27 Data query method and apparatus

Country Status (2)

Country Link
CN (1) CN105701111A (en)
WO (1) WO2016082432A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825505B (en) * 2019-10-29 2024-03-29 深圳前海环融联易信息科技服务有限公司 Task scheduling method, device, computer equipment and storage medium
CN112115227A (en) * 2020-08-14 2020-12-22 咪咕文化科技有限公司 Data query method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060031186A1 (en) * 2003-08-06 2006-02-09 Canon Kabushiki Kaisha Information processing method, information processing program, and information processing apparatus
CN102625486A (en) * 2012-04-16 2012-08-01 中国科学院声学研究所 Agent node and sensor network
CN103139270A (en) * 2011-12-01 2013-06-05 上海博腾信息科技有限公司 Cloud computing application system
CN103795763A (en) * 2012-11-02 2014-05-14 中兴通讯股份有限公司 Method for providing unified services and unified service platform in ubiquitous network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888416B (en) * 2010-07-20 2014-10-29 中兴通讯股份有限公司 Multi-platform application fused release platform and application downloading method
CN103745321A (en) * 2014-01-21 2014-04-23 王水洋 Cross-platform management system and method of realizing cross management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060031186A1 (en) * 2003-08-06 2006-02-09 Canon Kabushiki Kaisha Information processing method, information processing program, and information processing apparatus
CN103139270A (en) * 2011-12-01 2013-06-05 上海博腾信息科技有限公司 Cloud computing application system
CN102625486A (en) * 2012-04-16 2012-08-01 中国科学院声学研究所 Agent node and sensor network
CN103795763A (en) * 2012-11-02 2014-05-14 中兴通讯股份有限公司 Method for providing unified services and unified service platform in ubiquitous network

Also Published As

Publication number Publication date
WO2016082432A1 (en) 2016-06-02

Similar Documents

Publication Publication Date Title
CN105227341A (en) For the system and method by content center network management devices
CN103873505B (en) Method, system and the device uploaded offline to cloud storage service device
US20160012150A1 (en) System and method for main distribution network graph/model/data integration based on remote access and information interaction
CN107979635A (en) System, method and storage medium based on micro services
CN107959715B (en) Remote terminal information identification software method based on wireless telecommunications
CN104486411A (en) Recommended method and cloud server
CN103905495A (en) Application synchronization method and backstage server
CN103491156A (en) Method and system for enabling circles and groups to be synchronous based on converged communication
CN104144223B (en) A kind of data capture method and device
CN103003809B (en) For equipment and the method and system of managing remote subscriber interface
CN105100002A (en) Attribute operation method and device
CN105701111A (en) Data query method and apparatus
CN108011870B (en) A kind of remote software online upgrading information automatic identification management method
CN105337850A (en) Internet of Things data processing method and internet of Things gateway
CN106980697A (en) A kind of catalogue distribution querying method and device
CN106815334A (en) A kind of data query method and device for terminal
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server
CN107193654B (en) Resource operation method and device of distributed system and distributed system
CN103312816B (en) A kind of message distributing method and equipment
CN107273047A (en) A kind of buffer memory management method, cache manager and storage management software
CN105376147B (en) Instant communication information route addressing method, access server and system
CN105099939A (en) Method and device for implementing flow control among different data centers
CN103795810A (en) Data distribution system and method and central server of data distribution system
JP2015028764A (en) Method and apparatus for integrating data from various network nodes using template stack
CN106407452A (en) Method and device for server data access

Legal Events

Date Code Title Description
C06 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: 20160622

WW01 Invention patent application withdrawn after publication