CN107194014A - Data source call method and device - Google Patents

Data source call method and device Download PDF

Info

Publication number
CN107194014A
CN107194014A CN201710538674.0A CN201710538674A CN107194014A CN 107194014 A CN107194014 A CN 107194014A CN 201710538674 A CN201710538674 A CN 201710538674A CN 107194014 A CN107194014 A CN 107194014A
Authority
CN
China
Prior art keywords
data source
module
calling
key message
target data
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
CN201710538674.0A
Other languages
Chinese (zh)
Other versions
CN107194014B (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.)
Guizhou Data Network Technology Co Ltd
Original Assignee
Guizhou Data Network 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 Guizhou Data Network Technology Co Ltd filed Critical Guizhou Data Network Technology Co Ltd
Priority to CN201710538674.0A priority Critical patent/CN107194014B/en
Publication of CN107194014A publication Critical patent/CN107194014A/en
Application granted granted Critical
Publication of CN107194014B publication Critical patent/CN107194014B/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/25Integrating or interfacing systems involving database management systems

Abstract

Called the embodiment of the invention discloses a kind of data source and device, be related to areas of information technology, can solve the problem that call data source complexity it is higher the problem of.The method of the present invention includes:Based on standard interface, input parameter is received;Call the corresponding target data source of the input parameter;Computing is carried out to the input parameter according to the target data source, output result is obtained.The embodiment of the present invention can reduce the complexity for calling data source.

Description

