Support content delivering system and the method for multiple terminals
Technical field
The present invention relates to networking technology area, particularly a kind of content delivering system supporting multiple terminals and method.
Background technology
In the current era that network develops rapidly, web page browsing becomes people and obtains the important channel of information.Along with the appearance of the mobile equipment such as mobile phone, panel computer and universal, the platform that user browses webpage is also increasing, and web page browsing behavior is not limited on the desktop computer fixed, and starts to frequently occur on the mobile equipment such as mobile phone and panel computer.But due to the screen size difference of mobile terminals, it is useful in the content of pages on a Terminal Type display screen, is not particularly suited for other-end and shows.Such as at pc end, because computer screen is big, therefore navigation bar is a row<li>, but at mobile phone terminal, because mobile phone screen is little, it is necessary to allowing navigation bar hide, the place of navigation bar changes a button into, and navigation bar original after click occurs with the form of sidebar.In order to make webpage normally show on the screen of different resolution, it is necessary to page data is mated with the data of display screen.
Content Management System (contentmanagementsystem, CMS) is positioned at the software system between WEB front-end (Web server) and back office or flow process (content creation, editor) as one,
Can providing the access to particular content to the one or more clients (such as terminal consumer) being connected to this system by dedicated communications network, CMS is widely used as web page contents publishing tool.The basic thought of CMS is the management and the design that separate content.Pages Design is stored in template, and content is stored in data base or independent file.When a user requests webpage, each several part combines the html page generating a standard.
One Content Management System generally has following key element:
Document template
Script or markup language
With geo-database integration
The inclusion of content is controlled by the special marking being embedded in the page.These labellings are usually unique for a Content Management System.These systems generally have the language support to more complicated operation, such as Python, Perl, or Java etc..
Content Management System is all beneficial to station field signal and creation editor.This maximum of which benefit is able to use template and general design element to guarantee the coordination of whole website.Author only need to adopt a small amount of template code in their document, then energy can be concentrated on the content on design.
On current CMS delivery system, the page data management being different substantially adopted presents the content of different screen, that is: different according to screen, write as multiple Webpage, under this mode, a strong tie it is not set up between data under different screen, it is beneficial to the data to each screen is corresponding to modify, present differentiation display effect, exactly because but there is no strong tie between each data, to want to allow same data show on different screen, then need repeatedly to add same data on different screens, this makes troubles also to the data maintenance in later stage.
In a word, the management of existing this employing is different page data presents different screen content fixed form and has that management is numerous and diverse, safeguard the defect that under different screen, the cost of display data is relatively costly, the efficiency of management is low.Thus need a kind of Content Management System that display data can be carried out high-efficiency management of design badly.
Summary of the invention
Inventor is by after studying existing content delivering system CMS, find that existing content delivering system CMS adopts MySOL to store as data, limit the implication extension of same field, thus for realize same data show on different screen time, technical staff has to adopt different page data management to present the content of different screen, tracing sth. to its source, data store organisation is the emphasis solving existing content delivering system CMS defect.
In order to overcome the deficiencies in the prior art, the present invention proposes when content construction delivery system CMS, adopt MongoDB as the storage organization of bottom, compared with relevant database MySOL, MongoDB is the storage mode of file structure, in field more open, process same level formula data structure time can inquire about more easily and obtain data.Adopting MongoDB as the storage organization of bottom, it is possible to growth data as required, the data being modified under split screen or basis screen can also realize that different screen is done differentiation and show.Data under different screen, in the same page, are classified as same level by the present invention, it is achieved by the displaying content of same set of page management data maintenance different screen, improve the efficiency of management.
The present invention provides a kind of content delivering system supporting multiple terminals, including:
CMS module, is used for storing data to be released, and described data to be released include the data under the screen of basis and the data under split screen;
Acquisition module, for obtaining the page presentation request that terminal is initiated;
Identification module, for identifying UA (UserAgent according to page presentation request, user agent) information, UA is a special string head, is a kind of mark recording browser type and version, client operating system and the information such as version, browser kernel.The UA message reflection of the client hardware platform of client, systems soft ware relevant information;
Data call module, for searching according to UA information and transferring the data to be released with terminal adaptation from CMS module;
Release module, for by with the data publication to be released of terminal adaptation to corresponding terminal.
Specifically, described CMS module adopts MongoDB to store as data.Compared with relevant database, MongoDB has the advantage that
1, MongoDB has weak consistency, more can guarantee that the access speed of user;
2, MongoDB is the storage mode of file structure, it is possible to obtain data more easily;
3, MongoDB can pass through built-in GridFS, it is achieved supports jumbo storage, meets the fast range to large data sets and inquires about.
Further, described data call module is not for when finding the data to be released with terminal adaptation, using the data to be released under the screen of basis as the data to be released with terminal adaptation.
Preferably, the lower data of described basis screen include based on the parameter information of terminal that shields and the data to be released with this terminal adaptation, the data under described split screen include the terminal as split screen parameter information and with the data to be released of this terminal adaptation.The parameter information of described terminal refers to hardware and/or the software information of the terminal of identification from UA information, such as browser type and version, client operating system and the information such as version, browser kernel.
Specifically, described CMS module is additionally operable to the data under fundamentals of management screen and the data under split screen, modifies including to the data under the screen of described basis and the data under split screen, increase and/or deletes.
Correspondingly, the present invention also provides for a kind of content delivery method supporting multiple terminals, including:
The page presentation request that S1, acquisition terminal are initiated;
S2, according to page presentation request identify UA information;
S3, from CMS module, transfer the data to be released with terminal adaptation according to UA information;
S4, by with the data publication to be released of terminal adaptation to corresponding terminal.
Specifically, described CMS module adopts MongoDB to store as data, stores described data to be released.
Specifically, described data to be released include the data under the screen of basis and the data under split screen, the lower data of described basis screen include based on the parameter information of terminal that shields and the data to be released with this terminal adaptation, the data under described split screen include the terminal as split screen parameter information and with the data to be released of this terminal adaptation.
Further, in described step S3, when not finding the data to be released with terminal adaptation, using the data to be released under the screen of basis as the data to be released with terminal adaptation.
Further, described method also includes the data under the screen of described basis and the data under split screen are managed, and modifies including to the data under the screen of described basis and the data under split screen, increase and/or deletes.
Present invention also offers a kind of content delivery method, described method includes: server receives the page presentation request that client sends, client UA information is identified according to the request of described page presentation, according to described UA information inquiry CMS module, from CMS module, transfer the to be released data adaptive with client, data to be released are sent to client;Described CMS module adopts MongoDB to store as data.
The method have the advantages that
The present invention proposes when content construction delivery system CMS, adopts MongoDB as the storage organization of bottom, it is achieved by the displaying content of same set of page management data maintenance different screen, to improve the efficiency of management.Adopt MongoDB as bottom storage organization can growth data as required, be modified the content of corresponding screen and can also realize that different screen is done differentiation and show.By identifying UA source, automatically the data of applicable terminal screen are sent to corresponding terminal, it is achieved automatic adaptation is shown.
Accompanying drawing explanation
In order to be illustrated more clearly that technical scheme, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is present system frame diagram;
Fig. 2 is the functional block diagram of present system;
Fig. 3 is the method flow diagram of the embodiment of the present invention 4;
Fig. 4 is the method flow diagram of the embodiment of the present invention 5.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the premise not making creative work, broadly fall into the scope of protection of the invention.
The present invention provides a kind of content delivering system supporting multiple terminals, use same page management data, safeguard the content of different screen, it is possible to do difference from any granularities such as the page, module, data, titles and present or unify and present, use flexibly and easily.
Embodiment 1
A kind of content delivering system supporting multiple terminals, including: acquisition module, identification module, data call module, release module and multiple CMS module.
Described CMS module, is used for storing data to be released, and described data to be released include the data under the screen of basis and the data under split screen.
Specifically, described CMS module adopts MongoDB to store as data.
Described acquisition module, for obtaining the page presentation request that terminal is initiated.
Described identification module, for identifying UA (UserAgent, user agent) information according to page presentation request;UA is a special string head, is a kind of mark recording browser type and version, client operating system and the information such as version, browser kernel.The UA message reflection of the client hardware platform of client, systems soft ware relevant information.
Described data call module, for searching according to UA information and transferring the data to be released with terminal adaptation from each CMS module;By the user agent of identification terminal, it is possible to differentiate end message, in order to be deployed into the display content adaptive with this terminal demonstration.
Release module, for by with the data publication every to be released of terminal adaptation to corresponding terminal, in the page presentation content that terminal page combination formation is complete.
Present system adopts MongoDB as the storage organization of bottom, MongoDB is a DOM Document Object Model, more open in field, it is not necessary to design in advance, it is suitable for processing the data content of CMS, it is possible to accomplish, from the page, module, data source, different screen screen is done split screen control.Further, user is when creating the page, it is only necessary to create the data under the screen of basis, when different screen is done differentiation display by needs, only need to revise the content of corresponding screen.Based on present disclosure delivery system, when same be linked at different screen initiate request time, it is possible to according to UA identify source, then the incoming corresponding parameter acquiring page, module, data wait until that corresponding screen is presented, it is achieved automatic adaptation show.
Embodiment 2
A kind of content delivering system supporting multiple terminals, including: acquisition module, identification module, data call module, release module and multiple CMS module.
Described CMS module adopts MongoDB to store as data, is used for storing data to be released, and described data to be released include the data under the screen of basis and the data under split screen;
Further, described CMS module is additionally operable to the data under fundamentals of management screen and the data under split screen, modifies including to the data under the screen of described basis and the data under split screen, increase and/or deletes.
Preferably, the lower data of described basis screen include based on the parameter information of terminal that shields and the data to be released with this terminal adaptation, the data under described split screen include the terminal as split screen parameter information and with the data to be released of this terminal adaptation.
Described acquisition module, for obtaining the page presentation request that terminal is initiated.
Described identification module, for identifying UA (UserAgent according to page presentation request, user agent) information, UA is a special string head, is a kind of mark recording browser type and version, client operating system and the information such as version, browser kernel.The UA message reflection of the client hardware platform of client, systems soft ware relevant information
Data with terminal adaptation in each CMS module for inquiring about each CMS module respectively according to UA information, are sent to release module by described data call module.
Specifically, described data call module is for according to each CMS module of UA information searching, CMS module adopts MongoDB to store as data, each CMS module is previously provided with the data under the screen of basis and the data under split screen, the lower data of basis screen include based on the data item for displaying on the terminal of the parameter of terminal shielded and configuration, data under split screen are multiple, corresponding different terminals, the data under described split screen include the parameter of the terminal as split screen and the data item for displaying on the terminal of configuration.The parameter information of described terminal refers to hardware and/or the software information of the terminal of identification from UA information, such as browser type and version, client operating system and the information such as version, browser kernel.By the UA information of acquisition being mated with the information of the terminal of record in CMS module, after the match is successful, transfer the to be released data corresponding with end message.
Release module, for by with the data publication every to be released of terminal adaptation to corresponding terminal, in the page presentation content that terminal page combination formation is complete.
Said system to implement step as follows:
(1) channel is created, new added pages, the page that can support multi-screen is created on content delivering system backstage;
(2) under page listings, newly-increased multiple CMS modules, under each CMS module, create basis screen data.
Present disclosure delivery system adopts MongoDB to store as data, and MongoDB is the storage mode of file structure, more open in field, can inquire about when processing the data structure of same level formula more easily and obtain data.When employing MongoDB is as the storage organization of bottom, it is easy to extension, when multi-screen supported by needs, it is easy to field is carried out multi-screen expansion;Solve the problem adopting the MySQL same field implication brought when storing as data extension difficulty in prior art.
(3) create data source, in data source, add data.
(4) finally by the CMS module created in (two) and data source binding.
(5) receive terminal feedback page presentation request, according to page address identify UA information, it is judged that terminal type and model, inquire about each CMS module respectively according to terminal type, by each CMS module with the data publication of terminal adaptation to corresponding terminal.
The present invention proposes when content construction delivery system CMS, adopt MongoDB as the storage organization of bottom, compared with relevant database MySOL, MongoDB is the storage mode of file structure, in field more open, process same level formula data structure time can inquire about more easily and obtain data.Adopting MongoDB as the storage organization of bottom, it is possible to growth data as required, the data being modified under split screen or basis screen can also realize that different screen is done differentiation and show.Data under different screen, in the same page, are classified as same level by the present invention, it is achieved by the displaying content of same set of page management data maintenance different screen, improve the efficiency of management.
Embodiment 3
A kind of content delivering system supporting multiple terminals, including: acquisition module, identification module, data call module, release module and multiple CMS module.
Described CMS module adopts MongoDB to store as data, is used for storing data to be released, and described data to be released include the data under the screen of basis and the data under split screen;
Further, described CMS module is additionally operable to the data under fundamentals of management screen and the data under split screen, modifies including to the data under the screen of described basis and the data under split screen, increase and/or deletes.
Preferably, the lower data of described basis screen include based on the parameter information of terminal that shields and the data to be released with this terminal adaptation, the data under described split screen include the terminal as split screen parameter information and with the data to be released of this terminal adaptation.
Described acquisition module, for obtaining the page presentation request that terminal is initiated.
Described identification module, for identifying UA (UserAgent according to page presentation request, user agent) information, UA is a special string head, is a kind of mark recording browser type and version, client operating system and the information such as version, browser kernel.The UA message reflection of the client hardware platform of client, systems soft ware relevant information.
Described data call module, for inquiring about each CMS module respectively according to terminal type, if finding the to be released data adaptive with described terminal screen, then transfers this data to be released;If not finding the to be released data adaptive with described terminal screen, then carry out data to be released according to rule set in advance and transfer;When rule set in advance may is that the screen that do not configure in CMS module with current request terminal adaptive data to be released, using the data to be released under the screen of basis as the data adaptive with the screen of present terminal;Or, when not configuring the adaptive data to be released of screen with current request terminal in CMS module, the data to be released transferred the last time are as the data adaptive with the screen of present terminal.
Described CMS module adopts MongoDB to store as data, each CMS module is previously provided with the data under the screen of basis and the data under split screen, the lower data of basis screen include based on the data item for displaying on the terminal of the parameter of terminal shielded and configuration, data under split screen are multiple, corresponding different terminals, the data under described split screen include the parameter of the terminal as split screen and the data item for displaying on the terminal of configuration.The parameter information of described terminal refers to hardware and/or the software information of the terminal of identification from UA information, such as browser type and version, client operating system and the information such as version, browser kernel.
Release module, for by with the data publication every to be released of terminal adaptation to corresponding terminal, in the page presentation content that terminal page combination formation is complete.
Said system to implement step as follows:
(1) channel is created, new added pages, the page that can support multi-screen is created on content delivering system backstage;
(2) under page listings, newly-increased multiple CMS modules, basis screen data are created under each CMS module, if desired realize same content differentiation on different terminals to show, then can choose the screen needing to support, creating split screen data under CMS module, described split screen data include the screen parameter of split screen and adapt to the data to be released of this screen.
Present disclosure delivery system adopts MongoDB to store as data, and MongoDB is the storage mode of file structure, more open in field, can inquire about when processing the data structure of same level formula more easily and obtain data.When employing MongoDB is as the storage organization of bottom, it is easy to extension, when multi-screen supported by needs, it is easy to field is carried out multi-screen expansion;Solve the problem adopting the MySQL same field implication brought when storing as data extension difficulty in prior art.
(3) create data source, in data source, add data.Realize the difference words display of different terminals screen, then data source is also required to support that multiple terminals screen shows.When adding data in data source, the difference that concrete data carry out split screen controls, such as, first set basis screen data, then the data under split screen are set, the such as title of the data under split screen, can select to hold the title from basis screen, it is also possible to insert other data.
(4) data source of the CMS module created in (two) with setting is bound.
(5) the page presentation request of terminal feedback is received, UA (UserAgent is identified according to page address, user agent) information, UA is a special string head, is a kind of mark recording browser type and version, client operating system and the information such as version, browser kernel.The UA message reflection of the client hardware platform of client, systems soft ware relevant information.According to each CMS module of UA information searching, CMS module adopts MongoDB to store as data, each CMS module is previously provided with the data under the screen of basis and the data under split screen, the lower data of basis screen include based on the data item for displaying on the terminal of the parameter of terminal shielded and configuration, data under split screen are multiple, corresponding different terminals, the data under described split screen include the parameter of the terminal as split screen and the data item for displaying on the terminal of configuration.The parameter information of described terminal refers to hardware and/or the software information of the terminal of identification from UA information, such as browser type and version, client operating system and the information such as version, browser kernel.By the UA information of acquisition is mated with the information of the terminal of record in CMS module, after the match is successful, transfer the to be released data corresponding with end message, by in each CMS module with the data publication of terminal adaptation to corresponding terminal, form complete page presentation content in terminal page combination.
The present invention proposes when content construction delivery system CMS, adopt MongoDB as the storage organization of bottom, compared with relevant database MySOL, MongoDB is the storage mode of file structure, in field more open, process same level formula data structure time can inquire about more easily and obtain data.Adopting MongoDB as the storage organization of bottom, it is possible to growth data as required, the data being modified under split screen or basis screen can also realize that different screen is done differentiation and show.Data under different screen, in the same page, are classified as same level by the present invention, it is achieved by the displaying content of same set of page management data maintenance different screen, improve the efficiency of management.
Embodiment 4
Referring to Fig. 3, present invention also offers a kind of content delivery method supporting multiple terminals, the method includes:
S1, terminal initiate page presentation request, and the acquisition module of CMS system obtains the page presentation request that terminal is initiated;
The page presentation request that S2, identification module obtain according to acquisition module identifies UA (UserAgent, user agent) information, UA is a special string head, is a kind of mark recording browser type and version, client operating system and the information such as version, browser kernel.The UA message reflection of the client hardware platform of client, systems soft ware relevant information.
S3, from CMS module, transfer the data to be released with terminal adaptation according to UA information.
According to each CMS module of UA information searching, CMS module adopts MongoDB to store as data, each CMS module is previously provided with the data under the screen of basis and the data under split screen, the lower data of basis screen include based on the data item for displaying on the terminal of the parameter of terminal shielded and configuration, data under split screen are multiple, corresponding different terminals, the data under described split screen include the parameter of the terminal as split screen and the data item for displaying on the terminal of configuration.The parameter information of described terminal refers to hardware and/or the software information of the terminal of identification from UA information, such as browser type and version, client operating system and the information such as version, browser kernel.By the UA information of acquisition being mated with the information of the terminal of record in CMS module, after the match is successful, transfer the to be released data corresponding with end message.
S4, release module by with the data publication to be released of terminal adaptation to corresponding terminal.
Briefly, the content that presents of one webpage is divided into multiple item, one CMS module of each correspondence, and it is configured with corresponding data item for different display terminals under each CMS module, when terminal initiates page display request, from each CMS module, transfer, according to end message, the data adapted to this terminal adaptation to be shown, it is achieved automatic adaptation.
Embodiment 5
A kind of content delivery method supporting multiple terminals, the method includes:
S1, acquisition module obtain the page presentation request that terminal is initiated;
S2, according to obtain page presentation request identify UA (UserAgent, user agent) information, UA is a special string head, is a kind of mark recording browser type and version, client operating system and the information such as version, browser kernel.The UA message reflection of the client hardware platform of client, systems soft ware relevant information.
S3, from CMS module, transfer the data to be released with terminal adaptation according to UA information.
According to each CMS module of UA information searching, CMS module adopts MongoDB to store as data, each CMS module is previously provided with the data under the screen of basis and the data under split screen, the lower data of basis screen include based on the data item for displaying on the terminal of the parameter of terminal shielded and configuration, data under split screen are multiple, corresponding different terminals, the data under described split screen include the parameter of the terminal as split screen and the data item for displaying on the terminal of configuration.The parameter information of described terminal refers to hardware and/or the software information of the terminal of identification from UA information, such as browser type and version, client operating system and the information such as version, browser kernel.By the UA information of acquisition being mated with the information of the terminal of record in CMS module, after the match is successful, transfer the to be released data corresponding with end message.
There is a kind of situation is, CMS module does not comprise requesting terminal parameter information, also without configuring corresponding data item (i.e. data to be released), then after page presentation request is initiated in requesting terminal, according to the UA information of requesting terminal, the data to be released with this terminal adaptation can not be found from CMS module.For this situation, we provide two kinds of solutions: referring to Fig. 4, and one is to pre-set data to be released to transfer rule, when not finding the data mated with requesting terminal, using the data to be released under the screen of basis as the to be released data adaptive with requesting terminal;Another kind is the data to be released that used the last time as the to be released data adaptive with requesting terminal.
S4, by with the data publication to be released of terminal adaptation to corresponding terminal.
It is known that the development of new technique is maked rapid progress, the renewal speed of terminal is very fast, and CMS module does not include some end message and not configure the situation of corresponding data to be released be extremely common, and therefore, the extensibility of data is particularly important.
The present invention is when content construction delivery system CMS, adopt MongoDB as the storage organization of bottom, compared with relevant database MySOL, MongoDB is the storage mode of file structure, in field more open, process same level formula data structure time can inquire about more easily and obtain data.Adopting MongoDB as the storage organization of bottom, it is possible to growth data as required, the data being modified under split screen or basis screen can also realize that different screen is done differentiation and show.
Further, the inventive method also includes: the data under the screen of described basis and the data under split screen are managed, and modifies including to the data under the screen of described basis and the data under split screen, increase and/or deletes.
Embodiment 6
Present invention also offers a kind of content delivery method performed by server, described method includes: server receives the page presentation request that client sends, client UA information is identified according to the request of described page presentation, according to described UA information inquiry CMS module, from CMS module, transfer the to be released data adaptive with client, data to be released are sent to client.
Wherein, described CMS module adopts MongoDB to store as data, and user can extend as required or revise data, and the differentiation easily realizing different different terminals shows.
In a word, the data under different screen, in the same page, are classified as same level by the present invention, it is achieved by the displaying content of same set of page management data maintenance different screen, improve the efficiency of management.
Above disclosed it is only presently preferred embodiments of the present invention, certainly with this interest field limiting the present invention, according to the equivalent variations that the claims in the present invention are made, can not still belong to the scope that the present invention contains.