CN102722589A - Data querying method and system based on tri-networks integration - Google Patents

Data querying method and system based on tri-networks integration Download PDF

Info

Publication number
CN102722589A
CN102722589A CN2012101988156A CN201210198815A CN102722589A CN 102722589 A CN102722589 A CN 102722589A CN 2012101988156 A CN2012101988156 A CN 2012101988156A CN 201210198815 A CN201210198815 A CN 201210198815A CN 102722589 A CN102722589 A CN 102722589A
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.)
Granted
Application number
CN2012101988156A
Other languages
Chinese (zh)
Other versions
CN102722589B (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.)
Juhaokan Technology Co Ltd
Original Assignee
Qingdao Hisense Media 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 Qingdao Hisense Media Network Technology Co Ltd filed Critical Qingdao Hisense Media Network Technology Co Ltd
Priority to CN201210198815.6A priority Critical patent/CN102722589B/en
Publication of CN102722589A publication Critical patent/CN102722589A/en
Application granted granted Critical
Publication of CN102722589B publication Critical patent/CN102722589B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Data enquire method and system based on the integration of three networks
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.
In vogue day by day along with ecommerce; No matter be internet, broadcasting and television network (hereinafter to be referred as Broadcasting Cable Network); Or communication network; All released the electronic emporium system that is rich in own characteristic, as depended on the Taobao and the Amazon of internet, depended on various home shopping channels, the TV store of Broadcasting Cable Network and depend on various WAP version electronic emporiums (like mobile phone version Taobao) of communication network or the like.
The user is through terminal access wherein during a kind of E-business applications of network medium, and during such as the E-business applications of access internet, application server can return this network medium to the terminal, i.e. the inquiry of the data source in the internet.Like this, if the user also hopes to obtain the relevant query result of the electronic emporium in other network medium, obtain Query Result through the E-business applications of visiting in other network medium with regard to having to.
That is to say; In the prior art; Data source in the heterogeneous networks medium can't be shared; The user can not and obtain the data query in the data source in the variant network medium through the application of one of them network medium of visit, can not make that the user obtains more 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 the Query Result of the data source of heterogeneous networks medium in the integration of three networks easily.
According to an aspect of the present invention, a kind of data enquire method based on the integration of three networks is provided, has comprised:
Application server parses querying condition after receiving the query requests of sending at the terminal; Said querying condition is encapsulated in the inquiry file of predetermined format and sends to data grids;
Said data grids parse querying condition from said inquiry file; And corresponding to the data source server in the variant network medium, generate message respectively according to said querying condition after, the message that generates is sent to the data source server of correspondence;
The Query Result that said data grids return each data source server returns to said application server after being encapsulated into the Query Result file of predetermined format;
Said application server therefrom parses Query Result and returns to the terminal after receiving said Query Result file.
Wherein, said corresponding to the data source server in the variant network medium, generate message respectively according to said querying condition and be specially:
Said data grids are for the data source server in the variant network medium; According to the network address of each data source server of schema file logging and the agreement that this data source server is supported, generate corresponding to this data source server, comprise the message of said querying condition.
Further,, generate respectively before the message according to said querying condition corresponding to the data source server in the variant network medium said, said method also comprises:
Inquire about in the data of at least one data source server that said data grids are stored in local cache according to said querying condition, obtain first Query Result; And
The Query Result file that the Query Result that said data grids return each data source server is encapsulated into predetermined format is specially:
Said data grids do not store data into Query Result that the data source server in the said buffer memory returns as second Query Result, and first Query Result and second Query Result are encapsulated in the said Query Result file.
Preferably, the data of the data source server in the local cache of said data grids are stored according to following method:
Said data grids are in setting cycle, if data source server returns Query Result, then note this data source server and carrying out this time Query Result used response time when returning;
Said data grids are when setting cycle arrives, and the data storage of response time in the setting cycle is the longest or data source server that recording frequency is the highest is in the local cache of said data grids.
Further, said with setting cycle in the data storage of the longest or data source server that recording frequency is the highest of response time before the local cache of said data grids, said method also comprises:
Said data grids judge whether the local cache space is enough; And,
The data storage of said response time in the setting cycle is the longest or data source server that recording frequency is the highest is specially to the local cache of said data grids:
If said local cache space is enough, the data storage of then directly that response time in the setting cycle is the longest or data source server that recording frequency is the highest is in the local cache of said data grids;
If said local cache insufficient space, then the data the longest or data source server that recording frequency is the highest of response time in the setting cycle are override the data of the storage time in the said local cache of data source server at most.
If said data source server place network medium is specially the internet; The agreement that this data source server is supported is a http protocol; Then, after said querying condition generation message, the data source server transmission of the message that generates to correspondence specifically comprised corresponding to this data source server:
Said data grids generate the HTTP request message corresponding to this data source server according to said querying condition; According to corresponding communication port open before this data source server, the HTTP request message that generates is sent to this data source server with the requesting method that writes down in the schema file.
If said data source server place network medium is specially communication network; The agreement that this data source server is supported is a soap protocol; Then, after said querying condition generation message, the data source server transmission of the message that generates to correspondence specifically comprised corresponding to this data source server:
Said data grids generate soap message corresponding to this data source server according to said querying condition, and send the soap message that generates according to the invocation of procedure of the visit data that provides before this data source server to this data source server with the agreement of replying.
If said data source server place network medium is specially Broadcasting Cable Network; The agreement that this data source server is supported is a ldap protocol; Then, after said querying condition generation message, the data source server transmission of the message that generates to correspondence specifically comprised corresponding to this data source server:
Said data grids are corresponding to this data source server; According to before this data source server hierarchical structure of setting up and open to said data grids; And the dn label in the said querying condition, schema file generate comprise the message of query statement after, the message that generates is sent to this data source server.
Wherein, said application server belongs to network medium and is specially broadcasting and television network; Perhaps,
Said application server place network medium is specially the internet; Perhaps,
Said application server place network medium is specially communication network.
According to another aspect of the present invention, a kind of data query system based on the integration of three networks is provided also, has comprised:
Data grids, be connected with said data grids be arranged at a plurality of application servers in the heterogeneous networks medium, be connected with said data grids be arranged at a plurality of data source server in the heterogeneous networks medium;
Said application server is used for after receiving the query requests of sending at the terminal, parsing querying condition; Said querying condition is encapsulated in the inquiry file of predetermined format and sends to said data grids;
Said data grids are used for parsing querying condition from said inquiry file, and corresponding to the data source server in the variant network medium, generate message respectively according to said querying condition after, the message that generates is sent to the data source server of correspondence;
Said data source server is used for inquiring about according to the querying condition of the message of said data grids transmission, and returns Query Result to said data grids;
Said data grids return to said application server after also being used for the Query Result that each data source server is returned is encapsulated into the Query Result file of predetermined format;
Said application server therefrom parses Query Result and returns to the terminal after receiving the Query Result file that returns.
Preferably, said data grids generate message respectively according to said querying condition and are specially corresponding to the data source server in the variant network medium:
Said data grids are for the data source server in the variant network medium; According to the network address of each data source server of schema file logging and the agreement that this data source server is supported, generate corresponding to this data source server, comprise the message of said querying condition.
Further; Said data grids also are used in said data source server corresponding to variant network medium; Generate respectively before the message according to said querying condition; Inquire about in the data of at least one data source server of in local cache, storing according to said querying condition, obtain first Query Result; And
The Query Result file that the Query Result that said data grids return each data source server is encapsulated into predetermined format is specially:
Said data grids do not store data into Query Result that the data source server in the said buffer memory returns as second Query Result, and first Query Result and second Query Result are encapsulated in the said Query Result file.
Further, said data grids also are used in setting cycle, if data source server returns Query Result, then note this data source server and are carrying out this time Query Result used response time when returning; When said setting cycle arrived, the data storage of response time in the said setting cycle is the longest or data source server that recording frequency is the highest was in the local cache of said data grids.
Further, said data grids also be used for said with setting cycle in the data storage of the longest or data source server that recording frequency is the highest of response time before the local cache of said data grids, judge whether the local cache space enough; And,
The data storage of said data grids response time in the setting cycle is the longest or data source server that recording frequency is the highest is specially to the local cache of said data grids:
If said local cache space is enough, the data storage of then directly that response time in the setting cycle is the longest or data source server that recording frequency is the highest of said data grids is in the local cache of said data grids;
If said local cache insufficient space, said data grids then override the data the longest or data source server that recording frequency is the highest of response time in the setting cycle data of the storage time in the said local cache of data source server at most.
According to another aspect of the present invention, a kind of data grids are provided also, have comprised:
The inquiry file receiver module is used for receiving the inquiry file that the application server of heterogeneous networks medium sends;
The inquiry file parsing module is used for parsing querying condition from said inquiry file;
Message generating module is used for the data source server corresponding to variant network medium, generates message respectively according to said querying condition;
Message transmission module is used for the message that generates is sent to the data source server of correspondence;
The message sink module is used to receive the Query Result that each data source server is returned;
The Query Result file generating module is used for the Query Result that each data source server is returned is encapsulated into the Query Result file of predetermined format;
The Query Result file send module is used for the Query Result file that generates is returned to the application server that sends said inquiry file.
Preferably, said message generating module generates message respectively according to said querying condition and is specially corresponding to the data source server in the variant network medium:
Said message generating module is for the data source server in the variant network medium; According to the network address of each data source server of schema file logging and the agreement that this data source server is supported, generate corresponding to this data source server, comprise the message of said querying condition.
Further, said data grids also comprise:
The caching query module is used for inquiring about in the data of at least one data source server that local cache is stored according to said querying condition, obtains first Query Result; And
The Query Result file that the Query Result that said Query Result file generating module is returned each data source server is encapsulated into predetermined format is specially:
Said Query Result file generating module does not store data into Query Result that the data source server in the said buffer memory returns as second Query Result, and first Query Result and second Query Result are encapsulated in the said Query Result file.
Further, said data grids also comprise:
Data cache module is used in setting cycle, if data source server returns Query Result, then notes this data source server and is carrying out this time Query Result used response time when returning; When said setting cycle arrived, the data storage of response time in the said setting cycle is the longest or data source server that recording frequency is the highest was in the local cache of said data grids.
According to another aspect of the present invention, a kind of application server is provided also, has comprised:
The query requests receiver module is used for the query requests that receiving terminal sends;
The query requests parsing module is used for parsing querying condition from said query requests;
The inquiry file generation module is used to generate and comprises inquiry file said querying condition, that have predetermined format;
The inquiry file sending module is used for said inquiry file is sent to data grids;
Query Result file receiver module is used to receive said data grids Query Result file that return, that have predetermined format;
Query Result document analysis module is used for parsing Query Result from said Query Result file;
Query Result returns module, is used for the Query Result that parses is returned to said terminal.
The embodiment of the invention is because application server in the heterogeneous networks medium and provide between the data source server of data source and be provided with data grids; Make the application server in the different medium can obtain the Query Result of each data source in the different medium through the data grids platform; Just application server can obtain the Query Result of each data source in the integration of three networks through the data grids platform, and the user obtains more more conveniently, more perfect Query Result thereby make.
Further, because data grids can be with the metadata cache of certain or some data source server in local cache, thereby can accelerate inquiry velocity.
Description of drawings
Fig. 1 is the data query system synoptic diagram based on the integration of three networks of the embodiment of the invention;
Fig. 2 a, 2b are the method flow diagram that the data query system of the embodiment of the invention carries out data query;
Fig. 3 is the method flow diagram that the data grids 102 of the embodiment of the invention arrive the data storage in data source data storehouse local cache;
Fig. 4 is that the data source server of the support ldap protocol of the embodiment of the invention is set up and open hierarchical structure synoptic diagram to data grids;
Fig. 5 is the application server inner structure block diagram of the embodiment of the invention;
Fig. 6 is the data grids inner structure block diagram of the embodiment of the invention.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, below with reference to accompanying drawing and enumerate preferred embodiment, to further explain of the present invention.Yet, need to prove that many details of listing in the instructions only are in order to make the reader to one or more aspects of the present invention a thorough understanding arranged, even if there are not these specific details also can realize these aspects of the present invention.
Terms such as " module " that the application uses, " system " are intended to comprise the entity relevant with 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: the thread of the process of moving on the processor, processor, object, executable program, execution, program and/or computing machine.For instance, the application program of moving on the computing equipment can be a module with this computing equipment.One or more modules can be positioned at an executory process and/or thread, and module also can be on the computing machine and/or be distributed between two or more the computing machines.
Inventor of the present invention considers that data grids are application platforms of the separate data in a kind of storage, transmission and the processing global range, and it can combine the memory technology in high-end computing technique, high performance network and the wide area network scope effectively.Under the environment of the integration of three networks, information data can reach the magnanimity rank.In principle, data grids can connect any data source through both sides' safety certification, give data grids as long as this data source is agreed open corresponding ports, connected mode and DAP.Therefore, can utilize data grids to realize the data sharing that the electricity merchant under the integration of three networks uses.
Specify the technical scheme of the embodiment of the invention below in conjunction with accompanying drawing.The data query system based on the integration of three networks of the embodiment of the invention, promptly, as shown in Figure 1 based on the data query system of heterogeneous networks medium, comprising: application server 101, data grids 102, data source server 103.
Wherein, application server 101 can be one, also can be a plurality of; A plurality of application servers 101 can be arranged in the various network medium.For example; An application server has been shown among Fig. 1 has been arranged in broadcasting and television network (Broadcasting&TV network); The 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 the service of electronic application, the for example service of E-business applications for the user.Particularly, mode that application server 101 can be through website and webpage or the mode that run application provide the service of electronic application.For example, the webpage of the website, Taobao store in the E-business applications that the user provides through terminal access application server 101, the inquiry Related product, 101 of application servers return Query Result to the user.
Data source server 103 can be one, also can be a plurality of; A plurality of data source server 103 can be arranged in the various network medium.For example, a data source server has been shown among Fig. 1 has been arranged in broadcasting and television network (abbreviation Broadcasting Cable Network), another data source server is arranged in the internet, and also a data source server is arranged in communication network.Store data in the data source server 103 and can supply inquiry, promptly stored the data of data source in the data source server 103.The data source server that is arranged in the consolidated network medium can be supported different protocol.For example, being arranged in the agreement that the data source server of Broadcasting Cable Network supports can comprise: agreements such as LDAP, SQL; Being arranged in the agreement that the data source server of internet supports can comprise: agreements such as HTTP, HTTPS, SQL, SOAP; Being arranged in the agreement that the data source server of communication network supports can comprise: agreements such as HTTP, HTTPS, SOAP, LDAP, Diameter.
The embodiment of the invention carry out the method for data query based on the data query system of the integration of three networks, process flow diagram comprises the steps: shown in Fig. 2 a
S201: the query requests that application server 101 receiving terminals send.
Application server 101 can provide the service of electronic application, the for example service of E-business applications for the user.Particularly, mode that application server 101 can be through website and webpage or the mode that run application provide the service of electronic application.For example, the webpage of the website, Taobao store in the E-business applications that the user provides through terminal access application server 101, the inquiry Related product, 101 of application servers return Query Result to the user.
The user can send query requests through the application server 101 of terminal in the heterogeneous networks medium.That is to say that the application server place network medium that receives the query requests of sending at the terminal specifically can be internet, perhaps communication network, perhaps Broadcasting Cable Network.Said terminal comprises various equipment with network connecting function and Presentation Function, like mobile phone, computing machine, notebook, panel computer, intelligent television etc.
For example, the user sends the query requests of certain product to the WAP version electronic emporium of the application server 101 of communication network through mobile phone; For another example, the user sends the query requests of certain product to Taobao's electronic emporium of the application server 101 of internet through computing machine; And for example, the user sends the query requests of certain product to the TV store of Broadcasting Cable Network through intelligent television.
S202: application server 101 parses querying condition after receiving the query requests of sending at the terminal from query requests.
The heterogeneous networks medium is supported different protocol, and the application server 101 in the heterogeneous networks medium is after receiving the query requests that comprises querying condition thus, and the protocol analysis query requests according to its place network medium is supported obtains querying condition.
The querying condition that is comprised in the query requests is decided according to actual conditions, can comprise one or more in the following condition usually: 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 protocols agreement, and this inquiry file can comprise above-mentioned querying condition.The querying condition that specifically comprises in the inquiry file can be done 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 be returned Query Result based on a little querying conditions.Below show the inquiry file of a concrete XML (eXtensible Markup Language, extend markup language) form:
Figure BDA00001772980500091
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 to each querying condition, and the query context of qualification can be documented in the XSD file.Like this, application server 101 can be the option that user terminal provides each querying condition according to the query context of putting down in writing in the XSD file, and the user therefrom selects through the terminal.For example, to product category, application server 101 can support classification to have only with data source server 103: TV, refrigerator, washing machine, mobile phone and air-conditioning, and a concrete XSD file is as follows:
Figure BDA00001772980500092
Figure BDA00001772980500101
Above-mentioned XSD file shows that alternative option only comprises in the query context: TV (TV), refrigerator (Refrigerator), washing machine (washing-machine), mobile phone (CellPhone) and air-conditioning (airCondition) to querying condition product category (category).
S204: after data grids 102 receive inquiry file, from said inquiry file, parse querying condition.
Because the form of inquiry file is scheduled to, that is to say that data grids 102 have been confirmed the form of inquiry file in advance, therefore, behind the inquiry file that receives application server 101 transmissions, 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 said querying condition in the message of a plurality of different agreements.
Data grids 102 generate message corresponding to the data source server in the variant network medium respectively according to said querying condition, all include the querying condition that data grids 102 parse in the message of each generation.Particularly; Data grids 102 parse querying condition from inquiry file after; For the data source server in the variant network medium; According to the network address of each data source server of data source information file (schema file) record and the agreement that this data source server is supported, generate message corresponding to this data source server.The schema file of storage specifically can be as follows in the data grids 102:
Figure BDA00001772980500111
From above-mentioned schema file, can find out, write down 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 IP (the Internet Protocol of this data source server; Internet protocol) agreement supported of address, port numbers and this data source server generates the message corresponding to this data source server.Message for different agreement generated will describe in detail in follow-up.
S206: data grids 102 send the message that generates respectively to the data source server 103 of correspondence.
S207: after data source server 103 receives message, from message, parse querying condition, after inquiring about according to querying condition, return Query Result to data grids 102.
After data source server 103 receives message, from message, parse querying condition, after inquiring about according to querying condition, return the technology that the message that comprises Query Result is well known to those skilled in the art, repeat no more here to data grids 102.
S208: after data grids 102 received the Query Result that each data source server 103 returns, the Query Result file that the Query Result that each data source server is returned is encapsulated into predetermined format returned to application server 101.
Data grids 102 parse Query Result respectively from the message that comprises Query Result that each data source server 103 is returned; After obtaining Query Result that each data source server 103 returns, generate and comprise the Query Result file of these Query Results and 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 protocols agreement.A concrete Query Result file can be as follows:
Figure BDA00001772980500121
Figure BDA00001772980500131
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, and comprises in the Query Result that returns respectively that the brand that inquires is that TCL, model are price, picture, video, comment, the welcome degree of 6100 TV.
S209: application server 101 therefrom parses Query Result and returns to the terminal after receiving said Query Result file.
Application server 101 therefrom parses the Query Result of each data source server 103 after receiving said Query Result file.101 pairs of Query Results of application server carry out corresponding logical process, and Query Result is returned to the terminal.Application server 101 is encapsulated into Query Result that the technology returned to the terminal in the message of respective protocol is well known to those skilled in the art, and repeats no more here.
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 of being inquired about; Data grids 102 are the longest with the response time in the setting cycle, or the data storage in the highest data source data storehouse of enquiry frequency is in local cache, when 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.
Data grids 102 are with the data storage in the data source data storehouse method flow to local cache, and are as shown in Figure 3, comprise the steps:
S301: data grids 102 are in setting cycle; If receive the Query Result that data source server 103 is returned; Then in record sheet, note this data source server carrying out this time Query Result used response time when returning, promptly return the duration between the Query Result from sending a message to this data source server.The length of setting cycle can be confirmed according to actual conditions, for example, can be 1 hour, perhaps 1 day.Following table 1 shows the response time in the data source data storehouse of statistics in certain cycle:
Table 1
Inquiry ID The 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 the table 1 are numbered corresponding different respectively data source server, that is to say, can unique specified data source server according to the data source numbering.
S302: when data grids 102 arrived at setting cycle, the data storage of confirming one of them data source is numbered pairing data source server according to the record in the record sheet was in local cache.
Can find out that from table 1 it is the longest that data source is numbered the response time of 3 data source server, data source is numbered the higher by enquiry frequency of 1,2,4 data source server, has been inquired about 2 times.Can generate strategy according to the response time of data source server or by enquiry frequency, confirm that metadata cache with which or which data source server is in data grids 102.The metadata cache of data source server that for example, can response time is the longest is in data grids 102; The metadata cache of data source server that perhaps, will the highest by enquiry frequency (being that recording frequency is the highest in the record sheet) is in data grids 102; Perhaps, take all factors into consideration response time and confirmed behind the enquiry frequency the data source server of metadata cache in the data grids 102.
Data grids 102 are after determining data source server, and response time is the longest or by after the highest data source server of enquiry frequency such as determining, with the metadata cache of this data source server in local cache.Particularly, in the local cache of data grids 102 maybe before buffer memory the data of other data source server, if the local cache space is enough, then directly with the metadata cache of this data source server in local cache; If the local cache insufficient space, the data of other data source server of buffer memory for example, can override the data of depositing data source server at most in the buffer memory according to the FIFO principle before then the data of this data source server of usefulness override in the local cache.
For buffer memory in the data grids 102 data conditions of certain or some data source databases, before carrying out above-mentioned steps S205, data grids 102 can be carried out following steps S2041 earlier, concrete process flow diagram is shown in Fig. 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 said querying condition, obtain first Query Result.
Because in buffer memory, carrying out data query will be greatly faster than the speed of in the longest data source data storehouse of response time, inquiring about, thereby has improved inquiry velocity greatly.
Data grids 102 are not carried out above-mentioned steps S208 after receiving the Query Result that each data source server 103 returns, but execution in step S2081:
S2081: data grids 102 do not store data into Query Result that the data source server in the said buffer memory returns as second Query Result, first Query Result and second Query Result all are encapsulated into said Query Result file return to application server 101.That is to say; For buffer memory in the data grids 102 data conditions of certain or some data source databases; When carrying out above-mentioned steps S208; Also comprise: the Query Result that data grids 102 return except that each data source server is encapsulated in the Query Result file, also first Query Result also is encapsulated into said Query Result file and returns to application server 101.
Other step among Fig. 2 b except that S2041, S2081, identical with each step of introducing among Fig. 2 a, no longer repeatedly introduce one by one here.
Here it is to be noted; Though data grids 102 have obtained Query Result for the data in the data source data storehouse that is cached in local cache; Yet; Data grids 102 are specially the message that said querying condition is encapsulated into a plurality of different agreements in step S205: data grids 102 corresponding in the variant network medium, data do not store the data source server in the said buffer memory into; Generate message respectively according to said querying condition, also stored the data source server in the said buffer memory into, generate message respectively according to said querying condition corresponding to data.Like this, and though data grids 102 can to whether with the data source server test response duration of data storage in the buffer memory, in record sheet, make respective record, when arriving, confirm data are write the data in buffer source database for setting cycle.
Among the above-mentioned steps S205; Corresponding to each data source data storehouse; The agreement that data grids 102 are supported according to IP address, port numbers and this data source server of this data source server, generation is following corresponding to the detailed introduction of the message of this data source server:
For example; Data grids 102 link to each other with 4 data source servers; 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, SQL), HTTP (Hyper text Transfer Protocol; HTTP), SOAP (Simple Object Access Protocol, basic object access protocal).
For the place network medium is Broadcasting Cable Network, the data source server of supporting ldap protocol, and this data source server will be set up and hierarchical structure open as shown in Figure 4 to data grids.
Wherein, dn (Distinguished Name, identification name) the label amazon of these data is corresponding in one-level RDN (o=amazon) and the schema file; Secondary RDN (Relative Distinguished Name, identification name relatively) corresponding goods classification (as: ou=TV), corresponding with the category label in the inquiry file; Three grades of RDN corresponding goods brands (as: brand=TCL), corresponding with the brand label in the inquiry file; Level Four RDN is corresponding to marque (as: model=6100); Corresponding with the model label in the inquiry file; And this grade RDN node will comprise information attribute value (as: price price, comment remark, picture pic that front end electricity merchant application requirements obtains down; Video URL address vedio, welcome degree popularity).
Data grids 103 are according to this hierarchical structure, and the query statement that is comprised in the message corresponding to this data source data storehouse that generates of the querying condition in the schema file, inquiry file is:
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 the Broadcasting Cable Network, generation is similar corresponding to method and this method of the message of this data source server, details no longer one by one here.
For the place network medium is the relational data source of internet; Promptly support the data source server of SQL agreement; This data source server will provide a tableview (logical view) to data grids; This tableview need be major key with the querying condition that comprises in the inquiry file, and the data that electricity merchant's application requirements returns all will exist as an attribute of this table.The structure of this tableview is so:
Table view name:product (corresponding) with the tableview attribute of this data source among the schema;
Primary key:category, brand, model (with the category in the inquiry file, brand and model label are corresponding);
Attribute:price, pic, video, remark, popularity (attribute that this tableview comprised need contain require the information attribute value that returns);
According to the querying condition in this tableview and schema file and the inquiry file, the query statement that is comprised in the message corresponding to the data source server of 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
For the place network medium is that internet, supported protocol are the data source server of HTTP, and this data source server need be opened the corresponding communication port and give data grids, and data grids generate the HTTP request message that comprises querying condition according to querying condition, as:
http://135.252.1.3:8080/query?category=TV&brand=TCL&model=6100)
Send to this data source server with POST/GET (corresponding to the requesting method of this data source server definition in the schema file) mode.This data source server receives that request back triggers corresponding application (like Servlet etc.); According to the data in the querying condition Query Database of receiving; And with the commodity data information of needs (like price, pic, video; Remark, popularity) form with HTTP response returns to data grids.
For the data source server of supporting other agreement in the 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 here.
For the place network medium is that communication network, supported protocol are the data source server of SOAP, and this data source server provides the invocation of procedure of visit data and the agreement of replying to data grids, through the XML coding, sends soap message.The soap message of the inquiry item property that for example, generates according to querying condition is:
Figure BDA00001772980500181
The soap message of replying other attributes such as concrete price of replying that the SOAP data source server is corresponding is:
Figure BDA00001772980500182
For the data source server of supporting other agreement in the communication network, generation is similar corresponding to method and this method of the message of this data source server, details no longer one by one here.
A kind of application server that the embodiment of the invention provides; Inner structure is as shown in Figure 5, comprising: query requests receiver module 501, query requests 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 module 507.
Query requests receiver module 501 is used for the query requests that receiving terminal sends; Particularly, the agreement receiving terminal supported according to present application server of query requests receiver module 501 query requests of sending.
Query requests parsing module 502 is used for parsing querying condition from the query requests that query requests receiver module 501 receives.
Inquiry file generation module 503 is used to obtain the querying condition that query requests parsing module 502 is resolved, and generates to comprise inquiry file said querying condition, that have predetermined format.
Inquiry file sending module 504 is used for the inquiry file that inquiry file generation module 503 generates is sent to data grids.
Query Result file receiver module 505 is used to receive said data grids Query Result file that return, that have predetermined format.
Query Result document analysis module 506 is used for parsing Query Result from the Query Result file that Query Result file receiver module 505 receives.
Query Result returns module 507 and is used for the Query Result that Query Result document analysis module 506 parses is returned to said terminal.Particularly, Query Result returns agreement that module 507 supports according to present application server and Query Result is encapsulated the back returns to said terminal.
Particularly, the concrete course of work that each module in the application server of the embodiment of the invention is related can repeat no more with reference to disclosed related content in the querying method shown in above-mentioned Fig. 2 a, the 2b here.
A kind of data grids that the embodiment of the invention provides; Inner structure is 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.
Inquiry file receiver module 601 is used for receiving the inquiry file that the application server of heterogeneous networks medium sends;
Inquiry file parsing module 602 is used for parsing querying condition from the inquiry file that inquiry file receiver module 601 receives.Because the form of inquiry file is made an appointment, therefore, inquiry file parsing module 602 can be resolved the inquiry file that receives according to the form of making an appointment.
Message generating module 603 is used to obtain the querying condition that inquiry file parsing module 602 is resolved, and corresponding to the data source server in the variant network medium, generates message respectively according to said querying condition.Particularly; Message generating module 603 is for the data source server in the variant network medium; According to the network address of each data source server of schema file logging and the agreement that this data source server is supported, generate corresponding to this data source server, comprise the message of said querying condition.
The message that message transmission module 604 is used for message generating module 603 is generated is sent to the data source server of correspondence.
Message sink module 605 is used to receive the message that comprises Query Result that each data source server is returned.
Query Result file generating module 606 is used for the Query Result that each data source server that message sink module 605 receives is returned is encapsulated into the Query Result file of predetermined format.
Query Result file send module 607 is used for the Query Result file that Query Result file generating module 606 generates is returned to the application server that sends said inquiry file.
Further, data grids also comprise: caching query module 608.
The querying condition that caching query module 608 is used for parsing according to inquiry file parsing module 602 is inquired about in the data of at least one data source server that local cache is stored, and obtains first Query Result.
Thereby Query Result file generating module 606 is used for the Query Result that each data source server that message sink module 605 receives is returned 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 the said buffer memory returns as second Query Result, and first Query Result that second Query Result and caching query module 608 are obtained is encapsulated in the said Query Result file.
Further, data grids also comprise: data cache module 609.
Data cache module 609 is used in setting cycle, if data source server returns Query Result, then notes this data source server and is carrying out this time Query Result used response time when returning; When said setting cycle arrived, the data storage of response time in the said setting cycle is the longest or data source server that recording frequency is the highest was in the local cache of said data grids.
Particularly, the concrete course of work that each module in the data grids of the embodiment of the invention is related can repeat no more with reference to disclosed related content in the querying method shown in above-mentioned Fig. 2 a, the 2b here.
Though; Main in the embodiment of the invention is that example has been told about concrete scheme with the data query in the E-business applications, and those skilled in the art can be easily be applied to the occasion that other electronic application need be obtained the data query of the data source in the heterogeneous networks medium with the technical scheme of the embodiment of the invention; Therefore, the data query for other type also should be regarded as protection scope of the present invention under the prerequisite that does not break away from the principle of the invention.
The embodiment of the invention is because application server in the heterogeneous networks medium and provide between the data source server of data source and be provided with data grids; Make the application server in the different medium can obtain the Query Result of each data source in the different medium through the data grids platform; Just application server can obtain the Query Result of each data source in the integration of three networks through the data grids platform, and the user obtains more more conveniently, more perfect Query Result thereby make.
Further, because data grids can be with the metadata cache 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 that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; This program can be stored in the computer read/write memory medium, as: ROM/RAM, magnetic disc, CD etc.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.