Data source call method and device
Technical field
The present invention relates to areas of information technology, more particularly to a kind of data source call method and device.
Background technology
With the development of information technology, service application is information-based to propose higher and higher want to gathering a large amount of real time datas Ask.In order to preferably play real time data center effect, it is necessary to a large amount of multi-data sources produced during by operation of power networks it is real-time The corresponding real-time data base in data access real time data center.
At present, when receiving data, every kind of data source is required for corresponding data-interface, due to interface implemer, source System manufacturer etc. is all different, causes to call the complexity of data source higher.
The content of the invention
Embodiments of the invention provide a kind of data source call method and device, can solve the problem that the complexity for calling data source Higher the problem of.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
In a first aspect, embodiments of the invention provide a kind of data source call method, including:
Based on standard interface, input parameter is received;
Call the corresponding target data source of the input parameter;
Computing is carried out to the input parameter according to the target data source, output result is obtained.
It is described to call the input parameter with reference in a first aspect, in the first possible implementation of first aspect Corresponding target data source, including:
Extract the key message in the input parameter;
According to the key message, the corresponding target data source is called.
With reference to the first possible implementation of first aspect, in second of possible implementation of first aspect In, it is described according to the key message, before calling the corresponding target data source, in addition to:
The corresponding relation set up between each key message and each data source;
Store the corresponding relation between each key message and each data source.
With reference in a first aspect, in the third possible implementation of first aspect, methods described also includes:
When never call is to the target data source, preliminary data source is called.
With reference in a first aspect, in the 4th kind of possible implementation of first aspect, methods described also includes:
When the target data source abnormal state called, preliminary data source is called.
Second aspect, embodiments of the invention provide a kind of data source calling device, including:
Receiving module, for based on standard interface, receiving input parameter;
First calling module, for the corresponding target data source of the input parameter for calling the receiving module to receive;
Computing module, the target data source for being called according to first calling module is entered to the input parameter Row computing, obtains output result.
With reference to second aspect, in the first possible implementation of second aspect, first calling module includes: Extracting sub-module, call submodule;
The extracting sub-module, for extracting the key message in the input parameter;
It is described to call submodule, for according to the key message, calling the corresponding target data source.
With reference to the first possible implementation of second aspect, in second of possible implementation of second aspect In, described device also includes:Set up module, memory module;
It is described to set up module, for setting up the corresponding relation between each key message and each data source;
The memory module, for store each key message and each data source for setting up module foundation it Between corresponding relation.
With reference to second aspect, in the third possible implementation of second aspect, described device also includes:Second adjusts Use module;
Second calling module, for when never call is to the target data source, calling preliminary data source.
With reference to second aspect, in the 4th kind of possible implementation of second aspect, described device also includes:3rd adjusts Use module;
3rd calling module, for when the target data source abnormal state called, calling preliminary data Source.
Data source call method and device provided in an embodiment of the present invention, by being primarily based on standard interface, are received defeated Enter parameter, then call the corresponding target data source of the input parameter;Finally according to the target data source to the input Parameter carries out computing, obtains output result.It can realize by the unified variant data source of standardized data interface interchange, from And the complexity for calling data source can be reduced.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below by using required in embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached Figure.
Fig. 1 is the schematic flow sheet of the data source call method of the embodiment of the present invention;
Fig. 2A is another schematic flow sheet of the data source call method of the embodiment of the present invention;
Fig. 2 B are a result schematic diagrams of the data source call method of the embodiment of the present invention;
Fig. 3 is the data source calling device structural representation of the embodiment of the present invention;
Fig. 4 is the structural representation of the first calling module 32 of the embodiment of the present invention;
Fig. 5 is another structural representation of the data source calling device of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is all other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
One embodiment of the invention provides a kind of data source call method, as shown in figure 1, methods described includes:
101st, based on standard interface, input parameter is received.
Wherein, standard interface can receive the different data sources of same type.For example, Beijing's ID card No. data Source, Shanghai City ID card No. data source, national male's ID card No. data source etc. are the different data sources of same type.
102nd, the corresponding target data source of input parameter is called.
For the embodiment of the present invention, corresponding target data source can be called by the type of input parameter, can also led to Cross the key message carried in input parameter and call corresponding target data source, the embodiment of the present invention is not limited.
Wherein, corresponding target data source is called for the key message by being carried in input parameter, can used as follows Algorithm is implemented:
Assuming that carrying M key message in input parameter, the weight of each key message is Wi(1≤i≤M)。WiCan be with Given a mark or determined according to analytic hierarchy process (AHP) by user according to the difference of key message type.Assuming that any one data source and i-th The matching degree of individual key message is Ui, then UiValue be 0 or 1:
Calculate each data source corresponding
ObtainThe corresponding data sources of the J are target data source.
The target data source maximum with key information match degree can be selected according to above method, to greatest extent with user Desired data source matching.
103rd, computing is carried out to input parameter according to target data source, obtains output result.
For example, when input parameter is name and ID card No., province according to where the ID card No. calls it After ID card No. data source, the corresponding name letter of the ID card No. is searched in the ID card No. data source in the province Breath, so as to judge whether the name in input parameter is correct, and obtains corresponding output result.
Compared with prior art, it can realize by the unified variant data source of standardized data interface interchange, so that The complexity for calling data source can be reduced.
Further embodiment of this invention provides a kind of data source call method, and as shown in Figure 2 A, methods described includes:
201st, the corresponding relation set up between each key message and each data source.
Wherein, different key messages correspond to different data sources respectively.For example, for ID card No. data source, working as key Information be ID card No. front two be " 11 " when, its correspondence Beijing's ID card No. data source;When key message is identity When demonstrate,proving number front two for " 61 ", its correspondence Shaanxi Province's ID card No. data source.
202nd, the corresponding relation between each key message and each data source is stored.
203rd, based on standard interface, input parameter is received.
Wherein, standard interface can receive the different data sources of same type.For example, Beijing's ID card No. data Source, Shanghai City ID card No. data source, national male's ID card No. data source etc. are the different data sources of same type.
204th, the key message in input parameter is extracted.
Wherein, key message is used to determine corresponding data source.For example, for ID card No., key message can 2 are thought before ID card No., so as to call its corresponding province ID card No. data source;Key message can also be ID card No. 7-10, so as to call the province of its year of birth to demonstrate,prove number data source.
205th, the key message in input parameter, calls corresponding target data source.
For the embodiment of the present invention, when never call is to target data source, preliminary data source is called.In the embodiment of the present invention In, by calling preliminary data source when calling data source to fail, the coverage of data source, and fully profit can be effectively improved With the information of each data source.
For the embodiment of the present invention, when the target data source abnormal state called, preliminary data source is called.In this hair In bright embodiment, by calling preliminary data source when target data source is in abnormality, system can be effectively improved stable Property.
Wherein, preliminary data source, preliminary data source and target data source are called when target data source is in abnormality Between have certain deviation, not fully unanimously.In order to ensure between the preliminary data source finally called and target data source Deviation is smaller, from other all optional preliminary data sources in addition to target data source, can be selected using following algorithm More suitable preliminary data source is selected to call:
Assuming that there is M key message in input parameter, the weight of each key message is Wi (1≤i≤M).Wi can root Given a mark or determined according to analytic hierarchy process (AHP) by user according to the difference of key message type.Transfer each key message with it is each optional standby With the corresponding relation between data source;According to the corresponding relation, any one optional preliminary data source is calculated using such as minor function With the matching degree Ui of i-th of key message:
In formula, xi,0For the value of i-th of key message;xi,minBelong to same type with i-th of key message to be default The value lower limit of the key message of information;xi,maxFor the default crucial letter for belonging to same type information with i-th of key message The value upper limit of breath;xiIn the key message corresponding to preliminary data source currently calculating, optional, to be closed with i-th Key information belongs to the value of that key message of same type information.
In this function, for convenience of calculation, in advance to corresponding between each key message and each data source of above-mentioned storage Each key message assignment in relation, obtains the value of each key message in the corresponding relation.For example, first to correspondence pass All key messages in system, classify according to the implication expressed by key message, related between implication to be classified as a class;Again To each key message under same type, assignment is carried out according to assignment rule, assignment rule can be:According under same type Each key message implication, the corresponding basic meaning of setting the type;According to each key message under the type Similarity between implication and the basic meaning, is that each key message carries out assignment.It is exemplified below:Have in corresponding relation Five key messages " rock and roll ", " musical instrument ", " cuisines ", " dress ornaments ", wherein, between implication it is related be " rock and roll ", " musical instrument ", Three key messages can be classified as to a class, and be that the type sets a basic meaning as " music ";Under the type these three Similarity between the implication of key message and the basic meaning is different, wherein, the similarity of " rock and roll " is more than " musical instrument ", because This, when being entered as 80 to " rock and roll ", can be entered as 50, what kind of specific assignment rule is, can voluntarily be provided to " musical instrument ", All in the application protection domain.
Calculate each optional preliminary data source corresponding
ObtainThe corresponding optional preliminary data sources of the J are the standby number finally called According to source.
For example shown in Fig. 2 B, xi,0=5, xi,min=1, xi,maxWhen=9, if xi=6, then Ui=0.853553.
The preliminary data source more matched with key message can be selected according to above method, number of targets can not obtained In the case of according to source, the preliminary data source more matched with the desired data source of user is called out as far as possible, it is to avoid user Acquisition is used as reference less than any data source.
206th, computing is carried out to input parameter according to target data source, obtains output result.
For example, when input parameter is name and ID card No., province according to where the ID card No. calls it After ID card No. data source, the corresponding name letter of the ID card No. is searched in the ID card No. data source in the province Breath, so as to judge whether the name in input parameter is correct, and obtains corresponding output result.
Compared with prior art, it can realize by the unified variant data source of standardized data interface interchange, so that The complexity for calling data source can be reduced.
Further embodiment of this invention provides a kind of data source calling device, as shown in figure 3, described device includes:Receive mould Block 31, the first calling module 32, computing module 33.
Receiving module 31, for based on standard interface, receiving input parameter;
First calling module 32, for the corresponding target data of the input parameter for calling the receiving module 31 to receive Source;
Computing module 33, the target data source for being called according to first calling module 32 is joined to the input Number carries out computing, obtains output result.
Compared with prior art, it can realize by the unified variant data source of standardized data interface interchange, so that The complexity for calling data source can be reduced.
Further, as shown in figure 4, first calling module 32 includes:Extracting sub-module 3201, call submodule 3202。
Extracting sub-module 3201, for extracting the key message in the input parameter;
Submodule 3202 is called, for according to the key message, calling the corresponding target data source.
Further, as shown in figure 5, described device also includes:Set up module 51, memory module 52, the second calling module 53rd, the 3rd calling module 54.
Module 51 is set up, for setting up the corresponding relation between each key message and each data source;
Memory module 52, for store each key message and each data source for setting up the foundation of module 51 it Between corresponding relation.
Second calling module 53, for when never call is to the target data source, calling preliminary data source.
3rd calling module 54, for when the target data source abnormal state called, calling preliminary data source.
Compared with prior art, it can realize by the unified variant data source of standardized data interface interchange, so that The complexity for calling data source can be reduced.
Data source calling device provided in an embodiment of the present invention can realize the embodiment of the method for above-mentioned offer, concrete function The explanation referred in embodiment of the method is realized, be will not be repeated here.Data source call method provided in an embodiment of the present invention and Device goes for carrying out unified call to different data sources, but is not limited only to this.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for equipment Apply for example, because it is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to embodiment of the method Part explanation.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, the change or replacement that can be readily occurred in, all should It is included within the scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.

