CN105989070A - Method and system for requesting data from middleware and middleware client - Google Patents

Method and system for requesting data from middleware and middleware client Download PDF

Info

Publication number
CN105989070A
CN105989070A CN201510069814.5A CN201510069814A CN105989070A CN 105989070 A CN105989070 A CN 105989070A CN 201510069814 A CN201510069814 A CN 201510069814A CN 105989070 A CN105989070 A CN 105989070A
Authority
CN
China
Prior art keywords
middleware
request
data
loaded
request data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510069814.5A
Other languages
Chinese (zh)
Other versions
CN105989070B (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.)
Alibaba Singapore Holdings Pte Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510069814.5A priority Critical patent/CN105989070B/en
Priority to PCT/CN2016/073146 priority patent/WO2016127856A1/en
Publication of CN105989070A publication Critical patent/CN105989070A/en
Application granted granted Critical
Publication of CN105989070B publication Critical patent/CN105989070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Abstract

The invention discloses a method and a system for requesting data from middleware and a middleware client. The method comprises the steps of obtaining characteristic information related to a to-be-loaded webpage, and determining a to-be-requested data name set corresponding to the to-be-loaded webpage according to the characteristic information, wherein the to-be-requested data name set comprises a to-be-requested data name corresponding to at least one piece of middleware; receiving a middleware data request and determining target middleware according to the middleware data request; determining a to-be-requested data name required to be obtained from the target middleware according to the target middleware and the to-be-requested data name set; and obtaining a corresponding middleware data set from the target middleware according to the to-be-requested data name required to be obtained from the target middleware, and performing caching, wherein corresponding middleware data is extracted from the cached middleware data set and fed back if the middleware data request sent to the target middleware is received again. According to the method, the problem caused by requesting for combination is solved.

Description