Claims (10)

1. data enquire method based on the integration of three networks comprises:
Application server parses querying condition after receiving the query requests of sending at the terminal; Said querying condition is encapsulated in the inquiry file of predetermined format and sends to data grids;
Said data grids parse querying condition from said inquiry file; And corresponding to the data source server in the variant network medium, generate message respectively according to said querying condition after, the message that generates is sent to the data source server of correspondence;
The Query Result that said data grids return each data source server returns to said application server after being encapsulated into the Query Result file of predetermined format;
Said application server therefrom parses Query Result and returns to the terminal after receiving said Query Result file.
2. the method for claim 1 is characterized in that, and is said corresponding to the data source server in the variant network medium, generates message respectively according to said querying condition and is specially:
Said data grids are for the data source server in the variant network medium; According to the network address of each data source server of schema file logging and the agreement that this data source server is supported, generate corresponding to this data source server, comprise the message of said querying condition.
3. the method for claim 1 is characterized in that,, generates respectively before the message according to said querying condition corresponding to the data source server in the variant network medium said, also comprises:
Inquire about in the data of at least one data source server that said data grids are stored in local cache according to said querying condition, obtain first Query Result; And
The Query Result file that the Query Result that said data grids return each data source server is encapsulated into predetermined format is specially:
Said data grids do not store data into Query Result that the data source server in the said buffer memory returns as second Query Result, and first Query Result and second Query Result are encapsulated in the said Query Result file.
4. method as claimed in claim 3 is characterized in that, the data of the data source server in the local cache of said data grids are stored according to following method:
Said data grids are in setting cycle, if data source server returns Query Result, then note this data source server and carrying out this time Query Result used response time when returning;
Said data grids are when setting cycle arrives, and the data storage of response time in the setting cycle is the longest or data source server that recording frequency is the highest is in the local cache of said data grids.
5. method as claimed in claim 4 is characterized in that, said with setting cycle in the data storage of the longest or data source server that recording frequency is the highest of response time before the local cache of said data grids, also comprise:
Said data grids judge whether the local cache space is enough; And,
The data storage of said response time in the setting cycle is the longest or data source server that recording frequency is the highest is specially to the local cache of said data grids:
If said local cache space is enough, the data storage of then directly that response time in the setting cycle is the longest or data source server that recording frequency is the highest is in the local cache of said data grids;
If said local cache insufficient space, then the data the longest or data source server that recording frequency is the highest of response time in the setting cycle are override the data of the storage time in the said local cache of data source server at most.
6. data query system based on the integration of three networks comprises: data grids, be connected with said data grids be arranged at a plurality of application servers in the heterogeneous networks medium, be connected with said data grids be arranged at a plurality of data source server in the heterogeneous networks medium;
Said application server is used for after receiving the query requests of sending at the terminal, parsing querying condition; Said querying condition is encapsulated in the inquiry file of predetermined format and sends to said data grids;
Said data grids are used for parsing querying condition from said inquiry file, and corresponding to the data source server in the variant network medium, generate message respectively according to said querying condition after, the message that generates is sent to the data source server of correspondence;
Said data source server is used for inquiring about according to the querying condition of the message of said data grids transmission, and returns Query Result to said data grids;
Said data grids return to said application server after also being used for the Query Result that each data source server is returned is encapsulated into the Query Result file of predetermined format;
Said application server therefrom parses Query Result and returns to the terminal after receiving the Query Result file that returns.
7. system as claimed in claim 6 is characterized in that, said data grids generate message respectively according to said querying condition and are specially corresponding to the data source server in the variant network medium:
Said data grids are for the data source server in the variant network medium; According to the network address of each data source server of schema file logging and the agreement that this data source server is supported, generate corresponding to this data source server, comprise the message of said querying condition.
8. system as claimed in claim 6 is characterized in that,
Said data grids also are used in said data source server corresponding to variant network medium; Generate respectively before the message according to said querying condition; Inquire about in the data of at least one data source server of in local cache, storing according to said querying condition, obtain first Query Result; And
The Query Result file that the Query Result that said data grids return each data source server is encapsulated into predetermined format is specially:
Said data grids do not store data into Query Result that the data source server in the said buffer memory returns as second Query Result, and first Query Result and second Query Result are encapsulated in the said Query Result file.
9. system as claimed in claim 8 is characterized in that,
Said data grids also are used in setting cycle, if data source server returns Query Result, then note this data source server and are carrying out this time Query Result used response time when returning; When said setting cycle arrived, the data storage of response time in the said setting cycle is the longest or data source server that recording frequency is the highest was in the local cache of said data grids.
10. data grids comprise:
The inquiry file receiver module is used for receiving the inquiry file that the application server of heterogeneous networks medium sends;
The inquiry file parsing module is used for parsing querying condition from said inquiry file;
Message generating module is used for the data source server corresponding to variant network medium, generates message respectively according to said querying condition;
Message transmission module is used for the message that generates is sent to the data source server of correspondence;
The message sink module is used to receive the Query Result that each data source server is returned;
The Query Result file generating module is used for the Query Result that each data source server is returned is encapsulated into the Query Result file of predetermined format;
The Query Result file send module is used for the Query Result file that generates is returned to the application server that sends said inquiry file.
CN201210198815.6A 2012-06-15 2012-06-15 Data querying method and system based on tri-networks integration Active CN102722589B (en)

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 true CN102722589A (en) 2012-10-10
CN102722589B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016107397A1 (en) * 2014-12-29 2016-07-07 Huawei Technologies Co., Ltd. System and method for model-based search and retrieval of networked data
CN107729345A (en) * 2017-07-27 2018-02-23 上海壹账通金融科技有限公司 Website data processing method, device, website data processing platform and storage medium
CN108984553A (en) * 2017-06-01 2018-12-11 北京京东尚科信息技术有限公司 Caching method and device
CN111563216A (en) * 2020-07-16 2020-08-21 平安国际智慧城市科技股份有限公司 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016107397A1 (en) * 2014-12-29 2016-07-07 Huawei Technologies Co., Ltd. System and method for model-based search and retrieval of networked data
CN108984553A (en) * 2017-06-01 2018-12-11 北京京东尚科信息技术有限公司 Caching method and device
CN108984553B (en) * 2017-06-01 2022-02-01 北京京东尚科信息技术有限公司 Caching method and device
CN107729345A (en) * 2017-07-27 2018-02-23 上海壹账通金融科技有限公司 Website data processing method, device, website data processing platform and storage medium
WO2019019650A1 (en) * 2017-07-27 2019-01-31 深圳壹账通智能科技有限公司 Website data processing method and apparatus, website data processing platform and storage medium
CN107729345B (en) * 2017-07-27 2020-08-18 深圳壹账通智能科技有限公司 Website data processing method and device, website data processing platform and storage medium
CN111563216A (en) * 2020-07-16 2020-08-21 平安国际智慧城市科技股份有限公司 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

