WO2010072128A1 - 网络互联的方法、网关设备及系统 - Google Patents

网络互联的方法、网关设备及系统 Download PDF

Info

Publication number
WO2010072128A1
WO2010072128A1 PCT/CN2009/075732 CN2009075732W WO2010072128A1 WO 2010072128 A1 WO2010072128 A1 WO 2010072128A1 CN 2009075732 W CN2009075732 W CN 2009075732W WO 2010072128 A1 WO2010072128 A1 WO 2010072128A1
Authority
WO
WIPO (PCT)
Prior art keywords
content
protocol
user terminal
conversion
response message
Prior art date
Application number
PCT/CN2009/075732
Other languages
English (en)
French (fr)
Inventor
郑江龙
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2010072128A1 publication Critical patent/WO2010072128A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, a gateway device, and a system for network interconnection. Background technique
  • the WAP (Wireless Application Protocol) service is applied to the telecommunication network, which has the corresponding mobile terminal and WAP server; the Web service is applied in the IT (Information Technology) Internet, and it has the corresponding popular IE ( Internet Explorer, web browser) with web server.
  • IT Information Technology
  • IE Internet Explorer, web browser
  • the resulting network silos and network heterogeneity directly lead to users not being able to quickly and easily use the content provided by the service provider.
  • PC Personal Computer
  • the WAP page cannot be browsed, and the user cannot access the Web site when using the mobile terminal.
  • Web sites need to extend information to telecom networks and mobile terminals; WAP sites need to use the Internet and Web sites to promote and develop, form a systematic information exchange network, and ultimately cover all the means used by users.
  • the terminal develops multiple protocol stacks to support multiple protocols, and the method implements a fat client mode.
  • Support WML Wireless Markup Language
  • HTML Hyper Text Markup Language
  • XHTML extensible HyperText Markup Language
  • the embodiments of the present invention provide a method, a gateway device, and a system for network interconnection.
  • the technical solution is as follows:
  • the embodiment of the present invention provides a method for network interconnection, including:
  • the converted response message is returned to the user terminal.
  • an embodiment of the present invention further provides a method for network interconnection, including:
  • the embodiment of the present invention further provides a method for network interconnection, including:
  • an embodiment of the present invention provides a gateway device, including:
  • the HTTP server service module of the hypertext transfer protocol server receives the browsing request message sent by the user terminal, and acquires the user terminal identification information according to the browsing request message;
  • a Hypertext Transfer Protocol client HTTP client service module configured to send the browsing request message to a network server, and receive a response message sent by the network server, where the response message includes the user terminal request The content of the browsing; obtaining the response message content identification information according to the response message;
  • a policy service module configured to acquire a preset conversion rule according to the user terminal identification information and the response message content identification information
  • a conversion service Transform service module configured to perform content conversion on the response message according to a preset conversion rule acquired by the Policy Service module
  • the HTTP Server Service module is further configured to return a response message converted by the Transform Service module to the user terminal.
  • the embodiment of the present invention further provides a gateway device, including:
  • the second hypertext transfer protocol server HTTP server service module is configured to receive an upload request message sent by the user terminal, where the upload request message includes content to be uploaded by the user terminal, information of the destination network server, and user terminal information; And acquiring user terminal identification information according to the user terminal information;
  • a second policy service policy service module configured to acquire a preset conversion rule according to the user terminal identification information and the pre-saved network server information
  • a second conversion service Transform Service module configured to perform content conversion on the uploaded content according to the preset conversion rule
  • the second Hypertext Transfer Protocol client HTTP Client Service module is configured to send the converted upload content to the network server according to the information of the destination network server.
  • the embodiment of the invention further provides a gateway device, including:
  • a third hypertext transfer protocol client HTTP client service module configured to receive a service push request message sent by the network server, where the service push request message includes content pushed by the network server to the user terminal, user terminal information, and the The network server information is obtained: the user terminal identification information is obtained according to the user terminal information; the third policy service policy service module is configured to acquire a preset conversion rule according to the network server information and the user terminal identification information;
  • a third conversion service a Transform service module, configured to perform content conversion on the content pushed by the network server to the user terminal according to the preset conversion rule;
  • the third hypertext transfer protocol server HTTP Server Service module is configured to send the converted push content to the user terminal.
  • an embodiment of the present invention provides a system, where the system includes:
  • a gateway device configured to receive a browsing request message or an upload request message sent by the user terminal, and obtain user terminal identification information according to the browsing request message or the user terminal information;
  • the response message acquires response message content identification information or acquires network server information according to the service push request message;
  • a network server configured to send a response message corresponding to the browsing request to the gateway device, or receive content uploaded by the user terminal by using the gateway device, or send a service push request message to the user terminal.
  • An embodiment of the present invention further provides a method for implementing syntax conversion of protocol content in a protocol message body, where the method includes:
  • An embodiment of the present invention further provides an apparatus for implementing syntax conversion of protocol content in a protocol message body, where the apparatus includes:
  • a first determining module configured to determine whether an element/attribute in the original grammar of the protocol content in the received protocol message body exists in the target grammar
  • a second determining module configured to determine whether an element/attribute in the original grammar of the protocol content in the protocol message body is consistent with an element/attribute in the target grammar
  • a third determining module configured to determine whether an element/attribute in the original grammar of the protocol content in the protocol message body has a grammar of equivalent meaning in the target grammar
  • a copying module configured to: when the judgment result of the second judging module is yes, copy an element/attribute in an original grammar of the protocol content in the protocol message body to the target grammar
  • a representation/modification module configured to: when the judgment result of the third judging module is YES, use a syntax of a medium-meaning meaning of the target grammar to represent or modify an element/attribute in an original grammar of the content of the protocol message body protocol;
  • a representation module configured to express, by the program, the meaning of the element/attribute in the original grammar of the content of the protocol message body protocol when the judgment result of the third judgment module is no.
  • the user can access any Web/WAP application provided in the Internet according to the conversion between protocols provided by the gateway device.
  • Service Web/WAP application service providers and content providers can focus only on the content of the service, thus separating the content and presentation content, solving network heterogeneity and network islanding, and realizing the Internet and telecommunication networks. Effective integration.
  • FIG. 1 is a flowchart of a method for network interconnection according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a gateway device according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of still another method for network interconnection according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of still another gateway device according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of still another method for network interconnection according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of still another gateway device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a system according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a networking provided by an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a gateway device of a network interconnection according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a Policy Service module according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a Transform Service module according to an embodiment of the present invention.
  • FIG. 12 is still another schematic structural diagram of a networking provided by an embodiment of the present invention.
  • FIG. 13 is a flowchart of a method for a user to browse a service by using a gateway device according to an embodiment of the present invention
  • FIG. 14 is a diagram showing a conversion relationship between protocols according to an embodiment of the present invention.
  • 15 is a flowchart of an application method of a protocol conversion rule according to an embodiment of the present invention.
  • 16 is a flowchart of a method for converting a WML protocol set to another protocol according to an embodiment of the present invention
  • FIG. 17 is a flowchart of a method for converting an HTML protocol set to another protocol according to an embodiment of the present invention
  • FIG. 18 is a flowchart of a method for converting a XHTML protocol set to another protocol according to an embodiment of the present invention
  • FIG. 19 is a flowchart of a syntax conversion method according to an embodiment of the present invention
  • FIG. 20 is a schematic structural diagram of an apparatus for implementing syntax conversion of protocol message body protocol content according to an embodiment of the present invention. detailed description
  • FIG. 1 is a flowchart of a method for network interconnection according to an embodiment of the present invention, where the method includes:
  • S101 Receive a browsing request message sent by the user terminal, obtain user terminal identification information according to the browsing request message, and send the browsing request to the network server;
  • S102 Receive a response message sent by the network server, where the response message includes content requested by the user terminal for browsing, and obtain response message content identification information according to the response message;
  • S104 Perform content conversion on the response message according to a preset conversion rule.
  • the user can access the Web/WAP application service provided by any network on the network server according to the conversion between the provided protocols; the service provider and the content provider of the Web/WAP application service can only focus on providing the service.
  • the content so as to achieve the separation of the content and the presentation content, solve the network heterogeneity and network island phenomenon, and achieve the effective integration of the Internet and the telecommunications network.
  • FIG. 2 is a schematic structural diagram of a gateway device according to an embodiment of the present disclosure, where the device includes:
  • the Hypertext Transfer Protocol Server (HTTP) module 21 receives a browsing request message sent by the user terminal, and acquires user terminal identification information according to the browsing request message;
  • the Hyper-Text Transfer Protocol (CLI) module 22 is configured to send a browse request message to the network server, and receive a response message sent by the network server, where the response message includes content requested by the user terminal to browse; Responding to message content identification information;
  • a policy service (Pol icy Service) module 23 configured to acquire a preset conversion rule according to the user terminal identification information and the response message content identification information;
  • Transform Service Transform Service
  • Polic Service a transformation service (Transform Service) module 24 configured to perform content conversion on the response message according to a preset conversion rule acquired by the Polic Service module 23;
  • Hypertext Transfer Protocol Server (HTTP Server Service) module 21 also used by Transform Service
  • the response message after the conversion of the module 24 is returned to the user terminal.
  • HTTP Server Service Hypertext Transfer Protocol Server
  • the user can access any Web/WAP provided in the Internet according to the conversion between protocols provided by the gateway device.
  • Application services; Web/WAP application service providers and content providers can focus only on the content of services, thus separating the content and presentation content, solving network heterogeneity and network islanding, and implementing Internet and telecommunication networks. Effective integration.
  • FIG. 3 is a flowchart of still another method for network interconnection according to an embodiment of the present invention, where the method includes:
  • S301 Receive an upload request message sent by the user terminal, where the upload request message includes content to be uploaded by the user terminal, information of the destination network server, and user terminal information.
  • the information of the destination network server may be information such as an address, an identifier, and the like of the network server.
  • S302 Acquire user terminal identification information according to the upload request message.
  • S303 Obtain a preset conversion rule according to the user terminal identification information and the pre-saved network server information.
  • S305 Send the converted upload content to the network server according to the information of the destination network server.
  • the user can upload content to the Web/WAP application service provided by any network on the network server according to the conversion between the provided protocols; thereby realizing the separation of the provided content and the presentation content, and solving the network heterogeneity and The phenomenon of network islands, and the effective integration of the Internet and telecommunications networks.
  • FIG. 4 is a schematic structural diagram of still another gateway device according to an embodiment of the present invention.
  • the device includes: a second hypertext transfer protocol server (HTTP Server Service) module 41, configured to receive an upload request message sent by a user terminal, The upload request message includes content to be uploaded by the user terminal, information of the destination network server, and user terminal information; and acquiring user terminal identification information according to the user terminal information;
  • HTTP Server Service hypertext transfer protocol server
  • the second policy service module 42 is configured to obtain a preset conversion rule according to the user terminal identification information and the pre-saved network server information;
  • the second transformation service (Transform Service) module 43 is configured to perform content conversion on the uploaded content according to a preset conversion rule
  • the second Hypertext Transfer Protocol client (HTTP Client Service) module 44 is configured to send the converted upload content to the web server according to the information of the destination network server.
  • FIG. 5 is a flowchart of still another method for network interconnection according to an embodiment of the present invention, where the method includes:
  • S501 Receive a service push request message sent by the network server, where the service push request message includes content pushed by the network server to the user terminal, user terminal information, and network server information.
  • S502 Acquire user terminal identification information according to user terminal information.
  • S503 Obtain a preset conversion rule according to the network server information and the user terminal identification information.
  • S504 Perform content conversion on the content pushed by the network server to the user terminal according to the preset conversion rule.
  • S505 Send the converted push content to the user terminal.
  • the network server may actively provide the Web/WAP application service to the user according to the conversion between the provided protocols; the service provider and the content provider of the Web/WAP application service may only focus on providing the content of the service, thereby The separation of the provided content and the displayed content is realized, the network heterogeneity and the network island phenomenon are solved, and the effective integration of the Internet and the telecommunication network is realized.
  • FIG. 6 is a schematic structural diagram of a gateway device according to an embodiment of the present invention.
  • the device includes: a third hypertext transfer protocol client (HTTP Client Service) module 61, configured to receive a service push request message sent by a network server.
  • HTTP Client Service hypertext transfer protocol client
  • the service push request message includes the content pushed by the network server to the user terminal, the user terminal information, and the network server information; and the user terminal identification information is obtained according to the user terminal information;
  • a third policy service (Policy Service) module 62 configured to acquire a preset conversion rule according to the network server information and the user terminal identification information;
  • a third conversion service (Transform Service) module 63 configured to perform content conversion on the content pushed by the network server to the user terminal according to a preset conversion rule;
  • the third hypertext transfer protocol server (HTTP Server Service) module 64 is configured to send the converted push content to the user terminal.
  • the network server can actively provide the Web/WAP application service to the user according to the conversion between the protocols provided by the gateway device.
  • Web/WAP application service providers and content providers can focus only on the content of services, thus separating the content from the presentation content, solving network heterogeneity and network islanding, and realizing the effectiveness of the Internet and telecommunications networks. Fusion.
  • FIG. 7 is a schematic structural diagram of a system according to an embodiment of the present invention, where the system includes:
  • the gateway device 71 is configured to receive a browsing request message or an upload request message sent by the user terminal, and acquire user terminal identification information according to the browsing request message or the user terminal information;
  • the network server 72 is configured to send a response message corresponding to the browsing request to the gateway device 71, or receive content uploaded by the user terminal through the gateway device.
  • the user can access any Web/WAP application provided in the Internet according to the conversion between protocols provided by the gateway device.
  • Service Web/WAP application service providers and content providers can focus only on the content of the service, thus separating the content and presentation content, solving network heterogeneity and network islanding, and realizing the Internet and telecommunication networks. Effective integration.
  • the gateway device when the gateway device simultaneously receives multiple browsing request messages sent by the user terminal and multiple response messages sent by the network server, according to the prior art, the gateway device may correspond to multiple response messages and the browsing request message. , send separately, no longer repeat them here.
  • FIG. 8 is a schematic structural diagram of a networking provided by an embodiment of the present invention.
  • the network includes: a user terminal (UE) 81, an administrator terminal 82, a gateway device 83, and a WAP application server 85 and a web application server 84.
  • the user terminal 81 includes: a mobile phone, a PC, a notebook computer, and a PDA (Personal Digital Assistant) used by the user to access the WAP and the Web site; for example: an iPhone, a Lenovo computer, a Lenovo ThinkPacU, a Dell X50s, a handheld computer, and the like;
  • a PDA Personal Digital Assistant
  • the administrator terminal 82 is a device for the operator to maintain the gateway device, for example: a PC with a browser;
  • a Web Appl ication server 84 including a website or application for providing content and services to users, is referred to as a CP (Content Provider) / SP (Service Provider) in a telecommunications network.
  • CP Content Provider
  • SP Service Provider
  • http //www. sina. com. cn;
  • WAP Application Server 85 a website or application that provides content and services to users.
  • the main difference between WAP and Web lies in different protocols and different terminals.
  • gateway device 83 for receiving a request for the user terminal 81 to browse content or request a service, and performing corresponding terminal identification
  • the user terminal 81 stores the corresponding user behavior analysis and stores the data in the database;
  • the gateway device 83 can also provide a portal display function for providing services to the user, and the open service management function supports the administrator administrator terminal for business operations.
  • the embodiment of the present invention provides a gateway device for network interconnection.
  • the gateway device includes: an HTTP Server Service (HTTP server) module 91, and a Policy Service (policy). Service) module 92, HTTP Cl ient Service (HTTP client) module 93, Transform Service (transformation service) module 94.
  • HTTP server HTTP server
  • policy Policy Service
  • HTTP Cl ient Service HTTP client
  • Transform Service transformation service
  • the modules are connected through an API (Application Programming Interface) or a Web Services-based SOAP (Simple Object Access Protocol) interface; wherein the API interface is to improve performance, and the SOAP interface It is capable of distributed deployment and open interfaces. Because the functions and efficiency of each module are different, the Transform Service module and the Polic Service module can be deployed multiple times. The connection between the modules can be established through the above interfaces, which can balance performance efficiency, openness, and distributed deployment.
  • API Application Programming Interface
  • SOAP Simple Object Access Protocol
  • each module in the gateway device is as follows:
  • the HTTP Server Service module 91 is mainly used for interacting with the user terminal; interacting with the user terminal by using the HTTP protocol, and establishing a connection relationship with the Pol icy Service module 92 by using the SOAP protocol/API function;
  • the HTTP Server Service module 91 includes:
  • the first request/response processing unit is configured to process the response of the user/web server, receive the HTTP browsing request of the user, forward the request to the Polic Service module 92, and receive the response from the Polic Service module 92.
  • the HTTP Server Service Module 91 also supports users to access using HTTPS.
  • the first information identifying unit is configured to identify the terminal information, analyze the header domain information requested by the terminal, and obtain terminal type information (User-Agent header field) for conversion and protocol range information selected by the user (Accept header field) ), user information, and network information.
  • the terminal type information indicates detailed soft and hardware information related to the terminal; the protocol range selected by the user represents the capability of the browser software and the will of the terminal; the server can formulate special rules through user information (such as mobile phone number, user id, etc.);
  • the information contains information such as network type and network bandwidth, so that the converted content meets the bandwidth requirements and limitations of various networks.
  • the HTTP Server Service module forwards this information to the Pol icy Service module.
  • the HTTP Cl ient Service module 93 is configured to exchange information with the WAP/Web application server; interact with the WAP/Web application server through the HTTP protocol, and establish a connection relationship with the Pol icy Service module 92 by using the S0AP protocol/API function;
  • the HTTP Client Service module 93 includes: The second request/response processing unit is configured to process the service request and response, receive the browsing request of the Pol icy Service module, and forward the request to the WAP/Web application server, obtain the response to the server, and finally return to the Pol icy Service module. Based on security requirements, the HTTP Cl ient Service module also supports users to access using HTTPS.
  • a second information identifying unit configured to identify the content of the response message, and analyze the returned by the WAP/Web application server
  • the HTTP response message first specifies the message content protocol range based on the HTTP response header information (such as the Content-Type header field), and obtains the final protocol version number according to the protocol declaration in the message body.
  • the unit finally notifies the Pol icy Service module 92 of the message content and the identification result.
  • the Pol icy Service module 92 as a core module of the gateway device, connects other modules in the gateway device, performs message distribution, and drives other modules to complete the end-to-end process of browsing the WAP/Web application by the terminal; between the module and the administrator terminal Communicate via the HTTP/HTTPS protocol, communicate with the HTTP Server Service module 91 via the SOAP protocol/API function, communicate with the HTTP Cl ient Service module 93 via the SOAP protocol/API function, and communicate with the Transform Service module 94 via the SOAP protocol/API function.
  • the Pol icy Service module 92 is also used for an open interface to the administrator terminal for operation and maintenance.
  • the Pol icy Service module 92 acquires the corresponding protocol conversion rules and performs rule merging through the terminal identification information and the response message content identification information.
  • the Transform Service module 94 is configured to obtain a corresponding mapping logic syntax file from a database according to a protocol conversion rule given by the Polic Service module 92, and invoke an XSLT (Extended Stylesheet Language Transformation) or an XQuery engine ( Xml Query language engine, xml query language engine) performs content format conversion, and finally converts the protocol format of the supporting terminal; this module is also one of the core modules in the gateway device, and the module and the Pol icy Service module 92 pass the SOAP protocol/API Function communication.
  • XSLT Extended Stylesheet Language Transformation
  • XQuery engine Xml Query language engine, xml query language engine
  • the gateway device for implementing inter-protocol conversion between the embodiments of the present invention uses the Pol icy Service module to distribute the response of the WAP/Web application server, and invokes the Transform Service module to perform protocol content conversion to adapt the request of the terminal, which can be quickly
  • the application is developed to map the current protocol set, and then the heterogeneous and network islands of the network entity are adapted, so that the user can obtain the service provided by the WAP and the Web anytime and anywhere, and reduce the cost of providing the service by the content and the service provider.
  • an embodiment of the present invention provides a Polic Service module, which includes: a distribution policy processing unit 101 and a conversion policy processing unit 102.
  • the distribution policy processing unit 101 is configured to: when receiving the request sent by the HTTP Server Service module, perform distribution policy processing, determine whether to request the portal display or request other WAP/Web applications in the network, and if requesting the portal display, Directly providing the user with a web page for display; if requesting other WAP/Web applications in the network, forwarding the request message to the corresponding application website;
  • the unit is further configured to: after receiving the response of the HTTP Client Service module, apply a distribution policy to determine whether the response is to directly forward the response to the HTTP Server Service module or invoke a conversion policy processing unit to perform protocol conversion; wherein the foregoing distribution policy may include a client The request URL, the comparison and matching of the response message with the request message, and the like.
  • the conversion policy processing unit 102 is configured to process the adaptation of the terminal request capability to the WAP/Web application content protocol; specifically, the unit includes a WML protocol set, an HTML protocol set, and a mutual conversion policy of the XHTML protocol set; according to the HTTP Server Service module
  • the terminal identification function and the information provided by the response message content identification function of the HTTP Client Service module query the protocol conversion rule from the database, and call the Transform Service module to perform protocol content conversion to adapt the terminal capability.
  • the Pol icy Service module further includes:
  • the portal display unit 103 is used for user behavior statistics, TOP 10 WAP/Web application recommendation, for example, recommending a webpage or website with a high user access rate, common website classification, information notification, and user information maintenance.
  • user information maintenance includes user registration, login, personal settings and mobile phone number binding; mobile phone number binding is mainly because most WAP websites require mobile phone number authentication;
  • the service operation unit 104 is used by the operator administrator (that is, the foregoing administrator terminal) to perform operation operations on the entire gateway device, and the unit includes information notification, user management, charging management (optional), and service recommendation. You can also set forwarding and conversion rules to affect forwarding and conversion operations.
  • an embodiment of the present invention provides a Transform Service module, where the module includes: a protocol format verification unit 111, a message content repair unit 112, and a protocol conversion unit 113.
  • the protocol format verification unit 111 is configured to perform format verification on the message content forwarded by the Pol icy Service module, and obtain a DTD (Document Type Definition) document name from the Name Space in the message content, according to the document Name, take the corresponding DTD format type definition file from the database. If the verification format is illegal, the message content repair unit is called to repair the message content, otherwise the protocol conversion unit directly enters the conversion function;
  • DTD Document Type Definition
  • the message content repairing unit 112 is configured to: after the protocol format verification unit checks that the message content format is illegal, perform format modification of the message content according to the abnormal description of the format verification, so as to ensure that the message content meets the DTD format type definition before entering the protocol conversion unit. ;
  • a protocol conversion unit 113 configured to generate a message content that conforms to a capability of the user terminal
  • the network includes: a user terminal 81, an administrator terminal 82, a gateway device 83, and a WAP application server 85, a web application server 84;
  • the gateway device 83 includes: an HTTP Server Service module 91, a Pol icy Service module 92, an HTTP Cl ient Service module 93, and a Transform Service module 94;
  • the HTTP Server Service module 91 includes: a first request/response processing unit, a first information identifying unit; the HTTP Client Service module 93 includes: a second request/response processing unit, a second information identifying unit; and a Pol icy Service module 92 includes: a distribution policy processing unit 101 and a conversion policy processing unit 102; in a preferred embodiment, a portal presentation unit 103 and a service operation unit 104 are further included; the Transform Service module 94 includes a protocol format verification unit 111, and a message content repair unit 112. And protocol conversion unit 113.
  • connection relationship between the modules and the units inside the module is shown in FIG. 12 .
  • a user uses a gateway device to perform service browsing, and the method includes:
  • the user terminal sends a request for browsing the Web/WAP application server to the HTTP Server Service module in the gateway device.
  • the user terminal sends a request to the HTTP Server Service module in the gateway device to browse a Web/WAP application server that provides content and services on the Internet or the mobile Internet.
  • the transmission content can be encapsulated using the HTTPS protocol.
  • the HTTP Server Service module After receiving the user request, the HTTP Server Service module obtains terminal identification information.
  • the HTTP Server Service module identifies the terminal information, and obtains terminal type information (User-Agent header field) for conversion, protocol range information (Accept header field) selected by the user, user information, and network information. . This information serves as the primary basis for the subsequent Pol icy Service module application transformation strategy.
  • the HTTP Server Service module forwards the user request to the Pol icy Service module through the API function or the S0AP protocol, and carries the corresponding terminal identification information.
  • the API function or the S0AP protocol is selected according to the requirements in the specific implementation process, the API function is to improve performance, and the S0AP protocol is capable of distributed deployment and open interface.
  • the Pol icy Service module After receiving the request from the HTTP Server Service module, the Pol icy Service module performs distribution policy processing.
  • the request information is the request portal display, that is, the portal of the gateway device is requested, the corresponding information of the portal device of the gateway device is directly returned to the terminal, otherwise, 605 is performed.
  • the Pol icy Service module After the Pol icy Service module confirms that the request is a portal other than the gateway device, the Pol icy Service module forwards the corresponding request to the HTTP Cl ient Service module.
  • the HTTP Cl ient Service module forwards the above request to the specified Web/WAP website.
  • the specified Web/WAP website is specified by the URL (Uniform Resource Locator) address.
  • the Web/WAP server returns an HTTP/HTTPS response message corresponding to the request to the HTTP Client Service module.
  • the HTTP Cl ient Service module identifies the response message content of the response message.
  • the step of identifying the response message content includes: analyzing the content of the Content-Type in the response header field of the HTTP/HTTPS, thereby clarifying the protocol set to which the message belongs; and the System-ID and the Publ ic-ID in the message content, and obtaining the message from the message content.
  • Content encoding such as UTF-8, GB2312, etc.
  • the content of the protocol and then clear the message content encoding, the specific protocol used by the message and other information.
  • the HTTP Cl ient Service module forwards the HTTP/HTTPS response message returned by the Web/WAP server to the Pol icy Service module, and carries the response message content identification information.
  • the Pol icy Service module performs a distribution policy processing on the response message.
  • the Pol icy Service module determines according to the previously stored terminal identification information and the response message content identification information returned by the HTTP Cl ient Service module. If the terminal supports the protocol for responding to the message content, the gateway device executes 617; otherwise, executes 611.
  • the Pol icy Service module performs a protocol conversion policy.
  • the Pol icy Service module identifies the corresponding conversion rule in the search database according to the terminal identification information and the response message content.
  • the conversion rule pre-sets the normal default rules (ie, rules without conditions) for the gateway device, and supports conditional rules for specific terminals, specific networks, specific servers, and also supports rule merging.
  • the impact factors of rulemaking include the maximum capabilities of the terminal, network bandwidth, protocols supported by the server, and coordination of various factors to achieve a better user experience.
  • the Pol icy Service module forwards the response message to the Transform according to the converted conversion rule. Service module, and carries the conversion rule in the response message.
  • the Transform Service module performs protocol format verification of the content of the response message.
  • the protocol format verification for the content of the response message includes verifying whether the message content format is good and conforming to the DTD description. If the format verification is passed, execute 615; otherwise, perform format content repair according to the format verification error report, that is, execute step 614;
  • the format verification of the response message content includes: obtaining a DTD (Document Type Definition) document name from a Name Space in the message content, and extracting a corresponding DTD format from the database according to the document name.
  • the type definition file verifies that the format of the response message content conforms to the DTD description.
  • the Transform Service module performs message content repair.
  • the goal of message content repair is to generate message content that conforms to the DTD description to avoid message content being unprocessable during format conversion.
  • the Transform Service module performs protocol format content conversion.
  • the format content conversion is mainly divided into two stages: According to the conversion rule given by the Pol icy Service module, firstly, which protocol is converted to the specified protocol, and then the corresponding syntax mapping file is taken out from the database; The content that needs to be completely converted, the content that is not completely converted, and the content that is not converted at all (the content only retains the corresponding text). Determine the original file and the syntax mapping file that need to be filtered. If there is a clear content in the above content that does not require conversion Then discard or leave unprocessed, and finally generate the final converted message content according to the grammar mapping file.
  • the filtering conditions are diverse, for example, it is possible to filter content that cannot be displayed on some web pages or to filter unresolvable content. Since the conditions of filtering are diverse, the conversion rules are also variable.
  • the Transform Service module forwards the converted message content to the Polic Service module.
  • 617 The Pol icy Service module forwards the response message to the HTTP Server Service module.
  • the Pol icy Service module can directly forward the response to the HTTP Server Service module or notify the HTTP Server Service module to perform HTTP redirection, and the HTTP redirection indicates that the content of the response message to be finally sent to the terminal is a redirect response.
  • the terminal obtains a URL that finally provides a service for the user according to the redirect response, and then requests a corresponding resource according to the URL;
  • the Pol icy Service module determines whether the terminal identification information and the network information, the response message content of the server (including the network type and the network bandwidth, and the like) match, and if they match, it means that the protocol format conversion is not necessary, and then HTTP redirection is performed.
  • the Pol icy Service module can also forward the conversion through the Transform Service module. Content to the HTTP Server Service module.
  • the terminal device receives the HTTP/HTTPS response message and finally presents it to the end user through the browser.
  • the protocol conversion policy includes two key contents: a protocol mutual conversion relationship, and a conversion granularity.
  • the conversion relationship includes the conversion between the WML protocol set, the HTML protocol set, and the XHTML protocol set.
  • the WML protocol set includes protocols such as Li L 1. X series (ie Li L 1. 1, WML 1. 2 and Li L 1. 3), WML 2. 0;
  • HTML protocol set includes CHTML (Compact HTML), HTML 2 0, HTML 3. 0 and HTML 4. 0 and other protocols;
  • XHTML includes XHTML 1. 0, XHTML 1. 1 and XHTML 2. 0 and other protocols.
  • the conversion target of the conversion relationship shown in Figure 14 is the mutual conversion between the above three major protocol sets and within the protocol set.
  • Mutual conversion refers to the conversion between the two protocols.
  • WML World Wide Web Consortium
  • XHTML The dotted line between WML and HTML indicates that there is no direct conversion between ⁇ L and HTML.
  • the conversion between them is converted by XHTML as the medium, that is, WML is converted into HTML.
  • WML First, WML first converts XHTML and then maps to HTML. , vice versa.
  • XHTML is the core and ultimate goal of this method transformation, in keeping with the current W3C (World Wide Web Consortium) promotion of XHTML.
  • XHTML is converted to HTML as a dotted line.
  • the embodiment of the present invention designs a protocol conversion rule 1 according to the above conversion relationship, protocol conversion range, and conversion granularity requirements.
  • This conversion rule defines a set of rules, and an end user or terminal handset model can correspond to one or more rule sets.
  • a rule set can contain zero or more rules.
  • the rules include three parts: conditions, operations, and conversion content.
  • the conversion content includes the conversion protocol type and the modules and elements that are discarded and ignored.
  • the condition includes user information ( PhoneNumbers ), terminal information ( UserEquiment ), network information (NetWork) and response content message (MessageContent).
  • the user information includes a mobile phone number, a user id, and the like, and zero or more users can be set in the condition.
  • the terminal information includes information such as the terminal model, the protocol range supported by the terminal, and the like, and zero or more terminal information can also be set.
  • the network information includes network bandwidth (network uplink and downlink rate) and network type (Internet, 2. 5G (GSM/GPRS), 3G network (CDMA, WCDMA, TD-SCDMA), etc.).
  • the content of the response message contains the protocol set to which the message belongs and the specific protocol used.
  • the input of these conditions is derived from the terminal request, the server response, and the information obtained by the server for data expansion (for example, more detailed hardware and software information of the terminal is obtained from the network according to the terminal model, and the mobile phone number in the user registration or user request) Identification).
  • the operation contains two choices, whether or not the conversion is allowed. Allowed is al low, not allowed is block.
  • the converted content contains the input (OriginTransform) and output (TargetTransform) formats of the converted content, as well as the content that needs to be discarded during the conversion process (DiscardContent) and the content that is ignored (IgnoreContent).
  • the Discard Content and IgnoreContent contain the contents of the elements and modules.
  • the element contains the script, the picture, etc., and contains the corresponding prefix (prefix) and suffix (suffix) conditional judgment, that is, whether to discard or ignore the operation can be judged according to the prefix and suffix of the content in the message.
  • the module content includes the core module (coreModule), text module (TextModule) and so on.
  • the method includes the application of the foregoing conversion rule set. Because in the specific implementation process, for a variety of terminal information, different needs of users and special websites, a conversion rule in the XML conversion rules file is difficult to meet the conversion requirements, in order to achieve the best effect of inter-protocol conversion, The conversion rule is applied reasonably, that is, the optimal conversion rule is selected. Therefore, the method shown in FIG. 15 provides an application to the foregoing conversion rule set, and specifically includes:
  • the Pol icy Service module retrieves the XML transformation rules file from the database and reads a rule under the rule root element.
  • the Pol icy Service module obtains an XML conversion rule file from the database according to the content of the terminal request message and the content of the server response message.
  • the Pol icy Service module obtains the child element condition (condition) under the rule element, and determines whether the user mobile phone number, the terminal device, the network bandwidth, and the response message type in the server response message content meet the requirements of the conversion rule condition in the terminal identification information. , Yes, execute 804, otherwise execute 803.
  • 804 Determine whether the conversion rule allows the application, if yes, execute 806, otherwise execute 805.
  • the first conversion rule allowed to be converted during execution is directly retained;
  • the first conversion rule that allows conversion is to merge the content with the content of the previous conversion rule.
  • the principle of the combination is based on the best effect of the target conversion protocol. For example, the Target Transform (the target protocol) takes more content. Advanced rich protocols or higher version protocols. Discarding and ignoring content is based on the principle of discarding the least amount of content.
  • step 807 Determine if there is still a next rule, if yes, execute 801, otherwise go to step 808.
  • the final conversion rule content is generated according to the operations of 805 and 806.
  • the purpose of the rule merging in the application method of the protocol conversion rule provided in FIG. 8 is: due to the diversity of the rule conditions and the content to be converted, and the uncertainty (which may continue to increase in the future, it may be scalable), resulting in It is difficult to use a conversion rule to interpret a type of terminal, a server, or a user's conversion.
  • Rule consolidation emphasizes the concept of reuse (or refactoring) rather than exclusiveness. Many conditions and conversions are interrelated and interacting. You cannot add or discard the original content because of certain conditions and modifications of a conversion content. For example: The original rule 2G mobile phone access WAP website uses wapl. x protocol, but a user wants to use wap 2. 0 when visiting sina website. If rule consolidation is used, it can be reused, and the original rules are not wasted, they can be superimposed, and no changes are needed for other users.
  • the Transform Service module executes the 613 in the browsing service flow to perform the corresponding protocol conversion processing.
  • the conversion process involves the conversion of HTML, WML and XHTML to other protocols.
  • the embodiment of the present invention illustrates the conversion process between the WML protocol set, the HTML protocol set, and the XHTML protocol set through FIG. 16 to FIG. 18.
  • a flow chart of a method for converting a WML protocol set to another protocol which is a Transform Service
  • the module processes the steps of converting a protocol to another protocol in the LAC protocol set, including:
  • the Transform Service module receives the WML body content in the HTTP response message, and the message body carries the message protocol version.
  • the Transform Service module obtains a corresponding DTD format file from the database according to the message protocol version in the WML body, and verifies the WML body according to the DTD file, and determines whether the content format of the WML body is legal. If the verification result is legal, execute 904; otherwise, 903 will be executed.
  • the Transform Service module obtains a DTD document name from a Name Space in the message content according to a message protocol version in the WML body, and extracts a corresponding DTD format type definition file from the database according to the document name, according to the The DTD file verifies the WML body.
  • the repaired WML body meets the requirements of the DTD format file. For example, if the title element in WML has no content, you can set the content to Untitle.
  • the content of the sub-element DiscardContent is based on the content to be discarded (DiscardContent) in the conversion rule processed by the Pol icy Service module in the application method of the conversion rule set provided in FIG. 15 .
  • the change operation of the contents of Discard Content includes deleting and changing the WML body.
  • Operations on elements or attributes can be performed using both C++ or Java, and preferably XSLT techniques can be used.
  • the WML body needs to discard the template element in this conversion.
  • 906 Determine whether to ignore the content in the conversion syntax according to the content of the child element IgnoreContent in the conversion rule processed by the Pol icy Service module. Execute 907 if some syntax conversions need to be ignored, otherwise 908.
  • the content of the sub-element IgnoreContent is based on the content to be ignored (IgnoreContent) in the conversion rule processed by the Policic Service module in the application method of the conversion rule set provided in FIG.
  • the role of the mapping filter is to filter the XSLT syntax mapping file to include deletion, modification, etc., that is, to delete the related elements or the syntax mapping part of the attribute.
  • This operation can be modified using traditional C++ or Java, but XSLT technology is preferred.
  • WML body does not need to perform syntax mapping on option elements in this conversion, XSLT
  • WML is to be converted into HTML
  • the XSL (extensible style sheet language) file corresponding to the syntax conversion of WML mapping to the HTML protocol set can be first taken out from the database, because the current Internet popular browser
  • the Transitional mode in XHTML 1.0 is generally supported, so if WML is to be converted to HTML, you can directly extract the XSL file of Transition L to XHTML 1.0, and apply the filter to the XSL file for syntax conversion. File filtering, then execute 912.
  • Target Transform Determine whether the content of the Target Transform is an XHTML protocol set, if yes, execute 911, otherwise execute
  • WML syntax can be expressed by XHTML's own syntax and javascript.
  • L for example: wml card ontimer property table not The ontimer event occurs when a timer expires, can be achieved using the child element refresh of the head/meta element in xhtml.
  • the conversion between the internal protocols of the WML protocol set, for example, from WML 2.0 to WML 1. 1, or from WML 1. 1 to WML 1. 3.
  • WML 1. 3 and WML 2. 0 have elements such as head, meta, select, template, etc. Among them, template does not exist in Li L 2. 0. Other elements contain different sub-elements and attributes, so grammar mapping is required.
  • a flow chart of a method for converting an HTML protocol set to another protocol which is a Transform Service
  • the module processes the steps of converting a protocol in the HTML protocol set to other protocols, including:
  • the Transform Service module receives the HTML body content.
  • the content format of HTML is fixed, so that the content format directly becomes the Transitional mode in XHTML 1. 0, so that the conversion method can be converted by the preferred conversion method (XSLT) in the subsequent conversion process.
  • the W3C standard organization XHTML 1. 0 specification http: ⁇ www. w3. org/TR/xhtml l/) mainly points out that XHTML requires proper nesting, elements and attributes need to be lowercase, elements must have a terminator, and attribute values must be double quoted. , can not attribute minimized, space processing of attribute values, special character processing, use id attribute instead of name attribute. For example, ⁇ p>here is an emphasized ⁇ em>paragraph.
  • XHTML is illegal, and the correct content is: ⁇ p>here is an emphasized ⁇ em>paragraph ⁇ /em>. /p>. With content fixes, HTML content will become in XHTML 1. 0 format.
  • 1003 According to the DiscardContent content in the conversion rule processed by the Pol icy Service module, it is determined whether some content in the message needs to be discarded. Execute 1004 if needed. Otherwise execute 1005.
  • 1007 According to the content of the TargetTransform in the conversion rule processed by the Pol icy Service module, it is determined whether the target content of the conversion is a WML protocol set, and is executed 1008, otherwise 1010 is executed.
  • XSL file Convert the XSL file through the XSLT syntax parsing protocol, convert the XHTML content, and generate the corresponding WML message.
  • 1010 Determine whether the content of the Target Transform in the transfer rule is other protocols in the HTML protocol set, and the process indicates that the conversion needs to be performed within the HTML protocol set, that is, execution 1012, otherwise execution 1011.
  • 1011 Determine whether the content of the TargetTransform in the rule is an XHTML protocol set, if yes, execute 1012, otherwise execute 1014.
  • mapping converted to the HTML protocol set syntax is converted to XHTML.
  • a flowchart for converting a XHTML protocol set to another protocol, the method for the Transform Service module to process a protocol in the XHTML protocol set to other protocols including:
  • the Transform Service module receives the XHTML body content.
  • 1102 Obtain the corresponding DTD file according to the protocol type declared by the XHTML body for verification, and determine whether the XHTML message is in good format, and execute 1104, otherwise execute 1103.
  • the content of the message is fixed so that the content of the XHTML message conforms to the format defined by the DTD protocol.
  • the XHTML message is modified according to the content of Di scardContent.
  • 1 ink element is not needed in this conversion. It can be removed using the XSL syntax.
  • 1107 Generate a filter for the conversion syntax based on the contents of IgnoreContent.
  • the conversion syntax filter can be an XSL file. For example, the image needs to be ignored in this conversion.
  • 1108 Determine whether the target protocol of the current conversion is a WML protocol set according to the content of the TargetTransform in the conversion rule processed by the Policy Service module. If yes, execute 1109, otherwise execute 1111.
  • XSL file Convert the XSL file through the XSLT engine parsing protocol, and perform syntax conversion on the XHTML content to generate a corresponding WML message.
  • 1112 Determine whether the conversion target protocol is a conversion within the XHTML protocol set, and if yes, execute 1113, otherwise execute 1115.
  • the conversion inside the XHTML protocol set is converted from XHTML 1. 0 to XHTML 1. 1 or XHTML 2. 0, for example.
  • 1113 Get HTML from the database to the XSL file of XHTML 1. 0 Transitional, and apply the filter to the XSL conversion grammar file.
  • Syntax mapping is a critical step in the conversion process between the three major protocol sets described above.
  • the key to implementing grammatical mapping is to express the same semantics through different grammars, thereby realizing the same or similar content and functions.
  • the process of grammar mapping is similar to the principle of a programming language. For example, the same function can be implemented in C++ or in java.
  • the means of grammar mapping is to parse the source content and modify it into the target content through the program.
  • the embodiment of the present invention uses XSLT instead of C++ and Java syntax to parse and modify the source content to form a grammar conversion application.
  • Li L 1. 3 there are 36 elements in Li L 1. 3, each of which has corresponding attributes.
  • the WML syntax is compared with the XHTML syntax, where the element/attribute contains four cases:
  • the element/attribute of the original grammar exists in the target grammar and has the same meaning; the elements/attributes of the original grammar exist in the target grammar, but the meanings are different.
  • a flowchart of a method for synchronizing syntax between protocols includes: First, the content of the protocol message body is received; after that, 1201 is executed:
  • 1205 Represents or modifies the syntax of the element/attribute in the original grammar using the equivalent meaning in the target grammar.
  • the element/attribute of the original grammar cannot be completely copied into the target grammar according to the judgment of 1204. Therefore, it is necessary to represent or modify the grammar of the element/attribute in the original grammar using the equivalent meaning in the target grammar, including two types. Situation: Express or modify attributes; express or modify elements and attributes.
  • the WML meta element contains attributes such as http -equiv, name, forua, content, scheme, id, class, where forua, class is WML-specific.
  • the semantics of forua and class can be analyzed.
  • the class attribute is negligible; and the forua attribute indicates whether the meta is to be deleted.
  • the conversion logic can be implemented by syntax such as C++, Java, XSLT, etc., wherein the logic of XSL is used to implement the above logic:
  • the WML card ontimer attribute represents an event that occurs when the timer expires, and can be implemented using the head/meta neutron element ref.
  • some syntax in WML involves the forward and backward of the browser, such as onenterforward and onenterbackward.
  • the onenterforward table does not forward forward
  • is a table that does not back jump.
  • the Li L describes the control of the browser forward and backward function. When the user jumps from other pages to this page, the browser will advance and jump to http: 3g. sina. com. cn.
  • the XSLT syntax for the forward function is implemented as:
  • the gateway device expresses the meaning of the element/attribute through a program.
  • the gateway device can be used to express the logical meaning of the element/attribute through the program, that is, through the terminal and the gateway.
  • the device interacts with WML syntax control.
  • the program used by the gateway device may be C++, Java, or the like.
  • WML syntax control is performed by the gateway device interacting with the terminal as follows:
  • the WML describes controlling the browser forward and backward functions.
  • the forward and backward functions of the IE browser are not open to javascript control, so they can be processed by the gateway device.
  • the IE page can be controlled by the program without caching, and the gateway device records the request, that is, the gateway device caches. If IE browser rewinds, IE will re-initiate the browsing request, which can implement page back function.
  • An embodiment of the present invention provides a device for implementing syntax conversion of a protocol message body protocol content.
  • the device includes:
  • the first determining module 201 is configured to determine whether an element/attribute in the original grammar of the protocol content in the received protocol message body exists in the target grammar;
  • the second determining module 202 is configured to determine whether the element/attribute in the original grammar of the protocol content in the received protocol message body is consistent with the meaning of the element/attribute in the target grammar;
  • the third determining module 203 is configured to determine whether an element/attribute in the original grammar of the protocol content in the received protocol message body has a grammar of equivalent meaning in the target grammar;
  • the copying module 204 is configured to: when the judgment result of the second judging module is yes, copy the element/attribute in the original grammar of the protocol content in the received protocol message body to the target grammar;
  • the representation/modification module 205 is configured to: when the judgment result of the third judging module is YES, use the grammar of the target grammar to represent or modify the element/attribute in the original grammar of the protocol content in the received protocol message body;
  • the indicating module 206 is configured to, when the third determining module determines that the result of the determination is no, the logic to control the element/attribute in the original grammar of the protocol content in the received protocol message body.
  • the above device for implementing syntax conversion is used to implement syntax conversion between different protocols, and the above devices and their corresponding conversion methods can be used to convert different protocols regardless of the language used for conversion.
  • the gateway device of the embodiment of the invention supports the mutual conversion method of ⁇ L, HTML and XHTML.
  • the user can access any web provided in the Internet through terminals such as mobile terminals, PDAs, laptops and desktops.
  • WAP application service For service providers and content providers that provide WAP/Web application services, the content of the service can be focused only on, so as to realize the separation of the provided content and the presentation content, thereby realizing the effective integration of the Internet and the telecommunication network.
  • the embodiment of the present invention proposes two specific methods of protocol language conversion logic, which makes the protocol conversion become a reality, rather than a possibility.
  • the embodiment of the present invention in view of the heterogeneity of network entities such as terminals, networks, and application servers, and the complexity of grammar conversion between the three major protocol sets, for example, mobile phone terminal models emerge in an endless stream, and the network form includes 2G, 2. 5G and 3G. And continue to evolve; there are 36 elements in the WML 1. 3 protocol, and the number of attributes is about 2 to 3 times that of the element.
  • the embodiment is based on XSLT technology and is proposed to be programmed by XSL file.
  • the corresponding conversion rules and response message content modification can be expressed by XSL syntax. It can be quickly deployed and responded without large-scale programming, and can evolve with WML and XHTML. Synchronous development;
  • the embodiment of the present invention adopts XSLT technology for syntax mapping in the process of processing response message content, instead of conventional Java or C language DOM tree operation, which can improve conversion efficiency, flexibility and scalability. .
  • receiving in the embodiment of the present invention may be understood as being actively acquired from other modules or receiving information transmitted by other modules.
  • modules in the apparatus in the embodiments may be distributed in the apparatus of the embodiment according to the embodiment, or may be correspondingly changed in one or more apparatuses different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into multiple sub-modules.
  • the embodiments of the present invention can be implemented by software, and the corresponding software can be stored in a readable storage medium, such as a hard disk, an optical disk or a floppy disk of a computer.