From the method for middleware request data, system and middleware client
Technical field
The application relates to Internet technical field, particularly relates to a kind of method from middleware request data, system and middleware Client.
Background technology
Along with the fast development of Internet technology, internet site has gradually formed scale, when the scale of web station system is big After to a certain extent, system tends to serviceization, so in large-scale web station system, a webpage generally requires many The multiple middleware of secondary request just can complete to render.
In correlation technique, when a webpage repeatedly asks same middleware, it is common that provide a batch by middleware Interface, requesting party makes requests on merging by this batch interface.Although batch interface can solve the problem that the problem repeatedly called, but It is, when request being merged the service code with requesting party and being coupled, problems with to be brought: (1) increases when needs One is newly called, or delete one no when calling, requesting party's request of must changing merges code;(2) called side Need to write in all places having merging demand to merge the logic called;(3) in the framework of layer-stepping, the tune of different layers Also difficulty can be brought to the transmission calling result with merging.
Summary of the invention
One of technical problem that the purpose of the application is intended to solve in correlation technique the most to a certain extent.
To this end, the first of the application purpose is to propose a kind of method from middleware request data.The method is by centre The self study of part client completes request and merges, and the request in above-mentioned correlation technique that not only solves merges the problem brought, Requesting party need not understand the process that whole request merges simultaneously, simplifies the operation of requesting party.
Second purpose of the application is to propose a kind of system from middleware request data.
3rd purpose of the application is to propose a kind of middleware client.
In order to achieve the above object, the method from middleware request data of the application first aspect embodiment, including: obtain The characteristic information relevant to webpage to be loaded, and determine that treating corresponding to described webpage to be loaded is asked according to described characteristic information Data name set, wherein, described in treat request data name set include at least one middleware corresponding treat request data name Claim;Receive middleware request of data, and determine target middleware according to described middleware request of data;According in described target Between part and described treat that request data name set determines and need from treating request data title acquired in described target middleware;With And according to described needs from acquired in described target middleware to treat that request data title obtains from described target middleware corresponding Middleware data set merges caching, wherein, if again receiving the middleware request of data sent to described target middleware From the described middleware data acquisition system of described caching, then extract and feed back the middleware data of correspondence.
The method from middleware request data of the embodiment of the present application, after a webpage load request, middleware client Multiple middleware request of data requested resources are recorded, when webpage load request arrives next time, at middleware Client receives for the first time when the middleware request of data that target middleware sends, by the mistake of last webpage load request The repeatedly middleware request of data to resource recorded in journey, does merging automatically, i.e. by providing a batch interface, And by batch interface resource after target middleware request merges, request results is buffered in middleware client simultaneously, If during this webpage load request, middleware client receives the middleware sent to target middleware again During request of data, then from the request results of caching, extract and feed back the middleware data of correspondence, not only solve above-mentioned In correlation technique, request merges the problem brought, and requesting party need not understand the process that whole request merges simultaneously, simplifies The operation of requesting party.
In order to achieve the above object, the system from middleware request data of the application second aspect embodiment, including user visitor Family end, web page server, middleware client and at least one middleware, wherein, described subscription client, for institute State web page server send webpage load request and receive the web data of described web page server feedback;Described web page server, For building webpage to be loaded according to described webpage load request, and send middleware request of data to described middleware client To obtain middleware data, and the middleware data feedback extremely described user client that will obtain from least one middleware described End;Described middleware client, for obtaining the characteristic information relevant to described webpage to be loaded, and believes according to described feature Breath determines treats request data name set corresponding to described webpage to be loaded, and determines target according to middleware request of data Middleware, and according to described target middleware and described treat request data name set determine needs from described target middleware institute Obtain treats request data title, and according to described needs from acquired in described target middleware treat request data title from Described target middleware obtains corresponding middleware data set and merges caching, and again receives and send to described target middleware Middleware request of data time, extract from the described middleware data acquisition system of described caching and feed back correspondence middleware data, Wherein, treat described in request data name set include at least one middleware corresponding treat request data title.
The system from middleware request data of the embodiment of the present application, after a webpage load request, middleware client Multiple middleware request of data requested resources are recorded, when webpage load request arrives next time, at middleware Client receives for the first time when the middleware request of data that target middleware sends, by the mistake of last webpage load request The repeatedly middleware request of data to resource recorded in journey, does merging automatically, i.e. by providing a batch interface, And by batch interface resource after target middleware request merges, request results is buffered in middleware client simultaneously, If during this webpage load request, middleware client receives the middleware sent to target middleware again During request of data, then from the request results of caching, extract and feed back the middleware data of correspondence, not only solve above-mentioned In correlation technique, request merges the problem brought, and requesting party need not understand the process that whole request merges simultaneously, simplifies The operation of requesting party.
In order to achieve the above object, the middleware client of the application third aspect embodiment, including: treat request data title Set determines module, for obtaining the characteristic information relevant to webpage to be loaded, and according to described characteristic information determine described in treat Load and treat request data name set corresponding to webpage, wherein, described in treat that request data name set includes at least one Between part corresponding treat request data title;Target middleware determines module, is used for receiving middleware request of data, and according to institute State middleware request of data and determine target middleware;Treat that request data title determines module, for according to described target middleware Treat that request data name set determines need from treating request data title acquired in described target middleware with described;In and Between part data providing module, for according to described needs from treating that request data title is from described acquired in described target middleware Target middleware obtains corresponding middleware data set and merges caching, wherein, if again received to described target middleware The middleware request of data sent then is extracted from the described middleware data acquisition system of described caching and feeds back the middle number of packages of correspondence According to.
The middleware client of the embodiment of the present application, after a webpage load request, can be by multiple middleware request of data Requested resource is recorded, and when webpage load request arrives next time, receives for the first time and sends out to target middleware During the middleware request of data sent, by the repeatedly middleware to resource recorded during last webpage load request Request of data, is done merging automatically, i.e. by providing a batch interface, and is asked to target middleware by batch interface Resource after merging, is buffered in middleware client simultaneously by request results, if during this webpage load request, Middleware client receives again when the middleware request of data that target middleware sends, then from the request results of caching Extracting and feed back the middleware data of correspondence, the request in above-mentioned correlation technique that not only solves merges the problem brought, Requesting party need not understand the process that whole request merges simultaneously, simplifies the operation of requesting party.
Aspect and advantage that the application adds will part be given in the following description, and part will become bright from the following description Aobvious, or recognized by the practice of the application.
Accompanying drawing explanation
The application above-mentioned and/or that add aspect and advantage will be apparent from from the following description of the accompanying drawings of embodiments With easy to understand, wherein,
Fig. 1 is the flow chart of the method from middleware request data according to one embodiment of the application;
Fig. 2 be according to one embodiment of the application from the method for middleware request data in user to access pages first time, institute time The exemplary plot of operating process;
Fig. 3 be according to one embodiment of the application from the method for middleware request data in second time user to access pages time institute The exemplary plot of operating process;
Fig. 4 is the structural representation of the system from middleware request data according to one embodiment of the application;
Fig. 5 is the structural representation of the middleware client according to one embodiment of the application;
Fig. 6 is the structural representation of the middleware client according to another embodiment of the application.
Detailed description of the invention
Embodiments herein is described below in detail, and the example of described embodiment is shown in the drawings, the most identical Or similar label represents same or similar element or has the element of same or like function.Retouch below with reference to accompanying drawing The embodiment stated is exemplary, it is intended to be used for explaining the application, and it is not intended that restriction to the application.
Below with reference to the accompanying drawings the method from middleware request data of the embodiment of the present application, system and middleware client are described.
Fig. 1 is the flow chart of the method from middleware request data according to one embodiment of the application.As it is shown in figure 1, should May include that from the method for middleware request data
S101, obtains the characteristic information relevant to webpage to be loaded, and determines corresponding to webpage to be loaded according to characteristic information Treat request data name set, wherein, treat request data name set include at least one middleware corresponding treat request data Title.
Additionally, in embodiments herein, characteristic information can be the address information of the page to be loaded, ask the page to be loaded Member's type information of user, the page to be loaded title (such as list (catalogue) page, detail (details) page Deng), ask the page to be loaded client-side information (such as browser information used, operation system information etc.), ask to be loaded The calling interface when cookie information of the page or web page server call middleware client or parameter etc..
It addition, in embodiments herein, corresponding to webpage to be loaded, treat that request data name set can be by following step Rapid generate: when webpage to be loaded is loaded for the first time, middleware request of data that record sends at least one middleware and The characteristic information relevant to webpage to be loaded;And treat request data name set according to the middleware request of data generation of record, And set up characteristic information and the incidence relation treated between request data name set.
Specifically, when subscription client sends webpage load request to web page server, web page server can add according to webpage The request of load builds webpage to be loaded, and middleware client can obtain the characteristic information relevant to this webpage to be loaded, as this is to be added The address information (such as URL (Uniform Resource Locator, URL)) of contained network page or above-mentioned use According to features described above information, member's type information etc. of family client owning user, can determine that above-mentioned webpage to be loaded institute is right afterwards That answers treats request data name set, it will be understood that corresponding to above-mentioned webpage to be loaded treat request data name set be This webpage to be loaded is generated during loading for the first time.
S102, receives middleware request of data, and determines target middleware according to middleware request of data.
Specifically, after the webpage load request structure webpage to be loaded that web page server sends according to user, middleware visitor Family end can receive the middleware request of data that web page server sends, and finds and this middleware according to this middleware request of data Middleware corresponding to request of data is as target middleware.
S103, according to target middleware and treat request data name set determine needs ask from treating acquired in target middleware Data name.
Should be appreciated that due to above-mentioned treat request data name set include middleware corresponding treat request data title, so, Middleware client is after receiving middleware request of data, according to target middleware and treat request data name set Determine and need to be obtained from target middleware to treat request data title.
S104, as required from treating that request data title obtains corresponding centre from target middleware acquired in target middleware Part data acquisition system also caches, wherein, if again receiving the middleware request of data sent to target middleware, from caching Middleware data acquisition system in extract and feed back correspondence middleware data.
In sum, the method from middleware request data of the embodiment of the present application is to have been come by middleware client self study Becoming request to merge, the basic ideas that request merges automatically are: after a webpage load request, middleware client will be many Individual middleware request of data requested resource is recorded, when webpage load request arrives next time, middleware client End receives for the first time when the middleware request of data that target middleware sends, during last webpage load request The repeatedly middleware request of data to resource recorded, does merging automatically, i.e. by providing a batch interface, and By batch interface resource after target middleware request merges, request results is buffered in middleware client simultaneously, If during this webpage load request, middleware client receives the middleware sent to target middleware again During request of data, then from the request results of caching, extract and feed back the middleware data of correspondence.
Further, in an embodiment of the application, described method may also include that by corresponding to webpage to be loaded Treat request data name set is all treated middleware data corresponding to request data title all feed back complete after, empty caching. Being appreciated that in embodiments herein, the life cycle of caching is a webpage load request, and the result cached The most visible to this webpage load request.Thus, after this webpage load request terminates, caching is emptied, the most permissible Release server resource, on the other hand, does not results in the disorder of middleware data in caching between different web pages load request.
Optionally, in an embodiment of the application, the page to be loaded can need to call multiple middleware, treats number of request Can include that multiple middleware is corresponding respectively according to name set and treat request data title.It is to say, the embodiment of the present application from The method of Middleware Request data is also applied for from multiple Middleware Request data, when the page to be loaded needs to call multiple centre During part, above-mentioned treat that request data name set then can include that the plurality of middleware is corresponding respectively and treat request data title.In the middle of Between part client when receiving middleware request of data corresponding to which middleware, then according to the middle number of packages that this middleware is corresponding The process of above-mentioned steps S102-S104, all middlewares called required for obtaining in this page to be loaded are carried out according to request Corresponding middleware data.
So that those skilled in the art clearly understands the application, below will be to this Shen as a example by single middleware Please be further described.
For example, it is assumed that now with the middleware of a rights management, the authority of all users is all present in this middleware In, when, after user's Website login, the Webpage of this user being shown how many contents are by the authority institute of content area Control.Such as, by URL address be /webpage of admin/monitor.jsp as a example by, it is assumed that have 4 districts on this Webpage Territory, the authority in each region is respectively featureA, featureB, featureC, featureD, then when to render During this webpage, it would be desirable to authority Middleware Request 4 times to complete rendering of 4 regions in the page.Wherein, the most right The example of calling of authority middleware is: boolean isAllowed=service.isAllowed (personID, featureA), To long-range authority middleware, this calls can inquire whether current personID has this function of featureA, if had This function, just shows content corresponding to featureA on the page.
In the above example, it may be assumed that the authority will asked on a webpage is identical, then can be with contained network to be added The URL of page is dimension, the resource of request of classifying.When first time user to access pages, as in figure 2 it is shown, middleware is objective Family end can obtain and record the characteristic information URL relevant to webpage to be loaded from web page server, and middleware client can simultaneously Receive to the middleware request of data of middleware transmission (such as boolean IsAllowed=service.isAllowed (personID, featureA)), and according to this middleware request of data from target Middleware obtains corresponding middleware data and feeds back to web page server, and web page server is treated according to these middleware data Loading webpage to carry out rendering and feeding back to user, wherein, middleware client generates according to the middleware request of data received Treat request data name set and record, and set up characteristic information URL and treat between request data name set right Should be related to, variable personID is passed in middleware client by middleware client requirements web page server simultaneously.Upper In the example of face, characteristic information URL and the corresponding relation treated between request data name set, as follows:
URL:/admin/monitor.jsp-[featureA,featureB,featureC,featureD]
Variable: personID.
When second time and later all of web-page requests arrive, as it is shown on figure 3, middleware client can be according to web service What the incoming URL of device searched correspondence treats request data name set, in previous example, treats that request data name set is [featureA, featureB, featureC, featureD], simultaneously further according to the variable that web page server is incoming (personID) data preheating is done.Data preheating will call in batches interface, treat request data title to Middleware Request is above-mentioned All resources that set is corresponding, and be cached.Middleware is called and will obtain from caching by subsequent web page server Data.When finishing service (caching i.e. being treated, middleware data corresponding to request data title all feed back to web page server) After, empty caching, wherein, caching life cycle is the web-page requests of a user, and the result cached is only to this secondary net Page request is visible.
Should be appreciated that in correlation technique, when a webpage repeatedly asks same middleware, it is common that carried by middleware For a batch interface, requesting party makes requests on merging by this batch interface.Although batch interface can solve the problem that and repeatedly calls Problem, but, when request is merged be coupled with the service code of requesting party time, problems with can be brought: (1) Newly call when needs increase by one, or delete one no when calling, requesting party's request of must changing merges code; (2) called side needs to write in all places having merging demand to merge the logic called;(3) in the framework of layer-stepping, The calling to merge of different layers also can bring difficulty to calling the transmission of result.
By the method from middleware request data of the embodiment of the present application, completed by the self study of middleware client Request merges, and the request that not only solves in above-mentioned correlation technique merges the problem brought, and requesting party need not to understand whole simultaneously The process that individual request merges, simplifies the operation of requesting party.
In order to realize above-described embodiment, the application also proposed a kind of system from middleware request data.
Fig. 4 is the structural representation of the system from middleware request data according to one embodiment of the application.As shown in Figure 4, Subscription client 10, web page server 20, middleware client 30 should be may include that from the system of middleware request data With at least one middleware 40.
Specifically, subscription client 10 can be used for sending webpage load request to web page server 20 and receiving web page server The web data of 20 feedbacks.
Web page server 20 can be used for building webpage to be loaded according to webpage load request, and sends to middleware client 30 Middleware request of data is to obtain middleware data from least one middleware 40, and by the middleware data feedback that obtains extremely Subscription client 10.
Middleware client 30 can be used for obtaining the characteristic information relevant to webpage to be loaded, and determine to be added according to characteristic information Treat request data name set corresponding to contained network page, and determine target middleware according to middleware request of data, and according to Target middleware and treat that request data name set determines and need from treating request data title acquired in target middleware, and As required from treating that request data title obtains corresponding middleware data acquisition system from target middleware acquired in target middleware And cache, and again receive when the middleware request of data that target middleware sends, from the middleware data acquisition system of caching Middle extraction also feeds back corresponding middleware data, wherein, treats that request data name set includes that at least one middleware is corresponding Treat request data title.
Wherein, in embodiments herein, middleware client 30 can be additionally used in when webpage to be loaded is loaded for the first time Record at least one middleware 40 send middleware request of data and the characteristic information relevant to webpage to be loaded, and according to The middleware request of data of record generates and treats request data name set, and sets up characteristic information and treat request data name set Between incidence relation.
Additionally, characteristic information can be the page to be loaded address information, ask the user of the page to be loaded member's type information, The title (such as the list page, the detail page etc.) of the page to be loaded, ask the client-side information of the page to be loaded (such as institute By browser information, operation system information etc.), ask the cookie information of the page to be loaded or web page server to call Calling interface during middleware client or parameter etc..
More specifically, when subscription client 10 sends webpage load request to web page server 20, web page server 20 can Building webpage to be loaded according to webpage load request, middleware client 30 can obtain the feature letter relevant to this webpage to be loaded Breath, the address information (such as URL) of webpage as to be loaded in this or member's type letter of above-mentioned subscription client 10 owning user Breaths etc., can determine according to features described above information afterwards and treat request data name set corresponding to above-mentioned webpage to be loaded, permissible Understand, treat that request data name set is the mistake loaded for the first time at this webpage to be loaded corresponding to above-mentioned webpage to be loaded Journey generates.Meanwhile, web page server 20 can send middleware request of data with from least one to middleware client 30 Individual middleware 40 obtains middleware data, and middleware client 30, can be according to this after receiving middleware request of data Middleware request of data find the middleware corresponding with this middleware request of data as target middleware, and can be according in target Between part and treat that request data name set i.e. can determine that and need to be obtained from target middleware to treat request data title, with And as required from treating that request data title obtains corresponding middleware data set from target middleware acquired in target middleware Merge caching, and again receive when the middleware request of data that target middleware sends, from the middleware data set of caching Conjunction is extracted and is fed back the middleware data of correspondence.
Further, in an embodiment of the application, middleware client 30 can be additionally used in by webpage institute to be loaded Corresponding treat request data name set is all treated middleware data corresponding to request data title all feed back complete after, clearly Empty caching.Being appreciated that in embodiments herein, the life cycle of caching is a webpage load request, and delays The result deposited is the most visible to this webpage load request.Thus, after this webpage load request terminates, caching is emptied, one Aspect can discharge server resource, on the other hand, does not results in middleware data in caching between different web pages load request Disorder.
Optionally, in an embodiment of the application, the page to be loaded can need to call multiple middleware, treats number of request Can include that multiple middleware is corresponding respectively according to name set and treat request data title.It is to say, the embodiment of the present application from The system of Middleware Request data is also applied for from multiple Middleware Request data, when the page to be loaded needs to call multiple centre During part, above-mentioned treat that request data name set then can include that the plurality of middleware is corresponding respectively and treat request data title.In the middle of Between part client when receiving middleware request of data corresponding to which middleware, then according to the middle number of packages that this middleware is corresponding Above-mentioned respective handling is carried out, the centre that all middlewares of calling required for obtaining in this page to be loaded are corresponding according to request Number of packages evidence.
The system from middleware request data of the embodiment of the present application, after a webpage load request, middleware client Multiple middleware request of data requested resources are recorded by end, when webpage load request arrives next time, in centre Part client receives for the first time when the middleware request of data that target middleware sends, by last webpage load request During the repeatedly middleware request of data to resource recorded, do merging automatically, i.e. by providing a batch to connect Mouthful, and by batch interface resource after target middleware request merges, request results is buffered in middleware client simultaneously End, if during this webpage load request, middleware client receives again in target middleware sends Between part request of data time, then from caching request results extract and feed back correspondence middleware data, not only solve In above-mentioned correlation technique, request merges the problem brought, and requesting party need not understand the process that whole request merges, letter simultaneously Change the operation of requesting party.
In order to realize above-described embodiment, the application also proposed a kind of middleware client.
Fig. 5 is the structural representation of the middleware client according to one embodiment of the application.As it is shown in figure 5, this middleware Client may include that treats that request data name set determines that module 31, target middleware determine module 32, treat request data Title determines module 33 and middleware data providing module 34.
Specifically, treat that request data name set determines that module 31 can be used for obtaining the characteristic information relevant to webpage to be loaded, And determine according to characteristic information and to treat request data name set corresponding to webpage to be loaded, wherein, treat request data title collection Close include at least one middleware corresponding treat request data title.Additionally, in embodiments herein, characteristic information can For the page to be loaded address information, ask member's type information of the user of the page to be loaded, the page to be loaded title (as The list page, the detail page etc.), ask the page to be loaded client-side information (as browser information used, operation system System information etc.), calling when asking the cookie information of the page to be loaded or web page server to call middleware client Interface or parameter etc..
Further, in embodiments herein, treat that request data name set determines that module 31 can be additionally used in when to be loaded When webpage is loaded for the first time, the middleware request of data that sends at least one middleware of record and relevant to webpage to be loaded Characteristic information, and generate according to the middleware request of data of record and treat request data name set, and set up characteristic information with Treat the incidence relation between request data name set.
More specifically, when subscription client sends webpage load request to web page server, web page server can be according to webpage Load request builds webpage to be loaded, treats that request data name set determines that module 31 can obtain relevant to this webpage to be loaded Characteristic information, the address information of webpage as to be loaded in this or member's type information etc. of above-mentioned subscription client owning user, Can determine according to features described above information afterwards and treat request data name set corresponding to above-mentioned webpage to be loaded, it will be understood that Treat that request data name set is raw during this webpage to be loaded is loaded for the first time corresponding to above-mentioned webpage to be loaded Become.
Target middleware determines that module 32 can be used for receiving middleware request of data, and determines target according to middleware request of data Middleware.More specifically, after the webpage load request structure webpage to be loaded that web page server sends according to user, mesh Mark middleware determines that module 32 can receive the middleware request of data that web page server sends, and according to this middleware request of data Find the middleware corresponding with this middleware request of data as target middleware.
Treat request data title determine module 33 can be used for according to target middleware and treat request data name set determine needs from Request data title is treated acquired in target middleware.Should be appreciated that and treat that request data name set includes centre due to above-mentioned What part was corresponding treats request data title, so, after receiving middleware request of data, treat that request data title determines mould Block 33 is according to target middleware and treats that request data name set i.e. can determine that needs to be obtained treating from target middleware Request data title.
Middleware data providing module 34 can be used for as required from treating that request data title is from target acquired in target middleware Middleware obtains corresponding middleware data set and merges caching, wherein, if again received in target middleware sends Between part request of data then from caching middleware data acquisition system extract and feed back correspondence middleware data.
In sum, the middleware client of the embodiment of the present application is to complete request by self study to merge, and automatically asks to close And basic ideas be: after a webpage load request, multiple middleware request of data are asked by middleware client Resource record get off, when webpage load request next time arrives, receive in target for the first time in middleware client Between part send middleware request of data time, by record during last webpage load request repeatedly to resource Middleware request of data, does merging automatically, i.e. by providing a batch interface, and by batch interface in the middle of target Resource after part request merging, is buffered in middleware client, if in this webpage load request simultaneously by request results During, middleware client receives again when the middleware request of data that target middleware sends, then asking from caching Seek the middleware data extracting and feeding back correspondence in result.
Further, in an embodiment of the application, as shown in Figure 6, described middleware client may also include caching Management module 35, caching management module 35 can be used for by complete for treating in request data name set corresponding to webpage to be loaded Portion treat middleware data corresponding to request data title all feed back complete after, empty caching.It is appreciated that the application's In embodiment, the life cycle of caching is a webpage load request, and the result cached is only to this webpage load request Visible.Thus, after this webpage load request terminates, caching is emptied, on the one hand can discharge server resource, another Aspect, does not results in the disorder of middleware data in caching between different web pages load request.
Optionally, in an embodiment of the application, when the page to be loaded needs to call multiple middleware, treat number of request Can include that multiple middleware is corresponding respectively according to name set and treat request data title.It is to say, in the embodiment of the present application Between part client be also applied for from multiple Middleware Request data, when the page to be loaded needs to call multiple middleware, above-mentioned Treat that request data name set then can include that the plurality of middleware is corresponding respectively and treat request data title.When middleware client Which when receiving middleware request of data corresponding to middleware, then carry out according to the middleware request of data that this middleware is corresponding Above-mentioned respective handling, the middleware data that all middlewares of calling required for obtaining in this page to be loaded are corresponding.
The middleware client of the embodiment of the present application, after a webpage load request, can be by multiple middleware request of data Requested resource is recorded, and when webpage load request arrives next time, receives for the first time and sends out to target middleware During the middleware request of data sent, by the repeatedly middleware to resource recorded during last webpage load request Request of data, is done merging automatically, i.e. by providing a batch interface, and is asked to target middleware by batch interface Resource after merging, is buffered in middleware client simultaneously by request results, if during this webpage load request, Middleware client receives again when the middleware request of data that target middleware sends, then from the request results of caching Extracting and feed back the middleware data of correspondence, the request in above-mentioned correlation technique that not only solves merges the problem brought, Requesting party need not understand the process that whole request merges simultaneously, simplifies the operation of requesting party.
In the description of this specification, reference term " embodiment ", " some embodiments ", " example ", " concrete example ", Or specific features, structure, material or the feature that the description of " some examples " etc. means to combine this embodiment or example describes It is contained at least one embodiment or the example of the application.In this manual, need not to the schematic representation of above-mentioned term Identical embodiment or example must be directed to.And, the specific features of description, structure, material or feature can be in office One or more embodiments or example combine in an appropriate manner.Additionally, in the case of the most conflicting, this area The feature of the different embodiments described in this specification or example and different embodiment or example can be tied by technical staff Close and combination.
Additionally, term " first ", " second " are only used for describing purpose, and it is not intended that instruction or hint relative importance Or the implicit quantity indicating indicated technical characteristic.Thus, define " first ", the feature of " second " can be expressed Or implicitly include at least one this feature.In the description of the present application, " multiple " are meant that at least two, such as two Individual, three etc., unless otherwise expressly limited specifically.
In flow chart or at this, any process described otherwise above or method description are construed as, and represent and include one Or the module of code, fragment or the part of the executable instruction of the more step for realizing specific logical function or process, And the scope of the preferred implementation of the application includes other realization, wherein can not press order that is shown or that discuss, Including according to involved function by basic mode simultaneously or in the opposite order, performing function, this should be by the application's Embodiment person of ordinary skill in the field understood.
Represent in flow charts or the logic described otherwise above at this and/or step, for example, it is possible to be considered as reality The sequencing list of the executable instruction of existing logic function, may be embodied in any computer-readable medium, for instruction Execution system, device or equipment (system such as computer based system, including processor or other can perform from instruction System, device or equipment instruction fetch also perform the system instructed) use, or combine these instruction execution systems, device or set Standby and use.For the purpose of this specification, " computer-readable medium " can be any can to comprise, store, communicate, propagate Or transmission procedure for instruction execution system, device or equipment or combines these instruction execution systems, device or equipment and uses Device.The more specifically example (non-exhaustive list) of computer-readable medium includes following: have one or more cloth The electrical connection section (electronic installation) of line, portable computer diskette box (magnetic device), random access memory (RAM), read-only Memorizer (ROM), erasable read only memory (EPROM or flash memory) of editing, fiber device, and portable Compact disc read-only memory (CDROM).It addition, computer-readable medium can even is that the paper that can print described program thereon Or other suitable media, because then can carry out editing, solving such as by paper or other media are carried out optical scanning Translate or be processed to electronically obtain described program with other suitable methods if desired, be then stored in computer In memorizer.
Should be appreciated that each several part of the application can realize by hardware, software, firmware or combinations thereof.In above-mentioned reality Execute in mode, software that multiple steps or method in memory and can be performed by suitable instruction execution system with storage or Firmware realizes.Such as, if realized with hardware, with the most the same, available well known in the art under Any one or their combination in row technology realize: have the logic gates for data signal realizes logic function Discrete logic, there is the special IC of suitable combination logic gate circuit, programmable gate array (PGA), existing Field programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is can Completing instructing relevant hardware by program, described program can be stored in a kind of computer-readable recording medium, This program upon execution, including one or a combination set of the step of embodiment of the method.
Additionally, each functional unit in each embodiment of the application can be integrated in a processing module, it is also possible to be each Individual unit is individually physically present, it is also possible to two or more unit are integrated in a module.Above-mentioned integrated module was both Can realize to use the form of hardware, it would however also be possible to employ the form of software function module realizes.If described integrated module with The form of software function module realizes and as independent production marketing or when using, it is also possible to be stored in a computer-readable Take in storage medium.
Storage medium mentioned above can be read only memory, disk or CD etc..Although above it has been shown and described that Embodiments herein, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the restriction to the application, Above-described embodiment can be changed in scope of the present application, revises, replace and modification by those of ordinary skill in the art.

