Background technology
In recent years, mobile communication and internet combine the mobile Internet (mainly referring to the wap network here) of formation, and it is fast to become development, and prospect is tempting, the business that market is huge.(share that mobile Internet occupies in whole internet is increasing for 3rd-generation, fast-developing and application 3G) along with the 3G (Third Generation) Moblie technology of supporting high speed data transfer.
But because historical reasons, the content on the internet mainly concentrates on the web website.There is network address most web website and does not have a content on mobile Internet, and demonstration that can not adaptive portable terminal.This shows, the web web site contents is carried out content migration or duplicates more and more necessary to the wap website of mobile Internet.
In the prior art, proposed the web website is transformed into two kinds of common technologies of wap website:
First kind is the scheme that adopts the client software conversion, adopts this scheme that the web website is transformed into the wap website and may further comprise the steps:
S11, will dispose on the internet, can be directly the content of web website (being website on the line) through internet access, download to this locality web site contents of local backup (or directly use), form a plurality of web page files and file that off-line is deposited;
S12, to web web site contents input web2wap converse routine, web2wap converse routine (web2wap is a kind of program that the web website is transformed into the wap website), in reality, this step need be operated by manual work;
S13, result's (portable terminal wap web site contents) that the web2wap converse routine is changed are kept at this locality;
S14, these conversions that this locality is preserved are good, adapt to content release website to the line of web page files and the file of wap network browsing, let and use the user of mobile Internet to browse.
Second kind is the scheme that adopts the high in the clouds conversion, adopts this scheme that the web website is transformed into the wap website and may further comprise the steps:
S21, mobile phone users use transform engine visit web website, web2wap high in the clouds through browser, form as:
Http:// gate.example.com? Src=http: //www.abc.com, promptly the user need will import the network address of above form in browser's address bar;
S22, web2wap high in the clouds transform engine proxy user visit web website;
S23, web website are returned to web2wap high in the clouds transform engine to web site contents;
After S24, web2wap high in the clouds transform engine carry out adaptive conversion process, portable terminal is fit to browsed content sends to the user.
For the scheme of above-mentioned first kind of client software conversion, mainly contain following defective:
Only can change static page, conversion dynamic page that can not be real-time; The maintaining web cost is high, unsuitable extensive the use.
Because scheme one must have a link, with the download content of web website, change, be kept on the local computer, change with the web2wap converse routine.Yet the static page file that exists on the computer can only be handled and changed to the web2wap converse routine, and dynamic page is that program is handled output in real time, does not have such pagefile, so can't change out dynamic page.
Moreover large-scale slightly website, having thousands of the pages on the one hand, major part all is a dynamic page on the other hand.Use the common table top application software to remove to handle the thousands of page, the speed of processing and the real-time of maintenance all are very big problems, so unsuitable extensive the use.
And deal with scheme for second kind of high in the clouds, and the main defective of existence is: it is not convenient to import, and the main body of internet content---the site owner uses inconvenience.
This scheme will be through browser by means of web2wap high in the clouds transform engine visit web website; In browser, importing wap.example.com such as the common cellular network standing-meeting of user capture visits; And when using this technical scheme, just need in browser's address bar, to import at least
Http:// gate.baidu.com/tc? Src=http: //www.example.com, the input content of these increases when using mobile terminal accessing, will seem very inconvenient, because the input method of portable terminal does not have the input method on the PC fast rapid.
From site owner's angle, the original operation of these head of a station is similar to
Www.example.comThe website, with transfer of content portable terminal internet the time, use the domain name access website of wap.example.com can meet user's use habit more.If want the user to use similarly
Http:// gate.baidu.com/tc? Src=http: //www.example.comGo access websites, can not satisfy the head of a station's operation requirement.
Therefore, need the urgent technical matters that solves of those skilled in the art to be exactly at present: can change dynamic website in real time, not need high maintenance cost again; Make user and site owner's operation all more simple simultaneously, quick.
Summary of the invention
The application's technical matters to be solved provides the method that a kind of web website is transformed into the wap website, to realize that the web network switch to wap network dynamic translation, does not need high maintenance cost again; Make user and site owner's operation all more simple simultaneously, quick.
The system that the application also provides a kind of web website to be transformed into the wap website is in order to guarantee application and the realization of said method in reality.
In order to address the above problem, the application embodiment discloses the method that a kind of web website is transformed into the wap website, comprising:
Conversion of related corresponding wap website and configuration information in the content of web website; The information that comprises visit homepage, conversion regime and the page link conversion inlet of wap website in conversion of said wap website and the configuration information;
The access request of the corresponding wap website of submitting to according to portable terminal is extracted conversion of said wap website and configuration information;
Visit homepage according to said wap website gets into corresponding wap website homepage, adopts corresponding conversion regime to convert the content of said web website the content of wap website into, and said page link is pointed in the link in the page change inlet.
Preferably, the access request of the corresponding wap website that said portable terminal is submitted to comprises the wap website domain name that presets, and the step that the access request of said corresponding wap website of submitting to according to portable terminal is extracted conversion of wap website and configuration information comprises:
Resolve said wap website domain name, domain name is pointed to the head of a station's web server;
Said web server is directed to corresponding conversion of wap website and configuration information according to presetting the locating rule access request that domain name is corresponding.
Preferably, said wap website conversion and configuration information are the iWap routine package, said in the content of web website related corresponding wap website conversion and the step of configuration information comprise:
By the head of a station said iWap routine package is copied in the root directory or sub-directory of web website.
Preferably, the visit homepage of said wap website is the iWap homepage, and the conversion inlet of said page link enters the mouth for the PAAT conversion and conversion regime is provided with in the PAAT translation-profile.
Preferably, said conversion regime comprises online in real time conversion regime and off-line non real-time conversion regime;
When said conversion regime is on the line in real time during conversion regime, in the PAAT translation-profile, be provided with as follows: the similarities and differences wherein go on foot Control Node asyn and are set to false;
When said conversion regime is that off-line non real-time conversion regime is provided with in the PAAT translation-profile as follows: similarities and differences step Control Node asyn wherein is set to true.
Preferably, also comprise in said wap website conversion and the configuration information: the visit home address of web website; The home address of said web website is provided with in the PAAT translation-profile.
Preferably, said visit homepage according to the wap website gets into corresponding homepage, adopts corresponding conversion regime to convert the content of said web website the content of wap website into, and the step that said page link conversion inlet is pointed in the link in the page is comprised:
Call the iWap homepage, comprise the inlet file of PAAT class libraries in the said iWap homepage;
Said iWap homepage is called the PAAT class libraries according to the inlet file of said PAAT class libraries;
Said PAAT class libraries is searched the PAAT translation-profile in the iWap routine package, said PAAT translation-profile is resolved, and obtains the information of conversion regime;
Said PAAT class libraries adopts corresponded manner to convert the homepage of said web website into the wap page according to said conversion regime information, and with the all-links in the page, all points to the conversion inlet of PAAT.
The application embodiment discloses the system that a kind of web website is transformed into the wap website, comprising:
The website relating module is used at related corresponding wap website conversion of the content of web website and configuration information; The visit homepage that comprises the wap website in conversion of said wap website and the configuration information, conversion regime, and the information of the conversion of page link inlet;
The wap information extraction modules is used for the access request according to the corresponding wap website of portable terminal submission, extracts conversion of said wap website and configuration information;
Modular converter is used for getting into corresponding wap website homepage according to the visit homepage of said wap website, adopts corresponding conversion regime to convert the content of said web website the content of wap website into, and said page link is pointed in the link in the page change inlet.
Preferably, the access request of the corresponding wap website that said portable terminal is submitted to comprises the wap website domain name that presets, and said wap information extraction modules comprises:
The domain name mapping submodule is used to resolve said wap website domain name, domain name is pointed to the head of a station's web server;
The orientation for place submodule is used for by said web server being directed to corresponding conversion of wap website and configuration information according to presetting the locating rule access request that said website domain name is corresponding.
Preferably, said wap website conversion and configuration information are the iWap routine package, and said wap website conversion and configuration information are related with the web web site contents, through the head of a station said iWap routine package are copied in root directory or the sub-directory of web website to generate.
Preferably, said modular converter comprises:
Homepage is called submodule, is used to call the iWap homepage, comprises the inlet file of PAAT class libraries in the said iWap homepage;
PAAT class library call submodule is used for calling the PAAT class libraries by said iWap homepage according to the inlet file of said PAAT class libraries;
Conversion regime obtains submodule, is used for searching the PAAT translation-profile by said PAAT class libraries at the iWap routine package, and said PAAT translation-profile is resolved, and obtains the information of conversion regime;
The conversion of page submodule is used for adopting corresponded manner to convert the homepage of said web website into the wap page by said PAAT class libraries according to said conversion regime information;
The link inlet points to submodule, is used for the all-links with the page, all points to the conversion inlet of PAAT.
Compared with prior art, the application has the following advantages:
The application realizes that through a kind of page self-adapted technology the web network switch is to wap network dynamic translation.Utilize the iWap routine package; IWap routine package decompress(ion) is copied under the root directory of web website; Reach related corresponding wap website conversion and the robotization of configuration information in the content of web website, the head of a station is according to actual needs to the configuration of each node of the PAAT class libraries iWap routine package in the iWap routine package under, the method facility before comparing operation; Provide cost savings the more convenient head of a station's application.
In addition in a kind of preferred embodiment of the application, the PAAT class libraries converts the homepage of said web website into the wap page according to information configured, and can all point to the conversion inlet of PAAT simultaneously with the all-links in the page.And only need submit the visit application of wap website to, just can accomplish the importing of all inlets.Dynamic translation technology before comparing, the input that more meets mobile phone users is demand easily.
Embodiment
For above-mentioned purpose, the feature and advantage that make the application can be more obviously understandable, the application is done further detailed explanation below in conjunction with accompanying drawing and embodiment.
The core idea of the application embodiment is, on the server of web website, builds the conversion environment by the head of a station, the web web site contents of head of a station's arrangement oneself and scheme of designing.The web2wap converse routine then is the instrument of the web web site contents of head of a station's arrangement oneself, thereby realizes the in real time seamless conversion of web web site contents to portable terminal wap web site contents of carrying out.
With reference to figure 1, a kind of web website that shows the application is transformed into the flow chart of steps of the method embodiment of wap website, specifically can may further comprise the steps:
Step 101, in the content of web website related corresponding conversion of wap website and configuration information;
Wherein, comprise the visit homepage of wap website in conversion of said wap website and the configuration information, conversion regime, the information of the domain name of wap website and the conversion of page link inlet.
In concrete the realization, conversion of said wap website and configuration information can be the iWap routine package, but are not limited to the iWap routine package.The iWap routine package is the routine package that is used to realize the concrete conversion to the wap website of web website, and in reality, the iWap routine package can be downloaded from the code trustship website of project official website and other mandates by the head of a station.The iWap routine package mainly comprises following content: PAAT (Page Automatic Adaptation Technology) class libraries (realizing the code packages of the page self-adapted technology of PAAT), iWap homepage index.php, PAAT conversion inlet gate.phpt and PAAT translation-profile paat.xml.Correspondingly, promptly in this preferred exemplary, the visit homepage of said wap website is the iWap homepage, and the conversion inlet of said page link is PAAT conversion inlet gate.phpt, and the conversion regime of indication then can be provided with in the PAAT translation-profile in the step 101.
As in a kind of example of the application embodiment in concrete the application; Said conversion regime can comprise that online in real time conversion regime and off-line non real-time conversion regime are in concrete the application; If the visit capacity of website itself is little, the user asks seldom, then can adopt the mode of online in real time conversion; If the visit capacity of website itself is bigger, the user asks too much, then can adopt the mode of off-line non real-time conversion.More specifically, when said conversion regime is on the line in real time during conversion regime, can in the PAAT translation-profile, be provided with as follows:
Similarities and differences step Control Node asyn wherein is set to false;
When said conversion regime is off-line non real-time conversion regime, can in the PAAT translation-profile, be provided with as follows:
Similarities and differences step Control Node asyn wherein is set to true.
It is understandable that the PAAT translation-profile is the file that is used to be provided with PAAT conversion relevant information.In conversion of said wap website and configuration information, the visit home address of web website can also be set further.More specifically, the home address of said web website also can be provided with in said PAAT translation-profile.
In a kind of preferred embodiment of the application; The step of said wap website conversion related corresponding in the content of web website and configuration information can for; By the head of a station said iWap routine package is copied in the contents directory of web website, the contents directory of said web website comprises the root directory or the sub-directory of web website.
Adopt the mode that directly said iWap routine package is copied to the root directory or the sub-directory of web website, not only make operation associated simply, convenient, make that also the operation of extracting conversion of wap website and configuration information is also very convenient, only need under assigned catalogue, to read and get final product.Especially said iWap routine package directly is copied to the interrelational form in the root directory of web website, because the copy and the operation of reading can directly accomplish, with the speed that more helps system handles with economize on resources under root directory.
In concrete the realization, conversion of related corresponding wap website and configuration information in the content of web website as follows:
1) head of a station downloads the iWap routine package from the code trustship website of project official website and other mandates, comprising PAAT class libraries (realizing the code packages of the page self-adapted technology of PAAT), iWap routine package homepage index.php, PAAT conversion inlet gate.phpt and PAAT translation-profile paat.xml.
2) head of a station is copied to the iWap routine package decompress(ion) of downloading under the root directory of web website.
3) in PAAT translation-profile paat.xml, index node default configuration the homepage of web website.In practical application, can be as required, this node is set to other page.
4) in PAAT translation-profile paat.xml, asyn node default configuration is false.In practical application, can be as required, this node is set to true.This configuration has determined it is to adopt the online in real time conversion regime, or off-line non real-time conversion regime.
5) wap website domain name (like wap.example.com) is set.
In reality; The domain name of said wap website can be provided with by the head of a station; For satisfying its operation demand; Making things convenient for mobile phone users input network address, can said wap website domain name directly be set to the form of shape such as www.xxx.com, and need not to be set to shape such as http://gate.baidu.com/tc like prior art? Src=http: //the www.xxx.com form.
Certainly, only as a kind of example, those skilled in the art can pass through the said method principle to above-mentioned instance, make more variation, as adopt other any method related corresponding wap website in the content of web website, conversion and configuration information; And, change conversion and information configured, the conversion that all is based on the application is used, and the application need not this is limited.
The access request of step 102, the corresponding wap website of submitting to according to portable terminal is extracted conversion of said wap website and configuration information;
In concrete the realization, the access request of the corresponding wap website that said portable terminal is submitted to comprises the wap website domain name that presets, and through wap website domain name is resolved, can domain name be pointed to the head of a station's web server; The configuration of fictitious host computer on the web server will navigate to the iWap routine package through the request that wap website domain name is come then.
More specifically, in a kind of preferred embodiment of the application, said step 102 can comprise following substep:
Substep S21, resolve said wap website domain name, domain name is pointed to the head of a station's web server;
Substep S22, said web server are directed to corresponding conversion of wap website and configuration information according to presetting the locating rule access request that domain name is corresponding.
For example, in reality, can extract conversion of said wap website and configuration information through the access request of following steps according to the corresponding wap website of portable terminal submission:
1) the wap network user uses wap website domain name (like wap.example.com) to send browse request.
2) the dns resolution server of domain name provider (like ten thousand nets) is responsible for domain name is directed to the head of a station's web server.
3) wap website domain name will be set, the iWap routine package under parsing to the website root directory; Through the parsing of domain name, with this visit of wap user, point to the iWap routine package in the iWap routine package, visit homepage index.php, iWap routine package be decompress(ion) and being copied under the root directory of web website.
4) configuration of the fictitious host computer on the web server will be directed to the iWap routine package through the request that wap website domain name is come.
5) in iWap homepage index.php, can call the class libraries of PAAT; Corresponding access request, the configuration information of use xml resolver resolves xml configuration file paat.xml obtains corresponding conversion of wap website and configuration information; The page that definite request need be opened and the conversion regime that adopts.
Step 103, get into corresponding wap website homepage, adopt corresponding conversion regime to convert the content of said web website the content of wap website into, and said page link conversion inlet is pointed in the link in the page according to the visit homepage of said wap website.
In concrete the realization; Saidly adopt content that corresponding conversion regime converts the content of said web website into the wap website in the iWap routine package, transferring the PAAT class libraries; In the PAAT class libraries, search configuration file; The PAAT class libraries is resolved according to the configuration information of paat.xml, obtain the information of conversion regime.According to the information of conversion regime, the web conversion of page is become the wap page, comprising with the all-links in the page, all point to the conversion inlet of PAAT.
In a kind of preferred embodiment of the application, said step 103 can comprise following substep:
Substep S31, call the iWap homepage, comprise the inlet file of PAAT class libraries in the said iWap homepage;
Substep S32, said iWap homepage are called the PAAT class libraries according to the inlet file of said PAAT class libraries;
Substep S33, said PAAT class libraries are searched the PAAT translation-profile in the iWap routine package, said PAAT translation-profile is resolved, and obtain the information of conversion regime;
Substep S34, said PAAT class libraries adopt corresponded manner to convert the homepage of said web website into the wap page according to said conversion regime information, and with the all-links in the page, all point to the conversion inlet of PAAT.
Certainly, only as a kind of example, those skilled in the art can pass through the said method principle to the foregoing description, make more variation, as adopt other any method to extract conversion of wap website and configuration information; And, to adopt other any method to change web website domain name and convert wap website domain name into, the conversion that all is based on the application is used, and the application need not this is limited.
Those skilled in the art understand the application better for ease, below illustrate further the application through a complete example:
Suppose currently need convert web website www.exlets.com to the wap website, then adopt the application embodiment to operate as follows:
At first the head of a station downloads the iWap routine package from the code trustship website of project official website and other mandates, and the routine package of decompress(ion) iWap.
1) the iWap routine package behind the decompress(ion) is copied to
Www.exlets.comUnder the root directory of website, and wap website domain name (like wap.example.com) is set.
2) the index node of the paat.xml under the preparation iWap routine package, because
Www.exlets.comThe homepage of website is index.html, so with the index node configuration of the paat.xml under the iWap routine package do
Http:// www.exlets.com/index.html, it converts http://wap.exlets.com/index.php under the iWap routine package.
The mode of the webpage conversion of 3) selecting to adopt is false in the asyn node configuration of the following paat.xml of iWap routine package, and equipped with switches is changed in real time.
4) be iWap routine package configuration virtual main frame, wap.exlets.com is resolved to the iWap routine package.
5) user uses mobile phone access
Http:// wap.exlets.comBrowse request is sent in the website.
6) the dns resolution server of domain name provider (like ten thousand nets) is responsible for domain name is directed to the head of a station's web server; Fictitious host computer configuration on the web server will be directed to the iWap routine package through the request that the wap.exlets.com domain name is come, and access the homepage index.php of configuration.
7) automatically perform the inlet file of PAAT class libraries; Because comprise the inlet file paat.php of PAAT class libraries among the iWap homepage index.php,, can automatically perform the inlet file paat.php of PAAT class libraries when the user asks index.php.
8) the PAAT class libraries is sought configuration file paat.xml down from the iWap routine package automatically; And the configuration information of use xml resolver resolves xml configuration file paat.xml; Parse the home address index.html of web website, and this conversion is the mode that real-time online commentaries on classics is handled;
9) the PAAT class libraries is according to the configuration information of paat.xml, and the use label is deleted function, html commentaries on classics xhtml function, label clearing function, content is simplified function, layout inference function and xhtml changes wml function etc., converts the homepage of web website into the wap page;
10) when the PAAT class libraries is thoroughly cleared up adjustment to the homepage of web website, the PAAT of all link pointing systems conversion inlet, no longer point to the web website, and guiding PAAT class libraries removes to change other pages of web website to guarantee original link.
Need to prove; For method embodiment, for simple description, so it all is expressed as a series of combination of actions; But those skilled in the art should know; The application does not receive the restriction of described sequence of movement, because according to the application, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action might not be that the application is necessary.
With reference to figure 2, a kind of web website that shows the application is transformed into the structured flowchart of the system embodiment of wap website, specifically can comprise with lower module:
Website relating module 201 is used at related corresponding wap website conversion of the content of web website and configuration information; The visit homepage that comprises the wap website in conversion of said wap website and the configuration information, conversion regime, the domain name of wap website, and, the conversion inlet of page link;
Wap information extraction modules 202 is used for the access request according to the corresponding wap website of portable terminal submission, extracts conversion of said wap website and configuration information;
Modular converter 203; Be used for getting into corresponding wap website homepage according to the visit homepage of said wap website; Adopt corresponding conversion regime to convert the content of said web website the content of wap website into, and said page link is pointed in the link in the page change inlet.
As shown in Figure 2, said wap information extraction modules 202 links to each other with modular converter 203, and said wap information extraction modules 202, modular converter 203 link to each other with website relating module 201.
In concrete the realization, conversion of said wap website and configuration information can be the iWap routine package, and said wap website conversion and configuration information are related with the web web site contents, can said iWap routine package be copied in the contents directory of web website through the head of a station to generate.
More preferably, said iWap routine package can copy in the root directory or sub-directory of web website.
In said preferred embodiment, the visit homepage of said wap website is the iWap homepage, and the conversion inlet of said page link is PAAT conversion inlet, and the domain name of said conversion regime and wap website is provided with in the PAAT translation-profile.
As the concrete a kind of example used of the application embodiment, said conversion regime comprises online in real time conversion regime and off-line non real-time conversion regime.More specifically, when said conversion regime is on the line in real time during conversion regime, in the PAAT translation-profile, can be provided with as follows: the similarities and differences wherein go on foot Control Node asyn and are set to false;
When said conversion regime is that off-line non real-time conversion regime can be provided with in the PAAT translation-profile as follows: similarities and differences step Control Node asyn wherein is set to true.
In a kind of preferred embodiment of the application, can also comprise in conversion of said wap website and the configuration information: the visit home address of web website, the home address of said web website also can be provided with in the PAAT translation-profile.
In concrete the application, said wap information extraction modules can comprise following submodule:
The request submodule is used for the access request by the corresponding wap website of portable terminal submission, comprises the website domain name in the described request;
The domain name mapping submodule is used to resolve said website domain name, domain name is pointed to the head of a station's web server;
The orientation for place submodule is used for by said web server being directed to corresponding conversion of wap website and configuration information according to presetting the locating rule access request that said website domain name is corresponding.
In the application's preferred embodiment, said modular converter specifically can comprise following submodule:
Homepage is called submodule, is used to call the iWap homepage, comprises the inlet file of PAAT class libraries in the said iWap homepage;
PAAT class library call submodule is used for calling the PAAT class libraries by said iWap homepage according to the inlet file of said PAAT class libraries;
Conversion regime obtains submodule, is used for searching the PAAT translation-profile by said PAAT class libraries at the iWap routine package, and said PAAT translation-profile is resolved, and obtains the information of conversion regime;
The conversion of page submodule is used for adopting corresponded manner to convert the homepage of said web website into the wap page by said PAAT class libraries according to said conversion regime information;
The link inlet points to submodule, is used for the all-links with the page, all points to the conversion inlet of PAAT.
In concrete the realization, said system embodiment can be arranged in a certain station server, or is arranged in the server cluster of distributed frame according to actual conditions, and the application does not limit this.
Because said system embodiment is basically corresponding to preceding method embodiment, so not detailed part in the description of present embodiment can just not given unnecessary details at this referring to the related description in the previous embodiment.
The application can be used in numerous general or special purpose computingasystem environment or the configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, small-size computer, mainframe computer, comprise DCE of above any system or equipment or the like.
The application can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in DCE, put into practice the application, in these DCEs, by through communication network connected teleprocessing equipment execute the task.In DCE, program module can be arranged in this locality and the remote computer storage medium that comprises memory device.
More than a kind of web website that the application provided is transformed into the method for wap website and system that a kind of web website is transformed into the wap website has carried out detailed introduction; Used concrete example among this paper the application's principle and embodiment are set forth, the explanation of above embodiment just is used to help to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to the application's thought, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as the restriction to the application.