CN102722589B - Data querying method and system based on tri-networks integration - Google Patents
Data querying method and system based on tri-networks integration Download PDFInfo
- Publication number
- CN102722589B CN102722589B CN201210198815.6A CN201210198815A CN102722589B CN 102722589 B CN102722589 B CN 102722589B CN 201210198815 A CN201210198815 A CN 201210198815A CN 102722589 B CN102722589 B CN 102722589B
- Authority
- CN
- China
- Prior art keywords
- data
- data source
- source server
- query result
- grids
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000010354 integration Effects 0.000 title claims abstract description 17
- 230000004044 response Effects 0.000 claims description 43
- 238000004891 communication Methods 0.000 claims description 17
- 239000000344 soap Substances 0.000 claims description 14
- 230000005540 biological transmission Effects 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 5
- 238000004378 air conditioning Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000005406 washing Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a data querying method and system based on tri-networks integration. The method comprises the steps of: analyzing querying conditions from a querying file sent by an application server through data grids; generating information corresponding to data source servers in different network mediums according to the querying conditions, and then transmitting the generated information to the corresponding data source servers; and encapsulating querying results returned by each data source server into a querying result file with a preset format, and then returning to the application server. According to the data querying method, the data grids are arranged between the application servers in different network mediums and the data source servers which supply the data source, so that the application servers in different mediums can obtain the querying results of each data source in different mediums through a data grid platform, and a user can conveniently obtain comprehensive and complete querying results.
Description
Technical field
The present invention relates to network communications technology, relate in particular to data enquire method and system based on the integration of three networks.
Background technology
Ecommerce (Electronic Commerce) utilizes computer technology, network technology and telecommunication technique, realize the whole business procedure of electronization, digitizing and networking, for example: internet marketing, internet customer's service and online advertisement, investigation on the net etc.
Day by day prevailing along with ecommerce, no matter be internet, broadcasting and television network (hereinafter to be referred as Broadcasting Cable Network), or communication network, all release the electronic emporium system that is rich in own characteristic, as depend on Taobao and the Amazon of internet, depend on various home shopping channels, the TV store of Broadcasting Cable Network and depend on various WAP version electronic emporiums (as mobile phone version Taobao) of communication network etc.
User is by terminal access wherein when a kind of E-business applications of network medium, and during such as the E-business applications of access internet, application server can return to this network medium to terminal, i.e. the inquiry of the data source in internet.Like this, if user also wishes to obtain the relevant query result of the electronic emporium in other network medium, obtain Query Result with regard to having to by the E-business applications of accessing in other network medium.
That is to say, in prior art, data source in heterogeneous networks medium cannot be shared, user can not be by the application of one of them network medium of access, and obtain the data query in the data source in variant network medium, can not make that user obtains more comprehensively more conveniently, more perfect Query Result.
Summary of the invention
Embodiments of the invention provide a kind of data enquire method and system based on the integration of three networks, make user terminal can obtain easily the Query Result of the data source of heterogeneous networks medium in the integration of three networks.
According to an aspect of the present invention, provide a kind of data enquire method based on the integration of three networks, having comprised:
Application server, receiving after the inquiry request of terminal transmission, parses querying condition; Described querying condition is encapsulated in the inquiry file of predetermined format and sends to data grids;
Described data grids parse querying condition from described inquiry file; And corresponding to the data source server in variant network medium, according to after described querying condition difference generating messages, the message generating is sent to corresponding data source server;
The backward described application server of Query Result file that the Query Result that described data grids return to each data source server is encapsulated into predetermined format returns;
Described application server is receiving after described Query Result file, therefrom parses Query Result and returns to terminal.
Wherein, described corresponding to the data source server in variant network medium, according to described querying condition respectively generating messages be specially:
Described data grids are for the data source server in variant network medium, the agreement of supporting according to the network address of each data source server of schema file record and this data source server, generates corresponding to this data source server, the message that comprises described querying condition.
Further, described, corresponding to the data source server in variant network medium, before described querying condition difference generating messages, described method also comprises:
In the data of at least one data source server that described data grids are stored in local cache according to described querying condition, inquire about, obtain the first Query Result; And
The Query Result file that the Query Result that described data grids return to each data source server is encapsulated into predetermined format is specially:
Described data grids do not store data into Query Result that the data source server in described buffer memory returns as the second Query Result, and the first Query Result and the second Query Result are encapsulated in described Query Result file.
Preferably, the data of the data source server in the local cache of described data grids are stored according to following method:
Described data grids are in setting cycle, if data source server is returned to Query Result, record this data source server carrying out this Query Result response time used while returning;
Described data grids, in the time that setting cycle arrives, store the longest or the data source server that recording frequency is the highest response time in setting cycle data in the local cache of described data grids into.
Further, described, before response time the data the longest or data source server that recording frequency is the highest store the local cache of described data grids in by setting cycle, described method also comprises:
Described data grids judge that whether local cache space is enough; And,
The described local cache that stores the longest or the data source server that recording frequency is the highest response time in setting cycle data into described data grids is specially:
If described local cache space is enough, directly the longest or the data source server that recording frequency is the highest response time in setting cycle data are stored in the local cache of described data grids;
If described local cache insufficient space, falls the longest or the data source server that recording frequency is the highest response time in setting cycle data cover the data of the storage time in described local cache of data source server at most.
If described data source server place network medium is specially internet, the agreement that this data source server is supported is http protocol,, corresponding to this data source server, according to after described querying condition generating messages, the message of generation is sent and is specifically comprised to corresponding data source server:
Described data grids, corresponding to this data source server, generate HTTP request message according to described querying condition; According to corresponding communication port open before this data source server, with the requesting method recording in schema file, the HTTP request message generating is sent to this data source server.
If described data source server place network medium is specially communication network, the agreement that this data source server is supported is soap protocol,, corresponding to this data source server, according to after described querying condition generating messages, the message of generation is sent and is specifically comprised to corresponding data source server:
Described data grids, corresponding to this data source server, generate soap message according to described querying condition, and send according to the invocation of procedure of the visit data providing before this data source server the soap message generating to this data source server with the agreement of replying.
If described data source server place network medium is specially Broadcasting Cable Network, the agreement that this data source server is supported is ldap protocol,, corresponding to this data source server, according to after described querying condition generating messages, the message of generation is sent and is specifically comprised to corresponding data source server:
Described data grids are corresponding to this data source server, according to the hierarchical structure that this data source server is set up and opened to described data grids before, and dn label in described querying condition, schema file generates after the message that comprises query statement, the message generating is sent to this data source server.
Wherein, described application server place network medium is specially broadcasting and television network; Or,
Described application server place network medium is specially internet; Or,
Described application server place network medium is specially communication network.
According to another aspect of the present invention, also provide a kind of data query system based on the integration of three networks, having comprised:
Data grids, be connected with described data grids be arranged at multiple application servers in heterogeneous networks medium, be connected with described data grids be arranged at the multiple data source server in heterogeneous networks medium;
Described application server, for receiving after the inquiry request of terminal transmission, parses querying condition; Described querying condition is encapsulated in the inquiry file of predetermined format and sends to described data grids;
Described data grids are used for parsing querying condition from described inquiry file, and corresponding to the data source server in variant network medium, according to after described querying condition difference generating messages, the message generating are sent to corresponding data source server;
Described data source server is used for the querying condition of the message sending according to described data grids inquires about, and returns to Query Result to described data grids;
The backward described application server of Query Result file that described data grids are also encapsulated into predetermined format for the Query Result that each data source server is returned returns;
Described application server is receiving after the Query Result file returning, and therefrom parses Query Result and returns to terminal.
Preferably, described data grids are corresponding to the data source server in variant network medium, according to described querying condition respectively generating messages be specially:
Described data grids are for the data source server in variant network medium, the agreement of supporting according to the network address of each data source server of schema file record and this data source server, generates corresponding to this data source server, the message that comprises described querying condition.
Further, described data grids are also in the described data source server corresponding to variant network medium, before described querying condition difference generating messages, in the data of at least one data source server of storing in local cache according to described querying condition, inquire about, obtain the first Query Result; And
The Query Result file that the Query Result that described data grids return to each data source server is encapsulated into predetermined format is specially:
Described data grids do not store data into Query Result that the data source server in described buffer memory returns as the second Query Result, and the first Query Result and the second Query Result are encapsulated in described Query Result file.
Further, described data grids are also in setting cycle, if data source server is returned to Query Result, record this data source server carrying out this Query Result response time used while returning; When described setting cycle arrives, response time the data the longest or data source server that recording frequency is the highest in described setting cycle are stored in the local cache of described data grids.
Further, described data grids are also for before response time the data the longest or data source server that recording frequency is the highest store the local cache of described data grids in by setting cycle, judging that whether local cache space is enough described; And,
The local cache that described data grids store the longest or the data source server that recording frequency is the highest response time in setting cycle data into described data grids is specially:
If described local cache space is enough, described data grids directly store the longest or the data source server that recording frequency is the highest response time in setting cycle data in the local cache of described data grids into;
If described local cache insufficient space, described data grids fall the longest or the data source server that recording frequency is the highest response time in setting cycle data cover the data of the storage time in described local cache of data source server at most.
According to another aspect of the present invention, also provide a kind of data grids, having comprised:
Inquiry file receiver module, the inquiry file sending for receiving the application server of heterogeneous networks medium;
Inquiry file parsing module, for parsing querying condition from described inquiry file;
Message generating module, for the data source server corresponding to variant network medium, according to described querying condition generating messages respectively;
Message transmission module, for sending the message generating to corresponding data source server;
Message sink module, the Query Result returning for receiving each data source server;
Query Result file generating module, is encapsulated into the Query Result file of predetermined format for the Query Result that each data source server is returned;
Query Result file send module, for returning to the Query Result file of generation to the application server that sends described inquiry file.
Preferably, described message generating module is corresponding to the data source server in variant network medium, according to described querying condition respectively generating messages be specially:
Described message generating module is for the data source server in variant network medium, the agreement of supporting according to the network address of each data source server of schema file record and this data source server, generates corresponding to this data source server, the message that comprises described querying condition.
Further, described data grids also comprise:
Caching query module, inquires about in the data at least one data source server of storing at local cache according to described querying condition, obtains the first Query Result; And
The Query Result file that the Query Result that described Query Result file generating module is returned to each data source server is encapsulated into predetermined format is specially:
Described Query Result file generating module does not store data into Query Result that the data source server in described buffer memory returns as the second Query Result, and the first Query Result and the second Query Result are encapsulated in described Query Result file.
Further, described data grids also comprise:
Data cache module, in setting cycle, if data source server is returned to Query Result, records this data source server carrying out this Query Result response time used while returning; When described setting cycle arrives, response time the data the longest or data source server that recording frequency is the highest in described setting cycle are stored in the local cache of described data grids.
According to another aspect of the present invention, also provide a kind of application server, having comprised:
Inquiry request receiver module, the inquiry request sending for receiving terminal;
Inquiry request parsing module, for parsing querying condition from described inquiry request;
Inquiry file generation module, comprises inquiry file described querying condition, that have predetermined format for generating;
Inquiry file sending module, for sending described inquiry file to data grids;
Query Result file receiver module, for receiving described data grids Query Result file that return, that have predetermined format;
Query Result document analysis module, for parsing Query Result from described Query Result file;
Query Result returns to module, for the Query Result parsing is returned to described terminal.
The embodiment of the present invention is due to the application server in heterogeneous networks medium and provide between the data source server of data source and be provided with data grids, make application server in different medium can obtain by data grids platform the Query Result of each data source in different medium, namely application server can obtain by data grids platform the Query Result of each data source in the integration of three networks, thereby makes that user obtains more comprehensively more conveniently, more perfect Query Result.
Further, because data grids can be by the data buffer storage of certain or some data source server in local cache, thereby can accelerate inquiry velocity.
Accompanying drawing explanation
Fig. 1 is the data query system schematic diagram based on the integration of three networks of the embodiment of the present invention;
Fig. 2 a, 2b are the method flow diagram that the data query system of the embodiment of the present invention carries out data query;
Fig. 3 is the method flow diagram that the data grids 102 of the embodiment of the present invention store the data in data source data storehouse into local cache;
Fig. 4 is the hierarchical structure schematic diagram that the data source server of the support ldap protocol of the embodiment of the present invention is set up and opened to data grids;
Fig. 5 is the application server inner structure block diagram of the embodiment of the present invention;
Fig. 6 is the data grids inner structure block diagram of the embodiment of the present invention.
Embodiment
For making object of the present invention, technical scheme and advantage clearer, referring to accompanying drawing and enumerate preferred embodiment, the present invention is described in more detail.But, it should be noted that, many details of listing in instructions are only used to make reader to have a thorough understanding to one or more aspects of the present invention, even if do not have these specific details also can realize these aspects of the present invention.
The terms such as " module " used in this application, " system " are intended to comprise the entity relevant to computing machine, such as but not limited to hardware, firmware, combination thereof, software or executory software.For example, module can be, but be not limited in: thread, program and/or the computing machine of the process moved on processor, processor, object, executable program, execution.For instance, the application program of moving on computing equipment and this computing equipment can be modules.One or more modules can be positioned at an executory process and/or thread, and module also can and/or be distributed on a computing machine between two or more computing machines.
The present inventor considers that data grids are application platforms of the separate data in a kind of storage, transmission and processing global range, and it can combine the memory technology within the scope of high-end computing technique, high performance network and wide area network effectively.Under the environment of the integration of three networks, information data can reach magnanimity rank.In principle, data grids can connect any by the data source of both sides' safety certification, as long as this data source agrees to that open corresponding port, connected mode and DAP are to data grids.Therefore, can utilize data grids to realize the data sharing of the electric business's application under the integration of three networks.
Describe the technical scheme of the embodiment of the present invention in detail below in conjunction with accompanying drawing.The data query system based on the integration of three networks of the embodiment of the present invention, i.e. the data query system based on heterogeneous networks medium, as shown in Figure 1, comprising: application server 101, data grids 102, data source server 103.
Wherein, application server 101 can be one, can be also multiple; Multiple application servers 101 can be arranged in different network mediums.For example, in Fig. 1, illustrate that an application server is arranged in broadcasting and television network (Broadcasting & TV network), Another application server is arranged in internet (Internet), and also an application server is arranged in communication network (Telecom network).Application server 101 can provide for user the service of electronic application, the service of for example E-business applications.Particularly, application server 101 can provide by the mode of website and webpage or the mode running application the service of electronic application.For example, the webpage of the website, Taobao store in the E-business applications that user provides by terminal access application server 101, inquiry Related product, 101 of application servers return to Query Result to user.
The data query system based on the integration of three networks of the embodiment of the present invention carries out the method for data query, and process flow diagram as shown in Figure 2 a, comprises the steps:
S201: the inquiry request that application server 101 receiving terminals send.
User can send inquiry request to the application server 101 in heterogeneous networks medium by terminal.That is to say, the application server place network medium that receives the inquiry request that terminal sends can be specifically internet, or communication network, or Broadcasting Cable Network.Described terminal comprises the various equipment with network connecting function and Presentation Function, as mobile phone, computing machine, notebook, panel computer, intelligent television etc.
For example, user sends the inquiry request of certain product to the WAP version electronic emporium of the application server 101 of communication network by mobile phone; For another example, user sends the inquiry request of certain product to Taobao's electronic emporium of the application server 101 of internet by computing machine; And for example, user sends the inquiry request of certain product to the TV store of Broadcasting Cable Network by intelligent television.
S202: application server 101 receives after the inquiry request of terminal transmission, parses querying condition from inquiry request.
Heterogeneous networks medium is supported different agreements, and the application server 101 in heterogeneous networks medium is receiving after the inquiry request that comprises querying condition thus, and the protocol analysis inquiry request of supporting according to its place network medium, obtains querying condition.
The querying condition comprising in inquiry request is determined according to actual conditions, conventionally can comprise one or more in following condition: name of product, product category, brand name, price, model etc.
S203: application server 101 is encapsulated in querying condition in the inquiry file of predetermined format and sends to data grids 102.
The form of inquiry file can be by data grids 102, application server 101, data source server 103 common protocol agreements, and this inquiry file can comprise above-mentioned querying condition.The querying condition specifically comprising in inquiry file, can do reasonable customization according to the ability of application server 101 and data source server 103.For example, application server 101 offers the querying condition that user terminal can do to inquire about and comprises: classification, brand, price and model, and data source server 103 can also, based on a little querying conditions, be returned to Query Result.Below show a concrete XML(eXtensible Markup Language, extend markup language) inquiry file of form:
Querying condition wherein comprises: product category is that TV, brand are that TCL, model are 6100.
Further, application server 101 also, according to the query capability of application server 101 and data source server 103, defines query context for each querying condition, and the query context of restriction can be documented in XSD file.Like this, application server 101 can provide the option of each querying condition for user terminal according to the query context of recording in XSD file, and user therefrom selects by terminal.For example, for product category, application server 101 and data source server 103 can support classification to only have: TV, refrigerator, washing machine, mobile phone and air-conditioning, and a concrete XSD file is as follows:
Above-mentioned XSD file shows that in query context, alternative option only comprises for querying condition product category (category): TV (TV), refrigerator (Refrigerator), washing machine (washing-machine), mobile phone (CellPhone) and air-conditioning (airCondition).
S204: data grids 102 receive after inquiry file parses querying condition from described inquiry file.
Because the form of inquiry file is scheduled to, that is to say, data grids 102 are determined the form of inquiry file in advance, therefore, receiving after the inquiry file that application server 101 sends, can resolve inquiry file, therefrom parse querying condition.For example, for above-mentioned inquiry file, data grids 102 can therefrom parse querying condition and comprise: product category is that TV, brand are that TCL, price are 1888, model is 6100.
S205: data grids 102 are encapsulated into described querying condition in the message of multiple different agreements.
From above-mentioned schema file, can find out, record the information of four data sources: IP address, the port numbers in the data source data storehouse of db1, db2, db3, db4, and the agreement supported of data source data storehouse.
Corresponding to each data source data storehouse, data grids 102 are according to the IP(Internet Protocol of this data source server, Internet protocol) agreement that address, port numbers and this data source server are supported, generate the message corresponding to this data source server.The message generating for different agreement will describe in detail in follow-up.
S206: data grids 102 send the message of generation respectively to corresponding data source server 103.
S207: data source server 103 receives after message parses querying condition from message, after inquiring about, returns to Query Result to data grids 102 according to querying condition.
S208: data grids 102 receive after the Query Result that each data source server 103 returns, and the Query Result file that the Query Result that each data source server is returned is encapsulated into predetermined format returns to application server 101.
The message that comprises Query Result that data grids 102 return from each data source server 103, parse respectively Query Result, obtain after the Query Result that each data source server 103 returns, generate the Query Result file that comprises these Query Results and also return to application server 101.
The form of Query Result file can be by data grids 102, application server 101, data source server 103 common protocol agreements.A concrete Query Result file can be as follows:
From above-mentioned Query Result file, can find out that four data source db1, db2, db3, db4 are according to querying condition: product category is that TV, brand are that TCL, model are 6100 to inquire about, the Query Result returning respectively comprises that the brand inquiring is price, picture, video, comment, the welcome degree of TCL, the model TV that is 6100.
S209: application server 101 is receiving after described Query Result file, therefrom parses Query Result and returns to terminal.
As a kind of more excellent data enquire method, in order to accelerate inquiry velocity, data grids 102 also can be added up the response time in each data source data storehouse in setting cycle, or the frequency being queried, data grids 102 are the longest the response time in setting cycle, or the data in the highest data source data storehouse of enquiry frequency store in local cache, in the time inquiring about according to querying condition, data grids 102 just can be inquired about the data in this data source data storehouse in local cache, thereby accelerate inquiry velocity.
S301: data grids 102 are in setting cycle, if receive the Query Result that data source server 103 is returned, in record sheet, record this data source server carrying out this Query Result response time used while returning, return to the duration between Query Result from sending a message to this data source server.The length of setting cycle can be determined according to actual conditions, for example, can be 1 hour, or 1 day.Following table 1 shows the response time in the data source data storehouse of statistics in certain cycle:
Table 1
Inquiry ID | Data source numbering | Response time |
1 | Data source 1 | 2 |
1 | Data source 2 | 5 |
1 | Data source 3 | 20 |
1 | Data source 4 | 1 |
2 | Data source 1 | 15 |
2 | Data source 2 | 1 |
2 | Data source 4 | 3 |
Data sources different in table 1 are numbered corresponding different respectively data source server, that is to say, can unique specified data source server according to data source numbering.
S302: data grids 102, in the time that setting cycle arrives, determine that according to the record in record sheet the data that one of them data source is numbered to corresponding data source server store in local cache.
As can be seen from Table 1, it is the longest that data source is numbered the response time of 3 data source server, data source be numbered 1,2,4 data source server to be queried frequency higher, be queried 2 times.Can or be queried frequency according to the response time of data source server and generate strategy, determine the data buffer storage of which or which data source server in data grids 102.For example, can be by the data buffer storage of data source server the longest response time in data grids 102; Or, will be queried the data buffer storage of data source server of frequency the highest (being that in record sheet, recording frequency is the highest) in data grids 102; Or, consider response time and determine after frequency data buffer storage to the data source server in data grids 102 with being queried.
For buffer memory in data grids 102 situation of data of certain or some data source databases, before carrying out above-mentioned steps S205, data grids 102 can first be carried out following steps S2041, concrete process flow diagram as shown in Figure 2 b.
S2041: inquire about in the data of at least one data source server that data grids 102 are stored in local cache according to described querying condition, obtain the first Query Result.
Will be greatly faster than the speed of inquiring about in the longest data source data storehouse of response time owing to carrying out data query in buffer memory, thus inquiry velocity greatly improved.
S2081: data grids 102 do not store data into Query Result that the data source server in described buffer memory returns as the second Query Result, is encapsulated into described Query Result file by the first Query Result and the second Query Result and returns to application server 101.That is to say, for buffer memory in data grids 102 situation of data of certain or some data source databases, in the time carrying out above-mentioned steps S208, also comprise: the Query Result that data grids 102 return except each data source server is encapsulated in Query Result file, also the first Query Result is also encapsulated into described Query Result file and returns to application server 101.
Other step in Fig. 2 b except S2041, S2081, identical with each step of introducing in Fig. 2 a, no longer repeatedly introduce one by one herein.
Here it is to be noted, although data grids 102 have obtained Query Result for the data in the data source data storehouse that is cached in local cache, but, the message that described querying condition is encapsulated into multiple different agreements by data grids 102 in step S205 is specially: data grids 102 corresponding in variant network medium, data do not store the data source server in described buffer memory into, according to described querying condition generating messages respectively, also stored the data source server in described buffer memory into corresponding to data, according to described querying condition generating messages respectively.Like this, no matter data grids 102 can, to whether storing data into data source server test response duration in buffer memory, be made respective record in record sheet, while arrival for setting cycle, determine the data source data storehouse that data is write to buffer memory.
In above-mentioned steps S205, corresponding to each data source data storehouse, the agreement that data grids 102 are supported according to the IP address of this data source server, port numbers and this data source server, generates being described in detail as follows corresponding to the message of this data source server:
For example, data grids 102 are connected with 4 data source server, their open ports are respectively 228,229,8080,8081, the agreement of supporting is respectively LDAP(Lightweight Directory Access Protocol, Light Directory Access Protocol), SQL(Structured Query Language, Structured Query Language (SQL)), HTTP(Hyper text Transfer Protocol, HTML (Hypertext Markup Language)), SOAP(Simple Object Access Protocol, basic object access protocal).
Be Broadcasting Cable Network, the data source server of supporting ldap protocol for place network medium, hierarchical structure as shown in Figure 4 be set up and be opened to this data source server will to data grids.
Wherein, one-level RDN(o=amazon) and schema file in the dn(Distinguished Name of these data, identification name) label amazon is corresponding; Secondary RDN(Relative Distinguished Name, relatively identification name) corresponding goods classification (as: ou=TV), corresponding with the category label in inquiry file; Three grades of RDN corresponding goods brands (as: brand=TCL), corresponding with the brand label in inquiry file; Level Four RDN is corresponding to marque (as: model=6100), corresponding with the model label in inquiry file, and under this grade of RDN node, to comprise information attribute value (as: the price price that front end electricity business application requirements obtains, comment remark, picture pic, video URL address vedio, welcome degree popularity).
Ldapsearch–h 135.252.1.1-1 228-b“model=6100,brand=TCL,ou=TVo=amazon”–s sub brand,model,price,pic,video,remark,popularity
For the data source server of supporting other agreement in Broadcasting Cable Network, generation is similar corresponding to method and this method of the message of this data source server, describes in detail no longer one by one herein.
The relational data source that is internet for place network medium, support the data source server of SQL agreement, this data source server will provide a tableview(logical view to data grids), this tableview need to be take the querying condition that comprises in inquiry file as major key, and the data that electric business's application requirements returns all will exist as of this table attribute.The structure of this tableview is so:
The tableview Attribute Relative of this data source in Table view name:product(and schema is answered);
Primary key:category, brand, the category in model(and inquiry file, brand and model label are corresponding);
Attribute:price, pic, video, remark, the attribute that this tableview of popularity(comprises need to contain require the information attribute value that returns);
According to the querying condition in this tableview and schema file and inquiry file, the query statement comprising in the message of the data source server corresponding to this support SQL agreement that data grids generate is:
Select brand,model,price,pic,video,remark,popularity from product wheremodel=6100,brand=TCL,category=TV
Be the data source server that internet, supported protocol are HTTP for place network medium, this data source server need to be opened corresponding communication port to data grids, and data grids, according to querying condition, generate the HTTP request message that comprises querying condition, as:
http://135.252.1.3:8080/query category=TV&brand=TCL&model=6100)
Requesting method with POST/GET(corresponding to this data source server definition in schema file) mode sends to this data source server.After the request of receiving of this data source server, trigger corresponding application program (as Servlet etc.), according to the data in the querying condition Query Database of receiving, and by the commodity data information of needs (as price, pic, video, remark, popularity) return to data grids with the form of HTTP response.
For the data source server of supporting other agreement in internet, generate corresponding to the method for the message of this data source server similar with two above-mentioned methods, detailed description no longer one by one herein.
Be the data source server that communication network, supported protocol are SOAP for place network medium, this data source server provides the invocation of procedure of visit data and the agreement of replying to data grids, encodes by XML, sends soap message.The soap message of the inquiry item property for example, generating according to querying condition is:
The soap message that what SOAP data source server was corresponding reply replys other attributes such as concrete price is:
For the data source server of supporting other agreement in communication network, generation is similar corresponding to method and this method of the message of this data source server, describes in detail no longer one by one herein.
A kind of application server that the embodiment of the present invention provides, inner structure as shown in Figure 5, comprising: inquiry request receiver module 501, inquiry request parsing module 502, inquiry file generation module 503, inquiry file sending module 504, Query Result file receiver module 505, Query Result document analysis module 506, Query Result return to module 507.
The inquiry request that inquiry request receiver module 501 sends for receiving terminal; Particularly, the inquiry request that the agreement receiving terminal that inquiry request receiver module 501 is supported according to present application server sends.
Inquiry request parsing module 502 parses querying condition for the inquiry request receiving from inquiry request receiver module 501.
The querying condition that inquiry file generation module 503 is resolved for obtaining inquiry request parsing module 502, generates and comprises inquiry file described querying condition, that have predetermined format.
Inquiry file sending module 504 sends to data grids for the inquiry file that inquiry file generation module 503 is generated.
Query Result file receiver module 505 is for receiving described data grids Query Result file that return, that have predetermined format.
Query Result document analysis module 506 parses Query Result for the Query Result file receiving from Query Result file receiver module 505.
Query Result returns to module 507 and returns to described terminal for the Query Result that Query Result document analysis module 506 is parsed.Particularly, Query Result returns to agreement that module 507 supports according to present application server and Query Result is encapsulated to backward described terminal returns.
Particularly, the related specific works process of each module in the application server of the embodiment of the present invention can, with reference to disclosed related content in the querying method shown in above-mentioned Fig. 2 a, 2b, repeat no more herein.
A kind of data grids that the embodiment of the present invention provides, inner structure as shown in Figure 6, comprising: inquiry file receiver module 601, inquiry file parsing module 602, message generating module 603, message transmission module 604, message sink module 605, Query Result file generating module 606, Query Result file send module 607.
The inquiry file that inquiry file receiver module 601 sends for receiving the application server of heterogeneous networks medium;
Inquiry file parsing module 602 parses querying condition for the inquiry file receiving from inquiry file receiver module 601.Because the form of inquiry file is made an appointment, therefore, inquiry file parsing module 602 can be resolved the inquiry file receiving according to the form of making an appointment.
The querying condition that message generating module 603 is resolved for obtaining inquiry file parsing module 602, and corresponding to the data source server in variant network medium, according to described querying condition generating messages respectively.Particularly, message generating module 603 is for the data source server in variant network medium, the agreement of supporting according to the network address of each data source server of schema file record and this data source server, generates corresponding to this data source server, the message that comprises described querying condition.
Message transmission module 604 sends to corresponding data source server for the message that message generating module 603 is generated.
The message that comprises Query Result that message sink module 605 is returned for receiving each data source server.
The Query Result that Query Result file generating module 606 is returned for each data source server that message sink module 605 is received is encapsulated into the Query Result file of predetermined format.
Query Result file send module 607 is returned to the application server that sends described inquiry file for the Query Result file that Query Result file generating module 606 is generated.
Further, data grids also comprise: caching query module 608.
In the data of at least one data source server that caching query module 608 is stored at local cache for the querying condition parsing according to inquiry file parsing module 602, inquire about, obtain the first Query Result.
Thereby the Query Result that Query Result file generating module 606 is returned for each data source server that message sink module 605 is received is encapsulated into the Query Result file of predetermined format, be specially: Query Result file generating module 606 does not store data into Query Result that the data source server in described buffer memory returns as the second Query Result, the first Query Result that the second Query Result and caching query module 608 are obtained is encapsulated in described Query Result file.
Further, data grids also comprise: data cache module 609.
Data cache module 609 is in setting cycle, if data source server is returned to Query Result, records this data source server carrying out this Query Result response time used while returning; When described setting cycle arrives, response time the data the longest or data source server that recording frequency is the highest in described setting cycle are stored in the local cache of described data grids.
Particularly, the related specific works process of each module in the data grids of the embodiment of the present invention can, with reference to disclosed related content in the querying method shown in above-mentioned Fig. 2 a, 2b, repeat no more herein.
Although, in the embodiment of the present invention, mainly tell about concrete scheme as an example of the data query in E-business applications example, need to obtain the occasion of the data query of the data source in heterogeneous networks medium and those skilled in the art can be applied to other electronic application by the technical scheme of the embodiment of the present invention easily; Therefore, also should be considered as protection scope of the present invention for the data query of other type under the premise without departing from the principles of the invention.
The embodiment of the present invention is due to the application server in heterogeneous networks medium and provide between the data source server of data source and be provided with data grids, make application server in different medium can obtain by data grids platform the Query Result of each data source in different medium, namely application server can obtain by data grids platform the Query Result of each data source in the integration of three networks, thereby makes that user obtains more comprehensively more conveniently, more perfect Query Result.
Further, because data grids can be by the data buffer storage of certain or some data source server in local cache, thereby can accelerate inquiry velocity.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is can carry out the hardware that instruction is relevant by program to complete, this program can be stored in a computer read/write memory medium, as: ROM/RAM, magnetic disc, CD etc.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (15)
1. the data enquire method based on the integration of three networks, comprising:
Application server, receiving after the inquiry request of terminal transmission, parses querying condition; Described querying condition is encapsulated in the inquiry file of predetermined format and sends to data grids;
Described data grids parse querying condition from described inquiry file; And corresponding to the data source server in variant network medium, the agreement of supporting according to the network address of each data source server of schema file record and this data source server, generate corresponding to this data source server, the message that comprises described querying condition, the message generating is sent to corresponding data source server;
The backward described application server of Query Result file that the Query Result that described data grids return to each data source server is encapsulated into predetermined format returns;
Described application server is receiving after described Query Result file, therefrom parses Query Result and returns to terminal.
2. the method for claim 1, is characterized in that,,, before described querying condition difference generating messages, also comprises corresponding to the data source server in variant network medium described:
In the data of at least one data source server that described data grids are stored in local cache according to described querying condition, inquire about, obtain the first Query Result; And
The Query Result file that the Query Result that described data grids return to each data source server is encapsulated into predetermined format is specially:
Described data grids do not store data into Query Result that the data source server in described buffer memory returns as the second Query Result, and the first Query Result and the second Query Result are encapsulated in described Query Result file.
3. method as claimed in claim 2, is characterized in that, the data of the data source server in the local cache of described data grids are stored according to following method:
Described data grids are in setting cycle, if data source server is returned to Query Result, record this data source server carrying out this Query Result response time used while returning;
Described data grids, in the time that setting cycle arrives, store the longest or the data source server that recording frequency is the highest response time in setting cycle data in the local cache of described data grids into.
4. method as claimed in claim 3, is characterized in that,, also comprises before response time the data the longest or data source server that recording frequency is the highest store the local cache of described data grids in by setting cycle described:
Described data grids judge that whether local cache space is enough; And,
The described local cache that stores the longest or the data source server that recording frequency is the highest response time in setting cycle data into described data grids is specially:
If described local cache space is enough, directly the longest or the data source server that recording frequency is the highest response time in setting cycle data are stored in the local cache of described data grids;
If described local cache insufficient space, falls the longest or the data source server that recording frequency is the highest response time in setting cycle data cover the data of the storage time in described local cache of data source server at most.
5. the method for claim 1, it is characterized in that, if described data source server place network medium is specially internet, the agreement that this data source server is supported is http protocol, corresponding to this data source server, according to after described querying condition generating messages, the message of generation is sent and is specifically comprised to corresponding data source server:
Described data grids, corresponding to this data source server, generate HTTP request message according to described querying condition; According to corresponding communication port open before this data source server, with the requesting method recording in schema file, the HTTP request message generating is sent to this data source server.
6. the method for claim 1, it is characterized in that, if described data source server place network medium is specially communication network, the agreement that this data source server is supported is soap protocol, corresponding to this data source server, according to after described querying condition generating messages, the message of generation is sent and is specifically comprised to corresponding data source server:
Described data grids, corresponding to this data source server, generate soap message according to described querying condition, and send according to the invocation of procedure of the visit data providing before this data source server the soap message generating to this data source server with the agreement of replying.
7. the method for claim 1, it is characterized in that, if described data source server place network medium is specially Broadcasting Cable Network, the agreement that this data source server is supported is ldap protocol, corresponding to this data source server, according to after described querying condition generating messages, the message of generation is sent and is specifically comprised to corresponding data source server:
Described data grids are corresponding to this data source server, according to the hierarchical structure that this data source server is set up and opened to described data grids before, and dn label in described querying condition, schema file generates after the message that comprises query statement, the message generating is sent to this data source server.
8. the method as described in as arbitrary in claim 1-7, is characterized in that, described application server place network medium is specially broadcasting and television network; Or,
Described application server place network medium is specially internet; Or,
Described application server place network medium is specially communication network.
9. the data query system based on the integration of three networks, comprising: data grids, be connected with described data grids be arranged at multiple application servers in heterogeneous networks medium, be connected with described data grids be arranged at the multiple data source server in heterogeneous networks medium;
Described application server, for receiving after the inquiry request of terminal transmission, parses querying condition; Described querying condition is encapsulated in the inquiry file of predetermined format and sends to described data grids;
Described data grids are for parsing querying condition from described inquiry file, and corresponding to the data source server in variant network medium, the agreement of supporting according to the network address of each data source server of schema file record and this data source server, generate corresponding to this data source server, the message that comprises described querying condition, the message generating is sent to corresponding data source server;
Described data source server is used for the querying condition of the message sending according to described data grids inquires about, and returns to Query Result to described data grids;
The backward described application server of Query Result file that described data grids are also encapsulated into predetermined format for the Query Result that each data source server is returned returns;
Described application server is receiving after the Query Result file returning, and therefrom parses Query Result and returns to terminal.
10. system as claimed in claim 9, is characterized in that,
Described data grids are also in the described data source server corresponding to variant network medium, before described querying condition difference generating messages, in the data of at least one data source server of storing in local cache according to described querying condition, inquire about, obtain the first Query Result; And
The Query Result file that the Query Result that described data grids return to each data source server is encapsulated into predetermined format is specially:
Described data grids do not store data into Query Result that the data source server in described buffer memory returns as the second Query Result, and the first Query Result and the second Query Result are encapsulated in described Query Result file.
11. systems as claimed in claim 10, is characterized in that,
Described data grids are also in setting cycle, if data source server is returned to Query Result, record this data source server carrying out this Query Result response time used while returning; When described setting cycle arrives, response time the data the longest or data source server that recording frequency is the highest in described setting cycle are stored in the local cache of described data grids.
12. systems as claimed in claim 11, is characterized in that,
Described data grids are also for before response time the data the longest or data source server that recording frequency is the highest store the local cache of described data grids in by setting cycle, judging that whether local cache space is enough described; And,
The local cache that described data grids store the longest or the data source server that recording frequency is the highest response time in setting cycle data into described data grids is specially:
If described local cache space is enough, described data grids directly store the longest or the data source server that recording frequency is the highest response time in setting cycle data in the local cache of described data grids into;
If described local cache insufficient space, described data grids fall the longest or the data source server that recording frequency is the highest response time in setting cycle data cover the data of the storage time in described local cache of data source server at most.
13. 1 kinds of data grids, comprising:
Inquiry file receiver module, the inquiry file sending for receiving the application server of heterogeneous networks medium;
Inquiry file parsing module, for parsing querying condition from described inquiry file;
Message generating module, for the data source server corresponding to variant network medium, the agreement of supporting according to the network address of each data source server of schema file record and this data source server, generates corresponding to this data source server, the message that comprises described querying condition;
Message transmission module, for sending the message generating to corresponding data source server;
Message sink module, the Query Result returning for receiving each data source server;
Query Result file generating module, is encapsulated into the Query Result file of predetermined format for the Query Result that each data source server is returned;
Query Result file send module, for returning to the Query Result file of generation to the application server that sends described inquiry file.
14. data grids as claimed in claim 13, is characterized in that, also comprise:
Caching query module, inquires about in the data at least one data source server of storing at local cache according to described querying condition, obtains the first Query Result; And
The Query Result file that the Query Result that described Query Result file generating module is returned to each data source server is encapsulated into predetermined format is specially:
Described Query Result file generating module does not store data into Query Result that the data source server in described buffer memory returns as the second Query Result, and the first Query Result and the second Query Result are encapsulated in described Query Result file.
15. data grids as claimed in claim 14, is characterized in that, also comprise:
Data cache module, in setting cycle, if data source server is returned to Query Result, records this data source server carrying out this Query Result response time used while returning; When described setting cycle arrives, response time the data the longest or data source server that recording frequency is the highest in described setting cycle are stored in the local cache of described data grids.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210198815.6A CN102722589B (en) | 2012-06-15 | 2012-06-15 | Data querying method and system based on tri-networks integration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210198815.6A CN102722589B (en) | 2012-06-15 | 2012-06-15 | Data querying method and system based on tri-networks integration |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102722589A CN102722589A (en) | 2012-10-10 |
CN102722589B true CN102722589B (en) | 2014-06-11 |
Family
ID=46948350
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210198815.6A Active CN102722589B (en) | 2012-06-15 | 2012-06-15 | Data querying method and system based on tri-networks integration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102722589B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160188609A1 (en) * | 2014-12-29 | 2016-06-30 | Futurewei Technologies, Inc. | System and Method for Model-based Search and Retrieval of Networked Data |
CN108984553B (en) * | 2017-06-01 | 2022-02-01 | 北京京东尚科信息技术有限公司 | Caching method and device |
CN107729345B (en) * | 2017-07-27 | 2020-08-18 | 深圳壹账通智能科技有限公司 | Website data processing method and device, website data processing platform and storage medium |
CN111563216B (en) * | 2020-07-16 | 2020-11-06 | 平安国际智慧城市科技股份有限公司 | Local data caching method and device and related equipment |
CN112749192A (en) * | 2021-01-24 | 2021-05-04 | 武汉卓尔信息科技有限公司 | Data integration service system and data processing method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101256560A (en) * | 2007-02-26 | 2008-09-03 | 中国航空工业第二集团公司科学技术委员会 | Method for construction of distributing storage data file sharing system based on gridding |
CN101640825A (en) * | 2009-08-19 | 2010-02-03 | 刘文祥 | Integration of three networks |
CN102064959A (en) * | 2010-11-16 | 2011-05-18 | 西安电子科技大学 | Three-network convergence oriented digital home network architecture |
CN102300129A (en) * | 2011-08-30 | 2011-12-28 | 深圳创维-Rgb电子有限公司 | Method for interaction between television and computer |
-
2012
- 2012-06-15 CN CN201210198815.6A patent/CN102722589B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101256560A (en) * | 2007-02-26 | 2008-09-03 | 中国航空工业第二集团公司科学技术委员会 | Method for construction of distributing storage data file sharing system based on gridding |
CN101640825A (en) * | 2009-08-19 | 2010-02-03 | 刘文祥 | Integration of three networks |
CN102064959A (en) * | 2010-11-16 | 2011-05-18 | 西安电子科技大学 | Three-network convergence oriented digital home network architecture |
CN102300129A (en) * | 2011-08-30 | 2011-12-28 | 深圳创维-Rgb电子有限公司 | Method for interaction between television and computer |
Also Published As
Publication number | Publication date |
---|---|
CN102722589A (en) | 2012-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1610915B (en) | The method and system that specific internet user target advertising is replaced | |
US20160205106A1 (en) | Systems and methods for providing iot services | |
CN102722589B (en) | Data querying method and system based on tri-networks integration | |
JP5349589B2 (en) | Dynamic payment method and apparatus | |
CN111917687B (en) | Method and device for circularly pushing reminding message | |
CN101609415B (en) | Universal service calling system and method based on middleware | |
CN101635895B (en) | Website content subscribing system, website content subscribing method, mobile communication terminal and server | |
CN101046806B (en) | Search engine system and method | |
US20080109481A1 (en) | Context based network search | |
RU2009139653A (en) | METHOD FOR OBTAINING WEB SERVICES INTERFACES FROM METADATA FORMS AND TABLES | |
US20100036907A1 (en) | Digital living network alliance (DLNA) server that serves contents from IVL services | |
RU2015156798A (en) | SYSTEM AND METHOD OF PUSH (PUSH) ADVERTISEMENTS BASED ON THE HOME GATEWAY | |
US20130185322A1 (en) | Systems and methods for providing an electronic contact card | |
CN102761532A (en) | Information processing system and method for network video | |
CN110110196A (en) | A kind of information push method and device | |
Dickerson et al. | Stream feeds-an abstraction for the world wide sensor web | |
US10140347B2 (en) | Exposing data to query generating applications using usage profiles | |
CN101547194B (en) | Method and system for obtaining internet data by embedded type terminal | |
JP4009591B2 (en) | Domain naming system (DNS) for accessing databases | |
CN100498780C (en) | Data inquire system and method | |
CN101110858A (en) | Telecommunication report generation system and method thereof | |
US9189546B2 (en) | Semantic client, semantic information management server, method of generating semantic information, method of searching semantic information, and computer program recording medium for performing the methods | |
CN103237051A (en) | Product information providing system, product information providing method, server and terminal | |
Muller et al. | An aggregating discovery service for the EPCglobal network | |
CN103051512A (en) | Instant messaging establishing method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C41 | Transfer of patent application or patent right or utility model | ||
TR01 | Transfer of patent right |
Effective date of registration: 20170119 Address after: 266100 Shandong Province, Qingdao city Laoshan District Songling Road No. 399 Patentee after: Poly Polytron Technologies Inc Address before: 266061 Laoshan, Qingdao province Hongkong District No. East Road, room 248, room 131 Patentee before: Hisense Media Networks Co., Ltd. |