Also Published As

Publication number Publication date
CN102722589B (en) 2014-06-11

Similar Documents

Publication Publication Date Title
CN100380378C (en) Automatic discovering of web services
KR101543221B1 (en) - Method Apparatus and System for Providing Muti User-Multi Service
US20160205106A1 (en) Systems and methods for providing iot services
CN102722589B (en) Data querying method and system based on tri-networks integration
CN101188625B (en) Method and system for realizing information content subscription
US20010013037A1 (en) Information communication system, information communication method, and information provision business method
CN101147380B (en) Method and apparatus for efficiently expanding a P2P network
CN101635895B (en) Website content subscribing system, website content subscribing method, mobile communication terminal and server
CN101609415B (en) Universal service calling system and method based on middleware
CN106651470A (en) Directed advertisement promotion system based on user behavior prediction analysis
CN104125208A (en) Data transmission method and data transmission device
US20080109481A1 (en) Context based network search
CN101083633B (en) Information searching system and searching method
CN101783733B (en) Method for realizing information aggregation share through terminal device and terminal device
CN110110196A (en) A kind of information push method and device
Dickerson et al. Stream feeds-an abstraction for the world wide sensor web
CN107644017A (en) The querying method and device of journal file
CN100498780C (en) Data inquire system and method
CN110020243A (en) Querying method, device, Internet of Things server and the storage medium of internet of things data
CN101547194A (en) Method and system for obtaining internet data by embedded type terminal
CN103051512A (en) Instant messaging establishing method and system
JP2019175472A (en) Method and apparatus for data matching and integration
CN103237051A (en) Product information providing system, product information providing method, server and terminal
CN103001967A (en) Source station server and business push method
CN105357253A (en) Network data request processing device and method

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.