Claims (15)

1. the method from middleware request data, it is characterised in that comprise the following steps:
Obtain the characteristic information relevant to webpage to be loaded, and determine corresponding to described webpage to be loaded according to described characteristic information Treat request data name set, wherein, described in treat request data name set include at least one middleware corresponding treat please Seek data name;
Receive middleware request of data, and determine target middleware according to described middleware request of data;
According to described target middleware and described treat request data name set determine needs from acquired in described target middleware Treat request data title;And
According to described needs from acquired in described target middleware treat request data title from described target middleware obtain correspondence Middleware data set merge caching, wherein, please if again receiving the middleware data sent to described target middleware Ask, from the described middleware data acquisition system of described caching, extract and feed back the middleware data of correspondence.
2. as claimed in claim 1 from the method for middleware request data, it is characterised in that described webpage to be loaded institute is right That answers treats that request data name set is generated by following steps:
When described webpage to be loaded is loaded for the first time, the middleware request of data that sends at least one middleware of record and The characteristic information relevant to described webpage to be loaded;And
Middleware request of data according to described record treats request data name set described in generating, and sets up described characteristic information And the described incidence relation treated between request data name set.
3. as claimed in claim 1 or 2 from the method for middleware request data, it is characterised in that described characteristic information is The address information of the described page to be loaded, ask member's type information of the user of the described page to be loaded, described page to be loaded The title in face, ask the described page to be loaded client-side information, ask the described page to be loaded cookie information or Calling interface when web page server calls middleware client or parameter.
4. as claimed in claim 1 from the method for middleware request data, it is characterised in that also to include:
To treat request data name set is all treated, corresponding to described webpage to be loaded, the centre that request data title is corresponding Number of packages according to all feed back complete after, empty caching.
5. as claimed in claim 1 from the method for middleware request data, it is characterised in that the described page to be loaded needs Call multiple middleware, described in treat that request data name set includes that the plurality of middleware is corresponding respectively and treats request data name Claim.
6. the system from middleware request data, it is characterised in that include subscription client, web page server, centre Part client and at least one middleware, wherein,
Described subscription client, for sending webpage load request to described web page server and to receive described web page server anti- The web data of feedback;
Described web page server, for building webpage to be loaded according to described webpage load request, and to described middleware client End sends middleware request of data to obtain middleware data, and the middle number of packages that will obtain from least one middleware described According to feeding back to described subscription client;
Described middleware client, for obtaining the characteristic information relevant to described webpage to be loaded, and believes according to described feature Breath determines treats request data name set corresponding to described webpage to be loaded, and determines target according to middleware request of data Middleware, and according to described target middleware and described treat request data name set determine needs from described target middleware institute Obtain treats request data title, and according to described needs from acquired in described target middleware treat request data title from Described target middleware obtains corresponding middleware data set and merges caching, and again receives and send to described target middleware Middleware request of data time, extract from the described middleware data acquisition system of described caching and feed back correspondence middleware data, Wherein, treat described in request data name set include at least one middleware corresponding treat request data title.
It is 7. as claimed in claim 6 from the system of middleware request data, it is characterised in that described middleware client, Be additionally operable to when described webpage to be loaded is loaded for the first time middleware request of data that record sends at least one middleware and The characteristic information relevant to described webpage to be loaded, and treat number of request according to the middleware request of data generation of described record According to name set, and set up described characteristic information and the described incidence relation treated between request data name set.
The system from middleware request data the most as claimed in claims 6 or 7, it is characterised in that described characteristic information is The address information of the described page to be loaded, ask member's type information of the user of the described page to be loaded, described page to be loaded The title in face, ask the described page to be loaded client-side information, ask the described page to be loaded cookie information or Calling interface when described web page server calls described middleware client or parameter.
It is 9. as claimed in claim 6 from the system of middleware request data, it is characterised in that described middleware client, It is additionally operable in treating corresponding to described webpage to be loaded is all treated in request data name set that request data title is corresponding Between number of packages according to all feed back complete after, empty caching.
10. as claimed in claim 6 from the system of middleware request data, it is characterised in that the described page to be loaded needs Call multiple middleware, described in treat that request data name set includes that the plurality of middleware is corresponding respectively and treats request data Title.
11. 1 kinds of middleware clients, it is characterised in that including:
Treat that request data name set determines module, for obtaining the characteristic information relevant to webpage to be loaded, and according to described Characteristic information determines treats request data name set corresponding to described webpage to be loaded, wherein, described in treat request data title Set include at least one middleware corresponding treat request data title;
Target middleware determines module, is used for receiving middleware request of data, and determines mesh according to described middleware request of data Mark middleware;
Treat that request data title determines module, for according to described target middleware with described treat that request data name set determines Need from treating request data title acquired in described target middleware;And
Middleware data providing module, for according to described needs from treating request data title acquired in described target middleware Obtain corresponding middleware data set from described target middleware and merge caching, wherein, if again received to described target The middleware request of data that middleware sends then is extracted from the described middleware data acquisition system of described caching and feeds back in correspondence Between number of packages evidence.
12. middleware clients as claimed in claim 11, it is characterised in that described in treat that request data name set determines Module, is additionally operable to when described webpage to be loaded is loaded for the first time, the middle number of packages that record sends at least one middleware According to request and the characteristic information relevant to described webpage to be loaded, and generate described according to the middleware request of data of described record Treat request data name set, and set up described characteristic information and the described incidence relation treated between request data name set.
The 13. middleware clients as described in claim 11 or 12, it is characterised in that described characteristic information be described in treat Load the address information of the page, ask member's type information of the user of the described page to be loaded, the name of the described page to be loaded Claim, ask the client-side information of the described page to be loaded, the cookie information asking the described page to be loaded or webpage clothes Calling interface when business device calls middleware client or parameter.
14. middleware clients as claimed in claim 11, it is characterised in that also include:
Caching management module, for all waiting in request data name set to ask by treating corresponding to described webpage to be loaded Middleware data corresponding to data name all feed back complete after, empty caching.
15. middleware clients as claimed in claim 11, it is characterised in that the described page to be loaded needs to call multiple Middleware, described in treat that request data name set includes that the plurality of middleware is corresponding respectively and treats request data title.
CN201510069814.5A 2015-02-10 2015-02-10 Method and system for requesting data from middleware and middleware client Active CN105989070B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510069814.5A CN105989070B (en) 2015-02-10 2015-02-10 Method and system for requesting data from middleware and middleware client
PCT/CN2016/073146 WO2016127856A1 (en) 2015-02-10 2016-02-02 Method and system for requesting data from middleware, and middleware client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510069814.5A CN105989070B (en) 2015-02-10 2015-02-10 Method and system for requesting data from middleware and middleware client

