Summary of the invention
The relatively poor problem of effect that in user terminal, shows to the layout files that exists in the prior art; The present invention provides a kind of method and device of adjusting the layout files space of a whole page; With the rationality of raising, thereby improve the display quality of layout files in user terminal to the composing of layout files.
A kind of method of adjusting the layout files space of a whole page comprises:
Receive the request of obtaining that user terminal sends, this request of obtaining carries the screen size information of the fileinfo and the said user terminal of layout files;
Orient corresponding layout files according to said fileinfo, and extract the data content of this layout files;
According to said screen size information and the data content that extracts, generate file destination, the size of the space of a whole page size of this file destination and the screen of said user terminal adapts.
A kind of device of adjusting the layout files space of a whole page comprises:
The request receiving element is used to receive the request of obtaining that user terminal sends, and this request of obtaining carries the screen size information of fileinfo He this user terminal of layout files;
The data content extraction unit is connected with the described request receiving element, is used for orienting corresponding layout files according to the fileinfo that obtains request, and extracts the data content of this layout files;
The layout files generation unit; Be connected with the described request receiving element with said data content extraction unit respectively; Be used for according to the said screen size information of request and the data content that said data content extraction unit extracts of obtaining; Generate file destination, the size of the space of a whole page size of this file destination and the screen of said user terminal adapts.
In the embodiment of the invention; Obtaining when asking of the screen size information that carries this user terminal that the reception user terminal sends; Navigate to corresponding layout files and extract the data content of this layout files; And generate the file destination that the size of the screen of space of a whole page size and said user terminal adapts according to the data content that extracts; Because the size of the space of a whole page size of the file destination that generates and the screen of user terminal adapts, and has improved the rationality that file destination is set type, thereby has improved the display quality of layout files in user terminal to a certain extent.
Embodiment
Technical matters to the prior art existence; The embodiment of the invention provides a kind of method and device of adjusting the layout files space of a whole page; Improve the rationality that file destination is set type, thereby improved the display quality of layout files in user terminal to a certain extent.This method comprises: user terminal carries layout files to obtaining of sending of layout files server in the request the fileinfo and the screen size information of this user terminal; The layout files server is oriented corresponding layout files according to the fileinfo that obtains in the request; And extract the data content of this layout files; And according to the screen size information in the request of obtaining, the data content that extracts, the file destination that the size of the screen of generation space of a whole page size and user terminal adapts.Adopt technical scheme of the present invention; Because the size of the space of a whole page of the file destination that version server generates and the size of user terminal screen adapt; Thereby make the space of a whole page of file destination more meet the size of the screen of user terminal; The data content that has improved layout files is presented at sharpness and integrality in the user terminal, has improved the display quality of layout files in user terminal to a certain extent.
Below in conjunction with Figure of description technical scheme of the present invention is carried out detailed description.
Referring to Fig. 1, for the present invention is the method flow diagram of the adjustment layout files space of a whole page among the embodiment, the method comprising the steps of:
Step 101, layout files server receive the request of obtaining that user terminal sends, and this obtains the fileinfo that comprises layout files in the request and the screen size information of said user terminal.
Step 102, layout files server are oriented corresponding layout files according to the fileinfo that obtains in the request, and are extracted the data content of this layout files.
Step 103, layout files server generate file destination according to the data content that said screen size information and the step of obtaining in the request 102 extracts, and the size of the space of a whole page size of this file destination and the screen of said user terminal adapts.
The step 102 of above-mentioned flow process; Specifically comprise: the layout files server is resolved the request of obtaining; Parsing obtains the screen size information of the fileinfo and the user terminal of layout files, and according to the fileinfo that parsing obtains, determines the memory location and the decruption key of layout files; Navigate to corresponding layout files according to the memory location of determining; And adopt the decruption key of determining that the page number of request is deciphered and navigated to the layout files of orienting, from this page number, obtain data contents such as text, picture, form or video.
In the above-mentioned flow process 103; Specifically comprise: the layout files server adopts the file generating algorithm that is provided with in advance that the data content that gets access to is generated file destination; And in generative process; According to the screen size information of user terminal, position, the size of data content are adjusted accordingly, adapt with the size of the screen of the size of the space of a whole page of the file destination guaranteeing to generate and said user terminal.The size of the space of a whole page size of file destination and the screen of user terminal adapts, and can be that the width of the space of a whole page of file destination is identical with the width of the screen of user terminal.
Preferably, above-mentioned flow process also comprises:
Step 104, layout files server send to said user terminal with the file destination that generates, so that user terminal shows this file destination on its screen.
In the embodiment of the invention; User terminal sends layout files to the layout files server and obtains request; Specifically comprise: user terminal is through the browser of self; From the layout files application system, navigating to this user terminal needs the layout files of online browse, and from the layout files application system, obtains and the corresponding fileinfo of this layout files; User terminal starts the size that browser detected and obtained the screen of this user terminal, and generates screen size information; User terminal generates and to obtain Intra-request Concurrency and give the layout files server, and this obtains the fileinfo that carries layout files in the request and the screen size information of this user terminal.
The embodiment of the invention also provides a kind of device of adjusting the layout files space of a whole page, and the structure of this device is as shown in Figure 2.
Referring to Fig. 2, be the structural representation of the device of the adjustment layout files space of a whole page in the embodiment of the invention, this device comprises:
Request receiving element 21 is used to receive the request of obtaining that user terminal sends, and this obtains the fileinfo that comprises layout files in the request and the screen size information of this user terminal.
Data content extraction unit 22 is connected with request receiving element 21, is used for orienting corresponding layout files according to the fileinfo that obtains request, and extracts the data content of this layout files.
Layout files generation unit 23; Be connected with request receiving element 21 with data content extraction unit 22 respectively; Be used for according to the dimension information of the said screen that obtains request and the data content that said data content extraction unit 22 extracts; Generate file destination, the size of the space of a whole page size of this file destination and the screen of said user terminal adapts.
The data content how above-mentioned data content extraction unit 22 extracts in the layout files can adopt aforementioned manner, repeats no more at this.
How above-mentioned target version generation unit 23 generates space of a whole page size and the measure-alike file destination of user terminal screen, can adopt aforementioned manner, repeats no more at this.
Preferably, said apparatus can also comprise:
Layout files transmitting element 24 is connected with target version generation unit 23, is used for the file destination that layout files generation unit 23 generates is sent to user terminal.
With a comparatively detailed method flow technical scheme of the present invention is carried out detailed description below, this method flow as shown in Figure 3 comprises:
Step 301, user terminal obtain the fileinfo of the layout files of user's needs from the layout files application system through its browser.
Step 302, user terminal start the corresponding size (length and the wide information that comprise screen) of screen that its browser detected and obtained this user terminal automatically, and generate screen size information according to the corresponding size of screen.
Step 303, user terminal generate to be obtained Intra-request Concurrency and gives the layout files server, and this obtains the fileinfo that carries layout files in the request and the screen size information of user terminal.
The request receiving element 21 of step 304, layout files server receives the request of obtaining that user terminal sends; This request of obtaining is resolved, and fileinfo and the screen size information that parsing obtains is sent to layout files data in server contents extraction unit 22.
Step 305, data content extraction unit 22 are according to the fileinfo that receives; Determine the memory location and the decruption key of layout files; And navigate to corresponding layout files according to the memory location; The page number of request is deciphered and navigated to the decruption key that employing is determined to the layout files of orienting, and from this page number, obtains data contents such as text, picture, form or video, and the data content that obtains is sent to the layout files generation unit 23 of layout files server.
Step 306, layout files generation unit 23 adopt the file generating algorithm that is provided with in advance that the data content that gets access to is generated file destination; And in generative process; Screen size information according to user terminal; Position, size to the data content are adjusted accordingly, adapt with the size of the screen of the size of the space of a whole page of the file destination guaranteeing to generate and said user terminal, and file destination is sent to layout files transmitting element 24.
Step 307, layout files transmitting element 24 send to file destination and initiate to obtain the requesting users terminal.
The browser of step 308, user terminal is presented at file destination on the screen of user terminal, so that the user browses.
Layout files application system in the embodiment of the invention can be the digital resource platform; User terminal is oriented layout files from the layout files application system; Specifically can for: user terminal at digital resource platform input keyword " digital publishing "; From the index structure tabulation, choosing need be by the layout files of page browsing; The form of this layout files can be CEB (Chinese E-paper Basic) or CEBX (Common e-Document of Blending XML is based on the common electronic document that mixes XML) form.
In the embodiment of the invention; When user terminal is asked to obtaining of layout files server transmission; Obtain the screen size information that carries this user terminal in the request at this; Therefore, when the layout files server navigates to corresponding layout files and from this layout files, extracts corresponding data content, generate the file destination that the size of the screen of space of a whole page size and said user terminal adapts according to the data content that extracts; Because the space of a whole page size of the file destination that generates and the screen of user terminal is measure-alike; Thereby make the space of a whole page of file destination more meet the size of the screen of user terminal, the data content that has improved layout files is presented at sharpness and integrality in the user terminal, has improved the display quality of layout files in user terminal to a certain extent.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.