Background technology
At present, when user needs to obtain, from layout files application system, the layout files needing online browse, from application system, orient, according to keyword retrieval, the layout files that user terminal needs by the browser of user terminal, and at this layout files of browser display of user terminal.
Layout files server is that the size of the space of a whole page of layout files definition is bigger, owing to the screen size of user terminal is smaller, therefore, content in the original space of a whole page that can not show layout files the most on the screen of the user terminal or the space of a whole page that layout files can not be shown in the screen of user terminal completely, therefore, after needing layout files server that user terminal needs the space of a whole page of the layout files browsed be adjusted, then show this layout files on the screen of the user terminal.At present, the mode that the space of a whole page of layout files is adjusted by layout files server is mainly: extracted by data content corresponding for layout files, the content file of one fixed dimension of regeneration is also sent to user terminal, including said extracted word content out in this content file, the content file received is browsed in its browser by user terminal;Or, layout files server adds, in the content file generated, the pattern that the browser of user terminal is capable of identify that, by browser according to the space of a whole page size of the automatic Suitable content file of the pattern in content file.
Layout files server generates the content file of fixed dimension, the difference arranged due to the size of the display screen of different user terminals, the space of a whole page size using the content file that this kind of mode still can exist fixed dimension is not to be suitable for all of user terminal, when some screen size differs bigger user terminal displays content file with fixed dimension, yet suffer from layout files content and show that unintelligible or space of a whole page content shows incomplete situation, the problem still suffering from display quality poor (content shown in as is unintelligible);Layout files server adds, in the content file generated, the pattern that the browser of user terminal enough identifies, owing in content file, data source is of a great variety, not only include word content, and may also contain picture, form, the multiple data such as video, the browser of user terminal is poor to the space of a whole page self-adaptative adjustment ability of layout files, the browser using user terminal carries out the effectiveness comparison difference of self-adaptative adjustment according to the pattern in content file, therefore, this kind of mode is used to yet suffer from the problem that layout files display quality in the screen of user terminal is poor.
Summary of the invention
The problem that the effect that shows in the user terminal for layout files present in prior art is poor, the present invention provides a kind of method and device adjusting format file layout, to improve the reasonability of the typesetting to layout files, thus improve layout files display quality in the user terminal.
A kind of method adjusting format file layout, including:
Receiving the acquisition request that user terminal sends, this acquisition request carries fileinfo and the screen size information of described user terminal of layout files;
Orient corresponding layout files according to described fileinfo, and extract the data content of this layout files;
According to described screen size information and the data content extracted, generating file destination, the space of a whole page size of this file destination adapts with the size of the screen of described user terminal.
A kind of device adjusting format file layout, including:
Request reception unit, for receiving the acquisition request that user terminal sends, this acquisition request carries the fileinfo of layout files and the screen size information of this user terminal;
Data content extraction unit, is connected with described request reception unit, for orienting corresponding layout files according to the fileinfo obtained in request, and extracts the data content of this layout files;
Layout files signal generating unit, it is connected with described data content extraction unit and described request reception unit respectively, for the data content extracted according to the described screen size information obtained in request and described data content extraction unit, generating file destination, the space of a whole page size of this file destination adapts with the size of the screen of described user terminal.
In the embodiment of the present invention, when receiving the acquisition request of the screen size information carrying this user terminal that user terminal sends, navigate to corresponding layout files and extract the data content of this layout files, and the file destination that the size of the screen generating space of a whole page size and described user terminal according to the data content extracted adapts, the space of a whole page size of file destination owing to generating adapts with the size of the screen of user terminal, improve the reasonability that file destination is carried out typesetting, thus improve layout files display quality in the user terminal to a certain extent.
Detailed description of the invention
The technical problem existed for prior art, the embodiment of the present invention provides a kind of method and device adjusting format file layout, improve the reasonability that file destination is carried out typesetting, thus improve layout files display quality in the user terminal to a certain extent.The method includes: user terminal carries the fileinfo of layout files and the screen size information of this user terminal in the acquisition request that layout files server sends;Layout files server orients corresponding layout files according to the fileinfo obtained in request, and extract the data content of this layout files, and according to the screen size information obtained in request, the data content extracted, the file destination that the size of the screen generating space of a whole page size and user terminal adapts.Use technical solution of the present invention, owing to the size of the space of a whole page of the file destination of version server generation adapts with the size of user terminal screen, so that the space of a whole page of file destination more meets the size of the screen of user terminal, the data content that improve layout files shows definition in the user terminal and integrity, improves layout files display quality in the user terminal to a certain extent.
Below in conjunction with Figure of description, technical solution of the present invention is described in detail.
Seeing Fig. 1, be to adjust the method flow diagram of format file layout in embodiment for the present invention, the method comprising the steps of:
Step 101, layout files server receive the acquisition request that user terminal sends, and this acquisition request includes fileinfo and the screen size information of described user terminal of layout files.
Step 102, layout files server orient corresponding layout files according to the fileinfo obtained in request, and extract the data content of this layout files.
The data content that step 103, layout files server extract according to the described screen size information obtained in request and step 102 generates file destination, and the space of a whole page size of this file destination adapts with the size of the screen of described user terminal.
The step 102 of above-mentioned flow process, specifically include: acquisition request is resolved by layout files server, resolve and obtain the fileinfo of layout files and the screen size information of user terminal, and the fileinfo obtained according to parsing, determine storage position and the decruption key of layout files;According to the storage location positioning determined to corresponding layout files, and use the decruption key determined the layout files oriented to be decrypted and navigated to the page number of request, from this page number, obtain the data contents such as text, picture, form or video.
In above-mentioned flow process 103, specifically include: layout files server uses the file generated algorithm pre-set that the data content got is generated file destination, and during generating, screen size information according to user terminal, position, the size of data content is adjusted correspondingly, to guarantee that the size of the space of a whole page of the file destination generated adapts with the size of the screen of described user terminal.The space of a whole page size of file destination adapts with the size of the screen of user terminal, 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.
It is preferred that above-mentioned flow process also includes:
The file destination of generation is sent to described user terminal by step 104, layout files server, in order to user terminal shows this file destination on its screen.
In the embodiment of the present invention, user terminal sends layout files to layout files server and obtains request, specifically include: the user terminal browser by self, from layout files application system, navigate to this user terminal need the layout files of online browse, and from layout files application system, obtain the fileinfo corresponding with 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 acquisition request Concurrency and gives layout files server, carries the fileinfo of layout files and the screen size information of this user terminal in this acquisition request.
The embodiment of the present invention also provides for a kind of device adjusting format file layout, and the structure of this device is as shown in Figure 2.
Seeing Fig. 2, for adjusting the structural representation of the device of format file layout in the embodiment of the present invention, this device includes:
Request reception unit 21, for receiving the acquisition request that user terminal sends, comprises the fileinfo of layout files and the screen size information of this user terminal in this acquisition request.
Data content extraction unit 22, is connected with request reception unit 21, for orienting corresponding layout files according to the fileinfo obtained in request, and extracts the data content of this layout files.
Layout files signal generating unit 23, it is connected with data content extraction unit 22 and request reception unit 21 respectively, the data content extracted for the dimension information according to the described screen obtained in request and described data content extraction unit 22, generating file destination, the space of a whole page size of this file destination adapts with the size of the screen of described user terminal.
How above-mentioned data content extraction unit 22 extracts the data content in layout files, can use aforementioned manner, not repeat them here.
How above-mentioned target version signal generating unit 23 generates the file destination that space of a whole page size is equivalently-sized with user terminal screen, can use aforementioned manner, not repeat them here.
It is preferred that said apparatus can also include:
Layout files transmitting element 24, is connected with target version signal generating unit 23, for the file destination that layout files signal generating unit 23 generates is sent to user terminal.
With a most detailed method flow, technical solution of the present invention is described in detail below, the method flow process as it is shown on figure 3, include:
Step 301, user terminal obtain the fileinfo of the layout files that user needs by its browser from layout files application system.
Step 302, user terminal start its browser and automatically detect and obtain size corresponding to the screen of this user terminal (including the length of screen and wide information), and generate screen size information according to the size that screen is corresponding.
Step 303, user terminal generate acquisition request Concurrency and give layout files server, carry the fileinfo of layout files and the screen size information of user terminal in this acquisition request.
Step 304, the request reception unit 21 of layout files server receive the acquisition request that user terminal sends, this acquisition request is resolved, and the fileinfo that parsing obtained and screen size information are sent to the data content extraction unit 22 of layout files server.
Step 305, data content extraction unit 22 are according to the fileinfo received, determine storage position and the decruption key of layout files, and according to storage location positioning to corresponding layout files, the decruption key determined is used the layout files oriented to be decrypted and navigated to the page number of request, from this page number, obtain the data contents such as text, picture, form or video, and the data content of acquisition is sent to the layout files signal generating unit 23 of layout files server.
Step 306, layout files signal generating unit 23 use the file generated algorithm pre-set that the data content got is generated file destination, and during generating, screen size information according to user terminal, position, the size of data content is adjusted correspondingly, to guarantee that the size of the space of a whole page of the file destination generated adapts with the size of the screen of described user terminal, and file destination is sent to layout files transmitting element 24.
File destination is sent to the user terminal initiating to obtain request by step 307, layout files transmitting element 24.
File destination is shown on the screen of the user terminal by step 308, the browser of user terminal, in order to user browses.
Layout files application system in the embodiment of the present invention can be Digital Resource Platform, user terminal orients layout files from layout files application system, it is specifically as follows: user terminal inputs key word " digital publishing " at Digital Resource Platform, choose from index structure list and need by the layout files of page browsing, the form of this layout files can be CEB (ChineseE-paperBasic) or CEBX (Commone-DocumentofBlendingXML, common electronic document based on mixing XML) form.
In the embodiment of the present invention, user terminal is when the acquisition request that layout files server sends, the screen size information of this user terminal is carried in this acquisition is asked, therefore, when layout files server selection to corresponding layout files and extracts corresponding data content from this layout files, the file destination that size according to the data content generation space of a whole page size extracted with the screen of described user terminal adapts, equivalently-sized due to space of a whole page size and the screen of user terminal of file destination that generate, so that the space of a whole page of file destination more meets the size of the screen of user terminal, the data content that improve layout files shows definition in the user terminal and integrity, improve layout files display quality in the user terminal to a certain extent.
Obviously, those skilled in the art can carry out various change and modification without departing from the spirit and scope of the present invention to the present invention.So, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.