Publications (2)

Publication Number Publication Date
CN105989070A true CN105989070A (en) 2016-10-05
CN105989070B CN105989070B (en) 2020-01-17

Family

ID=56615012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510069814.5A Active CN105989070B (en) 2015-02-10 2015-02-10 Method and system for requesting data from middleware and middleware client

Country Status (2)

Country Link
CN (1) CN105989070B (en)
WO (1) WO2016127856A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107196917A (en) * 2017-04-27 2017-09-22 深圳市威富通科技有限公司 A kind of service response method and its middleware
CN107729516A (en) * 2017-10-26 2018-02-23 北京百度网讯科技有限公司 Single page application methods of exhibiting and device, server, equipment and computer-readable recording medium
CN107818022A (en) * 2017-10-25 2018-03-20 努比亚技术有限公司 Application programming interfaces merging method, mobile terminal and computer-readable recording medium
CN108459914A (en) * 2017-12-26 2018-08-28 深圳神州数码云科数据技术有限公司 A kind of middleware command execution method and device
CN110020349A (en) * 2017-09-26 2019-07-16 北京京东尚科信息技术有限公司 The method and device of page rendering
CN113377784A (en) * 2021-08-13 2021-09-10 成都市维思凡科技有限公司 Data processing method, system and storage medium based on middleware
CN113742010A (en) * 2020-05-29 2021-12-03 北京沃东天骏信息技术有限公司 Page multi-language display method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612983B (en) * 2021-01-07 2022-12-13 上海哔哩哔哩科技有限公司 Page access method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101632071A (en) * 2007-02-20 2010-01-20 雅虎公司 System and method for preloading content on the basis of user context
CN101661494A (en) * 2009-09-29 2010-03-03 莱芜钢铁集团有限公司 Data interactive method for distributed middleware and database
US7752326B2 (en) * 2001-08-20 2010-07-06 Masterobjects, Inc. System and method for utilizing asynchronous client server communication objects
CN103729440A (en) * 2013-12-30 2014-04-16 优视科技有限公司 Method and device for having access to website
CN103888456A (en) * 2014-03-18 2014-06-25 国家电网公司 Webpage client side, server side and data processing device and method
CN104052792A (en) * 2013-03-15 2014-09-17 Sap股份公司 Augmenting Middleware Communication Services

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101583072B (en) * 2008-05-15 2011-09-21 北京凯思昊鹏软件工程技术有限公司 Middleware product for realizing Mobile Internet and method thereof
EP2315139A1 (en) * 2009-09-30 2011-04-27 Systemite Ab Quick upload
CN103905498B (en) * 2012-12-27 2018-05-18 鼎捷软件股份有限公司 Service information management method and service information management system
CN103685476B (en) * 2013-11-26 2019-03-15 优视科技有限公司 The method and web page template server that webpage shows are realized using web page template

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7752326B2 (en) * 2001-08-20 2010-07-06 Masterobjects, Inc. System and method for utilizing asynchronous client server communication objects
CN101632071A (en) * 2007-02-20 2010-01-20 雅虎公司 System and method for preloading content on the basis of user context
CN101661494A (en) * 2009-09-29 2010-03-03 莱芜钢铁集团有限公司 Data interactive method for distributed middleware and database
CN104052792A (en) * 2013-03-15 2014-09-17 Sap股份公司 Augmenting Middleware Communication Services
CN103729440A (en) * 2013-12-30 2014-04-16 优视科技有限公司 Method and device for having access to website
CN103888456A (en) * 2014-03-18 2014-06-25 国家电网公司 Webpage client side, server side and data processing device and method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107196917A (en) * 2017-04-27 2017-09-22 深圳市威富通科技有限公司 A kind of service response method and its middleware
CN110020349A (en) * 2017-09-26 2019-07-16 北京京东尚科信息技术有限公司 The method and device of page rendering
CN110020349B (en) * 2017-09-26 2021-09-03 北京京东尚科信息技术有限公司 Page rendering method and device
CN107818022A (en) * 2017-10-25 2018-03-20 努比亚技术有限公司 Application programming interfaces merging method, mobile terminal and computer-readable recording medium
CN107818022B (en) * 2017-10-25 2021-08-24 努比亚技术有限公司 Application program interface merging method, mobile terminal and computer readable storage medium
CN107729516A (en) * 2017-10-26 2018-02-23 北京百度网讯科技有限公司 Single page application methods of exhibiting and device, server, equipment and computer-readable recording medium
CN108459914A (en) * 2017-12-26 2018-08-28 深圳神州数码云科数据技术有限公司 A kind of middleware command execution method and device
CN108459914B (en) * 2017-12-26 2021-01-01 深圳神州数码云科数据技术有限公司 Middleware command execution method and device
CN113742010A (en) * 2020-05-29 2021-12-03 北京沃东天骏信息技术有限公司 Page multi-language display method and device
CN113377784A (en) * 2021-08-13 2021-09-10 成都市维思凡科技有限公司 Data processing method, system and storage medium based on middleware
CN113377784B (en) * 2021-08-13 2021-12-03 成都市维思凡科技有限公司 Data processing method, system and storage medium based on middleware