Description

网络互联的方法、 网关设备及系统 本申请要求于 2008年 12月 23日提交中国专利局、 申请号为 200810188274.2、 发明名 称为 "网络互联的方法、 网关设备及系统" 的中国专利申请的优先权, 其全部内容通过引 用结合在本申请中。 技术领域
本发明涉及通信领域, 特别涉及网络互联的方法、 网关设备及系统。 背景技术
WAP (Wireless Application Protocol, 无线应用协议) 服务应用于电信网络中, 它有对 应的手机终端与 WAP服务器; Web服务则应用在 IT (Information Technology, 信息技术) 互联网中, 它有相应的流行 IE (Internet Explorer, 网页浏览器) 与 Web服务器。 由此引起 的网络孤岛与网络异构性直接导致用户无法方便快捷使用服务提供商提供的内容。 当用户 使用 PC (Personal Computer, 个人计算机) 终端时无法浏览 WAP网页, 而用户使用手机 终端时却无法访问 Web网站。 随着 3G时代的到来, Web网站需要把信息延伸到电信网络, 手机终端; WAP网站更需要借助互联网与 Web网站进行推广与发展, 形成系统化的信息交 换网络, 最终覆盖用户使用的所有手段。
针对 WAP与 Web应用中的网络实体的异构现状与网络孤岛, 现有技术有以下几种解决 方案: 第一种是终端开发多种协议栈支持多种协议, 该方法通过实现胖客户端方式, 支持 WML (Wireless Markup Language,无线标记语言)、 HTML (Hyper Text Markup Language, 超文本标记语言) 与 XHTML ( extensible HyperText Markup Language, 可扩展超文本标记 语言) 等协议; 第二种是应用服务提供商开发多个 Web与 WAP服务器支持终端访问; 第三 种是进行协议格式转换。
在实现本发明的过程中, 发明人发现:
现有技术在解决网络实体的异构现状与网络孤岛时, 对现有网络资源修改较大, 对终 端、 网络带宽要求高; 投入巨大, 应用服务提供商提供服务的门槛较高, 成本高, 而且涉 及到网络带宽升级等要求; 协议格式转换只能实现部分协议的单向协议转换, 实现范围有 限, 导致用户还是无法访问大部分网站。 发明内容
有鉴于此, 本发明实施例提供了网络互联的方法、 网关设备及系统。 所述技术方案如 下:
—方面, 本发明实施例提供了网络互联的方法, 包括:
接收用户终端发送的浏览请求消息, 根据所述浏览请求消息获取用户终端识别信息, 将所述浏览请求消息发送至网络服务器;
接收所述网络服务器发送的响应消息, 所述响应消息中包含所述用户终端请求浏览的 内容, 根据所述响应消息获取响应消息内容识别信息;
根据所述用户终端识别信息、 所述响应消息内容识别信息获取预设的转换规则; 根据所述预设的转换规则对所述响应消息进行内容转换;
将转换后的响应消息返回所述用户终端。
另一方面, 本发明实施例还提供一种网络互联的方法, 包括:
接收用户终端发送的上传请求消息, 所述上传请求消息中包含所述用户终端要上传的 内容、 目的网络服务器的信息以及用户终端信息;
根据所述用户终端信息获取用户终端识别信息;
根据所述用户终端识别信息和预先保存的网络服务器信息获取预设的转换规则; 根据所述预设的转换规则对所述上传内容进行内容转换;
根据所述目的网络服务器的信息将转换后的上传内容发送至网络服务器。
再一方面, 本发明实施例还提供一种网络互联的方法, 包括:
接收网络服务器发送的业务推送请求消息, 所述业务推送请求消息中包含所述网络服 务器向用户终端推送的内容、 用户终端信息以及所述网络服务器信息;
根据所述用户终端信息获取用户终端识别信息;
根据所述网络服务器信息和所述用户终端识别信息获取预设的转换规则;
根据所述预设的转换规则对所述网络服务器向用户终端推送的内容进行内容转换; 将转换后的推送内容发送至所述用户终端。
一方面, 本发明实施例提供了一种网关设备, 包括:
超文本传输协议服务端 HTTP Server Service模块, 接收用户终端发送的浏览请求消息, 根据所述浏览请求消息获取用户终端识别信息;
超文本传输协议客户端 HTTP Client Service模块,用于将所述浏览请求消息发送至网络 服务器, 并接收所述网络服务器发送的响应消息, 所述响应消息中包含所述用户终端请求 浏览的内容; 根据所述响应消息获取响应消息内容识别信息;
策略服务 Policy Service模块, 用于根据所述用户终端识别信息、 所述响应消息内容识 别信息获取预设的转换规则;
转换服务 Transform Service模块, 用于根据所述 Policy Service模块获取的预设的转换 规则对所述响应消息进行内容转换;
所述 HTTP Server Service模块还用于将由所述 Transform Service模块转换后的响应消 息返回所述用户终端。
又一方面, 本发明实施例还提供了一种网关设备, 包括:
第二超文本传输协议服务端 HTTP Server Service模块, 用于接收用户终端发送的上传 请求消息, 所述上传请求消息中包含所述用户终端要上传的内容、 目的网络服务器的信息 以及用户终端信息; 并根据所述用户终端信息获取用户终端识别信息;
第二策略服务 Policy Service模块, 用于根据所述用户终端识别信息和预先保存的网络 服务器信息获取预设的转换规则;
第二转换服务 Transform Service模块, 用于根据所述预设的转换规则对所述上传内容 进行内容转换;
第二超文本传输协议客户端 HTTP Client Service模块,用于根据所述目的网络服务器的 信息将转换后的上传内容发送至网络服务器。
再一方面, 本发明实施例还提供了一种网关设备, 包括:
第三超文本传输协议客户端 HTTP Client Service模块,用于接收网络服务器发送的业务 推送请求消息, 所述业务推送请求消息中包含所述网络服务器向用户终端推送的内容、 用 户终端信息以及所述网络服务器信息; 根据所述用户终端信息获取用户终端识别信息; 第三策略服务 Policy Service模块, 用于根据所述网络服务器信息和所述用户终端识别 信息获取预设的转换规则;
第三转换服务 Transform Service模块, 用于根据所述预设的转换规则对所述网络服务 器向用户终端推送的内容进行内容转换;
第三超文本传输协议服务端 HTTP Server Service模块, 用于将转换后的推送内容发送 至所述用户终端。
再一方面, 本发明实施例提供了一种系统, 所述系统包括:
网关设备, 用于接收用户终端发送的浏览请求消息或上传请求消息; 根据所述浏览请 求消息或所述用户终端信息获取用户终端识别信息;
还用于接收网络服务器发送的响应消息或网络服务器发送的业务推送请求消息; 根据 所述响应消息获取响应消息内容识别信息或根据所述业务推送请求消息获取网络服务器信 息;
根据所述用户终端识别信息、 所述响应消息内容识别信息或网络服务器信息获取预设 的转换规则;
根据所述预设的转换规则对所述响应消息或所述网络服务器推送的业务或所述用户终 端上传的内容网络服务器进行内容转换, 将转换后的结果对应返回所述用户终端或所述网 络服务器;
网络服务器, 用于向所述网关设备发送对应于所述浏览请求的响应消息, 或接收所述 用户终端通过所述网关设备上传的内容, 或向所述用户终端主动发送业务推送请求消息。
本发明实施例还提供一种实现协议消息体中协议内容的语法转换的方法, 所述方法包 括:
判断收到的协议消息体中协议内容的原语法中的元素 /属性是否存在于目标语法中, 是 则判断所述原语法中的元素 /属性与所述目标语法中的元素 /属性的含义是否一致, 否则判 断所述协议消息体中协议内容的原语法中的元素 /属性在所述目标语法中是否存在等价含义 的语法;
当所述判断所述原语法中的元素 /属性与所述目标语法中的元素 /属性的含义的判断结 果为是, 则复制所述协议消息体中协议内容的原语法中的元素 /属性到所述目标语法, 否则 判断所述协议消息体中协议内容的原语法中的元素 /属性在所述目标语法中是否存在等价含 义的语法;
当所述判断所述协议消息体中协议内容的原语法中的元素 /属性在所述目标语法中是否 存在等价含义的语法的判断结果为是则使用所述目标语法中等价含义的语法表示或者修改 所述协议消息体中协议内容的原语法中的元素 /属性, 否则通过程序表达所述协议消息体中 协议内容的原语法中的元素 /属性的含义。
本发明实施例还提供一种实现协议消息体中协议内容的语法转换的设备, 所述设备包 括:
第一判断模块, 用于判断收到的协议消息体中协议内容的原语法中的元素 /属性是否存 在于目标语法中;
第二判断模块, 用于判断所述协议消息体中协议内容的原语法中的元素 /属性与所述目 标语法中的元素 /属性的含义是否一致;
第三判断模块, 用于判断所述协议消息体中协议内容的原语法中的元素 /属性在所述目 标语法中是否存在等价含义的语法; 复制模块, 用于当所述第二判断模块的判断结果为是时, 复制所述协议消息体中协议 内容的原语法中的元素 /属性到所述目标语法;
表示 /修改模块, 用于当所述第三判断模块的判断结果为是时, 使用所述目标语法中等 价含义的语法表示或者修改所述协议消息体协议内容的原语法中的元素 /属性;
表示模块, 用于当所述第三判断模块的判断结果为否时, 通过程序表达所述协议消息 体协议内容的原语法中的元素 /属性的含义。
本发明实施例提供的技术方案的有益效果是:
本发明实施例通过增加支持电信网络与互联网网络的 WML、 HTML与 XHTML协议间的 相互转换的网关设备, 用户可以根据网关设备提供的协议之间的转换访问任意的互联网中 提供的 Web/WAP应用服务; Web/WAP应用服务的服务提供商与内容提供商可以只着重提供 服务的内容, 从而实现提供内容与展现内容的分离, 解决了网络异构与网络孤岛现象, 并 实现互联网与电信网络的有效融合。 附图说明
图 1是本发明实施例提供的网络互联的方法流程图;
图 2是本发明实施例提供的网关设备的结构示意图;
图 3是本发明实施例提供的又一网络互联的方法流程图;
图 4是本发明实施例提供的又一网关设备的结构示意图;
图 5是本发明实施例提供的又一网络互联的方法流程图;
图 6是本发明实施例提供的又一网关设备的结构示意图;
图 7是本发明实施例提供的系统的结构示意图;
图 8是本发明实施例提供的组网结构示意图;
图 9是本发明实施例提供的网络互联的网关设备结构示意图;
图 10是本发明实施例提供的 Policy Service模块结构示意图;
图 11是本发明实施例提供的 Transform Service模块结构示意图;
图 12是本发明实施例提供的组网的又一结构示意图;
图 13是本发明实施例提供的用户使用网关设备浏览业务的方法流程图;
图 14是本发明实施例提供的协议间的转换关系图;
图 15是本发明实施例提供的协议转换规则的应用方法流程图;
图 16是本发明实施例提供的 WML协议集向其他协议转换方法流程图;
图 17是本发明实施例提供的 HTML协议集向其他协议转换方法流程图; 图 18是本发明实施例提供的 XHTML协议集向其他协议转换方法流程图; 图 19是本发明实施例提供的语法转换方法流程图;
图 20是本发明实施例提供的实现协议消息体协议内容的语法转换的设备结构示意图。 具体实施方式
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明实施方式作 进一步地详细描述。
参见图 1, 为本发明实施例提供的网络互联的方法流程图, 该方法包括:
S101 : 接收用户终端发送的浏览请求消息, 根据浏览请求消息获取用户终端识别信息, 将浏览请求发送至网络服务器;
S102 : 接收网络服务器发送的响应消息, 响应消息中包含用户终端请求浏览的内容, 根据响应消息获取响应消息内容识别信息;
S103: 根据用户终端识别信息、 响应消息内容识别信息获取预设的转换规则;
S104: 根据预设的转换规则对响应消息进行内容转换;
S105: 将转换后的响应消息返回用户终端。
本发明实施例中, 用户可以根据提供的协议之间的转换, 访问网络服务器任意的互联 网中提供的 Web/WAP应用服务; Web/WAP应用服务的服务提供商与内容提供商可以只着重提 供服务的内容, 从而实现提供内容与展现内容的分离, 解决了网络异构与网络孤岛现象, 并实现互联网与电信网络的有效融合。
参见图 2, 为本发明实施例提供的网关设备的结构示意图, 该设备包括:
超文本传输协议月艮务端 (HTTP Server Service, Hyper Text Transfer Protocol Server Service )模块 21, 接收用户终端发送的浏览请求消息, 根据浏览请求消息获取用户终端识 别信息;
超文本传输协议客户端 (HTTP Cl ient Service) 模块 22, 用于将浏览请求消息发送至 网络服务器, 并接收网络服务器发送的响应消息, 响应消息中包含用户终端请求浏览的内 容; 根据响应消息获取响应消息内容识别信息;
策略服务 (Pol icy Service ) 模块 23, 用于根据用户终端识别信息、 响应消息内容识 别信息获取预设的转换规则;
转换服务 (Transform Service ) 模块 24, 用于根据 Pol icy Service模块 23获取的预 设的转换规则对响应消息进行内容转换;
超文本传输协议服务端(HTTP Server Service )模块 21,还用于将由 Transform Service 模块 24转换后的响应消息返回用户终端。
本发明实施例通过增加支持电信网络与互联网网络的 WML、 HTML与 XHTML协议间的相 互转换的网关设备, 用户可以根据网关设备提供的协议之间的转换, 访问任意的互联网中 提供的 Web/WAP应用服务; Web/WAP应用服务的服务提供商与内容提供商可以只着重提供服 务的内容, 从而实现提供内容与展现内容的分离, 解决了网络异构与网络孤岛现象, 并实 现互联网与电信网络的有效融合。
参见图 3, 为本发明实施例提供的又一网络互联的方法流程图, 该方法包括:
S301 : 接收用户终端发送的上传请求消息, 该上传请求消息中包含用户终端要上传的 内容、 目的网络服务器的信息以及用户终端信息;
其中, 目的网络服务器的信息可以是网络服务器的地址、 标识等信息。
S302: 根据上传请求消息获取用户终端识别信息;
S303: 根据用户终端识别信息和预先保存的网络服务器信息获取预设的转换规则; S304: 根据预设的转换规则对上传内容进行内容转换;
S305: 根据目的网络服务器的信息将转换后的上传内容发送至网络服务器。
本发明实施例中, 用户可以根据提供的协议之间的转换, 向网络服务器任意的互联网 中提供的 Web/WAP应用服务上传内容; 从而实现提供内容与展现内容的分离, 解决了网络 异构与网络孤岛现象, 并实现互联网与电信网络的有效融合。
参见图 4, 为本发明实施例提供的又一网关设备的结构示意图, 该设备包括: 第二超文本传输协议服务端 (HTTP Server Service) 模块 41, 用于接收用户终端发送 的上传请求消息, 上传请求消息中包含用户终端要上传的内容、 目的网络服务器的信息以 及用户终端信息; 并根据用户终端信息获取用户终端识别信息;
第二策略服务 (Policy Service) 模块 42, 用于根据用户终端识别信息和预先保存的 网络服务器信息获取预设的转换规则;
第二转换服务 (Transform Service) 模块 43, 用于根据预设的转换规则对上传内容进 行内容转换;
第二超文本传输协议客户端 (HTTP Client Service) 模块 44, 用于根据目的网络服务 器的信息将转换后的上传内容发送至网络服务器。
本发明实施例通过增加支持电信网络与互联网网络的 WML、 HTML与 XHTML协议间的相 互转换的网关设备, 用户可以根据网关设备提供的协议之间的转换, 向网络服务器任意的 互联网中提供的 Web/WAP应用服务上传内容; 从而实现提供内容与展现内容的分离, 解决 了网络异构与网络孤岛现象, 并实现互联网与电信网络的有效融合。 参见图 5, 为本发明实施例提供的又一网络互联的方法流程图, 该方法包括:
S501 : 接收网络服务器发送的业务推送请求消息, 该业务推送请求消息中包含网络服 务器向用户终端推送的内容、 用户终端信息以及网络服务器信息;
S502: 根据用户终端信息获取用户终端识别信息;
S503: 根据网络服务器信息和用户终端识别信息获取预设的转换规则;
S504: 根据预设的转换规则对网络服务器向用户终端推送的内容进行内容转换; S505: 将转换后的推送内容发送至用户终端。
本发明实施例中, 网络服务器可以根据提供的协议之间的转换, 向用户主动提供 Web/WAP应用服务; Web/WAP应用服务的服务提供商与内容提供商可以只着重提供服务的内 容, 从而实现提供内容与展现内容的分离, 解决了网络异构与网络孤岛现象, 并实现互联 网与电信网络的有效融合。
参见图 6, 为本发明实施例提供的又一网关设备的结构示意图, 该设备包括: 第三超文本传输协议客户端 (HTTP Client Service) 模块 61, 用于接收网络服务器发 送的业务推送请求消息, 业务推送请求消息中包含网络服务器向用户终端推送的内容、 用 户终端信息以及网络服务器信息; 并根据用户终端信息获取用户终端识别信息;
第三策略服务 (Policy Service) 模块 62, 用于根据网络服务器信息和用户终端识别 信息获取预设的转换规则;
第三转换服务 (Transform Service) 模块 63, 用于根据预设的转换规则对网络服务器 向用户终端推送的内容进行内容转换;
第三超文本传输协议服务端 (HTTP Server Service) 模块 64, 用于将转换后的推送内 容发送至用户终端。
本发明实施例通过增加支持电信网络与互联网网络的 WML、 HTML与 XHTML协议间的相 互转换的网关设备, 网络服务器可以根据网关设备提供的协议之间的转换, 向用户主动提 供 Web/WAP应用服务; Web/WAP应用服务的服务提供商与内容提供商可以只着重提供服务的 内容, 从而实现提供内容与展现内容的分离, 解决了网络异构与网络孤岛现象, 并实现互 联网与电信网络的有效融合。
参见图 7, 为本发明实施例提供的系统的结构示意图, 该系统包括:
网关设备 71, 用于接收用户终端发送的浏览请求消息或上传请求消息; 根据浏览请求 消息或用户终端信息获取用户终端识别信息;
还用于接收网络服务器发送的响应消息或网络服务器发送的业务推送请求消息; 根据 响应消息获取响应消息内容识别信息或根据业务推送请求消息获取网络服务器信息; 根据用户终端识别信息、 响应消息内容识别信息或网络服务器信息获取预设的转换规 则;
根据预设的转换规则对响应消息或网络服务器推送的业务或用户终端上传的内容进行 内容转换, 将转换后的结果对应返回用户终端或网络服务器;
网络服务器 72, 用于向网关设备 71发送对应于浏览请求的响应消息, 或接收用户终端 通过网关设备上传的内容。
本发明实施例通过增加支持电信网络与互联网网络的 WML、 HTML与 XHTML协议间的相 互转换的网关设备, 用户可以根据网关设备提供的协议之间的转换访问任意的互联网中提 供的 Web/WAP应用服务; Web/WAP应用服务的服务提供商与内容提供商可以只着重提供服务 的内容, 从而实现提供内容与展现内容的分离, 解决了网络异构与网络孤岛现象, 并实现 互联网与电信网络的有效融合。
本发明实施例中, 当网关设备同时收到用户终端发送的多个浏览请求消息和网络服务 器发送的多个响应消息时, 根据现有技术, 网关设备可以将多个响应消息与浏览请求消息 对应, 分别进行发送, 此处不再赘述。
参见图 8, 为本发明实施例提供的组网结构示意图。 如图 8所示, 网络中包括: 用户终 端 (UE) 81、 管理员终端 82、 网关设备 83以及 WAP应用服务器 85、 Web应用服务器 84。
用户终端 81包括:用户访问 WAP以及 Web网站所使用的手机、 PC、笔记本电脑以及 PDA (Personal Digital Assistant,个人数字助理)等;例如: IPhone、联想电脑、联想 ThinkPacU 戴尔 X50s掌上电脑等;
管理员终端 82, 是运营商维护网关设备的设备, 例如: 拥有浏览器的 PC;
Web Appl ication (应用) 服务器 84, 包括用于为用户提供内容与服务的网站或者应用 程序, 在电信网络中被称为 CP (内容提供商) /SP (业务提供商)。 例如: http : //www. sina. com. cn;
WAP 应用服务器 85, 为用户提供内容与服务的网站或应用程序。 WAP与 Web主要区别 在于协议不同,面向不同终端。例如, http : //3g. sina. com. cn或者 wsp: //3g. sina. com. cn; 网关设备 83, 用于接收用户终端 81浏览内容或者请求服务的请求, 进行相应的终端识 另 |J、 转发策略等处理, 将请求转发到指定的 WAP应用服务器 85/Web应用服务器 84, 接收相 应的 WAP应用服务器 85/Web应用服务器 84的响应内容, 并进行协议转换, 将最终响应返 回给用户终端 81, 在进行相应的用户行为分析之后, 存入数据库;
在优选的实施方式中, 网关设备 83还可以提供门户展示的功能用来为用户提供服务, 开放业务管理功能支持商管理员终端进行业务运营。 基于图 8所示的组网结构示意图, 本发明实施例提供一种网络互联的网关设备, 如图 9 所示, 该网关设备包括: HTTP Server Service (HTTP服务端) 模块 91、 Policy Service (策略服务) 模块 92、 HTTP Cl ient Service (HTTP客户端) 模块 93、 Transform Service (转换服务) 模块 94。
各个模块之间通过 API (Appl ication Programming Interface, 应用程序编程接口) 或者基于 Web Services的 SOAP ( Simple Object Access Protocol , 简单对象访问协议) 接口建立联系; 其中, API接口目的是提高性能, 而 SOAP接口则能够进行分布式部署以及 开放接口。 由于各个模块功能与效率不同, Transform Service模块与 Pol icy Service模 块可以部署多个; 通过上述接口建立模块之间的连接关系, 可以兼顾性能效率、 开放性以 及实现分布式部署。
网关设备中的各个模块功能如下:
HTTP Server Service模块 91, 主要用于与用户终端进行交互; 与用户终端采用 HTTP 协议进行交互, 与 Pol icy Service模块 92采用 SOAP协议 /API函数建立连接关系;
具体地, HTTP Server Service模块 91包括:
第一请求 /响应处理单元, 用于处理用户的请求 /网络服务器的响应, 接收用户的 HTTP 浏览请求, 转发该请求到 Pol icy Service模块 92, 接收来自 Pol icy Service模块 92的响 应。
基于安全性需求, HTTP Server Service模块 91也支持用户使用 HTTPS进行访问。 第一信息识别单元, 用于对终端信息进行识别, 分析终端请求的头域信息, 并从中获 取用于转换的终端类型信息(User-Agent头域)、用户选择的协议范围信息(Accept头域)、 用户信息以及网络信息等相关内容。
其中, 终端类型信息表示该终端相关详细软、 硬件信息; 用户选择的协议范围代表浏 览器软件的能力与终端的意愿; 服务器能够通过用户信息 (如手机号码, 用户 id等) 制定 特殊规则; 网络信息包含了网络类型与网络带宽等信息, 从而使转换后的内容符合各种网 络的带宽的要求与限制。 HTTP Server Service模块将这些信息转发给 Pol icy Service模 块。
HTTP Cl ient Service模块 93, 用于与 WAP/Web应用服务器进行信息交互; 与 WAP/Web 应用服务器之间通过 HTTP协议进行交互, 与 Pol icy Service模块 92采用 S0AP协议 /API 函数建立连接关系;
具体地, HTTP Cl ient Service模块 93包括: 第二请求 /响应处理单元, 用于处理服务请求与响应, 接收 Pol icy Service 模块的浏 览请求, 并转发请求到 WAP/Web 应用服务器, 获取到服务器的响应, 最终返回给 Pol icy Service模块。 基于安全性需求, HTTP Cl ient Service模块也支持用户使用 HTTPS进行访 问。
第二信息识别单元, 用于对响应消息内容进行识别, 分析 WAP/Web 应用服务器返回的
HTTP响应消息, 首先根据 HTTP响应头信息 (如 Content-Type头域) 明确消息内容协议范 围, 并根据消息体中的协议声明获取最终的协议版本号。 该单元最终把消息内容与识别结 果通知 Pol icy Service模块 92。
Pol icy Service模块 92, 作为网关设备的核心模块, 连接网关设备中的其他各个模块, 进行消息分发, 驱动其他模块完成终端浏览 WAP/Web 应用的端到端流程; 该模块与管理员 终端之间通过 HTTP/HTTPS协议通讯, 与 HTTP Server Service模块 91通过 SOAP协议 /API 函数通讯, 与 HTTP Cl ient Service模块 93通过 SOAP协议 /API函数通讯, 与 Transform Service模块 94通过 SOAP协议 /API函数通讯。
Pol icy Service模块 92还用于开放接口给管理员终端进行运营维护。
Pol icy Service模块 92通过终端识别信息与响应消息内容识别信息获取相应协议转换 规则并进行规则合并。
Transform Service模块 94, 用于根据 Pol icy Service模块 92给出的协议转换规则从数 据库中获取相应映射逻辑语法文件, 并调用 XSLT ( extended Stylesheet Language Transformation, 可扩展基于样式表转换语言) 或者 XQuery engine (Xml Query language engine, xml查询语言引擎) 进行内容格式转换, 并最终转换出支持终端的协议格式; 该模 块也是网关设备中的核心模块之一, 该模块与 Pol icy Service模块 92通过 SOAP协议 /API函 数通讯。
本发明实施例提供的实现协议间相互转换的网关设备, 采用 Pol icy Service模块对 WAP/Web应用服务器的响应进行分发策略, 调用 Transform Service模块进行协议内容转换, 以适配终端的请求, 能够快速开发出应用而映射目前协议集, 进而适配网络实体的异构与 网络孤岛, 使用户能够随时随地获得 WAP与 Web提供的服务, 降低内容与服务提供商提供服 务的成本。
参见图 10, 本发明实施例提供一种 Pol icy Service (策略服务) 模块, 该模块包括: 分发策略处理单元 101和转换策略处理单元 102。
分发策略处理单元 101, 用于在收到 HTTP Server Service模块发送的请求时, 进行分 发策略处理, 判断是请求门户展示还是请求网络中其他 WAP/Web应用, 如果请求门户展示, 则直接向用户提供网页进行展示; 如果是请求网络中其他 WAP/Web 应用, 则将请求消息转 发至相应的应用网站;
该单元还用于在收到 HTTP Cl ient Service 模块的响应后, 应用分发策略确定该响应 是直接向 HTTP Server Service模块转发响应还是调用转换策略处理单元进行协议转换; 其中, 上述分发策略可以包括客户端请求 URL, 响应消息与请求消息的比较与匹配等。 转换策略处理单元 102, 用于处理终端请求能力与 WAP/Web应用内容协议的适配; 具体地, 该单元包括 WML协议集、 HTML协议集以及 XHTML协议集的相互转换策略; 根 据 HTTP Server Service模块的终端识别功能以及 HTTP Cl ient Service模块的响应消息 内容识别功能提供的信息, 从数据库中查询协议转换规则, 并调用 Transform Service 模 块进行协议内容转换, 以适配终端能力。
在优选的实施方式中, Pol icy Service模块还包括:
门户展示单元 103, 用于用户行为统计, TOP 10 WAP/Web应用推荐, 例如推荐用户访问 率较高的网页或网站, 常用网站分类, 信息通告以及用户信息维护等特性。 其中, 用户信 息维护包含了用户注册, 登陆, 个人设置以及手机号码绑定等特性; 手机号码绑定主要是 因为大部分 WAP网站都需要手机号码认证;
业务运营单元 104, 用于运营商管理员 (即前述管理员终端)对整个网关设备进行运营 操作, 该单元包含了信息通告, 用户管理, 计费管理 (可选), 以及业务推荐等。 并可以设 置转发、 转换规则来影响转发与转换操作。
参见图 11, 本发明实施例提供一种 Transform Service模块, 该模块包括: 协议格式 验证单元 111、 消息内容修复单元 112和协议转换单元 113。
协议格式验证单元 111, 用于实现对 Pol icy Service模块转发的消息内容进行格式验 证, 从消息内容中的 Name Space (命名空间) 获取 DTD (Document Type Definition, 文 档类型定义) 文档名, 根据该文档名, 从数据库中取出相应的 DTD格式类型定义文件。 如 果验证格式非法, 则调用消息内容修复单元进行消息内容的修复, 否则直接进入协议转换 单元进行转换功能;
消息内容修复单元 112, 用于在协议格式验证单元检查出消息内容格式非法后, 根据格 式验证的异常描述进行消息内容的格式修复, 以保证消息内容进入协议转换单元前是符合 DTD格式类型定义的;
协议转换单元 113, 用于产生符合用户终端能力的消息内容;
由于丽 L、 HTML与 XHTML协议集较多, 一种协议里面定义的元素与属性多达几十多个, 而且这三大协议集自身在不断地发展与演进, 导致协议语法转换存在需求持续不断、 映射 内容多、 开发效率低等问题, 因此, 该单元舍弃利用 C++或者 java对 XML、 WML, XHTML等 DOM (Document Object Model , 文档对象模型)操作方法, 引入基于 SOA ( Service-Oriented Architecture, 面向服务的体系结构) 的 XSLT技术。 XSLT可以理解为 XML编程, 可以使用 这种技术将映射逻辑保存为 XML文档, 可以进行动态修改。 协议转换单元实现的功能也是 网关设备的最终目标。
参见图 12, 为组网结构的另一示意图。 该图基于图 8提供了优选的实施方式, 网络中 包括: 用户终端 81、 管理员终端 82、 网关设备 83以及 WAP应用服务器 85、 Web应用服务 器 84;
其中, 网关设备 83包括: HTTP Server Service模块 91、 Pol icy Service模块 92、 HTTP Cl ient Service模块 93、 Transform Service模块 94;
进一步地, HTTP Server Service模块 91包括: 第一请求 /响应处理单元、 第一信息识 别单元; HTTP Cl ient Service模块 93包括: 第二请求 /响应处理单元、 第二信息识别单元; Pol icy Service模块 92包括: 分发策略处理单元 101和转换策略处理单元 102; 在优选的 实施方式中还可以包括门户展示单元 103和业务运营单元 104; Transform Service模块 94 包括协议格式验证单元 111、 消息内容修复单元 112和协议转换单元 113。
其中, 各个模块之间、 模块内部的单元之间的连接关系如图 12所示。
参见图 13, 为本发明实施例提供的网络互联的方法流程图, 用户使用网关设备进行业 务浏览, 该方法包括:
601: 用户终端向网关设备中的 HTTP Server Service模块发送浏览 Web/WAP应用服务 器的请求。
其中, 用户终端向网关设备中的 HTTP Server Service 模块发出请求, 请求浏览位于 互联网或者移动互联网中提供内容与服务的 Web/WAP应用服务器。 当用户或者网站认为交 互内容存在个人敏感信息时, 可以使用 HTTPS协议对传输内容进行封装。
602: HTTP Server Service模块接收到用户请求后, 获取终端识别信息。
其中, HTTP Server Service模块对终端信息进行识别, 并从中获取用于转换的终端类 型信息 (User-Agent头域)、 用户选择的协议范围信息 (Accept头域)、 用户信息以及网络 信息等相关内容。 这些信息作为后续 Pol icy Service模块应用转换策略的主要依据。
603: HTTP Server Service模块通过 API函数或者 S0AP协议将用户请求转发给 Pol icy Service模块, 并携带相应终端识别信息。
其中, 根据具体实施过程中的要求选择 API函数或者 S0AP协议, API函数目的是提高 性能, 而 S0AP协议则能够进行分布式部署以及开放接口。 604: Pol icy Service模块收到来自 HTTP Server Service模块的请求后, 进行分发策 略处理。
其中, 如果请求信息是请求门户展示, 即请求本网关设备的门户网站, 则直接向终端 返回本网关设备的门户网站的相应信息, 否则执行 605。
605: 当 Pol icy Service模块确认请求为非本网关设备的门户网站后, Pol icy Service 模块将相应的请求转发至 HTTP Cl ient Service模块。
其中包括, 转发该请求到 HTTP Cl ient Service 模块, 并保存该请求中相应的终端识 别信息。
606: HTTP Cl ient Service模块转发上述请求至指定的 Web/WAP网站。
其中, 指定的 Web/WAP网站是请求 URL (Uniform Resource Locator, 统一资源定位符) 地址所指定的。
607: Web/WAP服务器将与请求对应的 HTTP/HTTPS响应消息返回至 HTTP Client Service 模块。
608: HTTP Cl ient Service模块对响应消息进行响应消息内容识别。
其中, 响应消息内容识别的步骤包括: 分析 HTTP/HTTPS的响应头域中 Content-Type的 内容, 从而明确消息所属的协议集; 以及消息内容中 System-ID与 Publ ic-ID, 从中获取消 息的内容编码 (如 UTF-8, GB2312等) 以及内容的协议, 进而明确消息内容编码, 消息使用 的具体协议等信息。
609: HTTP Cl ient Service模块转发该 Web/WAP服务器返回的 HTTP/HTTPS响应消息至 Pol icy Service模块, 并携带响应消息内容识别信息。
610: Pol icy Service模块对响应消息进行分发策略处理。
其中, Pol icy Service模块根据之前保存的终端识别信息以及 HTTP Cl ient Service模 块返回的响应消息内容识别信息进行判断, 如果终端支持响应消息内容的协议则网关设备 执行 617; 否则执行 611。
611: Pol icy Service模块执行协议转换策略。
其中, Pol icy Service模块根据终端识别信息、 响应消息内容识别搜索数据库中相对 应的转换规则。 该转换规则为网关设备预先设置普通缺省规则 (即没有条件的规则) , 并 支持特定终端、 特定网络、 特定服务器的条件规则, 而且也支持规则合并。 规则制定的影 响因素包含终端的最大能力、 网络带宽、 服务器支持的协议, 协调各个因素达到用户较佳 的体验。
612: Pol icy Service 模块根据查询到的转换规则, 将响应消息转发给 Transform Service模块, 并在该响应消息中携带转换规则。
613: Transform Service模块进行响应消息内容的协议格式验证。
其中, 对响应消息内容的协议格式验证包括验证消息内容格式是否良好, 是否符合 DTD 描述。 如果格式验证通过则执行 615; 否则根据格式验证错误报告进行格式内容修复, 即执 行步骤 614;
具体地, 对响应消息内容进行格式验证包括: 从消息内容中的 Name Space (命名空间) 获取 DTD (Document Type Definition, 文档类型定义) 文档名, 根据该文档名, 从数据库 中取出相应的 DTD格式类型定义文件, 验证响应消息内容的格式是否符合 DTD描述。
614: Transform Service模块进行消息内容修复。
进行消息内容修复的目标是产生符合 DTD 描述的消息内容, 以避免格式转换时消息内 容无法处理。
615: Transform Service模块进行协议格式内容转换。
其中, 进行格式内容转换主要是分为两个阶段: 根据 Pol icy Service模块给出的转换 规则首先确认从哪个协议转换到指定的协议, 然后从数据库中取出相应的语法映射文件; 再根据转换规则中规定的需要完全转换的内容、 不完全转换的内容以及完全不转换的内容 (该内容只保留相应文字) 确定需要过滤的原文件与语法映射文件, 如果上述内容中明确 有不要求转换的内容则进行丢弃或者保留不处理, 最后根据语法映射文件产生最终的转换 后消息内容。
上述需要过滤的原文件中, 过滤的条件是多样化的, 例如可以过滤一些网页中不可显 示的内容或者过滤无法解析的内容。 由于过滤的条件是多样化的, 因此转换规则也是可变 的。
616: Transform Service模块将经过转换的消息内容转发到 Pol icy Service模块。 617: Pol icy Service模块转发响应消息到 HTTP Server Service模块。
其中, 与 610相应的, Pol icy Service模块可以直接转发响应至 HTTP Server Service 模块或者通知 HTTP Server Service模块进行 HTTP重定向, 该 HTTP重定向表示最终要发给终 端的响应消息的内容是重定向响应, 终端根据重定向响应获取最终为用户提供服务的 URL, 再根据该 URL请求相应的资源;
其中, Pol icy Service模块判断终端识别信息与网络信息、 服务器的响应消息内容(包 括网络类型与网络带宽等信息) 是否匹配, 如果匹配, 表示不必进行协议格式的转换, 进 而进行 HTTP重定向。
与 616相应的, Pol icy Service模块也可以转发经过 Transform Service模块转换的消 息内容到 HTTP Server Service模块。
618: 终端设备接收到 HTTP/HTTPS响应消息, 并最终通过浏览器展示给终端用户。 在上述用户使用网关设备浏览业务的方法的 611中, 协议转换策略包括两个关键内容: 协议相互转换关系、 转换粒度。
下面通过图 14说明协议之间的转换关系:
如图 14所示, 该转换关系包括范围为 WML协议集、 HTML协议集与 XHTML协议集之间的 相互转换。 其中 WML协议集包含丽 L 1. X系列 (即丽 L 1. 1、 WML 1. 2与丽 L 1. 3), WML 2. 0 等协议; HTML协议集包括 CHTML (Compact HTML)、 HTML 2. 0、 HTML 3· 0与 HTML 4. 0等协议; XHTML则包含了 XHTML 1. 0、 XHTML 1. 1以及 XHTML 2. 0等协议。
图 14 所示的转换关系的转换目标是以上三大协议集之间以及协议集内部间的相互转 换。 相互转换指的是两种协议间的转换。 WML、 HTML与 XHTML之间共有六种转换。 其中 WML 与 HTML之间的虚线表示丽 L与 HTML之间不进行直接转换, 它们之间的转换借助于 XHTML 作为介质进行转换, 即 WML要转换成 HTML, 首先 WML先转换 XHTML, 然后映射到 HTML, 反 之亦然。 XHTML 为本方法转换的核心与最终目标, 以保持与目前 W3C ( World Wide Web Consortium万维网联盟)推动 XHTML发展的目标一致。 另夕卜, XHTML转换成 HTML为虚线的 原因为大部分浏览器如果支持 HTML也会支持 XHTML, 而且 XHTML 1. 0为格式良好的 HTML, 不需要转换。 图 14中协议集内部转换以某种协议为例, 实现与协议集内部其它协议的相互 转换, 从而实现协议集中所有协议的相互转换。
由于终端能力、 网络带宽、 服务器目前支持的协议等条件, 即使进行完全的协议转换 也无法满足终端用户的需求。 例如 flash、 zip包等文件受限于网络带宽, 手机内存、 计算 能力等硬件条件。 因此响应消息内容中的某些内容可以丢弃或者忽略, 修改等操作。 而丢 弃、 忽略、 修改等操作的内容需要考虑粒度问题。 关于粒度分析, 可以包括为模块、 元素 两种粒度。 模块是采用 XHTML Modularization (模块化) 的思路, 将响应消息内容可以分 为 module (模块), 根据 XHTML的定义可以把消息内容大概分为 28个模块, 如文本, 表格、 脚本、 图像模块等模块。 同时可以支持更小粒度的操作, 例如对消息内容中的元素或者属 性进行操作。
本发明实施例根据上述转换关系、 协议转换范围以及转换粒度的要求设计协议转换规 贝1」。 本转换规则定义了规则集合, 一个终端用户或者终端手机型号可以对应一个或者多个 规则集合。 一个规则集合可以包含零个或者多个规则。 其中规则包含了条件、 操作以及转 换内容三大部分, 其中转换内容包含了转换协议类型以及丢弃与忽略的模块与元素。
条件中包含了用户信息 ( PhoneNumbers )、 终端信息 ( UserEquiment )、 网络信息 (NetWork) 与响应内容消息 (MessageContent)。 用户信息包含了手机号码, 用户 id等身 份标识, 条件中可以设置零个或者多个用户。 终端信息包含终端型号, 终端支持的协议范 围等信息, 同样可以设置零个或者多个终端信息。 而网络信息则包含了网络带宽 (网络上 行与下行速率)与网络类型(Internet, 2. 5G ( GSM/GPRS ) , 3G网络(CDMA, WCDMA, TD-SCDMA) 等)。 响应消息内容包含了消息所属的协议集与使用具体协议。 这些条件的输入来源于终端 请求、 服务器响应以及服务器进行数据拓展得到的信息 (例如根据终端型号从网络中得到 更详细的该终端更详细的软硬件信息, 以及用户注册或者用户请求中的手机号码标识)。
操作包含了两个选择, 即是否允许转换。 允许就是 al low, 不允许就是 block。
转换内容包含了转换内容的输入 (OriginTransform) 与输出 (TargetTransform) 格 式, 以及在转换过程中需要丢弃的内容(DiscardContent )与忽略的内容( IgnoreContent)。 其中丢弃内容(DiscardContent )与忽略内容( IgnoreContent )包含了元素与模块的内容。 元素包含了脚本(script)、 图片等内容, 并包含了相应的前缀(prefix)与后缀(suffix) 条件判断, 即是否进行丢弃或者忽略操作可以根据消息中的内容的前缀与后缀进行判断。 模块内容包含了核心模块 (coreModule ), 文本模块 (TextModule ) 等。
参见图 15, 为本发明实施例提供的协议转换规则的应用方法流程图, 该方法中包括对 上述转换规则集合的应用。 由于在具体的实施过程中, 对于多种终端信息、 用户的不同需 求以及特殊的网站, XML转换规则文件中的一个转换规则很难满足转换的要求, 为了达到协 议间转换的最佳效果, 需要合理应用转换规则, 即选择最优转换规则, 因此图 15所示的方 法提供了对上述转换规则集合的应用, 具体包括:
801: Pol icy Service模块从数据库中获取 XML转换规则文件, 并读取 rule (规则) 根 元素下的一条规则。
其中, Pol icy Service模块根据终端请求消息内容与服务器响应消息内容, 从数据库 中获取 XML转换规则文件。
802: Pol icy Service模块获取 rule元素下的子元素 condition (条件) , 判断终端识 别信息中用户手机号码, 终端设备, 网络带宽, 与服务器响应消息内容中的响应消息类型 是否符合转换规则条件的要求, 是则执行 804, 否则执行 803。
803: 丢弃该转换规则, 之后执行 807。
804: 判断转换规则是否允许应用, 是则执行 806, 否则执行 805。
805: 保留不允许应用的转换规则, 执行 807。
806: 保留允许应用的转换规则, 并进行转换规则的合并。
具体地, 对于执行过程中遇到的第一条允许转换的转换规则直接保留; 而对于遇到的 非第一条允许转换的转换规则, 将其内容与之前的转换规则的内容进行合并, 合并的原则 以目标转换协议的最佳效果为准, 例如, Target Transform (即目标协议) 取内容更为高 级丰富的协议或版本较高的协议。 而丢弃与忽略的内容则以丢弃的内容最少为原则。
807: 判断是否还存在下一条规则, 如果是则执行 801, 否则执行步骤 808。
808: 读取规则结束, 之后执行 809。
809: 根据 805与 806的操作产生最终的转换规则内容。
其中, 如果整个流程没有执行 806, 则以 805的结果为准不进行任何转换; 如果没有任 何规则的条件匹配到本次转换, 即 802中的终端识别信息、 服务器的响应消息内容均不符合 规则条件的要求, 则保留相关信息到数据库并通知管理员终端进行规则新增或者修改; 否 则以 806产生的转换内容为准, 确定进行转换的初始协议 (OriginTransform) 与目标转换 协议 (TargetTransform) ; 同时, 在转换的过程中, 根据 806产生的结果得到最终丢弃的 内容; 根据 806产生的结果得到最终忽略的内容。
对于图 8提供的协议转换规则的应用方法中进行规则合并的目的在于: 由于规则条件与 需要转化的内容的多样性以及不确定性 (以后可能会继续增加, 也即可扩展性) , 导致很 难用一条转化规则来诠释某一类型的终端、 某个服务器、 某个用户的转化。
选择最合适的转换规则具体原因有:
( 1 ) 规则合并强调重用 (或称为重构) 概念, 而不是排它性。 很多条件与转换内容是 相互关联与相互作用, 不能因为某个条件以及某个转换内容的修改就全部新增或者舍弃原 来的内容。 例如: 原规则 2G手机访问 WAP网站使用 wapl. x协议, 但是某用户希望访问 sina网 站时使用 wap 2. 0。 如果使用规则合并是可以重用的, 而且原来的规则也不浪费, 可以叠加, 而对于其它用户无需任何变化。
( 2 ) 规则合并的目标是最全规则应用, 而不是最优规则应用。 如果是最优规则那么必 然会导致其它规则无法使用。
根据图 13所示的用户使用网关设备浏览业务方法流程中的描述, Pol icy Service模块 执行转换策略后, Transform Service模块执行浏览业务流程中的 613, 进行相应的协议转 换处理。
为了实现 WML协议集、 HTML协议集与 XHTML协议集之间的转换,转换处理包含了由 HTML、 WML与 XHTML向其它协议的转换。
本发明实施例通过图 16〜图 18说明 WML协议集、 HTML协议集与 XHTML协议集之间的 转换过程。
参见图 16, 为 WML协议集向其他协议转换方法流程图, 该方法为 Transform Service 模块处理丽 L协议集中某一协议向其它协议转换的步骤, 包括:
901: Transform Service模块接收到 HTTP响应消息中 WML body (消息体) 内容,消息体 中携带消息协议版本。
902: Transform Service模块根据 WML body中的消息协议版本从数据库中获取对应 DTD 格式文件, 并根据该 DTD文件验证 WML body, 判断 WML body的内容格式是否合法。 如果验证 结果是合法的, 则执行 904; 否则将执行 903。
具体地, Transform Service模块根据 WML body中的消息协议版本,从消息内容中的 Name Space (命名空间) 获取 DTD文档名, 根据该文档名, 从数据库中取出相应的 DTD格式类型定 义文件, 根据该 DTD文件验证 WML body。
903: 根据 DTD的验证结果进行消息内容格式修复, 之后执行 904。
修复后的 WML body符合 DTD格式文件的要求。 例如, WML中 title元素没有内容, 则可以 设置内容为 Untitle。
904:根据经过 Pol icy Service模块处理的转换规则中的子元素 DiscardContent的内容, 判断转换规则是否需要丢弃相应部分消息内容, 如果需要进行内容丢弃则执行 905, 否则执 行 906。
其中, 子元素 DiscardContent的内容是基于图 15提供的转换规则集合的应用方法中经 过 Pol icy Service模块处理的转换规则中需要丢弃的内容 (DiscardContent ) 。
905: 针对 Discard Content的内容进行更改操作, 之后执行 906。
其中, 对 Discard Content的内容进行更改操作包括对 WML body进行删、 改等操作。 对 于元素或者属性的操作可以同时使用 C++或者 java进行操作, 同时, 优选地可以使用 XSLT技 术进行操作。 例如, WML body本次转换中需要对 template元素进行丢弃, XSLT语法可以表 不为: <xsl: if test='7/template"X/xsl: if>。
906: 根据经过 Pol icy Service模块处理的转换规则中的子元素 IgnoreContent的内容, 判断是否需要忽略转换语法中的内容。 如果需要忽略某些语法转换则执行 907, 否则执行 908。
其中, 子元素 IgnoreContent的内容是基于图 15提供的转换规则集合的应用方法中经过 Pol icy Service模块处理的转换规则中需要忽略的内容 (IgnoreContent ) 。
907: 根据 I gnoreContent的内容生成转换语法的过滤器。
其中, 映射过滤器的作用是对 XSLT语法映射文件进行过滤包含删除、 修改等操作, 即 删除相关元素或者属性的语法映射部分。 该操作可以使用传统的 C++或者 java进行修改, 但 是优选使用 XSLT技术。 例如: WML body本次转换中不需要对 option元素进行语法映射, XSLT 语 法 对 语 法 映 射 文 件 进 行 修 改 的 语 法 为 : 〈xsl : if test= / / template/ imatch=' option' ">〈/xsl : if>。
908: 根据经过 Policy Service模块处理的转换规则中的子元素 TargetTransform的内 容, 判断转换目标协议是否为 HTML协议集, 如果是则执行 909, 否则执行 910。
909: 从数据库中取出 WML到 XHTML 1. 0的语法转换的 XSL文件, 并对该 XSL转换语法文 件应用过滤器进行过滤, 之后执行 912。
其中, 根据 908的判断结果 WML要转换到 HTML, 可以首先从数据库中取出对应 WML映射到 HTML协议集的语法转换的 XSL ( extensible Stylesheet Language, 可扩展样式表语言) 文 件, 由于目前互联网流行浏览器普遍支持 XHTML 1. 0中的 Transitional (过渡) 模式, 因此 如果 WML要转换到 HTML, 则可以直接取出丽 L到 XHTML 1. 0的 Transitional的 XSL文件, 并对 该 XSL文件应用过滤器进行语法转换文件的过滤, 之后执行 912。
910: 判断 Target Transform的内容是否为 XHTML协议集, 如果是则执行 911, 否则执行
913。
911: 从数据库中取出对应 WML映射到 XHTML协议集的语法转换 XSL文件, 并对该 XSL转换 语法文件应用过滤器进行过滤。
912: 根据 WML与 XHTML协议集之间的语法差异通过 XSLT技术进行转换, 之后结束。
其中, WML的语法可以通过 XHTML自身的语法与 javascript进行表示。 通过 XHTML语法表 不丽 L, 例如: wml card ontimer属性表不 The ontimer event occurs when a timer expires, 可以使用 xhtml中 head/meta元素的子元素 refresh实现。
具体的语法实现方法详见本发明实施例对语法映射过程的说明。
913: 判断 WML是否转换成 WML协议集中其它协议, 是则执行 914, 否则执行 916。
其中, WML协议集内部协议之间的转换, 例如从 WML 2. 0转换成 WML 1. 1, 或者从 WML 1. 1 转换成 WML 1. 3。
914: 从数据库中取出对应 WML映射到 WML协议集的语法转换 XSL文件, 并对该 XSL转换语 法文件应用过滤器进行过滤, 之后执行 915。
915: 根据 WML与 WML协议集其它协议的语法差异通过 XSLT技术进行转换。
例如, WML 1. 3与 WML 2. 0存在元素 head, meta, select, template等差异。其中, template 在丽 L 2. 0中已经不存在。 而其它元素包含的子元素与属性各有不同, 因此需要进行语法映 射。
916: 转换结束。
参见图 17, 为 HTML协议集向其他协议转换方法流程图, 该方法为 Transform Service 模块处理 HTML协议集中某一协议向其它协议转换的步骤, 包括:
1001: Transform Service模块接收到 HTML body (消息体) 内容。
1002: 对 HTML进行内容格式修复。
其中,对 HTML进行内容格式修复,使该内容格式直接变成 XHTML 1. 0中的 Transitional 模式, 从而使后续转换过程中能够采用优选的转换方式 (XSLT) 进行转换。 W3C 标准组织 XHTML 1. 0 规范 (http:〃 www. w3. org/TR/xhtml l/) 主要指出了 XHTML 要求正确嵌套, 元 素与属性需要小写, 元素必须有结束符, 属性值要双引号, 不能属性最小化, 属性值的空 格处理, 特殊字符处理, 用 id属性代替 name属性等。 例如, 〈p>here is an emphasized <em>paragraph. </p></em>¾ XHTML中属于非法, 正确的内容为: <p>here is an emphasized 〈em>paragraph〈/em>.〈/p>。 通过内容修复, HTML内容将变成 XHTML 1. 0的格式。
1003: 根据经过 Pol icy Service模块处理的转换规则中的 DiscardContent 内容, 判 断是否需要丢弃消息中的部分内容。 如果需要则执行 1004。 否则执行 1005。
1004: 对 DiscardContent的内容进行丢弃操作, 之后执行 1005。
其中, 对 DiscardContent的内容进行更改操作包括对 XHTML body进行删除、 修改等操 作。例如,在本次转换中不需要 javascript的内容,可以使用 XSLT语法进行删除, BP : <xsl : if test=〃//script〃X/xsl: if>。
1005:根据经过 Pol icy Service模块处理的转换规则中的子元素 IgnoreContent的内容, 判断是否需要忽略转换语法中的内容, 是则执行 1006, 否则执行 1007。
1006: 根据 I gnoreContent的内容生成转换语法的过滤器。
例如, 本次转换中不需要使用到 style元素, 则可以使用语法: 〈xsl : if test=〃//style〃X/xsl: if>。
1007: 根据经过 Pol icy Service模块处理的转换规则中的 TargetTransform的内容, 判 断本次转换的目标内容是否为 WML协议集, 是执行 1008, 否则执行 1010。
1008: 从数据库中取出 XHTML映射成 WML的 XSL文件, 并对该 XSL转换语法文件应用过滤 器进行过滤。
1009: 通过 XSLT语法解析协议转换 XSL文件, 对 XHTML内容进行转换, 产生相应 WML消息。 例如: XHTML 1. 0协议格式的消息内容转换成 WML 1. 3的消息过程中, XHTML 1. 0的 body 元素指的是消息体的内容, 而 WML 1. 3中则以 card元素表示消息体。 因此 XSL文件描述为: <xsl: template match=〃body〃>〈card>*"〈/card>〈/ xsl: template>。
1010: 判断转规则中的 Target Transform的内容是否为 HTML协议集中的其它协议, 是 则表示需要在 HTML协议集内部进行转换, 即执行 1012, 否则执行 1011。 1011: 判断规则中的 TargetTransform的内容是否为 XHTML协议集, 是则执行 1012, 否 则执行 1014。
1012: 从数据库中获取 HTML到 XHTML 1. 0的 Transitional的 XSL文件, 并对该 XSL转换 语法文件应用过滤器进行过滤。
由于目前浏览器都支持 XHTML 1. 0,因此转换成 HTML协议集语法的映射统一转换成 XHTML
1. 0, 可以理解的是, 根据实际的需要, 可以进行精确地协议转换。
1013: 使用 XSLT解析协议转换 XSL文件, 最终产生相应的 XHTML文件。
1014: 结束转换。
参见图 18, 为 XHTML协议集向其他协议转换方法流程图, 该方法为 Transform Service 模块处理 XHTML协议集中某一协议向其它协议转换的步骤, 包括:
1101: Transform Service模块接收 XHTML body (消息体) 内容。
1102: 根据 XHTML body声明的协议类型获取相应 DTD文件进行验证, 判断 XHTML消息是 否格式良好, 是执行 1104, 否则执行 1103。
1103: 根据 DTD验证报告对消息内容进行修复。
对消息内容进行修复, 使 XHTML消息内容符合 DTD协议定义格式。
1104: 根据经过 Policy Service模块处理的转换规则中的元素 DiscardContent内容判 断在本次转换中是否需要丢弃消息中的部分模块与元素, 是则执行 1105, 否则执行 1106。
1105: 根据 Di scardContent内容对 XHTML消息进行删改。
例如,本次转换中不需要 1 ink元素。可以使用 XSL语法进行删除。语法为:〈xsl: template match=〃link,, >〈/xsl: template>。
1106: 根据经过 Policy Service模块处理的转换规则中 IgnoreContent内容判断在本次 转换中是否需要忽略消息中某些元素的转换, 是则执行 1107, 否则执行 1108。
1107: 根据 IgnoreContent的内容生成转换语法的过滤器。
该转换语法过滤器可以是 XSL文件, 例如, 本次转换中需要忽略图片, 相应语法为: <xsl: template match=〃img,, >〈/xsl: template>。
1108: 根据经过 Policy Service模块处理的转换规则中 TargetTransform的内容判断本 次转换的目标协议是否为 WML协议集, 是则执行 1109, 否则执行 1111。
1109: 从数据库中取出 XHTML向 WML协议集映射的协议转换 XSL文件, 并对该 XSL转换语 法文件应用过滤器进行过滤。
1110: 通过 XSLT引擎解析协议转换 XSL文件, 对 XHTML内容进行语法转换, 产生相应 WML 消息。 例如, 在 XHTML 1. 1协议格式的消息内容转换成 WML 1. 3的消息过程中, XHTML 1. 1的 form元素指的是终端向服务器提交内容, 而丽 L 1. 3中则以 go元素同样表示类似的作用。 因 此 XSL文件描述为: <xsl: template match=〃fo:rm〃>〈go>*"〈/go>〈/ xsl: template>。
1111: 根据 TargetTransform的内容判断本次转换的目标协议是否为 HTML协议集, 是则 执行 1113, 否则执行 1112。
1112: 判断本次转换目标协议是否为 XHTML协议集内部的转换, 是则执行 1113, 否则执 行 1115。
其中, XHTML协议集内部的转换例如从 XHTML 1. 0转换为 XHTML 1. 1或者 XHTML 2. 0。 1113: 从数据库中获取 HTML到 XHTML 1. 0的 Transitional的 XSL文件, 并对该 XSL转换 语法文件应用过滤器进行过滤。
由于目前浏览器都支持 XHTML 1. 0,因此转换成 HTML协议集语法的映射统一转换成 XHTML 1. 0, 可以理解的是, 根据实际情况, 可以进行精确地协议转换。
1114: 使用 XSLT引擎解析协议转换 XSL文件, 产生相应的 XHTML文件。
1115: 转换规则中无相应的协议转换匹配, 通知管理员无法处理, 程序结束。
在上述的三大协议集之间的转换过程中, 语法映射是关键步骤。 而实现语法映射的关 键在于通过不同的语法表达相同的语义, 从而实现展现相同或相似的内容以及功能。 语法 映射的过程类似于编程语言的原理, 例如, 同样的功能可以通过 C++实现, 也可以通过 java 实现。 而语法映射实现的手段是通过程序进行解析源内容并修改成目标内容。 本发明实施 例采用 XSLT替代了 C++与 java语法进行对源内容进行解析修改, 形成语法转换应用。
在丽 L、 HTML与 XHTML的转换实现过程中,处理过程中多次提到协议转换 XSL文件以及 XSL 语法映射。 无论采用何种语法, 在转换的过程中, 其转换的逻辑规则是不变的, 只是不同 语法的体现形式不同。 下面从语法具体实现角度说明从三大协议集中某一种协议转换成另 外一种协议映射的逻辑规则, 以源内容 WML 1. 3协议转换为目标 XHTML 1. 0 为例:
根据丽 L 1. 3的 DTD描述获知丽 L 1. 3中共有 36个元素, 每个元素都有相应多个属性。 WML 语法与 XHTML语法比较, 其中元素 /属性包含四种情况: 原语法的元素 /属性存在于目标语法 中, 而且含义一致; 原语法的元素 /属性虽存在于目标语法中, 但是含义有差异, 例如 meta, select, optgroup, input, img, a, br, head, option, f ieldset, table, tr, td, em, strong, b, i, u, big, small , p, pre等 23个; 原语法元素 /属性不存在于目标语法中, 但是能够通过目标语法进行等价逻辑表达; 原语法元素 /属性既不存在于目标语法中, 又不 能够通过目标语法进行等价逻辑表达。 因此针对这四类元素可以采用不同的方法进行转换: 参见图 19, 为本发明实施例提供的协议间语法转换方法流程图, 包括: 首先接收协议消息体的内容; 之后, 执行 1201 :
1201: 从协议内容中取出一个元素 /属性, 判断原语法的元素 /属性是否在目标语法中 存在, 是则执行 1202, 否则执行 1204。
1202: 判断该元素 /属性在原语法中的含义是否与在目标语法中的含义一致, 是则程序 执行 1203, 否则执行 1204。
1203: 复制该元素 /属性到目标语法中。
其中, 根据 1201、 1202的判断结果得出原语法的该元素 /属性存在于目标语法中, 而且 含义一致, 则复制该元素 /属性到目标语法中。
1204:判断原语法中该元素 /属性在目标语法中是否有等价含义的语法,是则执行 1205, 否则执行 1206。
1205: 对原语法中该元素 /属性在目标语法中使用等价含义的语法进行表示或者修改。 其中, 根据 1204判断得出原语法该元素 /属性不能完全复制到目标语法中, 因此, 需要 对原语法中该元素 /属性在目标语法中使用等价含义的语法进行表示或者修改, 包含两种情 况: 表达或者修改属性; 表达或者修改元素与属性。
( 1 ) 表达或者修改属性。
例如, WML meta元素共包含 http -equiv, name, forua, content, scheme, id, class 等属性, 其中 forua, class属于 WML特有。 可以对 forua与 class的语义进行分析, 根据 0MA ( Open Mobi le Al l iance, 开放移动联盟) 规范的描述, class属性是可以忽略的; 而 forua 属性则表示 meta是否要删除。 该转换逻辑可以通过 C++、 Java, XSLT等语法实现, 其中, 采 用 XSL的转换语法实现上述逻辑为:
<xsl: template match="meta"〉
<xsl: when test= boolean (@forua) and @forua=i false' ^ />
<xsl: otherwise)
<meta>
<xsl: copy-of select= @http-equiv | ©name | ©content | ©scheme | @id" />
<xsl: if test=〃boolean (starts- with (©content, ' text/html' ) )〃 />
</meta>
</xsl: otherwise)
</xsl: template)
( 2 ) 表达或者修改元素与属性。
例如, 使用 XHTML动态网页实现 WML向 XHTML转换, 可以使用 XHTML自身语法或者插件语 法 (如 javascript, ActiveX, flash, wmlscript, java applet^ ) 来实现其转换。 自身语法 实现例如, WML card ontimer属性表示当定时器到期时发生的事件, 可以使用 XHTML中的 head/meta兀素中子兀素 refresh实现。
又例如, WML中有些语法涉及到浏览器的前进后退, 例如 onenterforward以及 onenterbackward。 onenterforward表不前进跳转, 而 onenterbackward贝|是表不后退跳转。 该丽 L描述的是控制浏览器前进后退功能, 用户从其它页面跳转到本页面时浏览器会前进跳 转到 http : 3g. sina. com. cn。 前进功能的 XSLT语法实现为:
<xsl: if test=〃starts- with (/ / card/ onevent/ itype, ' onenterforward' ) and
11 card/ onevent/ go/ @href〃>
<meta http_equiv=〃refresh〃>
<xsl: attribute name=〃content〃>
<xsl: value-of select= concat (1, '; url=' , / / card/ onevent/ go/ ihref ) " />
</xsl: attribute)
</meta>
</xsl : if>
1206: 网关设备通过程序表达该元素 /属性的含义。
根据 1204判断得出原语法中该元素 /属性不能完全通过目标语法进行等价含义的语法 表达或者修改时, 此时可采用网关设备通过程序表达该元素 /属性的逻辑含义, 即通过终端 与网关设备交互进行 WML语法控制。 其中, 网关设备采用的程序可以是 C++, Java等。
再以上述 WML中有些语法涉及到浏览器的前进后退为例说明。 onenterforward表示前进 跳转, 而 onenterbackward则是表示后退跳转。 通过网关设备与终端交互进行 WML语法控制 如下:
<wml>
<card>
<onevent type= onenterforward >
<go href=〃http : //3g. sina. com. cn〃 />
</onevent>
<onevent type= onenterbackward >
<go href=〃http : //wap. baidu. com〃 />
</onevent>
</ card> </wml>
该 WML描述的是控制浏览器前进后退功能, 从 http :〃3g. sina. com. cn后退到本页面 时需要转到 http:〃 wap. baidu. com。 而 IE 浏览器的前进后退功能是不开放给 javascript 进行控制的, 因此可以通过网关设备进行处理, 可以通过程序控制 IE页面不进行缓存, 而 网关设备则记录该请求, 即通过网关设备进行缓存。 如果 IE浏览器进行后退时, IE浏览器 会重新发起浏览请求, 可以实现页面后退功能。
本发明实施例提供了一种实现协议消息体协议内容的语法转换的设备, 参见图 20, 该 设备包括:
第一判断模块 201, 用于判断收到的协议消息体中协议内容的原语法中的元素 /属性是 否存在于目标语法中;
第二判断模块 202, 用于判断收到的协议消息体中协议内容的原语法中的元素 /属性与 目标语法中的元素 /属性的含义是否一致;
第三判断模块 203, 用于判断收到的协议消息体中协议内容的原语法中的元素 /属性在 目标语法中是否存在等价含义的语法;
复制模块 204, 用于当第二判断模块的判断结果为是时, 复制收到的协议消息体中协议 内容的原语法中的元素 /属性到目标语法;
表示 /修改模块 205, 用于当第三判断模块的判断结果为是时, 使用目标语法中等价含 义的语法表示或者修改收到的协议消息体中协议内容的原语法中的元素 /属性;
表示模块 206, 用于当第三判断模块的判断结果为否时, 通过逻辑控制表达收到的协议 消息体中协议内容的原语法中的元素 /属性。
上述实现语法转换的设备用于实现不同协议之间的语法转换, 无论采用何种语言进行 转换, 均可以采用上述设备以及其对应的转换方法进行不同协议的转换。
本发明实施例的网关设备支持丽 L、 HTML与 XHTML的相互转换方法, 根据协议之间的转 换方法, 用户可以通过手机终端、 PDA、 笔记本电脑与台式机等终端访问任意的互联网中提 供的 Web/WAP应用服务; 对于提供 WAP/Web应用服务的服务提供商与内容提供商, 可以只着 重提供服务的内容, 从而实现提供内容与展现内容的分离, 进而实现互联网与电信网络的 有效融合。 另外, 本发明实施例提出两种不同的协议语言转换逻辑的具体方法, 使协议转 换变成一种现实, 而不是一种可能。
本发明实施例鉴于终端、 网络、 应用服务器等网络实体存在异构以及三大协议集之间 相互语法转换存在复杂性等问题, 例如手机终端型号层出不穷, 网络形态包含了 2G, 2. 5G 与 3G, 并继续演进; WML 1. 3协议中元素有 36个, 属性个数大约为元素的 2〜3倍, 本发 明实施例基于 XSLT技术提出通过 XSL文件进行编程, 相应的转换规则与响应消息内容修改 都可以通过 XSL语法表示, 无须大规模编程, 能够快速部署与响应需求, 并可以随着 WML 与 XHTML的演进同步发展; 另外, 本发明实施例在对响应消息内容的处理过程中采用 XSLT 技术进行语法映射, 而非常规的 java或者 C语言的 D0M树操作, 可以提高转换的效率、 灵 活性与可扩展性。
本发明实施例中的 "接收"一词可以理解为主动从其他模块获取也可以是接收其他模 块发送来的信息。
本领域技术人员可以理解附图只是一个优选实施例的示意图, 附图中的模块或流程并 不一定是实施本发明所必须的。
本领域技术人员可以理解实施例中的装置中的模块可以按照实施例描述分布于实施例 的装置中, 也可以进行相应变化位于不同于本实施例的一个或多个装置中。 上述实施例的 模块可以合并为一个模块, 也可以进一步拆分成多个子模块。
上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。
本发明实施例可以通过软件实现, 相应的软件可以存储在可读取的存储介质中, 例如 计算机的硬盘、 光盘或软盘中。
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1.一种网络互联的方法, 其特征在于, 所述方法包括:
接收用户终端发送的浏览请求消息, 根据所述浏览请求消息获取用户终端识别信息, 将 所述浏览请求消息发送至网络服务器;
接收所述网络服务器发送的响应消息, 所述响应消息中包含所述用户终端请求浏览的内 容, 根据所述响应消息获取响应消息内容识别信息;
根据所述用户终端识别信息、 所述响应消息内容识别信息获取预设的转换规则; 根据所 述预设的转换规则对所述响应消息进行内容转换;
将转换后的响应消息返回所述用户终端。
2.根据权利要求 1所述的方法, 其特征在于, 所述将所述浏览请求发送至网络服务器之 前包括:
当所述浏览请求为请求门户展示, 则向用户终端直接返回门户网站的信息; 相应地, 当所述浏览请求为非门户展示, 则将所述浏览请求发送至与所述浏览请求消息对应的网 络服务器。
3.根据权利要求 1所述的方法, 其特征在于, 所述根据所述预设的转换规则对所述响应 消息进行内容转换之前进一步包括对所述响应消息的内容进行格式验证;
当所述格式验证通过, 根据所述预设的转换规则对所述响应消息的内容进行转换; 当所述格式验证没有通过, 对所述响应消息的内容进行修复, 再根据预设的转换规则对 所述响应消息的内容进行转换。
4.根据权利要求 1所述的方法, 其特征在于, 所述预设的转换规则包括条件、 操作和转 换内容;
所述条件包括用户信息、 终端信息、 网络信息以及响应消息的内容;
所述操作包括允许转换与不允许转换;
所述转换内容包括需要转换的源协议类型、 目标协议类型、 在转换过程中要丢弃的模块 与元素和在转换过程中要忽略的模块与元素。
5.根据权利要求 1所述的方法, 其特征在于, 通过可扩展基于样式表转换语言对所述响 应消息的内容进行转换。
6.根据权利要求 1所述的方法, 其特征在于, 所述根据所述用户终端识别信息、 所述响 应消息内容识别信息获取预设的转换规则之前还包括:
根据所述用户终端识别信息和所述响应消息内容识别信息, 判断用户终端是否支持响应 消息内容中的协议, 是则直接发送所述响应消息至所述用户终端;
否则根据所述用户终端识别信息、 响应消息内容识别信息获取对应的转换规则, 根据获 取的转换规则对所述响应消息进行内容转换, 将转换后的响应消息返回所述用户终端。
7.根据权利要求 1至 6所述的方法, 其特征在于, 所述对所述响应消息进行内容转换包 括:
根据所述预设的转换规则确定转换的源协议与目标协议; 根据所述转换规则中需要丢弃 的内容对所述响应消息进行丢弃; 根据所述转换规则中需要忽略的内容对转换语法的内容进 行过滤; 再根据过滤后的转换语法对源协议进行语法转换。
8.—种网络互联的方法, 其特征在于, 所述方法包括:
接收用户终端发送的上传请求消息, 所述上传请求消息中包含所述用户终端要上传的内 容、 目的网络服务器的信息以及用户终端信息;
根据所述用户终端信息获取用户终端识别信息;
根据所述用户终端识别信息和预先保存的网络服务器信息获取预设的转换规则; 根据所述预设的转换规则对所述上传内容进行内容转换;
根据所述目的网络服务器的信息将转换后的上传内容发送至网络服务器。
9.根据权利要求 8所述的方法, 其特征在于, 所述对所述上传请求消息进行内容转换包 括:
根据所述预设的转换规则确定转换的源协议与目标协议; 根据所述转换规则中需要丢弃 的内容对所述上传请求消息进行丢弃; 根据所述转换规则中需要忽略的内容对转换语法的内 容进行过滤; 再根据过滤后的转换语法对源协议进行语法转换。
10.—种网络互联的方法, 其特征在于, 所述方法包括: 接收网络服务器发送的业务推送请求消息, 所述业务推送请求消息中包含所述网络服务 器向用户终端推送的内容、 用户终端信息以及网络服务器信息;
根据所述用户终端信息获取用户终端识别信息;
根据所述网络服务器信息和所述用户终端识别信息获取预设的转换规则;
根据所述预设的转换规则对所述网络服务器向用户终端推送的内容进行内容转换; 将转换后的推送内容发送至所述用户终端。
11.根据权利要求 10所述的方法, 其特征在于, 所述对所述网络服务器向用户终端推送 的内容进行内容转换包括:
根据所述预设的转换规则确定转换的源协议与目标协议; 根据所述转换规则中需要丢弃 的内容对所述业务推送请求消息内容进行丢弃; 根据所述转换规则中需要忽略的内容对转换 语法的内容进行过滤; 再根据过滤后的转换语法对源协议进行语法转换。
12.—种网关设备, 其特征在于, 所述设备包括:
超文本传输协议服务端 HTTP Server Service模块, 接收用户终端发送的浏览请求消息, 根据所述浏览请求消息获取用户终端识别信息;
超文本传输协议客户端 HTTP Cl ient Service模块, 用于将所述浏览请求消息发送至网 络服务器, 并接收所述网络服务器发送的响应消息, 所述响应消息中包含所述用户终端请求 浏览的内容; 根据所述响应消息获取响应消息内容识别信息;
策略服务 Pol icy Service模块, 用于根据所述用户终端识别信息、 所述响应消息内容识 别信息获取预设的转换规则;
转换服务 Transform Service模块, 用于根据所述 Pol icy Service模块获取的预设的转 换规则对所述响应消息进行内容转换;
所述 HTTP Server Service模块还用于将由所述 Transform Service模块转换后的响应 消息返回所述用户终端。
13.根据权利要求 12所述的设备, 其特征在于, 所述 Transform Service模块包括: 协议格式验证单元, 用于对所述响应消息的内容进行格式验证;
消息内容修复单元, 当所述格式验证没有通过, 对所述响应消息的内容进行修复; 协议转换单元, 用于根据预设的转换规则对所述响应消息的内容进行转换。
14.根据权利要求 13所述的设备, 其特征在于, 所述协议转换单元具体用于: 根据所述转换规则确定转换的源协议与目标协议; 根据所述转换规则中需要丢弃的内容 对所述响应消息进行丢弃;根据所述转换规则中需要忽略的内容对转换语法的内容进行过滤; 再根据过滤后的转换语法对源协议进行语法转换。
15.—种网关设备, 其特征在于, 所述设备包括:
第二超文本传输协议服务端 HTTP Server Service模块, 用于接收用户终端发送的上传 请求消息, 所述上传请求消息中包含所述用户终端要上传的内容、 目的网络服务器的信息以 及用户终端信息; 并根据所述用户终端信息获取用户终端识别信息;
第二策略服务 Pol icy Service模块, 用于根据所述用户终端识别信息和预先保存的网络 服务器信息获取预设的转换规则;
第二转换服务 Transform Service模块, 用于根据所述预设的转换规则对所述上传内容 进行内容转换;
第二超文本传输协议客户端 HTTP Cl ient Service模块, 用于根据所述目的网络服务器 的信息将转换后的上传内容发送至网络服务器。
16. 一种网关设备, 其特征在于, 所述设备包括:
第三超文本传输协议客户端 HTTP Cl ient Service模块, 用于接收网络服务器发送的业 务推送请求消息, 所述业务推送请求消息中包含所述网络服务器向用户终端推送的内容、 用 户终端信息以及网络服务器信息; 根据所述用户终端信息获取用户终端识别信息;
第三策略服务 Pol icy Service模块, 用于根据所述网络服务器信息和所述用户终端识别 信息获取预设的转换规则;
第三转换服务 Transform Service模块, 用于根据所述预设的转换规则对所述网络服务 器向用户终端推送的内容进行内容转换;
第三超文本传输协议服务端 HTTP Server Service模块, 用于将转换后的推送内容发送 至所述用户终端。
17.—种系统, 其特征在于, 所述系统包括:
网关设备, 用于接收用户终端发送的浏览请求消息或上传请求消息; 根据所述浏览请求 消息或所述用户终端信息获取用户终端识别信息;
还用于接收网络服务器发送的响应消息或网络服务器发送的业务推送请求消息; 根据所 述响应消息获取响应消息内容识别信息或根据所述业务推送请求消息获取网络服务器信息; 根据所述用户终端识别信息、 所述响应消息内容识别信息或网络服务器信息获取预设的 转换规则;
根据所述预设的转换规则对所述响应消息或所述网络服务器推送的业务或所述用户终端 上传的内容网络服务器进行内容转换, 将转换后的结果对应返回所述用户终端或所述网络服 务器;
网络服务器, 用于向所述网关设备发送对应于所述浏览请求的响应消息, 或接收所述用 户终端通过所述网关设备上传的内容, 或向所述用户终端主动发送业务推送请求消息。
18.—种实现协议消息体中协议内容的语法转换的方法, 其特征在于, 所述方法包括: 判断收到的协议消息体中协议内容的原语法中的元素 /属性是否存在于目标语法中,是则 判断所述原语法中的元素 /属性与所述目标语法中的元素 /属性的含义是否一致, 否则判断所 述协议消息体中协议内容的原语法中的元素 /属性在所述目标语法中是否存在等价含义的语 法;
当所述判断所述原语法中的元素 /属性与所述目标语法中的元素 /属性的含义的判断结果 为是, 则复制所述协议消息体中协议内容的原语法中的元素 /属性到所述目标语法, 否则判断 所述协议消息体中协议内容的原语法中的元素 /属性在所述目标语法中是否存在等价含义的 语法;
当所述判断所述协议消息体中协议内容的原语法中的元素 /属性在所述目标语法中是否 存在等价含义的语法的判断结果为是, 则使用所述目标语法中等价含义的语法表示或者修改 所述协议消息体中协议内容的原语法中的元素 /属性,否则通过程序表达所述协议消息体中协 议内容的原语法中的元素 /属性的含义。
19.一种实现协议消息体中协议内容的语法转换的设备, 其特征在于, 所述设备包括: 第一判断模块,用于判断收到的协议消息体中协议内容的原语法中的元素 /属性是否存在 于目标语法中;
第二判断模块,用于判断所述协议消息体中协议内容的原语法中的元素 /属性与所述目标 语法中的元素 /属性的含义是否一致; 第三判断模块,用于判断所述协议消息体中协议内容的原语法中的元素 /属性在所述目标 语法中是否存在等价含义的语法;
复制模块, 用于当所述第二判断模块的判断结果为是时, 复制所述协议消息体中协议内 容的原语法中的元素 /属性到所述目标语法;
表示 /修改模块, 用于当所述第三判断模块的判断结果为是时, 使用所述目标语法中等价 含义的语法表示或者修改所述协议消息体协议内容的原语法中的元素 /属性;
表示模块, 用于当所述第三判断模块的判断结果为否时, 通过程序表达所述协议消息体 协议内容的原语法中的元素 /属性的含义。
PCT/CN2009/075732 2008-12-23 2009-12-18 网络互联的方法、网关设备及系统 WO2010072128A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810188274.2 2008-12-23
CN200810188274.2A CN101764767A (zh) 2008-12-23 2008-12-23 网络互联的方法、网关设备及系统