Claims (10)

1. a kind of data source call method, it is characterised in that including:
Based on standard interface, input parameter is received;
Call the corresponding target data source of the input parameter;
Computing is carried out to the input parameter according to the target data source, output result is obtained.
2. according to the method described in claim 1, it is characterised in that described to call the corresponding target data of the input parameter Source, including:
Extract the key message in the input parameter;
According to the key message, the corresponding target data source is called.
3. method according to claim 2, it is characterised in that described according to the key message, is called corresponding described Before target data source, in addition to:
The corresponding relation set up between each key message and each data source;
Store the corresponding relation between each key message and each data source.
4. according to the method described in claim 1, it is characterised in that methods described also includes:
When never call is to the target data source, preliminary data source is called.
5. according to the method described in claim 1, it is characterised in that methods described also includes:
When the target data source abnormal state called, preliminary data source is called.
6. a kind of data source calling device, it is characterised in that including:
Receiving module, for based on standard interface, receiving input parameter;
First calling module, for the corresponding target data source of the input parameter for calling the receiving module to receive;
Computing module, the target data source for being called according to first calling module is transported to the input parameter Calculate, obtain output result.
7. device according to claim 6, it is characterised in that first calling module includes:Extracting sub-module, call Submodule;
The extracting sub-module, for extracting the key message in the input parameter;
It is described to call submodule, for according to the key message, calling the corresponding target data source.
8. device according to claim 7, it is characterised in that described device also includes:Set up module, memory module;
It is described to set up module, for setting up the corresponding relation between each key message and each data source;
The memory module, for storing described set up between each key message and each data source of module foundation Corresponding relation.
9. device according to claim 6, it is characterised in that described device also includes:Second calling module;
Second calling module, for when never call is to the target data source, calling preliminary data source.
10. device according to claim 6, it is characterised in that described device also includes:3rd calling module;
3rd calling module, for when the target data source abnormal state called, calling preliminary data source.
CN201710538674.0A 2017-07-04 2017-07-04 Data source calling method and device Active CN107194014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710538674.0A CN107194014B (en) 2017-07-04 2017-07-04 Data source calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710538674.0A CN107194014B (en) 2017-07-04 2017-07-04 Data source calling method and device

