Summary of the invention
The embodiment of the invention provides a kind of website content components generation method, analytic method and device, shows the problem that can not satisfy diversity and dirigibility demand in order to web site contents in the solution prior art.
A kind of website content components generation method, this method comprises:
In the web site contents template, determine the insertion position of website content components;
Data item for described website content components selection comprises generates the data item description character string;
For described data item is determined bandwagon effect, generate the bandwagon effect character string;
Form the component description character string by described data item description character string and described bandwagon effect character string, and be retained in insertion position described in the web site contents template, generate website content components.
Preferably, when described website content components comprises two or more data item, be respectively each data item and determine bandwagon effect.
Preferably, described is the data item that described website content components selection comprises, and generates the data item description character string, specifically comprises:
Determine the memory location of described data item, and the span of determining described data item, described data item description character string generated.
Preferably, describedly determine bandwagon effect for data item, generate the bandwagon effect character string, specifically comprise:
For data item is selected a Hypertext Markup Language HTML effect segment of storage in advance; Perhaps
Dynamically write the HTML effect segment of a correspondence for data item.
Preferably, describedly select the data item comprise and determine bandwagon effect, realize by the assembly edit tool for described data item for website content components.
Preferably, described assembly edit tool is embedded in the professional webpage making instrument as plug-in unit.
A kind of website content components analytic method, this method comprises:
Resolve the component description character string that keeps in the web site contents template, obtain data item description character string and bandwagon effect character string;
Obtain corresponding data item content according to described data item description character string;
According to described bandwagon effect character string the data item content of obtaining is shown by its corresponding bandwagon effect.
Preferably, obtain corresponding data item content according to described data item description character string before, also comprise:
Described data item description character string is separated by data item, and set up corresponding relation between each data item and the bandwagon effect character string.
A kind of website content components generating apparatus, this device comprises: assembly determining unit, data item editing unit and bandwagon effect edit cell, wherein,
Described assembly determining unit is used for determining in the web site contents template insertion position of website content components;
Described data item editing unit is used to described website content components to select the data item that comprises, and generates the data item description character string;
Described bandwagon effect edit cell is used to described data item to determine bandwagon effect, generates the bandwagon effect character string.
Preferably, described device further comprises:
Component description character string unit is used for the description character string and the bandwagon effect character string of module data item are combined into the component description character string, and is retained in insertion position described in the web site contents template, generates website content components.
A kind of website content components resolver, this device comprises: analyzing component unit, data item resolution unit and bandwagon effect resolution unit, wherein,
Described analyzing component unit is used for resolving the component description character string that the web site contents template keeps, and obtains data item description character string and bandwagon effect character string;
Described data item resolution unit is used for obtaining corresponding data item content according to described data item description character string;
Described bandwagon effect resolution unit is used for according to described bandwagon effect character string the data item content of obtaining being shown by its corresponding bandwagon effect.
Preferably, described device further comprises:
The component classification unit is used for described data item description character string is separated by data item, and sets up the corresponding relation between each data item and the bandwagon effect character string;
Described bandwagon effect resolution unit also is used for the bandwagon effect character string according to described corresponding relation specified data item content correspondence.
The embodiment of the invention is by the assembly edit tool, by determine the insertion position of website content components in the web site contents template; Data item for described website content components selection comprises generates the data item description character string; For described data item is determined bandwagon effect, generate the bandwagon effect character string; Form the component description character string by described data item description character string and described bandwagon effect character string, and be retained in insertion position described in the web site contents template, generate website content components.The scheme that the embodiment of the invention provided, adopt the mode of dynamic flexible to make and generate website content components, the dirigibility that on the one hand can improve establishment of component greatly can be satisfied the multifarious requirement of assembly effect on the other hand, thereby realizes better, more various displaying web site contents.
Embodiment
Because existing web site contents template adopts modularity to realize the displaying of web site contents mostly, the embodiment of the invention is by the assembly edit tool, on the basis of existing web site contents tools, realize flexible editor and displaying to module data item content and corresponding bandwagon effect.
Be explained in detail to the main realization principle of embodiment of the invention technical scheme, embodiment and to the beneficial effect that should be able to reach below in conjunction with each accompanying drawing.
The main realization principle process of the website content components generation method that as shown in Figure 1, the embodiment of the invention provided is as follows:
Step 11, the position and the plug-in package of definite assembly in the web site contents template.
The portal management person can use professional webpage making instrument usually in making the process of web site contents, for example software such as DreamWave.By these professional webpage making instruments, the portal management person can produce web site contents and the webpage that needs issue very easily.
In the web site contents template, often need from database or other web site contents, to extract relevant data item, and show at the diverse location of webpage, to enrich web site contents according to certain bandwagon effect.Usually adopt the form of assembly to finish relevant work.Therefore, portal management after editor finishes relevant web site contents template, need determine to extract the position of data item in the web site contents template, and inserts corresponding assembly at correspondence position.Plug-in package can be finished by relevant assembly edit tool.
Step 12 for described assembly compose data items content, obtains the data item description character string.
Insert the relevant position of web site contents template at assembly after, further need be assembly editing component data item.Content edited mainly comprises span, store data items position of data item etc.For example, need editing component from which column fetch data, get how many bars or how many days, the reference position of data and by destination address of position and source data etc.
The content of compose data items, the assembly edit tool that can using system provides, this assembly edit tool can be used as plug-in unit and is embedded in the professional webpage making instrument (for example DreamWave), realizes the seamless link of web site contents template construct and establishment of component.
Step 13 for described module data item editor bandwagon effect, obtains the bandwagon effect character string.
For after assembly edited the module data item, the needs that can show according to assembly be that the module data item is showed the bandwagon effect that editor is various.The bandwagon effect of assembly can be finished by editor HTML statement.The portal management person can select Hypertext Markup Language HTML effect segment of storing in advance or the HTML effect segment of dynamically writing a correspondence for data item for data item.Bandwagon effect generally includes: the displaying order of data item, the exhibition method of data item and animation, audio or other the associated attributes etc. in the data item displaying process.For example, can be by editor's HTML statement fragment, Control Component data item order or inverted sequence show, and animation effect in the data item displaying process, music effect etc. can be set.
Especially, may comprise a plurality of data item in the assembly, that is to say that assembly can extract a plurality of data item or extract many data item from different columns from database.At different module data items, need edit different data item bandwagon effects respectively, and obtain the bandwagon effect character string respectively.
Step 14 is combined into the component description character string with data item description character string and bandwagon effect character string, is retained in relevant position in the web site contents template, generates website content components.
The component description character string comprises the data item information and the bandwagon effect information of assembly in order to describe the relevant information of assembly.
Especially, data item editing or bandwagon effect editor to assembly carries out all can finish by the assembly edit tool, by the assembly edit tool, can finish the data item editing of assembly and the editor of bandwagon effect easily.By functions such as clicking of providing of assembly edit tool, the indication range of assignment component in the web site contents template and the module data item that will generate easily, and the editing area by the assembly edit tool, the assembly bandwagon effect of the contextual HTML statement customization of data item is freely edited into.
Especially, behind the editor who finishes assembly, just after the preservation of assembly edit tool is withdrawed from, in the web site contents template, keep the assembly character string of one section special format, in order to describe the relevant information of this assembly.The information of describing in the assembly character string had both comprised the information of the module data item that will show, also can comprise the HTML segment, came assembly is carried out the bandwagon effect customization.
If need the many places plug-in package in the web site contents template, above-mentioned method can be repeated, finish up to the web site contents edit model.
Accordingly, after the web site contents edit model is finished, need resolve to finish representing of webpage the web site contents template.This just need resolve editor's assembly, as shown in Figure 2, is the analyzing component method cardinal principle process flow diagram that the embodiment of the invention provides, and is specific as follows:
Step 21, resolution component is described character string, and with component description character string classifying content.
The web site contents management system except needs are resolved the related content of web site contents template, also needs analytically dependent assembly when the web site contents that edits is resolved.When assembly is resolved, at first in web site contents, find corresponding component description character string, and, the component description character string is classified according to the content of component description character string.
During to the component description string sort, can find out peek scope, DISPLAY ORDER of assembly etc. by regular expression, and module data item and bandwagon effect once traveled through, handle component is described character string separately, thereby the component description character string is divided into data item description character string and bandwagon effect character string.The data item description character string is in order to describe the content of module data item, and the bandwagon effect character string is in order to describe the bandwagon effect of module data item.
Step 22 is organized into tree-shaped relation respectively with sorted component description character string content.
After with the component description string sort, can be organized into tree-shaped relation to the component description character string of serial according to the sequencing and the attribute of character string in the component description character string.That is to say, with the component description character string separately according to different data item description character strings, and the bandwagon effect character string of each data item correspondence and corresponding data item be mapped, the data item description character string is separated by data item, set up the corresponding relation between each data item and the bandwagon effect character string.
For example, when the component description character string comprises a plurality of data item description character string, with the component description character string separately, and be mapped according to the bandwagon effect character string of each data item respectively, form a plurality of tree-shaped relations correspondence according to different data item description character strings.
Step 23 is replaced corresponding module data item with module data item content and is described character string, obtains the assembly character string, and output obtains assembly.
After obtaining several and being the independent character string at center, need further resolution data item describe character string, find the corresponding contents of the data item of data item description character string correspondence with each data item.For example, can find the span, data item particular content, data item target address of the described data item of each data item description character string etc. by each data item description character string of traversal.
Describe character string with data item content replacement data item, can obtain the assembly character string, comprising data item content and bandwagon effect character string.With the corresponding component description character string in the assembly character string replacement web site contents, just obtain the output content of whole web site contents.
As shown in Figure 3, for a website content components provided by the invention generates and the detailed process process flow diagram of resolving, specific as follows:
Step 31, the user goes out the web site contents template file by professional webpage making tool making;
Step 32 needs the position of fetching data in the web site contents template, insert corresponding assembly by the assembly edit tool.
Step 33, the data item of the assembly that inserts by assembly edit tool editor; Content edited mainly comprises: from which column fetch data, get how many bars or how many days, the data of taking out by positive sequence still be inverted sequence show and needs displaying data which data item etc.;
Step 34, judging whether need be at corresponding data item editing bandwagon effect, if, execution in step 35, otherwise, execution in step 36.
Step 35, the bandwagon effect of the assembly editing area editor corresponding data item that provides at the assembly edit tool adopt HTML to edit usually, and the HTML segment is freely to be imported by the user.
Step 36, system carries out the page when generating to web site contents, at first resolution component is described character string, according to the content of component description character string with the component description string sort.
Step 37 is further analyzed the component description character string, takes out the data item content according to data item from database, and the data in the data item content are inserted in the corresponding bandwagon effect character wound, obtains the assembly character string.According to the assembly character string, can formation component.
Especially,, use the many places assembly, then in corresponding position repeating step 32~step 35 if in the web site contents template.The assembly edit tool keeps one section special format character string in the web site contents template after preservation is withdrawed from, just the component description character string is in order to describe this module information.
Correspondingly, the embodiment of the invention also provides a kind of website content components generating apparatus, and as shown in Figure 4, this device comprises assembly determining unit 41, data item editing unit 42 and bandwagon effect edit cell 43, and is specific as follows:
Assembly determining unit 41 is used for determining in the web site contents template insertion position of website content components;
Data item editing unit 42 is used to described website content components to select the data item that comprises, and generates the data item description character string;
Bandwagon effect edit cell 43 is used to described data item to determine bandwagon effect, generates the bandwagon effect character string.
Preferably, above-mentioned website content components generating apparatus further comprises component description character string unit 44, be used for the description character string and the bandwagon effect character string of module data item are combined into the component description character string, and be retained in insertion position described in the web site contents template, generate website content components.
Accordingly, as shown in Figure 5, be the website content components resolver that the embodiment of the invention provides, this device comprises analyzing component unit 51, data item resolution unit 52 and bandwagon effect resolution unit 53, and is specific as follows:
Analyzing component unit 51 is used for resolving the component description character string that the web site contents template keeps, and obtains data item description character string and bandwagon effect character string;
Data item resolution unit 52 is used for obtaining corresponding data item content according to described data item description character string;
Bandwagon effect resolution unit 53 is used for according to described bandwagon effect character string the data item content of obtaining being shown by its corresponding bandwagon effect.
Preferably, above-mentioned website content components resolver further comprises component classification unit 54, is used for described data item description character string is separated by data item, and sets up corresponding relation between each data item and the bandwagon effect character string;
Bandwagon effect resolution unit 53 also is used for the bandwagon effect character string according to described corresponding relation specified data item content correspondence.
In sum, the scheme that the embodiment of the invention provided, adopt the mode of dynamic flexible to make and generate website content components, the dirigibility that can improve establishment of component greatly on the one hand, can satisfy the multifarious requirement of assembly effect on the other hand, thereby realize better, more various displaying web site contents.
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, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.