Summary of the invention
For overcoming problem present in correlation technique, the present invention provides the method and device of a kind of formation component object.
First aspect according to embodiments of the present invention, it is provided that a kind of method of formation component object, described method includes:
The code for describing web pages component is obtained from the code of webpage;
Assembly mark and the parameter information of described web pages component is obtained from the code for describing web pages component;Described parameter
Information includes the attribute information that at least one attribute-bit of described web pages component is corresponding with each described attribute-bit;
The component model corresponding with described web pages component is obtained according to described assembly mark;Described component model includes often
The attribute information position that individual described attribute-bit is corresponding with each described attribute-bit;Corresponding for each attribute-bit
Attribute information position, described attribute information position is for filling in the attribute information that described attribute-bit is corresponding;
According to described parameter information and described component model formation component object.
Wherein, the attribute information that attribute-bit is corresponding is the property value or the genus of computation attribute mark correspondence that attribute-bit is corresponding
The computational methods of property value;
Wherein, the described code obtained from the code of webpage for describing web pages component, including:
Lookup the first preset characters string in the code of described webpage and the second preset characters string;
Obtain the character string between described first preset characters string and described second preset characters;
By described first preset characters string, character between described first preset characters and described second preset characters
String, and described second preset characters string composition is for describing the code of web pages component.
Wherein, the described component model corresponding with described web pages component according to the mark acquisition of described assembly, including:
Obtain the corresponding relation between assembly mark and the mark of component model of preset web assembly;
The mark of the component model corresponding with the assembly of described web pages component mark is searched from described corresponding relation;
The component model corresponding with the mark of the component model found is obtained in the component model storehouse prestored.
Wherein, the component model of acquisition is one, described according to described parameter information with described component model formation component pair
As, including:
Generate a blank component object;
The content that described component model includes is inserted in the component object of described blank and obtain reference component object;
For the attribute information that each attribute-bit is corresponding, described attribute information is filled in described reference component object
Including, in attribute information position that described attribute-bit is corresponding, obtain component object.
Wherein, the parameter information of acquisition be component model that is multiple and that obtain be multiple, described according to described parameter information and
Described component model formation component object, including:
Generate a blank component object;
In the component model obtained, detect whether that there is multiple component model has at least one identical attribute-bit;
When there is multiple component model and there is at least one identical attribute-bit, create in the component object of described blank
Building the several separate blank subobjects of target, described target number is identical with the number of the component model of acquisition;Right
In each component model, the content that described component model includes is filled in a blank subobject, obtains
One reference component object;For the attribute information that each attribute-bit is corresponding, this attribute information described is filled into first
In the attribute information position corresponding with described attribute-bit in reference component object, obtain component object.
When any two component model does not the most have identical attribute-bit, the content that each component model is included
The component object filled in the blanks obtains the second reference component object;For the attribute information that each attribute-bit is corresponding,
The attribute information position corresponding with described attribute-bit described attribute information being filled in the second reference component object
In, obtain component object.
Further, described method also includes:
Detect and whether the code of described webpage comprises the more new character strings being updated described component object;
When the code of described webpage comprises the more new character strings being updated described component object;According to described renewal word
Described component object is updated by symbol string.
Second aspect according to embodiments of the present invention, it is provided that the device of a kind of formation component object, described device includes:
First acquisition module, for obtaining the code for describing web pages component from the code of webpage;
Second acquisition module, for from for describe the assembly mark obtaining described web pages component the code of web pages component and
Parameter information;Described parameter information includes at least one attribute-bit of described web pages component and each described attribute-bit pair
The attribute information answered;
3rd acquisition module, for obtaining the component model corresponding with described web pages component according to described assembly mark;Institute
State the attribute information position that component model includes that each described attribute-bit is corresponding with each described attribute-bit;For often
The attribute information position that one attribute-bit is corresponding, described attribute information position is for filling in the genus that described attribute-bit is corresponding
Property information;
Generation module, for according to described parameter information and described component model formation component object.
Wherein, the attribute information that attribute-bit is corresponding is the property value or the genus of computation attribute mark correspondence that attribute-bit is corresponding
The computational methods of property value;
Wherein, described first acquisition module includes:
First searches unit, for lookup the first preset characters string in the code of described webpage and the second preset characters
String;
First acquiring unit, for obtaining the character between described first preset characters string and described second preset characters
String;
Comprising modules, is used for described first preset characters string, is positioned at described first preset characters and described second predetermined word
Character string between symbol, and described second preset characters string composition is for describing the code of web pages component.
Wherein, described 3rd acquisition module includes:
Second acquisition unit, the corresponding pass between assembly mark and the mark of component model obtaining preset web assembly
System;
Second searches unit, for searching the group corresponding with the assembly of described web pages component mark from described corresponding relation
The mark of part model;
3rd acquiring unit, for obtaining the mark phase with the component model found in the component model storehouse prestored
Corresponding component model.
Wherein, the component model of acquisition is one, and described generation module includes:
First signal generating unit, for generating a blank component object;
First inserts unit, obtains in the component object that the content that described component model includes is inserted described blank
Reference component object;
Second inserts unit, for the attribute information corresponding for each attribute-bit, is filled into by described attribute information
In attribute information position that described reference component object includes, that described attribute-bit is corresponding, obtain component object.
Wherein, the parameter information of acquisition be multiple and obtain component model be multiple, described generation module includes:
Second signal generating unit, generates a blank component object;
Detector unit, for, in the component model obtained, detecting whether that there is multiple component model has at least one phase
Same attribute-bit;
3rd inserts unit, for when there is multiple component model and having at least one identical attribute-bit, described
Blank component object creates the several separate blank subobjects of target, described target number and the assembly of acquisition
The number of model is identical;For each component model, the content that described component model includes is filled into a blank
Subobject in, obtain the first reference component object;For the attribute information that each attribute-bit is corresponding, it is somebody's turn to do described
Attribute information is filled in the attribute information position corresponding with described attribute-bit in the first reference component object,
To component object.
4th inserts unit, for when any two component model does not the most have identical attribute-bit, by each group
The component object that the content that part model includes fills in the blanks obtains the second reference component object;For each attribute mark
Know corresponding attribute information, that described attribute information is filled in the second reference component object with described attribute-bit phase
In corresponding attribute information position, obtain component object.
Further, described device also includes:
Whether detection module, comprise, in the code detecting described webpage, the renewal word being updated described component object
Symbol string;
More new module, for when comprising the more new character strings being updated described component object in the code of described webpage;
According to described more new character strings, described component object is updated.
The technical scheme that embodiments of the invention provide can include following beneficial effect: by the way of the present invention, technology
Personnel are during the code writing a webpage, if to write the code for describing web pages component, technical staff
Without in advance whole codes of web pages component all being write in the code of webpage, only need to write web pages component assembly mark and
Parameter information, when terminal gets the code of webpage and finds in the code of webpage for describing web pages component
During code, securing component mark and parameter information from the code for describing web pages component, then obtain according to assembly mark
Take and generate the required component model that use, that generated in advance of web pages component, recycle the group of this parameter information and acquisition
Part model generation component object, afterwards recycling component object formation component.Wherein, technical staff is without in advance by webpage
Whole codes of assembly all write in the code of webpage, only need to write assembly mark and the parameter information of web pages component,
The assembly mark of web pages component and the amount of writing of parameter information are far smaller than whole codes of web pages component, such that it is able to reduce
Cost of labor.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe, can not
Limit the present invention.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to attached
During figure, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary is implemented
Embodiment described in example does not represent all embodiments consistent with the present invention.On the contrary, they be only with such as
The example of the apparatus and method that some aspects that described in detail in appended claims, the present invention are consistent.
Fig. 1 is the flow chart of the method according to a kind of formation component object shown in an exemplary embodiment, as it is shown in figure 1,
The method comprises the following steps.
In step S101, from the code of webpage, obtain the code for describing web pages component;
Wherein, when user needs to obtain a Webpage, user can input the webpage page needing to obtain in the terminal
The URL (Uniform Resource Locator, URL) in face, terminal obtains the URL of user's input,
URL according to user's input obtains the code of webpage corresponding for this URL, the then generation to webpage from web page server
Code renders, and so could demonstrate the web page contents that this webpage includes in the display screen of terminal.
Wherein, if the code of webpage includes the code for describing web pages component, then need for describing group of web
The code of part renders, but firstly the need of the code got from the code of webpage for describing web pages component.
Specifically, this step can be realized by following flow process, including:
11), lookup the first preset characters string in the code of webpage and the second preset characters string;
Wherein, during technical staff writes the code of webpage the most in the server, when to write for describing webpage
During the code of assembly, then preset characters string can be utilized will to be used for describing web pages component code and to make a distinction with other codes, example
As, before the code for describing web pages component and to add first pre-the position of the adjacent code for describing web pages component
If character string, after the code for describing web pages component and the position of the adjacent code for describing web pages component adds
Second preset characters string, so, in the code of webpage, just may be used by the first preset characters string and the second preset characters string
So that the code being used for describing the code of web pages component and other the webpage in addition to being used for describing the code of web pages component is entered
Row is distinguished.
Generally, the second preset characters string is plus mark before the character string identical with the first preset characters string
Symbol, such as identifier "/" etc..For example, it is assumed that the first preset characters string is alert, then the second preset characters string is /alert.
For example, it is assumed that the code of webpage is: angular.module (" panda.pagination ",
[' oc.lazyLoad']) .directive (panda.setTagName (" pagination "), alert type=" danger " text=
“hello”/alert['$compile','$parse','$timeout','$ocLazyLoad',function($compile,
$ parse, $ timeout, $ ocLazyLoad) { return{restrict:'E', } }, and the first preset characters string is alert,
Two preset characters strings are /alert.The most in this step, the code of webpage is searched the first preset characters string alert, and
Search the second preset characters string/alert, and find the first preset characters string alert and the second preset characters string/alert.
12), the character string between the first preset characters string and the second preset characters is obtained;
Such as, in the code of above-mentioned webpage, acquisition is positioned at the first preset characters string alert and the second preset characters string/alert
Between character string type=" danger " text=" hello ".
13), by the first preset characters string, character string between the first preset characters string and the second preset characters string,
And second preset characters string composition for describing the code of web pages component.
Such as, by the first preset characters string alert, character string between the first preset characters and the second preset characters
Type=" danger " text=" hello " and the second preset characters string/alert composition are for describing the generation of web pages component
Code alert type=" danger " text=" hello "/alert.
In step s 102, the assembly mark and the parameter that obtain web pages component from the code for describing web pages component are believed
Breath;
Wherein, the parameter information of web pages component includes that at least one attribute-bit of web pages component is corresponding with each attribute-bit
Attribute information;For the attribute information that any one attribute-bit is corresponding, this attribute information is the genus that this attribute-bit is corresponding
Property value or calculate the computational methods of property value corresponding to this attribute-bit.
In embodiments of the present invention, technical staff, can be pre-by first in advance when writing the code for describing web pages component
If character string identifies as the assembly of web pages component, for any attribute mark and the attribute corresponding with this attribute-bit letter
Breath, utilizes the 3rd character string this attribute-bit and the attribute information corresponding with this attribute-bit to be associated, such as,
3rd preset characters string can be :=, this attribute-bit is filled out before the 3rd preset characters string and adjacent 3rd preset characters
The position of string, utilizes double quotation marks " " to include this attribute information, then fills out after the 3rd preset characters string and adjacent the
The position of three preset characters strings;For other each attribute-bit and attribute information, it is performed both by aforesaid operations.
So, the assembly mark of web pages component can just be got according to the first preset characters string, according to the 3rd preset characters
String just can get each attribute-bit of web pages component and attribute information corresponding with each assembly mark respectively.
Therefore, in this step, the first preset characters string can be identified as the assembly of web pages component, and be used for
Describe and the code of web pages component is searched the 3rd preset characters string, for each the 3rd preset characters string found, will
Before the 3rd preset characters string and the character string of adjacent 3rd preset characters string is as an attribute mark of web pages component
Know, by after the 3rd preset characters string and adjacent 3rd preset characters string, the character that included by double quotation marks " "
String is as the attribute information corresponding with this attribute-bit, for other each the 3rd preset characters strings found, all
Perform aforesaid operations.
Such as, at code alert type=" danger " text=" hello " for describing web pages component of above-mentioned acquisition
In/alert, the first preset characters string alert is identified as the assembly of web pages component, and searches the 3rd preset characters string,
And find two the 3rd preset characters strings=.
Wherein, first the 3rd preset characters string=before and adjacent first the 3rd preset characters string=character string be
Type, first the 3rd preset characters string=afterwards and adjacent first the 3rd preset characters string=, by double quotation marks " "
Including character string be danger, therefore, it can type as an attribute-bit of web pages component, and by danger
As the attribute information corresponding with attribute-bit type, wherein, attribute information danger is to identify type with attribute component
Corresponding property value.
Second the 3rd preset characters string=before and adjacent second the 3rd preset characters string=character string be text,
Second the 3rd preset characters string=afterwards and adjacent second the 3rd preset characters string=, the word that included by double quotation marks " "
Symbol string for hello, therefore, it can text as an attribute-bit of web pages component, and using hello as with genus
Property the mark corresponding attribute information of text, wherein, attribute information hello is the attribute corresponding with attribute-bit text
Value.
In step s 103, identify, according to the assembly of web pages component, the component model that acquisition is corresponding with web pages component;
Wherein, component model includes the attribute information position that at least one attribute-bit is corresponding with each attribute-bit,
For the attribute information position that any attribute mark is corresponding, this attribute information position is used for filling in and this attribute-bit phase
Corresponding attribute information.For the property location that other each attribute-bits are corresponding, same.
The component model corresponding with this web pages component obtained in this step includes the described web pages component of described acquisition
Parameter information in each attribute-bit attribute information position corresponding with each attribute-bit.
In an alternative embodiment of the invention, attribute information position can comprise occupy-place information;Occupy-place information can be occupy-place
Symbol etc..
Wherein, owing to different web pages component needs to use different component models, which webpage technical staff knows in advance
Which component model assembly needs to use, and therefore, technical staff can arrange assembly mark and the assembly of preset web assembly
Corresponding relation between the mark of model, in above-mentioned corresponding relation, the assembly of each web pages component identifies correspondence at least
The mark of one component model, the most each web pages component at least one component model corresponding.
So, this step is specifically as follows: obtain between assembly mark and the mark of component model of preset web assembly
Corresponding relation;The mark of the component model corresponding with the assembly of web pages component mark is searched from corresponding relation;In advance
The component model storehouse of storage obtains the component model corresponding with the mark of the component model found.
In step S104, according to parameter information and the component model formation component object of acquisition of web pages component.
The first situation, the component model of acquisition are one, then this step is specifically as follows:
21), a blank component object is generated;
22), the component object content that the component model of acquisition includes filled in the blanks obtains reference component object;
Wherein it is possible to the content including component model replicates;The assembly that content duplication obtained fills in the blanks
Object obtains reference component object.
23), for attribute information corresponding to each attribute-bit, this attribute information is filled in reference component object
Including the attribute information position corresponding with this attribute-bit in, obtain component object.
Wherein, for the attribute information that any attribute mark is corresponding, search in reference component object according to this attribute-bit
For filling in the attribute information position of this attribute information, this attribute information is inserted in the attribute information position found.Right
In the attribute information that other each attribute-bits are corresponding, it is performed both by aforesaid operations.
In an alternative embodiment of the invention, if the attribute information position found comprises occupy-place information, then need first
Delete the occupy-place information in the attribute information position found, this attribute information is inserted the attribute information found the most again
In position.
For example, it is assumed that the blank component object generated is: Component Object={}, and the assembly got
Model is: Component Model={type=' [[type]] ', text=' [[text]] ' }, wherein [[type]] and [[text]]
For equal occupy-place information, by content type=' [[type]] ' in component model, the assembly that text=' [[text]] ' fills in the blanks
In object Component Object={}, obtain reference component object Component Object={type=' [[type]] ',
Text=' [[text]] ' }.
Then according to attribute-bit type, at reference component object Component Object={type=' [[type]] ',
Text=' [[text]] ' } in, search the attribute information position for filling in attribute information danger corresponding for attribute-bit type
Put, and attribute-bit is filled in as being used in the attribute information position corresponding for attribute-bit type in reference component object
The attribute information position of attribute information danger corresponding for type, i.e. using the position at occupy-place information [[type]] place as
For filling in the attribute information position of attribute information danger corresponding for attribute-bit type, then fill in attribute being used for
Occupy-place information [[type]] is deleted in the attribute information position of the attribute information danger that mark type is corresponding, by attribute-bit
Attribute information danger corresponding for type inserts in this attribute information position.
Finally according to attribute-bit text, at reference component object Component Object={type=' [[type]] ',
Text=' [[text]] ' } the middle attribute information position searched for filling in attribute information hello corresponding for attribute-bit text,
And attribute-bit text pair is filled in as being used in the attribute information position corresponding for attribute-bit text in reference component object
The attribute information position of the attribute information hello answered, i.e. genus is filled in as being used in the position at occupy-place information [[text]] place
Property mark attribute information hello corresponding to text attribute information position, then be used for filling in attribute-bit text corresponding
Attribute information hello attribute information position delete occupy-place information [[text]], by attribute corresponding for attribute-bit text
Information hello is inserted in this attribute information position, so can obtain component object Component Object={type=
' danger ', text=' hello ' }.
The second situation, the parameter information of acquisition be multiple and obtain component model be multiple, then this step is the most permissible
For:
31), a blank component object is generated;
32), in the component model obtained, detect whether that there is multiple component model has at least one identical attribute
Mark;
33), when there is multiple component model and there is at least one identical attribute-bit, if the group that directly will obtain
Content in part model is added in the component object of blank, then finally can there is multiple attribute-bit phase in component object
, thus may there is conflict, therefore, in order to avoid conflict, create in blank component object in same parameter information
Building the several separate blank subobjects of target, target number is identical with the number of the component model of acquisition;For appointing
One component model, is filled into the content that this component model includes in a blank subobject, for other each
Component model, is performed both by aforesaid operations;Add in different blank subobjects is the content in different component models,
Finally give the first reference component object;For the attribute information that any attribute mark is corresponding, this attribute information is filled into
In the attribute information position corresponding with this attribute-bit in first reference component object, for other each attributes
The attribute information that mark is corresponding, is performed both by aforesaid operations, finally gives component object.
Wherein, owing between subobject being independent, therefore the parameter information in any two subobject is also independent,
And then do not have the situation of conflict.
For example, it is assumed that the blank component object generated is: Component Object={}, being used for of acquisition describes net
The code of page assembly is: alert type=" danger " text=" hello " class=" button "/alert;And
The component model got is two, and first component model is: Component Model={type=' [[type]] ',
Text=' [[text]] ' }, second component model is: Component Model={type=' [[type]] ', class=
‘[[class]]’}。
Wherein, a ginseng in the attribute-bit type of the parameter information of first component model one and second component model
The attribute-bit type of number information is identical, therefore, in order to avoid conflict, at blank component object Component
Object={} creates two separate blank subobject Component Object={Component
Object={};Component Object={}}, then adds the content in first component model to first blank
Subobject in, and the content in second component model is added in second blank subobject, obtains
Component Object={Component Object={type=" danger " text=" hello " };Component
Object={type=" danger " class=" button}}.
34), when any two component model does not the most have identical attribute-bit, if the assembly mould that directly will obtain
Content in type is added in the component object of blank, then finally do not have multiple attribute-bit in component object identical
Parameter information, thus may not have conflict.Therefore, it can the content by each component model includes insert
Blank component object obtains the second reference component object;For the attribute information that any attribute mark is corresponding, by this genus
Property information is filled in the attribute information position corresponding with this attribute-bit in the second reference component object, for it
His each parameter information, is performed both by aforesaid operations, finally gives component object.
By the way of the embodiment shown in Fig. 1 of the present invention, technical staff during the code writing a webpage,
If writing the code for describing web pages component, technical staff is without writing whole codes of web pages component in advance
In the code of webpage, only need to write assembly mark and the parameter information of web pages component, when terminal gets the generation of webpage
Code and when finding the code for describing web pages component in the code of webpage, from the code for describing web pages component
Securing component mark and parameter information, then obtain that use needed for generating web pages component, the most according to assembly mark
The component model generated, recycles the component model formation component object of this parameter information and acquisition, recycles assembly afterwards
Object formation component.Wherein, technical staff without in advance whole codes of web pages component all being write in the code of webpage,
Only need to write assembly mark and the parameter information of web pages component, the assembly mark of web pages component and writing of parameter information
Amount is far smaller than whole codes of web pages component, such that it is able to reduce cost of labor.
Wherein, in an alternative embodiment of the invention, technical staff is follow-up may be updated component object, such as, exist
Component object adds certain parameter information, deletes certain parameter information or revise certain parameter information etc., normal conditions
Under, in order to save renewal operation, the code being used for being updated component object can be write on the code of webpage by technical staff
End.
Therefore, the most also include: whether the code of detection webpage comprises component object is updated
More new character strings;When the code of webpage comprises the more new character strings being updated component object;According to this renewal
Component object is updated by character string.
For example, it is assumed that technical staff needs to delete time attribute-bit is the parameter information of type in component object, can be at webpage
Code end at write for deleting the code of the parameter information that attribute-bit is type: such as, delete
Component Object.type, when this section of code being detected, can be according to character string type in this statement,
The component object Component Object={type=' danger ', text=' hello ' generated } middle lookup attribute-bit
The attribute information that type and attribute-bit type is corresponding, then at the component object Component generated
Object={type=' danger ', text=' hello ' } middle deletion attribute-bit type and attribute-bit type correspondence
Attribute information danger, the component object Component Object={text=' hello ' after being updated, so
Realize component object is updated.
Fig. 2 is the block diagram of the device according to a kind of formation component object shown in an exemplary embodiment.With reference to Fig. 2, should
Device includes:
First acquisition module 11, for obtaining the code for describing web pages component from the code of webpage;
Second acquisition module 12, for obtaining the assembly mark of described web pages component from the code for describing web pages component
And parameter information;Described parameter information includes at least one attribute-bit of described web pages component and each described attribute-bit
Corresponding attribute information;
3rd acquisition module 13, for obtaining the component model corresponding with described web pages component according to described assembly mark;
Described component model includes the attribute information position that each described attribute-bit is corresponding with each described attribute-bit;For
The attribute information position that each attribute-bit is corresponding, described attribute information position is corresponding for filling in described attribute-bit
Attribute information;
Generation module 14, for according to described parameter information and described component model formation component object.
By the way of the embodiment shown in Fig. 2 of the present invention, technical staff during the code writing a webpage,
If writing the code for describing web pages component, technical staff is without writing whole codes of web pages component in advance
In the code of webpage, only need to write assembly mark and the parameter information of web pages component, when terminal gets the generation of webpage
Code and when finding the code for describing web pages component in the code of webpage, from the code for describing web pages component
Securing component mark and parameter information, then obtain that use needed for generating web pages component, the most according to assembly mark
The component model generated, recycles the component model formation component object of this parameter information and acquisition, recycles assembly afterwards
Object formation component.Wherein, technical staff without in advance whole codes of web pages component all being write in the code of webpage,
Only need to write assembly mark and the parameter information of web pages component, the assembly mark of web pages component and writing of parameter information
Amount is far smaller than whole codes of web pages component, such that it is able to reduce cost of labor.
Wherein, the attribute information that attribute-bit is corresponding is the property value or the genus of computation attribute mark correspondence that attribute-bit is corresponding
The computational methods of property value;
Wherein, described first acquisition module 11 includes:
First searches unit, for lookup the first preset characters string in the code of described webpage and the second preset characters
String;
First acquiring unit, for obtaining the character between described first preset characters string and described second preset characters
String;
Comprising modules, is used for described first preset characters string, is positioned at described first preset characters and described second predetermined word
Character string between symbol, and described second preset characters string composition is for describing the code of web pages component.
Wherein, described 3rd acquisition module 13 includes:
Second acquisition unit, the corresponding pass between assembly mark and the mark of component model obtaining preset web assembly
System;
Second searches unit, for searching the group corresponding with the assembly of described web pages component mark from described corresponding relation
The mark of part model;
3rd acquiring unit, for obtaining the mark phase with the component model found in the component model storehouse prestored
Corresponding component model.
Wherein, the component model of acquisition is one, and described generation module 14 includes:
First signal generating unit, for generating a blank component object;
First inserts unit, obtains in the component object that the content that described component model includes is inserted described blank
Reference component object;
Second inserts unit, for the attribute information corresponding for each attribute-bit, is filled into by described attribute information
In attribute information position that described reference component object includes, that described attribute-bit is corresponding, obtain component object.
Wherein, the parameter information of acquisition be multiple and obtain component model be multiple, described generation module 14 includes:
Second signal generating unit, generates a blank component object;
Detector unit, for, in the component model obtained, detecting whether that there is multiple component model has at least one phase
Same attribute-bit;
3rd inserts unit, for when there is multiple component model and having at least one identical attribute-bit, described
Blank component object creates the several separate blank subobjects of target, described target number and the assembly of acquisition
The number of model is identical;For each component model, the content that described component model includes is filled into a blank
Subobject in, obtain the first reference component object;For the attribute information that each attribute-bit is corresponding, it is somebody's turn to do described
Attribute information is filled in the attribute information position corresponding with described attribute-bit in the first reference component object,
To component object.
4th inserts unit, for when any two component model does not the most have identical attribute-bit, by each group
The component object that the content that part model includes fills in the blanks obtains the second reference component object;For each attribute mark
Know corresponding attribute information, that described attribute information is filled in the second reference component object with described attribute-bit phase
In corresponding attribute information position, obtain component object.
Further, described device also includes:
Whether detection module, comprise, in the code detecting described webpage, the renewal word being updated described component object
Symbol string;
More new module, for when comprising the more new character strings being updated described component object in the code of described webpage;
According to described more new character strings, described component object is updated.
About the device in above-described embodiment, wherein modules performs the concrete mode of operation in relevant the method
Embodiment is described in detail, explanation will be not set forth in detail herein.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to other of the present invention
Embodiment.The application is intended to any modification, purposes or the adaptations of the present invention, these modification, purposes
Or adaptations follow the present invention general principle and include the present invention undocumented in the art known often
Know or conventional techniques means.Description and embodiments is considered only as exemplary, true scope and spirit of the invention by under
The claim in face is pointed out.
It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and
Various modifications and changes can carried out without departing from the scope.The scope of the present invention is only limited by appended claim.