Invention content
The technical issues of in view of occurring in the related technology, technical problem to be solved by the present invention lies in provide one kind
Layout files display technology reduces data traffic under the premise of not influencing user experience.
In view of this, according to an aspect of the invention, there is provided a kind of server, including:Communication unit, for receiving
Browse request from client, and by image processing unit treated processing after content be sent to the client;Know
Other unit, the type page for when receiving the browse request, identifying target resource;Described image processing unit, for giving birth to
Image procossing is carried out at the content with format for the type page, and to the content with format, it is described to obtain
Content after processing.
What it is due to generation is the content with format for being directed to type page, eliminates " white edge " in original format set type file,
And then reduce the data traffic of online browse, and image procossing further is carried out to the content with format, greatly reduce
Network flow, and the browsing content due to remaining layout files, will not influence the clear of important content information
It lookes at.
According to another aspect of the present invention, a kind of terminal is additionally provided, including:Communication unit, for being sent to server
Browse request, and receive content after the processing from the server;Unit for scaling, for big according to the screen of the terminal
The size of content after the small and described processing, zooms in and out content after the processing, obtains display content;Display unit is used for
Show the display content that the unit for scaling obtains.
According to another aspect of the invention, a kind of layout files display methods is additionally provided, including:It is receiving from visitor
When the browse request at family end, the type page of target resource is identified, generate the content with format for the type page;To the tool
It is sent to the client after having the content of format to carry out image procossing, so that the client is shown.
What it is due to generation is the content with format for being directed to type page, eliminates " white edge " in original format set type file,
And then reduce the data traffic of online browse, and image procossing further is carried out to the content with format, greatly reduce
Network flow, and the browsing content due to remaining layout files, will not influence the clear of important content information
It lookes at.
Therefore, according to the technique and scheme of the present invention, what is transmitted between client and server is after removing " white edge "
Content with format, while the word segment in transferring content is also carried out black and white processing by server end, improves compressing file
The collective effect of rate, two methods is the reduction of transferring content, reduces data volume, and it is online clear in progress also just to save user
Data traffic when looking at.Simultaneously by carrying out pattern processing in client, aesthetic problem when webpage imaging is also taken into account, has been improved
User experience.Further, since server end remains original layout files, can also be selected when client screen is larger
It is browsed by original layout files.
Specific implementation mode
To better understand the objects, features and advantages of the present invention, below in conjunction with the accompanying drawings and specific real
Mode is applied the present invention is further described in detail.It should be noted that in the absence of conflict, the implementation of the application
Feature in example and embodiment can be combined with each other.
Many details are elaborated in the following description to facilitate a thorough understanding of the present invention, still, the present invention may be used also
To be implemented different from other modes described here using other, therefore, the present invention is not limited to following public specific realities
Apply the limitation of example.
Fig. 1 shows the block diagram of server according to an embodiment of the invention.
As shown in Figure 1, server 100 according to an embodiment of the invention, including:Communication unit 102 comes from for receiving
The browse request of client, and by image processing unit 106 treated processing after content be sent to client;Recognition unit
104, the type page for when receiving browse request, identifying target resource, such as the type page 402 in Fig. 4;Image processing unit
106, image procossing is carried out for generating the content with format for type page, and to the content with format, to obtain everywhere
Content after reason.
What it is due to generation is the content with format for being directed to type page, eliminates the white edge in original format set type file(Such as
White edge 404 in Fig. 4), and then reduce the data traffic of online browse, and figure further is carried out to the content with format
As processing, network flow, and the browsing content due to remaining layout files are greatly reduced, weight will not be influenced
Want the browsing of content information.
Preferably, image processing unit 106 with the text information part in the content of format for will carry out at black and white
Reason generates black white image, and retains the gray level image format of the non-legible message part in the content with format.
After carrying out black and white processing to text information part, compression ratio can be improved, to reduce data traffic, saved for user
Resource-saving.
Preferably, server 100 can also include:Judging unit 108 includes the screen message of client in browse request
When, judge whether the size of client screen exceeds screen size preset value, is determined whether target directly according to judging result
Resource is sent to client.
When client screen is smaller, after layout files is removed white edge, important content part capable of enlarged displaying, to improve
User experience can be not necessarily to server and carry out associated picture processing when client screen is larger, to mitigate the burden of server,
Therefore, it is possible to provide selected to user, if to carry out relevant image procossing.
Fig. 2 shows the block diagrams of terminal according to an embodiment of the invention.
As shown in Fig. 2, terminal 200 according to an embodiment of the invention, including:Communication unit 202 is used for server
(Such as server 100 shown in FIG. 1)Browse request is sent, and receives content after the processing from the server;Scaling is single
Member 204 zooms in and out content after above-mentioned processing, obtains for the size according to content after the screen size of terminal 200 and processing
To display content;Display unit 206, the display content obtained for showing unit for scaling 204.
Preferably, terminal 200 can also include:Pattern processing unit 208 carries out at pattern the display content after scaling
Reason, display unit 106 is based on pattern, and treated that content is imaged.
After layout files is removed white edge, the content with format that can be obtained to processing is amplified display or diminution
Display for beauty or meets user's custom to meet display effect requirement, can be that the content with format increases corresponding sample
Formula, such as background color, font format, underscore etc..
Therefore, transmitted between client and server according to the present invention be remove " white edge " after in format
Hold, while the word segment in transferring content is also carried out black and white processing by server end, improves compressing file rate, two methods
Collective effect be the reduction of transferring content, reduce data volume, also just save data of the user when carrying out online browse
Flow.Simultaneously by carrying out pattern processing in client, aesthetic problem when webpage imaging is also taken into account, user's body is improved
It tests.Further, since server end remains original layout files, can also be selected by original when client screen is larger
Layout files browsed.
Fig. 3 shows the schematic diagram of layout files display system according to an embodiment of the invention.As shown in figure 3, service
Device 100 is handled target resource after the browse request for receiving terminal 200, including removal white edge, word segment it is black
White processing etc..Content after processing is sent to terminal 200.In end side, terminal 200 zooms in and out place to content after the processing
Reason shows content to make full use of screen size, and can be to carry out pattern processing to content after processing, to improve user's body
It tests.
Fig. 5 shows the flow chart of layout files display methods according to an embodiment of the invention.
As shown in figure 5, layout files display methods according to an embodiment of the invention, including:Step 502, it is receiving
When browse request from client, the type page of target resource is identified, generate the content with format for type page;Step
504, it is sent to client after carrying out image procossing to the content with format, so that client is shown.
What it is due to generation is the content with format for being directed to type page, eliminates " white edge " in original format set type file,
And then reduce the data traffic of online browse, and image procossing further is carried out to the content with format, greatly reduce
Network flow, and the browsing content due to remaining layout files, will not influence the clear of important content information
It lookes at.
In the above-mentioned technical solutions, it is preferred that with format content carry out image procossing process include:To have
Text information part in the content of format carries out black and white processing, generates black white image, and retain in the content with format
The gray level image format of non-legible message part.After carrying out black and white processing to text information part, compression ratio can be improved, to
Data traffic is reduced, resource is saved for user.
In the above-mentioned technical solutions, it is preferred that size of the client according to client screen and the content with format
Size zooms in and out the content with format, obtains display content.
Preferably, layout files display methods according to the present invention can also include:Pattern processing is carried out to display content,
Based on pattern, treated that content carries out imaging shows.After layout files is removed white edge, what can be obtained to processing has version
The content of formula is amplified display or reduces display, to meet display effect requirement, for beauty or meets user's custom, can be
Content with format increases corresponding pattern, such as background color, font format, underscore etc..
Preferably, layout files display methods according to the present invention can also include:Include client in browse request
When screen message, judge whether the size of client screen exceeds screen size preset value, is determined whether directly according to judging result
It connects and target resource is sent to client.It is capable of enlarged displaying heavy after layout files is removed white edge when client screen is smaller
Content part is wanted, to improve user experience, when client screen is larger, server can be not necessarily to and carry out associated picture processing, with
Mitigate the burden of server, therefore, it is possible to provide selected to user, if to carry out relevant image procossing.
Layout files browsing method according to the present invention is further illustrated with reference to Fig. 6 and Fig. 7.
As shown in fig. 6, target resource is stored in server end after machining, the processing procedure of server end includes:
A1:After server end obtains the online browse request of client, the target resource for treating browsing carries out type page identification
Operation generates the content with format just for type page, to eliminate the white edge in target resource.
A2:Server end carries out image procossing to the content after identification type page and content is sent to client by treated
End, wherein image procossing is divided into two classes:
A) the text information part in the content after identification type page is subjected to black and white processing, becomes black white image.
B) by the non-legible message part in the content after identification type page, retain its original gray level image mode.
As shown in fig. 7, the processing procedure of client includes:
A3:Content after client acquisition server-side processes are good, according to the actual size of online browse client screen
And the size and location with format content, processing is zoomed in and out, makes full use of screen size to show content.
A4:Pattern processing is carried out to displaying content in client, takes into account aesthetic problem when webpage imaging.
A5:Pattern handling result is finally illustrated in client.
Through the above technical solutions, when online browse terminal is imaged, server end utilizes type page recognition methods,
It is positioned, only extracts type page content, while need not wherein will carry out black and white processing with the part of iamge description, improve compression
Rate, by treated, result is transmitted, to reduce its data traffic.Simultaneously when client forms webpage in view of beautiful,
Pattern processing is carried out to it, the user experience is improved.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, any made by repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.