Publications (2)

Publication Number Publication Date
CN107194014A true CN107194014A (en) 2017-09-22
CN107194014B CN107194014B (en) 2021-05-28

Family

ID=59880726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710538674.0A Active CN107194014B (en) 2017-07-04 2017-07-04 Data source calling method and device

Country Status (1)

Country Link
CN (1) CN107194014B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130086104A1 (en) * 2011-09-30 2013-04-04 Rick Morrison Systems and methods for generating schemas that represent multiple data sources
CN103279573A (en) * 2013-06-20 2013-09-04 天脉聚源(北京)传媒科技有限公司 Method and system for searching data
US20140214809A1 (en) * 2004-09-17 2014-07-31 First American Financial Corporation Method and system for query transformation for managing information from multiple datasets
CN104866383A (en) * 2015-05-29 2015-08-26 北京金山安全软件有限公司 Interface calling method and device and terminal
CN106649638A (en) * 2016-12-08 2017-05-10 贵州数据宝网络科技有限公司 Big data acquisition method
CN106649363A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 Data query method and device
CN106649488A (en) * 2016-09-30 2017-05-10 广东网金数据服务有限公司 Method and device for invoking multi-data-source interaction interface

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140214809A1 (en) * 2004-09-17 2014-07-31 First American Financial Corporation Method and system for query transformation for managing information from multiple datasets
US20130086104A1 (en) * 2011-09-30 2013-04-04 Rick Morrison Systems and methods for generating schemas that represent multiple data sources
US20150199389A1 (en) * 2011-09-30 2015-07-16 Comprehend Systems, Inc. Systems and methods for generating schemas that represent multiple data sources
CN103279573A (en) * 2013-06-20 2013-09-04 天脉聚源(北京)传媒科技有限公司 Method and system for searching data
CN104866383A (en) * 2015-05-29 2015-08-26 北京金山安全软件有限公司 Interface calling method and device and terminal
CN106649363A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 Data query method and device
CN106649488A (en) * 2016-09-30 2017-05-10 广东网金数据服务有限公司 Method and device for invoking multi-data-source interaction interface
CN106649638A (en) * 2016-12-08 2017-05-10 贵州数据宝网络科技有限公司 Big data acquisition method

