Process user is acted on behalf of the device and method of archives in a kind of Wireless Application Protocol Gateway
Technical field
The present invention relates to the communication of mobile terminal field, be particularly to the device and method that process user in a kind of WAP (WirelessApplication Protocol, WAP (wireless application protocol)) gateway is acted on behalf of archives.
Background technology
The files on each of customers property set of various user's relevant parameters such as network attribute that UA Prof (User Agent Profiles, customer agent file) is the concrete management device attribute, equipment inserted.UA Prof is the variation of variation, end product along with mobile service and a kind of service attribute administrative skill of rising, its feature is by a unified server or server cohort, the relevant attribute data of leading subscriber business or equipment (comprising the network that equipment connects), feasible professional carrying out and to provide different business experiences at the user and the residing varying environment thereof of different life styles.These attribute datas generally include: ardware feature data (as the screen size of end side, screen color, pixel etc.); Software feature data (as the publisher of operating system, version number, the tabulation of video encoding device etc.); Application data (as browser publisher, version number, SGML of being supported etc.); The user is from set information (as personal information such as address name, address, the employed traffic performances of user); The user profile (as in net time, positional information etc.) that system is collected; WAP (Wireless Application Protocol, WAP (wireless application protocol)) performance data (for example: WML (Wireless Markup Language, WAP Markup Language) script storehouse, WAP version number, WML size etc.); Network characteristic data (as the delay of bearer network, reliability etc.).
Specific to mobile data services, UA Prof is generally write by portable terminal manufacturer, is placed on then on the WEB server of portable terminal manufacturer for user's inquiry.Portable terminal sends WAP gateway to sending field that WAP when request can be by the x-wap-profile URL with UA Prof place, the server of WAP gateway and content supplier can utilize this field to operate accordingly, after UA Prof is resolved, can obtain the customer mobile terminal ability, thereby the content that is fit to terminal is provided.
UA Prof makes standard as far back as WAP 1.2, therefore there are a large amount of WAP1.1 portable terminals not support UA Prof function, though the portable terminal after the WAP 1.2 has been realized UA Prof, there are a large amount of defectives in the implementation of each portable terminal manufacturer, and there is following mistake in great amount of terminals in the existing technology when the UA Prof that reports:
1. do not report at all;
2. report the URL at UA Prof place, but the URL that reports does not exist;
3. the URL that reports exists, but the server at URL place can not connect or instability;
4. the form of the UA Prof on the manufacturer terminal server does not meet standard;
5.UA the format character standardization of Prof, still the terminal capability with reality is not inconsistent.
Summary of the invention
For addressing the above problem, the object of the present invention is to provide the device and method of handling UA Prof in a kind of Wireless Application Protocol Gateway, do not support UA Prof function to solve some portable terminal, perhaps when reporting WAP gateway, report wrong problem.
For achieving the above object, the invention provides the device that process user in a kind of Wireless Application Protocol Gateway is acted on behalf of archives, be arranged in the Wireless Application Protocol Gateway, wherein, comprising:
The customer agent file server is used to preserve mobile terminal user and acts on behalf of archives, and distributes described customer agent file place URL(uniform resource locator);
The customer agent file administration module, be connected with described customer agent file server, be used to set up the mapping relations between the customer agent file place URL(uniform resource locator) of described portable terminal and described customer agent file server repository, when receiving the request that described portable terminal sends, according to described mapping relations, find same user agent archives place URL(uniform resource locator) in the customer agent file server, described URL(uniform resource locator) is added in the described request, uses for Wireless Application Protocol Gateway and/or content supplier.
Process user is acted on behalf of the device of archives in the above-mentioned Wireless Application Protocol Gateway, and wherein, described customer agent file administration module further comprises:
One cache module, be used for after described customer agent file administration module obtains described customer agent file from described customer agent file server, preserve described customer agent file, and regularly visit described customer agent file server, obtain up-to-date described customer agent file.
For achieving the above object, the invention provides process user in a kind of Wireless Application Protocol Gateway and act on behalf of the method for archives, portable terminal is in the request of sending to Wireless Application Protocol Gateway, the customer agent file place URL(uniform resource locator) that portable terminal manufacturer server is preserved sends Wireless Application Protocol Gateway to, the server of Wireless Application Protocol Gateway and content supplier is according to described URL(uniform resource locator), find described customer agent file and operate accordingly, wherein, further comprising the steps of:
Step 1, the described mobile terminal user of customer agent file server repository in the Wireless Application Protocol Gateway is acted on behalf of archives, and distributes the URL(uniform resource locator) at described customer agent file place;
Step 2, the customer agent file administration module in the Wireless Application Protocol Gateway are set up the mapping relations between the customer agent file place URL(uniform resource locator) of described portable terminal and described customer agent file server repository;
Step 3, when described customer agent file administration module is received the request of described portable terminal transmission, according to described mapping relations, find same user agent archives place URL(uniform resource locator) in the customer agent file server, described URL(uniform resource locator) is added in the described request, use for Wireless Application Protocol Gateway and/or content supplier.
Process user is acted on behalf of the method for archives in the above-mentioned Wireless Application Protocol Gateway, and wherein, described step 1 further comprises:
For the portable terminal of not supporting the customer agent file function, the customer agent file server is earlier the step that described portable terminal is made customer agent file.
The method of process user archives in the above-mentioned Wireless Application Protocol Gateway, wherein, the mapping relations of the URL(uniform resource locator) at the customer agent file place of described portable terminal and described customer agent file server repository further comprise:
The mapping relations of the URL(uniform resource locator) at the customer agent file place of mobile terminal user agency and customer agent file server repository; And/or
The mapping relations of the URL(uniform resource locator) at the abnormal URL(uniform resource locator) at customer agent file place and the customer agent file place of customer agent file server repository.
Process user is acted on behalf of the method for archives in the above-mentioned Wireless Application Protocol Gateway, and wherein, described step 3 further comprises:
Step 61, when described customer agent file administration module is received the request of described portable terminal transmission, judge and whether contain customer agent file place URL(uniform resource locator) in the described request, if contain described URL(uniform resource locator), then enter step 62, if do not contain described URL(uniform resource locator), then obtain described mobile terminal user agency, from the mapping relations of the customer agent file place URL(uniform resource locator) of mobile terminal user agency and customer agent file server repository, obtain URL(uniform resource locator), and be added in the described request;
Step 62, continue to judge whether the customer agent file place URL(uniform resource locator) that contains is normal, if it is undesired, then from the mapping relations of the customer agent file place URL(uniform resource locator) of abnormal URL(uniform resource locator) in customer agent file place and customer agent file server repository, obtain new URL(uniform resource locator), abnormal URL(uniform resource locator) in the described request is upgraded.
Process user is acted on behalf of the method for archives in the above-mentioned Wireless Application Protocol Gateway, wherein, judges in the described step 62 whether normal step further comprises the customer agent file place URL(uniform resource locator) that contains:
Judge whether described customer agent file place URL(uniform resource locator) can visit; And/or
Whether the content of judging described customer agent file meets compound ability/preference is provided with filespec; And/or
Judge whether the server of the portable terminal manufacturer that described URL(uniform resource locator) is pointed can stablize connection; And/or
Whether the content of judging the customer agent file in the server of the portable terminal manufacturer that described URL(uniform resource locator) is pointed conforms to the terminal capability of reality.
Process user is acted on behalf of the method for archives in the above-mentioned Wireless Application Protocol Gateway, and wherein, described step 3 further comprises:
Step 81 when the customer agent file administration module obtains a mobile terminal user first and acts on behalf of archives place URL(uniform resource locator), is resolved described URL(uniform resource locator), if resolve failure, then alarms, otherwise enters step 82;
Step 82 if resolve successfully, is resolved the host name in the described URL(uniform resource locator), as can't successfully resolving, then alarms, otherwise enters step 83;
Step 83 if resolve successfully, obtains host address, connects, if connection failure is then alarmed, enters step 84;
Step 84 is if successful connection asks described mobile terminal user to act on behalf of archives, if the request failure is then alarmed;
Step 85, if when receiving above-mentioned any alarm, then the URL(uniform resource locator) of described portable terminal is added into the mapping relations of described abnormal URL(uniform resource locator) and the customer agent file place URL(uniform resource locator) of customer agent file server preservation.
Process user is acted on behalf of the method for archives in the above-mentioned Wireless Application Protocol Gateway, wherein, further comprises after the described step 3:
After described customer agent file administration module obtains described customer agent file from described customer agent file server, the described customer agent file of buffer memory, when follow-up request needs described customer agent file, directly from described buffer memory, obtain the step of described customer agent file.
Process user is acted on behalf of the method and the device of archives in the Wireless Application Protocol Gateway provided by the invention, make the portable terminal of not supporting UA Prof also can realize UA Prof, simultaneously, the portable terminal that does not meet UA Prof is fully had overwrite function and caching function, WAP gateway and subsequent server can be successfully resolved and relevant processing the UA Prof of portable terminal.
Description of drawings
Fig. 1 is a device schematic diagram of the present invention;
Fig. 2 is the device schematic diagram of UA Prof administration module of the present invention;
Fig. 3 is a workflow schematic diagram of the present invention.
Embodiment
The invention provides process user in a kind of Wireless Application Protocol Gateway and act on behalf of the device of archives.Fig. 1 is a device schematic diagram of the present invention.As shown in Figure 1, the present invention comprises that mainly two modules being arranged in the WAP gateway 120 promptly: UA Prof administration module 121, and UA Prof server 122.
Safeguard the mapping relations of " the UA Prof place URL that User-Agent preserves to UA Prof server " in the UA Prof administration module 121, mapping relations with one " the UA Prof place URL that abnormal UA Prof URL preserves to UA Prof server ", so-called abnormal UA Prof URL is exactly the technical problem that reports UA Prof to exist described in the background technology, promptly report UA Prof, but the URL that reports does not exist; The URL that reports exists, but the portable terminal manufacturer server at URL place can not connect or instability; The form of UA Prof on the portable terminal manufacturer server does not meet standard; Or the format character standardization of UA Prof, still the terminal capability with reality is not inconsistent, and when having a kind of situation to take place in above-mentioned four kinds of situations, this UA Prof URL promptly is considered to abnormal UA Prof URL.
Portable terminal 110 sends to the request of WAP gateway 120 all can pass through UA Prof administration module 121, if there is not UA Prof field in the request that portable terminal 110 sends, UA Prof administration module 121 is just searched the mapping relations of " the UA Prof place URL that User-Agent preserves to UA Prof server " by the User-Agent field in the request, and the UA Prof URL that inquires is joined in the request; If contain UA Prof URL in the request that portable terminal 110 sends, the mapping of then inquiry " the UA Prof place URL that abnormal UAProf URL preserves to UA Prof server ", if Query Result is not empty, then normal UA Prof URL is substituted abnormal UA Prof URL, send to the server of content supplier 130 then, perhaps carry out respective handling voluntarily by WAP gateway 120.
The mapping relations of " the UA Prof place URL that User-Agent preserves to UA Prof server " need regularly be safeguarded, UA Prof administration module 121 is when finding to lack the portable terminal of UA Prof first, can report to the police automatically, so that UA Prof server 122 is in time for this portable terminal carries out the making of UAProf, and this portable terminal is added in the mapping relations by UA Prof administration module 121.
The mapping relations of " the UA Prof place URL that abnormal UA Prof URL preserves to UA Prof server " also need to be serviced.UA Prof administration module 121 can carry out following operation when obtaining the UA Prof URL of a portable terminal first:
Resolve the URL that x-wap-profile formulates,, then alarm if resolve failure, if resolve successfully, the host name among the URL is resolved, as can't successfully resolving, then alarm,, obtain host address if resolve successfully, then connect,, then alarm as connection failure, as successful connection, then ask UA Prof,, then alarm as the request failure.When if WAP gateway 120 is received above-mentioned any alarm, with the state confirmation of this UA Prof URL is undesired, and will this abnormal UA ProfURL be added into the mapping relations of " the UA Prof place URL that abnormal UA Prof URL preserves to UA Prof server ".
UA Prof administration module 121 is visited the UA Prof of portable terminal in the server that whether can normally obtain portable terminal manufacturer with the repeatedly retry of fixed cycle, to bring in constant renewal in the mapping relations of " the UA Prof place URL that abnormal UA Prof URL preserves to UA Prof server ".
UA Prof administration module 121 possesses caching function simultaneously, as shown in Figure 2, UA Prof administration module 121 also comprises a cache module 1211, be used to store the UA Prof of the portable terminal that has obtained, when follow-up request needs this UA Prof, can directly transfer the UA Prof in the cache module 1211, improve the access efficiency of system greatly.
Cache module 1211 has the ability of automatic renewal, the UA Prof of each cache module 1211 is provided with a timer, in case timer arrives the fixed time, UA Prof administration module 121 is promptly visited UAProf server 122 and is obtained up-to-date UA Prof, upgrades the UA Prof in the cache module 1211.
UA Prof server 122 is arranged in the WAP gateway, be used to preserve different mobile terminal manufacturer portable terminal UA Prof, and for the portable terminal 110 of not supporting UA Prof is made, storage UAProf.
When abnormal situation takes place in the UA Prof URL that does not have UA Prof URL in the request of portable terminal or report, UA Prof administration module 121 can pass through mapping relations, find normal UA Prof place URL, connect then and go up UA Prof server 122, obtain UA Prof.
WAP gateway 120 has flexible, complete UA Prof disposal ability among the present invention.The OMA standard has only been stipulated identification means and the content format of UA Prof, how not use UA Prof to make regulation to WAP gateway 120, usually UA Prof sends to WAP gateway 120 with the form of HTTP Header (x-wap-profile) from portable terminal 110, sends to content provider 130 by WAP gateway 120 again.The content of UA Prof is an XML (EXtensible Markup Language who meets CC/PP (compound ability/preference is provided with file) standard, XML (extensible Markup Language)) document, content provider 130 needs an XML resolver to realize that XML resolves, and has increased the cost of content provider virtually.WAP gateway 120 among the present invention can be finished UA Prof analytical capabilities, UA Prof after the parsing has two purposes, the one, send according to the needs of content provider 130 form with HTTP Header, so that content provider 130 develops the personalized service of self adaptation capacity of mobile terminal, the 2nd, the foundation of self carrying out content conversion, Push transmission as WAP gateway 120.
WAP gateway 120 utilizes UA Prof to carry out content adaptation, comprise two aspects: when terminal is carried out Pull, WAP gateway 120 may and be not suitable for terminal from the content of the server acquisition of content supplier 130, such as character set do not match, graphical format, color depth, dimension of picture do not match, WAP gateway 120 depends on UA Prof and finds that these do not match, and then carries out the content conversion; When Push, WAP gateway 120 utilizes UA Prof to determine the OTA agreement that portable terminal is supported, the type of Push, size etc. are selected suitable Push mechanism.
UA Prof makes standard as far back as WAP 1.2, therefore there are a large amount of WAP1.1 portable terminals not support UA Prof function, in order to allow the unified plan UA Prof successfully of operator, the present invention has set up the mapping function of User Agent to the UA Prof place URL of UA Prof server preservation in WAP gateway 120, this function can realize by two steps: at first UA Prof server 122 does not support the portable terminal 110 of UA Prof to make corresponding UA Prof (XML document) for these, and on UAProf server 122, store this XML document, distribute UA Prof place URL; UA Prof administration module 121 is set up the mapping relations of " the UA Prof place URL that User Agent and UA Prof server are preserved " then.Like this when portable terminal 110 visit WAP gateways 120, UA Prof administration module 121 obtains the User Agent of portable terminal 110, and (User Agent is sent by the form of portable terminal 110 by HTTP Header, and User Agent is used for portable terminal of unique sign, itself does not have terminal ability information), in mapping relations, find the UA Prof place URL that corresponding UA Prof server is preserved then, follow-up operation is just identical with the processing mode of WAP1.2 portable terminal, promptly visit UA Prof server 122, obtain UA Prof.
For the portable terminal 110 that can not obtain normal UA Prof, as x-wap-profile URL inaccessible pointed, perhaps its content does not meet the CC/PP standard fully, in case WAP gateway 120 can't be resolved smoothly, thereby the ability of the portable terminal that can't know for sure, will have a strong impact on professional carrying out.For this reason, the present invention also provides the overwrite function of UA Prof.This function realizes problematic UA Prof is carried out the URL overwrite function, as original URL is the server of portable terminal manufacturer, this URL inaccessible or its content do not meet standard, WAP gateway 120 allows operator to utilize the UA Prof place URL of storage in the UA Prof server 122 to rewrite this URL (as making uaprof.uniwise.com.cn into), so just can shield original problematic URL.
For realizing purpose of the present invention, process user is acted on behalf of the method for archives in a kind of Wireless Application Protocol Gateway provided by the invention, comprise: the UA Prof of described portable terminal is left in the UA Prof server of newly setting up in the WAP gateway 120 122, and be the URL that each UA Prof distributes the place;
UA Prof administration module 121 is set up the mapping relations of the UA Prof place URL of portable terminal and the preservation of UA Prof server in WAP gateway 120;
When WAP gateway 120 is received the request of portable terminal transmission, judge in the request whether contain normal UA Prof URL, if do not have,, find the UA Prof place URL that UA Prof server is preserved then according to mapping relations.
Fig. 3 is a workflow schematic diagram of the present invention.As shown in the figure, specifically may further comprise the steps:
Step S301, WAP gateway 120 is received the request that portable terminal 110 sends;
Step S302, the UA Prof administration module 121 of WAP gateway 120 judges whether contain the x-wap-profile field in this request, if do not have, then enters step S303, if having, then enters step S306;
Step S303, UA Prof administration module 121 obtain the UserAgent of portable terminal 110 from request;
Step S304, UA Prof administration module 121 finds corresponding UA Prof URL in the mapping relations of " the UA Prof place URL that User Agent preserves to UA Prof server 122 ";
Step S305, UA Prof administration module 121 are sent to content supplier 130 during UA Prof URL is joined request then;
Step S306, UA Prof administration module 121 judge that whether the UA Prof URL in this field can normally obtain UA Prof, judges promptly whether this URL can visit, and perhaps whether this field contents meets the CC/PP standard fully;
Step S307, if this URL goes wrong, can not obtain correct UA Prof, the identical UA Prof place URL that UA Prof administration module 121 finds UA Prof server 122 to preserve in the mapping relations of " the UA Prof place URL that abnormal UA Prof URL preserves to UA Prof server ";
Step S308, the problematic UA Prof URL during UA Prof administration module 121 will be asked is updated to normal UA Prof URL, sends to content supplier 130 then;
Step S309, the server of WAP gateway 120 and/or content supplier 130 are according to the URL at correct UAProf place, and visit UA Prof server 122 obtains correct UA Prof, and handles accordingly.
Illustrate below: (address of supposing above-mentioned UA Prof server is uaprof.uniwise.com.cn)
1. there is not UA Prof in the request
It is as follows that portable terminal sends to the request of WAP gateway:
GET
http://wap.uniwise.com.cn/index.wml?HTTP?1.1
Host:10.0.0.165
....
User-Agent:LG8080
After 121 pairs of requests of UA Prof administration module were handled, the request of forwarding was as follows:
GET?index.html?HTTP?1.1
Host:wap.uniwise.com.cn
User-Agent:LG8080
x-wap-profile:http://uaprof.uniwise.com.cn/lg8080.rdf
2. the UA Prof mistake in asking
It is as follows that portable terminal sends to the request of WAP gateway 120:
GET?
http://wap.uniwise.com.cn/index.wml?HTTP?1.1
Host:10.0.0.165
....
User-Agent:MOT?E398
x-wap-profile:http://www.motorola.com/uaprof/mot398.xml
Suppose that there is certain stylistic mistake in the mot398.xml in the above-mentioned request, the system manager corrects this UA Prof obtaining alarm back, and the UA Prof after will correcting is kept on the UA Prof server 122.After 121 pairs of requests of UA Prof administration module were handled, the request of forwarding was as follows:
GET?index.html?HTTP?1.1
Host:wap.uniwise.com.cn
User-Agent:MOT?E398
x-wap-profile:http://uaprof.uniwise.com.cn/mote398.xml
Wherein new x-wap-profile just is modified to
Http:// uaprof.uniwise.com.cn/mot398.xml
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; being familiar with those of ordinary skill in the art ought can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.