Also Published As

Publication number Publication date
WO2016127856A1 (en) 2016-08-18
CN105989070B (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN105989070A (en) Method and system for requesting data from middleware and middleware client
DE60015423T2 (en) Method and device for reproducing objects in a network
CN105791341B (en) Application release processing method, device and system
CN104067274A (en) System and method for improving access to search results
CN103095743A (en) Handling method and system of grey release
CN113094136A (en) Page display control method and device, storage medium and electronic equipment
CN112131504B (en) Webpage editing and displaying method, device, equipment and storage medium
DE102015101062B4 (en) Server system, method for controlling a server system and storage medium
US9197431B2 (en) Matching an autonomic manager with a manageable resource
CN108074140A (en) Intelligent Questionnaire systems and collecting method
US8874687B2 (en) System and method for dynamically modifying content based on user expectations
CN108920703A (en) A kind of HTTP cache optimization method and device
CN103699566B (en) A kind of picture cuts map device and method in real time
CN107220066A (en) Method and device for releasing application software in application store
US9026483B1 (en) Automatic prediction of aspects of human task performance
US10257285B2 (en) Resource migration method and apparatus
DE112014005183T5 (en) Store service network
CN110928911A (en) System, method and device for processing checking request and computer readable storage medium
CN106649716A (en) Multithread-based online file format conversion method and system
CN111124858A (en) Embedded point-free plug-in data processing method and system, terminal device and storage medium
DE10290696T5 (en) Method and system for wireless access to a user's computer
US11899734B2 (en) Extracting and populating content from an email link
CN107451182B (en) File caching method based on Appcache
KR102495790B1 (en) An integrated medical management system for integrating and managing data including data located on external servers
CN109885787A (en) APP page display method and system, mobile terminal and computer-readable medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240401

Address after: Singapore

Patentee after: Alibaba Singapore Holdings Ltd.

Country or region after: Singapore

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: ALIBABA GROUP HOLDING Ltd.

Country or region before: Cayman Islands