Publications (1)

Publication Number Publication Date
WO2010072128A1 true WO2010072128A1 (zh) 2010-07-01

Family

ID=42286894

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/075732 WO2010072128A1 (zh) 2008-12-23 2009-12-18 网络互联的方法、网关设备及系统

Country Status (2)

Country Link
CN (1) CN101764767A (zh)
WO (1) WO2010072128A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710558B (zh) * 2012-05-21 2015-01-28 中兴通讯股份有限公司 适用于多种显示类型的家庭网关的界面显示方法和系统
CN103686628B (zh) * 2012-09-17 2017-09-12 中国移动通信集团公司 一种信息推送方法、系统及网络设备、移动终端
CN103347056B (zh) * 2013-06-19 2016-12-28 百度在线网络技术(北京)有限公司 移动终端的网页访问方法、系统以及服务器
CN104093077B (zh) * 2013-10-29 2016-05-04 腾讯科技(深圳)有限公司 多终端互联的方法、装置及系统
WO2015085571A1 (en) * 2013-12-13 2015-06-18 Nokia Technologies Oy Method and apparatus for provisioning an operational subscription
CN104948173B (zh) * 2014-03-25 2019-02-15 中国石油化工股份有限公司 压裂现场数据远程实时监测方法及系统
CN106161478B (zh) * 2016-09-19 2019-02-19 成都知道创宇信息技术有限公司 基于http响应头变化的准确攻击识别方法
CN108228680A (zh) * 2016-12-22 2018-06-29 广州市动景计算机科技有限公司 页面防劫持方法、装置及客户终端
CN108494671A (zh) * 2018-03-19 2018-09-04 珠海格力电器股份有限公司 一种网关设备
CN108769017B (zh) * 2018-05-29 2022-01-11 杭州字符串科技有限公司 一种数据通信方法及装置
CN110661787A (zh) * 2019-09-04 2020-01-07 苏宁云计算有限公司 Http重定向状态码捕获方法、装置和计算机设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259706B1 (en) * 1997-10-23 2001-07-10 Fujitsu Limited Communication controlling apparatus and recording medium for recording communication controlling programs
CN1592270A (zh) * 2003-08-26 2005-03-09 华为技术有限公司 一种在智能网和外部平台之间实现多协议转换的方法和装置
CN1960409A (zh) * 2006-09-25 2007-05-09 郭枭业 一种在移动电话上浏览web或rss网站内容的方法及其计算机装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259706B1 (en) * 1997-10-23 2001-07-10 Fujitsu Limited Communication controlling apparatus and recording medium for recording communication controlling programs
CN1592270A (zh) * 2003-08-26 2005-03-09 华为技术有限公司 一种在智能网和外部平台之间实现多协议转换的方法和装置
CN1960409A (zh) * 2006-09-25 2007-05-09 郭枭业 一种在移动电话上浏览web或rss网站内容的方法及其计算机装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHIWEN TANG: "Implementation of data sharing method between heterogeneous database system", FUJIAN COMPUTER, no. 7, July 2006 (2006-07-01), pages 175 - 176 *
WEIKAI XIE ET AL.: "Extension and application for Voice XML with semantic annotation", MINI-MICRO COMPUTER SYSTEM, vol. 23, no. 12, December 2002 (2002-12-01), pages 1419 - 1424 *