Also Published As

Publication number Publication date
CN107194014B (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN107317672A (en) A kind of light weight terminating machine block catenary system
CN101650717B (en) Method and system for saving storage space of database
CN106878528A (en) A kind of disturbance incoming call SMS interception method and system based on block chain technology
CN101562609B (en) VPN network security loophole detection and global admittance controlling system
CN112270550A (en) New energy electric power source tracing method and system based on block chain
CN112463840B (en) Real-time business wind control system and method based on rule engine
CN106202028B (en) A kind of address information recognition methods and device
CN110503136A (en) Platform area line loss exception analysis method, computer readable storage medium and terminal device
CN107360536A (en) Control method, terminal device and the computer-readable recording medium of terminal device
CN105989076A (en) Data statistical method and device
CN109086413A (en) For searching for the method, equipment and readable storage medium storing program for executing of block chain data
CN110084070A (en) A kind of identity of the cross-domain isomeric data of manufacturing industry based on block chain constructs and source tracing method
CN104317957B (en) A kind of open platform of report form processing, system and report processing method
CN108805710A (en) A kind of distribution type electric energy method of commerce based on block chain intelligence contract technology
CN106802958B (en) Conversion method and system of the CAD data to GIS data
CN107069801A (en) A kind of power distribution network isolated island division methods based on minimum Custom interruption cost
CN109413047A (en) Determination method, system, server and the storage medium of Behavior modeling
CN108833133A (en) Network configuration management method, apparatus and storage medium based on system for cloud computing
CN110264027A (en) A kind of the member's model expansion method and system of electric power assisted hatching
CN109542863A (en) Mine machine system is dug in artificial intelligence storage
CN109086331A (en) Method and device for updating data of main network and distribution network and computer readable storage medium
CN107832374A (en) Construction method, electronic installation and the storage medium in standard knowledge storehouse
CN108256986A (en) Wages computational methods, application server and computer readable storage medium based on cloud computing
CN107194014A (en) Data source call method and device
CN104978366A (en) Voice data index building method and system based on mobile terminal

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
GR01 Patent grant
GR01 Patent grant