Embodiment
The present invention is divided into the client and server end with microbrowser, the logical process function of complexity is transferred on the server, with layout with represent function and be divided into client.
As shown in Figure 1, the user at first needs the network address (network address can be forms such as URL) of visiting (S100) by input in the microbrowser of embedded device when the embedded device accesses network among the present invention; Microbrowser is according to network address and device parameter structure request message, submit request (S101) by certain network transmission protocol (for example http protocol) to server, server is resolved (S102) to the request message of client, obtain page info according to website information wherein from the webserver, the webserver can be (S103) such as third party website, custom web site and application servers.By the server requests webserver, obtain page info, as a preferred embodiment, the present invention is in order to support the page info of multiple form, preestablished first predetermined format, when receiving the page info different, changed (S104), for example with first predetermined format, if what obtain is html document, then directly enter parsing.If be non-html document, then be converted to html document by the document format transform engine, then html document is resolved (S105).By this process, make the present invention not be only applicable to visit the WEB webpage, can also realize the compatibility of WAP website.Page info after will resolving then is configured to DOM Document Object Model dom tree (Document Object Model), defines a group interface, so that program and script can dynamic access and modification XML document content, structure and patterns.If quoted other documents, can also obtain other documents (as CSS document and JavaScript document),, resolve (for example resolving CSS document and JavaScript document) at different documents.Server according to the parameter information of embedded device (for example, client device screen size, colorfulness, equipment are used configuration etc.) dom tree of HTML is carried out the adaptive calculating of the small screen, page info can also be converted to the form (S106) that embedded device is supported.In addition, as a preferred embodiment, in order to improve the confidentiality of Network Transmission, page info after adaptive can be encoded according to predefined second predetermined format, in order further to improve network transfer speeds, can the page info behind the coding be compressed, at last the page info of finishing dealing with is sent to client (S107).
After the client of microbrowser receives data,, then carry out decompress(ion) and/or decoding, then data are carried out layout again and represented calculating, and the result is shown if these data are the page infos behind overcompression and/or coding.Be responsible for the demonstration of page info and human-computer interaction function is provided by client.
The FAQs of accesses network such as by above-mentioned transit server pattern, it is lower to solve the client process ability, and the single networking stand-by period is longer, and the data conveying capacity is bigger especially moves and browses the user and bring preferable user experience for browsing the user.
In addition, microbrowser of the prior art usually need be at the specific microbrowser of embedded device exploitation of specific model, therefore do not possess versatility for different embedded devices, and the present invention handles according to the characteristic of various types of embedded devices by server, different-format is changed accordingly, and carry out at the device attribute of different model adaptive, to reach versatility.
Corresponding to the method for above-mentioned microbrowser network data, below just corresponding respectively microbrowser structure and the means of communication of client, the structure of server and the method for network data thereof be described in detail, more clearly to understand the present invention.
Below be the means of communication and the corresponding client terminal structure of the client of microprocessor among the embodiment.
For can be on the small screen of embedded device the content of display network page, the client of microbrowser is at first obtained the data (communications protocol can be a http agreement etc.) of first server process by communications protocol, then the data that receive are resolved, data after resolving according to this each positions of elements in the calculated data on the small screen, and describe each element one by one, data are carried out again layout represent.
It below is a kind of client terminal structure framework of microbrowser of embedded device, as shown in Figure 2, the client of this microbrowser comprises first communication module 201, first parsing module 204, first data processing module 205, display module 206 and commanded response module 207.
Below be the course of work that example is set forth each module in above-mentioned steps and the client with embedded device visit WEB website.First communication module 201 is according to microbrowser
The address of server is initiated connection request by the http mode to server, can carry the network address of client desire visit and the parameter information of embedded device in this request.Microbrowser can be when each request, obtain the relevant information of soft, hardware (as the device screen size by the DLL (dynamic link library) of embedded device, operation of equipment mode, equipment supporting documentation type and attachment format, equipment free memory body, equipment can use permanent storage body, equipment to support parameter and information such as colorfulness), be sent to server by sending a request message, so that server assists to carry out the pre-adaption function of embedded device; In addition, also can be simultaneously show status requirement that size, picture show, whether support characteristic such as felt pen click to carry out the local adaptive of equipment, so that microbrowser of the present invention can be adapted to the embedded device of different screen size according to the font of embedded device Set For Current.
The client of microbrowser also can embed different enciphering and deciphering algorithms as required, can also comprise the first coding/decoding module 203, is carrying out before the communication data being encrypted with server, and according to the importance of data, is providing corresponding key strength.For example, landing password at the user uses the unsymmetrical key RSA Algorithm to encrypt; At general user data, use the lightweight cryptographic algorithm, for example BouncyCastle Crypto mode is carried out encryption and decryption to data.
When browser of the prior art is browsed a webpage that comprises literal and picture, usually need send once request to each width of cloth picture, and the present invention is by the once request of user end to server end transmission of browser, server returns with all data are disposable, thereby can in request once, data processing be finished and represent like this, and need not repeatedly obtain data, and avoid repeatedly networking, thus the faster and browsing page of low discharge more.
After the HTTP connection, client will get access to the data format after the server code, decode by the first coding/decoding module 203.In order more to save flow, microbrowser can also increase the compression/decompression module, compressed before data send, and carry out decompress(ion) after receiving data.Therefore, client can also comprise the first compression/decompression module 202, will be after the data compression transmits at network, not only can accelerate the access efficiency used greatly, can also reduce network traffic data, for the user saves cost of use.The data that if the data that client is received are server after compressing, then it is carried out decompress(ion) by the first compression/decompression module 202, again carry out layout and represent calculating by the screen size of back by 205 pairs of decompress(ion)s of first data processing module and decoded data based display module 206 of decoding then, show that according to screen size, the font of client size shows the adaptive of aspect.Last 206 pairs of data of display module show.
The layout that first data processing module 205 calculates webpage is promptly calculated the position of each element in painting canvas.For literal, in the length of calculating literal, if surpass the length of screen, then line feed.Otherwise directly describe.For picture, server can transmit the picture according to the device screen uniform zoom, and whether decision represents between two parties according to server, directly represents to get final product.For control, then describe according to the form of various controls.
In the present invention, the element that shows on display module 206 can comprise: text, picture, straight line and control.Comprise focus element and non-focus element in the page info of the html format that obtains.Every kind of a kind of display space of element representation.When representing, describe non-focus element and focus element one by one.
In a preferred embodiment, user interface can be simple and efficient interface, and display web page content in big zone as much as possible.As a preferred embodiment, for displaying web page content comprehensively, the interface of display module 206 can be divided into simple three zones, be respectively title bar, service area and status bar.
Title bar is used for representing basic information, for example title of the page and time etc.
The service area is used for the content of displaying web page.If web page contents surpasses the height of service area, need scroll bar, and support roll display.
Status bar is used for showing the title and the progress bar of left and right sides soft key.
The interface of display module 206 has two states: the page loading process and the page load and finish.Will the progress displaying bar in the page loading process, the page then shows common left and right sides soft key after loading and finishing.
The screen of (as mobile phone etc.) is very little because embedded device, can not show all contents according to 800 * 600 of generic browser, even the mode of rolling about providing also is difficult to represent, rolling can cause the inconvenience of move left and right in addition, and rolling just can browse about needing repeatedly finishes.For this reason, 206 pairs of webpages of display module represent and are set at scroll-up/down in one embodiment of the present of invention, about do not roll, the width that represents according to screen of webpage represents, and highly then decides according to the content of webpage.
The user can carry out man-machine interactive operation by the commanded response module 207 of microbrowser.Commanded response module 207 is supported two kinds of operations usually: keyboard operation and pointer operation, and the keyboard operation main mode of operation of embedded device normally, the keyboard of embedded device has defined numerical key usually, navigation key and left and right sides soft key.Respond user's operation by function key, but the key assignments difference of different embedded devices, in order to make microbrowser of the present invention have versatility for various embedded devices, the commanded response module at first is transformed into key assignments predefined key assignments, realizes the key assignments conversion of different embedded devices by judging this predefined key assignments.
Navigation key be used for navigating each element of service area, the operation of service area comprises the moving focal point element, chooses focus element.For example up and down page turning etc., can by on move, move down, move to left, move to right and Fire is good for and realizes.Commanded response module 207 is by response corresponding instruction trigger event.
Numerical key is as the shortcut of menu, and during the user click numerical key, commanded response module 207 is caught corresponding key assignments, easily every function of calling system.And should be set by the user shortcut.
The operation of embedded device can also be operated by the mode of writing pen.Writing pen is a kind of by x, and the mode of y coordinate is located.
By mobile phone screen being divided into three parts, and judge separately position.Thereby trigger its real operation.
One embodiment of the present of invention also provide in order to support can also support the solution of abundanter media formats except the document of html format.For this reason, the client of microbrowser of the present invention provides a kind of media structure that can expand, just can support multiple media formats by the mode of accredited media type.Client at first will be checked the medium type that embedded device can be supported, resolve every kind of medium type by the mode of judging each medium type, and calling different players according to different media types, server then determines whether transmitting and coding according to client support media type.
In addition, in order to reduce access to netwoks, the microprocessor of client can also comprise first memory module, can store the page of having visited, to improve user's experience and efficient, make the user need not open webpage all needs accesses network at every turn.By first memory module, user's operation web page that can move forward and backward.For what make visit is not webpage in first memory module, can refresh by the process that the page is obtained in networking again.
Client of the present invention can also comprise bookmark, and bookmark is the function of a convenience, helps the user to remember network address commonly used.Bookmark is made of title and network address.The user can increase newly, editor and the deletion bookmark, also can very easily webpage be saved in the bookmark, and open bookmark promptly can accessed web page.As preferred embodiment, bookmark is that persistence is preserved, can preserving by RMS.
In addition, this microbrowser can also comprise history module, and corresponding website can be opened like this in the website of recording user ever accessed from the record of history.History module is similar to first memory module, the web page contents of first memory module storage, and the history module storage is the access history of webpage.As preferred embodiment, the information of history module record is that persistence is preserved, and preserves by RMS.
Below be as the means of communication and the corresponding server architecture of the server end of microbrowser among the embodiment.
Server provided by the invention according to the information such as device parameter that client transmits, carries out adaptive, conversion, further coding and compression after receiving the request that client sends.
At the course of work of above server, this server can comprise second communication module 301, second parsing module 303, second data processing module 304, can also comprise account management module 307, the second compression/decompression module 306, the second coding/decoding module 305 etc. in addition.
Second communication module 301 receives the request message that client sends, and obtain corresponding HTML network data (present embodiment is that example is set forth with visit WEB website still) from the webserver, and the network data that gets access to is routed to other moulds certainly handles according to wherein parameter.
The HTML network data that 303 pairs second communication modules of second parsing module 301 send is resolved, and can comprise operations such as HTML syntactic analysis, grammer fault-tolerant processing, page elements extraction, CSS syntax parsing.
In addition, server provided by the invention can be discerned equally for the network data of the non-HTML that gets access to, for reaching this purpose, this server can also comprise format converting module 302, when receiving the network data of non-html format, the network data (network data of obtaining when for example visiting the WAP website) that is converted into html format (S104).
HTML network data after 304 pairs of parsings of second data processing module is handled, for example adaptive by data are carried out, the file format of page info is changed etc., further, in order to increase the confidentiality of transmission, the second coding/decoding module 305 can also carried out the enciphering/deciphering operation to page info before client sends data, this operation is corresponding with the enciphering/deciphering operation of client.Further, the second coding/decoding module 305 of server end can also be supported how high-intensity cryptographic algorithm (for example DES, RC2) as required, is connected and transmits so that carry out safe data with destination server.In addition, can also compress by 306 pairs of data of the second compression/decompression module etc.
The adaptation procedure of second data processing module 304 can be that relevant information according to soft, the hardware of embedded device wherein is (as the device screen size, operation of equipment mode, equipment supporting documentation type and attachment format, equipment free memory body, equipment can use permanent storage body, equipment to support parameter and information such as colorfulness), carry out the pre-adaptation processing of embedded device, for example, microbrowser on certain mobile phone terminal is only supported the picture of JPG and PNG, if the picture format in the page that obtains is GIF, then be converted to the JPG form; And for example, if the screen size of embedded device only is 172 * 208, and dimension of picture is excessive, then carries out convergent-divergent on year-on-year basis according to screen size; If the size of the page has surpassed mobile phone available cache memory size, then automatically the page is carried out segmentation, and the paragraph of formulating (for example, being defaulted as first section) is sent to the client of microbrowser.
In addition, directly on the small screen of embedded system, carry out unified demonstration, so data processing module can also be reset operation to the page because internet page is difficult.
Second data processing module 304 can also comprise the various modules that file format is changed, for example, can realize the module of the functions such as format conversion of the module of the format conversion of the module of the format conversion of different pictures, different annexes, different compressed files, concrete function can be expanded according to user's demand.For example, different mobile phone terminal screen size differences, revealable picture format is also variant, and the picture that this has caused using on the page possibly can't correctly represent on certain mobile phone terminal, also may only represent the part of picture because of terminal screen is too little.This module can be carried out dynamic translation and processing to picture according to the characteristic of mobile phone terminal, allows different mobile phone terminals can represent all pictures on the page correctly, fast.The picture file transform engine is supported conversion and the pretreatment operation to picture file forms such as GIF, JPG, BMP, WBMP, PNG, and can optimize in advance and squeeze operation picture.
This data processing module can also comprise discerns module with the function of format conversion to office document (comprising DOC, PDF, XLS, PPT, EML) commonly used, makes the user browse these files efficiently on microbrowser.
This data processing mould certainly can have discerns function with format conversion to compressed file (comprising ZIP, RAR, GZIP, GZ etc.) commonly used, makes the user browse these files efficiently on microbrowser.In addition, may contain multi-level bibliographic structure in the compressed file format, this module can also increase the respective directories navigation menu, to realize the complete operation of compressed format files at mobile phone terminal.
Music, the video format supported because of different mobile phone terminals have suitable difference.Music, video transform engine can help more mobile phone to read music video forms such as MID, WAV, AMR, 3GP.
In addition, server provided by the invention can also comprise account management module 307, to satisfy the demand of a plurality of customer access networks.Because the website of each user capture is different with Cookie, browsing of each user will have independent memory space.Each user's visit has the Cookie management space of oneself, distributes a user ID when each user browses for this reason, by account management module each user ID is managed.In the time of the client access server first time, server will distribute an ID for the user, sends client storage then to.Conduct interviews with this user ID later at every turn.
In addition, the present invention can visit custom web site.This custom web site is on the original web basis, behind structural adjustment and page reset, is fit to the website of small-screen embedded equipment browses such as mobile phone.Because original web is for the design of the browser of computer, therefore needs through certain optimization.Browser of the present invention also has the adaptive mould of application and determines, with the complex Web page or the application page, carry out the extracting of intelligence, filter, reset, optimize and the content adjustment manufacturing process of complete custom web site, so that the user can browse fast, and obtain best result of browse on portable terminal.
Above-described embodiment of the present invention does not constitute the qualification to protection range of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection range of the present invention.