Also Published As

Publication number Publication date
CN101764767A (zh) 2010-06-30

Similar Documents

Publication Publication Date Title
WO2010072128A1 (zh) 网络互联的方法、网关设备及系统
TW583557B (en) A network apparatus for validating documents
CA2467782C (en) System and method for processing extensible markup language (xml) documents
US6535896B2 (en) Systems, methods and computer program products for tailoring web page content in hypertext markup language format for display within pervasive computing devices using extensible markup language tools
US20170103047A1 (en) Mechanisms to Compose, Execute, Save, and Retrieve Hyperlink Pipelines in Web Browsers
WO2011088640A1 (zh) 一种移动终端浏览多媒体资源的方法、相应系统及通信系统
US20080313273A1 (en) Method, apparatus and system for service selection, and client application server
US20030115365A1 (en) Transcoding information in a first markup language into a second markup language
KR101424261B1 (ko) 모바일 웹 서비스를 제공하는 단말기 및 상기 단말기의동작 방법
KR101018473B1 (ko) 모바일용 웹페이지 변환 시스템 및 방법
KR100831392B1 (ko) 웹 브라우징에서 하이퍼텍스트로 연결된 문서의 미리보기서비스 제공 방법 및 시스템
US20010056497A1 (en) Apparatus and method of providing instant information service for various devices
JP4308448B2 (ja) 出力装置に応じたコンテンツの生成
Mogul Server-directed transcoding
Lemlouma et al. Content adaptation and generation principles for heterogeneous clients
CN100438522C (zh) 创建与协议无关的管理器/代理关系的方法
JP2007035053A (ja) 異なる端末器間のセッション保持方法
Cisco Introduction to the Cisco Content Optimization Engine 1.2 for ACNS 4.1
Cisco Introduction to the Cisco Content Optimization Engine for ACNS 4.0
KR100453224B1 (ko) 유/무선 인터넷을 이용한 수식 기호 편집장치 및 방법
CN113824756A (zh) 文件处理方法、装置、存储介质及电子设备
Butler Using capability classes to classify and match CC/PP and UAProf profiles
KR100600512B1 (ko) 무선 단말기용 컨텐츠 클리핑 서비스 제공 장치 및 방법
Di Nitto et al. Adaptation of web contents and services to terminals capabilities: The@ Terminals approach
CN103428023A (zh) 操作配置方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09834081

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09834081

Country of ref document: EP

Kind code of ref document: A1