Summary of the invention
The embodiment of the present invention provides a kind of Web page construction method, device, calculates equipment and storage medium, to solve
Versatility existing for Web page in the prior art, flexibility, the problem of scalability difference.
The embodiment of the present invention provides a kind of construction method of Web page, including:
Server determines the Web page for needing to show in the user equipment according to the facility information of user equipment
Setting information;
The server determines the corresponding Active Server Pages ASP text of the setting information according to the setting information
The feature of part;
The server then will include the spy if it is determined that in the presence of the ASP file including the feature in the server
The ASP file of sign is added into the ASP script for generating the Web page;
The server executes the ASP script, generates the Web page.
A kind of possible implementation, the server determine that the setting information is corresponding according to the setting information
The feature of Active Server Pages ASP file, including:
The server determines the element of the Web page according to the setting information;
The element of the Web page is determined as the feature of the ASP file of the Web page by the server.
A kind of possible implementation, the server determine that the setting information is corresponding according to the setting information
The feature of Active Server Pages ASP file, including:
The server determines the element of the Web page and the configuration ginseng of the element according to the setting information
Number;
The configuration parameter of the element of the Web page and the element is determined as the Web page by the server
ASP file feature.
By the ASP file that the configuration parameter of the element of Web page and the element is combined as to the Web page
Feature, can filter out faster user equipment needs configuration information in corresponding element configuration parameter be stored in advance
ASP file element configuration parameter different elements, and then improve Web page building efficiency.
The ASP file is added to the ASP for generating the Web page for a kind of possible implementation, the server
In script, including:
The configuration parameter of the ASP file is revised as the configuration parameter of the element of the Web page by the server;
The modified ASP file is referenced in the ASP template script of the Web page by the server;It is described
ASP template script is the ASP template script for generating the Web page of same user device type.
The modified ASP file is referenced to the Web page by a kind of possible implementation, the server
After in ASP template script, further include:
The server determines corresponding CSS style according to the element in the Web page;And the CSS style is drawn
With into the ASP script.
A kind of possible implementation, the method also includes:
The server is if it is determined that be not present the ASP file of the feature, then according to feature life in the server
It is added at the ASP file of character pair, and by the ASP file of the feature to the ASP script for generating the Web page.
The embodiment of the present invention provides a kind of Web page construction device, including:
Processing unit determines the Web for needing to show in the user equipment for the facility information according to user equipment
The setting information of the page;According to the setting information, the corresponding Active Server Pages ASP file of the setting information is determined
Feature;If it is determined that there is the ASP file including the feature in the server, then the ASP file including the feature is added
Enter into the ASP script for generating the Web page;
Generation unit generates the Web page for executing the ASP script.
A kind of possible implementation, the processing unit include:
Determining module, for determining the element of the Web page according to the setting information;By the member of the Web page
Element is determined as the feature of the ASP file of the Web page.
Modified module, the configuration ginseng of the element for the configuration parameter of the ASP file to be revised as to the Web page
Number;The modified ASP file is referenced in the ASP template script of the Web page;The ASP template script is to use
In the ASP template script for the Web page for generating same user device type;
A kind of possible implementation, the modified module are also used to:
According to the element in the Web page, corresponding CSS style is determined;And the CSS style is referenced to described
In ASP script.
A kind of possible implementation, the processing unit are also used to:If it is determined that there is no the features in server
ASP file then generates the ASP file of character pair according to the feature, and the ASP file of the feature is added to generation institute
State the ASP script of Web page.
The embodiment of the present invention provides a kind of computer readable storage medium, and the computer-readable recording medium storage has meter
Calculation machine executable instruction, the computer executable instructions are for making the computer execute any one of above embodiment institute
The method stated.
The embodiment of the present invention provides a kind of calculating equipment of Web page building, including:
Memory, for storing program instruction;
Processor executes above-mentioned implementation according to the program of acquisition for calling the program instruction stored in the memory
Method described in any one of mode.
The embodiment of the present invention has the advantages that:
By server according to the facility information of user equipment, the Web page for needing to show in the user equipment is determined
The setting information in face;And then determine the feature of the corresponding Active Server Pages ASP file of the setting information;The server
If it is determined that there is the ASP file including the feature in the server, then the ASP file including the feature is added to life
At in the ASP script of the Web page;The ASP script is executed by the server, generates the Web page.And then it saves
It has gone when developing the Web page of different user equipmenies, for the file of ASP needed for identical setting, has saved a large amount of
Development cost and later maintenance cost improve the versatility of the exploitation of the Web page of user equipment, flexibility, scalability, pole
Big has saved human cost, improves the formation efficiency of Web page.
Specific embodiment
With the development of network technology and webpage design, the content of webpage is more and more abundant, and generallys use hypertext
Markup language (Hyper Text Mark-up Language, HTML) format embodies, and html text is made of TML order
Descriptive text, HTML command can be with comment, figure, animation, sound, table, link etc..HTML is not a kind of programming
Language, but a kind of markup language (markup language), markup language are a set of label labels (markup tag),
HTML describes webpage using label label, and HTML markup label is commonly known as html tag (HTML tag).Html tag
It is the keyword surrounded by angle brackets, such as<html>;What html tag usually occurred in pairs, such as<b>With</b>;Label
First label of centering is to start label, and second label is end-tag;The also referred to as open mark of beginning and end label
Label and closure label;Html document describes webpage, and html document includes html tag and plain text, and html document is also referred to as net
Page.
In practical applications, having been more and more widely used with embedded product, consequent are clients couple
The requirement of Product Interface is also more and more abundant.In the prior art, corresponding develop in different Web pages is needed for different product
All elements, a whole set of component part such as element property.With increasing for enterprise product, cause new product development cycle it is slow,
Safeguard that multiple product workloads are increasing simultaneously, efficiency is too low.Therefore, as shown in Figure 1, the embodiment of the present application provides one kind
The flow diagram of Web page construction method, includes the following steps:
Step 101:Server determines what needs were shown in the user equipment according to the facility information of user equipment
The setting information of Web page;
Step 102:The server determines the corresponding dynamic server page of the setting information according to the setting information
The feature of face ASP file;
Step 103:If it is determined that there is the ASP file including the feature in the server, then by packet in the server
The ASP file for including the feature is added into the ASP script for generating the Web page;
Step 104:The server executes the ASP script, generates the Web page.
Wherein, the structure of HTML includes head (Head), main body (Body) two large divisions, wherein head describes browser
Required information, and main body then includes the particular content to be illustrated.
In a step 101, the facility information of the user equipment can be determined according to specific equipment, for example, if
The user equipment is router, then the facility information may include:WAN mouthfuls of states, LAN mouthfuls of states and network rate, if
Standby model etc..If the user equipment is monitoring device, the facility information may include:Show camera real-time recording,
Monitored results, warning information etc..Intelligent parking lot parking stall monitoring class equipment facility information may include:Display parking stall makes
With situation etc..
It needs when accessing the user equipment according to the facility information of different user devices and user in Web page exhibition
The demand of the data and interaction shown may include different setting information.
The setting information can be the setting information of factory pre-sets, producer can also needs as the case may be, more
The new setting information;The setting information may be that the server obtains Web from the database of the user equipment
The Web page file can be saved as ASP file by the data obtained after page file, the server, and ASP script is added
In;The editing files of extended formatting can also be saved as, for example, JavaScript, it is not limited here.Below with ASP file
For be illustrated, the set-up mode of alternative document can refer to the set-up mode of ASP file, and details are not described herein.
The Web page file can be XML file, and XML refers to extensible markup language (EXtensible Markup
Language), transmission data are only used for, and non-display data, XML tag are not predefined.XML data is with plain text format
It is stored, XML document forms a kind of tree construction, then it expands to " branches and leaves " since " root ".XML document is necessary
Include root element.The element is father's element of every other element.Element in XML document forms a document tree.This
Tree expands to the lowermost end of tree since root.All elements can possess daughter element:All elements can possess in text
Hold and attribute (in similar HTML).XML element refers to since (and including) label until the portion of (and including) end-tag
Point.Element may include the mixture of other elements, text or both.Pass through XML DOM (Document Object Model)
All elements in accessible and operation XML, and the content (text and attribute) of element can be modified, create new member
Element.
It is of course also possible to the setting information of the user equipment be obtained according to ASP, for example, literary from ASP by ADO interface
The database of user equipment described in part inter access.Specifically, may include:It creates to the ADO connection (ADO of database
Connection), database connection is opened, is created ADO record set (ADO recordset), record set is opened
(recordset), data required for extracting from data set close data set, close connection.
Therefore, for different setting informations, need the Web page to the user equipment that different html elements is set
Element and the corresponding attribute of the HTML element.
HTML is mainly used for showing data, i.e., is laid out and is shown using HTML.Therefore, the Web page is being constructed
When, it is only necessary to the layout of the HTML and the element of display are set.Dynamic is being needed to update the data in the Web page
When, XML file can be read, and then update the data content in HTML, it is no longer necessary to carry out to HTML by JavaScript
Any change.
HTML element is referred to from all codes for starting label (start tag) to end-tag (end tag).Element
Content be the content started between label and end-tag.Most of HTML elements can possess attribute, and attribute is HTML element
Additional information is provided.Html tag can possess attribute.Attribute provides more information in relation to HTML element.Attribute be with
The form of name/value pair occurs, such as:Name=" value ".Attribute provides in the beginning label of HTML element.
For the development efficiency for improving HTML, in the embodiment of the present application, Active Server Pages (Active can be passed through
Server Pages, ASP) carry out Web page building.
ASP is the journey run in Internet information service (Internet Information Services, IIS)
Sequence.The script in ASP file can be performed in server.ASP file may include html tag, and ASP file also may include service
Device end feet sheet, these scripts are by separator<% and %>It is surrounded.The server script, may include legal expression formula,
Sentence or operator.
ASP can dynamically edit, change or add any content of Web page;ASP can be fixed for different users
Webpage processed, to improve the availability of Web page.
In a step 102, the server determines the corresponding dynamic Service of the setting information according to the setting information
The feature of device page ASP file, including:
Step 1: the server determines the element of the Web page according to the setting information;
Step 2: the element of the Web page is determined as the spy of the ASP file of the Web page by the server
Sign.
An application program on Web can be one group of ASP file.These ASP files are cooperated together to complete certain
Item task.When creating function, header, footer or the other elements that need to use on the page, it is pre- can directly to first pass through reference
The ASP file that first stores is realized, to reduce the workload of exploitation, improves the efficiency of exploitation and maintenance.It therefore, can be according to sentencing
Break the feature of the ASP file needed on the page, and then determines the ASP file for needing to quote.
The feature of the ASP file may include:The element of the Web page.
For example, however, it is determined that the element is the list that account information is inputted for user, and the Form Element can be with
For the one or more of the elements such as different types of input element, check box, radio button and submitting button.The server can
To obtain the corresponding ASP file of list for inputting account information for user, wherein may be all in the ASP file
Including the ASP file needed in the element, for example, the corresponding ASP file of input element, the corresponding ASP file of selective listing,
The corresponding ASP file of button.It may also also need to add corresponding element again, at this point it is possible to which corresponding again search corresponding element
Corresponding ASP, and according to the quote command of ASP file, it is referenced in the corresponding ASP file of the element.
In the specific implementation process, the feature of the ASP file can be determined by adding label to the ASP file,
It can also be by reading the ASP file, and then determine the element in the ASP file, it is not limited here.
By can accurately filter out use using the element of Web page as the feature of the ASP file of the Web page
Feature and the different elements of the element of pre-stored ASP file of corresponding element in the configuration information that family equipment needs
Feature, and then improve the efficiency of Web page building.
A kind of possible implementation, the server determine that the setting information is corresponding according to the setting information
The feature of Active Server Pages ASP file, including:
Step 1: the server according to the setting information, determines the element and the element of the Web page
Configuration parameter;
Step 2: the server by the configuration parameter of the element of the Web page and the element, be determined as it is described
The feature of the ASP file of Web page.
By the ASP file that the configuration parameter of the element of Web page and the element is combined as to the Web page
Feature, can filter out faster user equipment needs configuration information in corresponding element configuration parameter be stored in advance
ASP file element configuration parameter different elements, and then improve Web page building efficiency.
In step 103, a kind of possible implementation, however, it is determined that the element of the pre-stored ASP file is matched
It is different from the configuration parameter of corresponding element in the configuration information that the user equipment needs to set parameter, the server will be described
The process into the ASP script for generating the Web page is added in ASP file, may include:
Step 1: the configuration parameter of the ASP file is revised as the configuration of the element of the Web page by the server
Parameter;
Step 2: the modified ASP file is referenced to the ASP template script of the Web page by the server
In;The ASP template script is the ASP template script for generating the Web page of same user device type.
The template of the ASP file is generated by the above method, can preferably be adapted to the needs of user, be met user's
In the case where setting information, the versatility of template is improved, further increases the efficiency of the building of Web page.
A kind of possible implementation can generate the mould of corresponding ASP file according to the type of the element in Web page
Plate calls directly the ASP file for the server when exploitation Web page needs the element using the type
Template, it is only necessary to modify corresponding parameter, without writing corresponding ASP file again, improve exploitation and maintenance
Efficiency.
In conjunction with above-mentioned example, if the server determines that the ASP file is the list for inputting account information for user
ASP file, wherein needed in the Web page user input account information list in only need input control and button,
At this point it is possible to screen the element in the template of the ASP file, and corresponding according to the configuration parameter of element in the Web page
Modification.
Based on same inventive concept, corresponding template can also be arranged according to the type of user equipment in the ASP script,
The i.e. described ASP template script, to improve the development efficiency of the ASP script.
A kind of possible implementation, the method also includes:
The server is if it is determined that be not present the ASP file of the feature, then according to feature life in the server
It is added at the ASP file of character pair, and by the ASP file of the feature to the ASP script for generating the Web page.
The template of the ASP file is generated by the above method, can preferably be adapted to the needs of user, be met user's
In the case where setting information, the versatility of template is improved, further increases the efficiency of the building of Web page.
Further, the ASP template script can be updated according to the ASP script of generation, convenient for generating the use
When the other users equipment of the same type of family equipment, alternatively, when the user equipment needs to update upgrading, described in corresponding modification
ASP file in Web page improves the efficiency for producing Web page corresponding with the user equipment of O&M same type.
In the specific implementation process, the Application object in ASP by ASP document bundle together, formed one answer
Use program.For storing and accessing the variable from any page, variable may include Application object
Application variable, session variable etc..Application variable owns for storing in a specific application program
The information of user, and it is effective to all pages in an application program.All users share one Application pairs
As.Session variable is used to store the information of sole user, and effective to all pages in an application program.Example
Such as, the data being stored in session may include name, id or parameter.
In the specific implementation process, after the server will generate the ASP script, further include:
The server determines corresponding CSS style according to the element in the Web page;And the CSS style is drawn
With into the ASP script.
The template of the ASP file is called directly by the above method, it is only necessary to corresponding parameter is modified, without
Corresponding ASP file is write again, improve the efficiency of exploitation and maintenance.
In the specific implementation process, it can be classified according to the type of user equipment, and the user of same type is set
The standby CSS style needed is marked with same label, can also be stored into identical file, can be only when for quoting
It is searched according to the type of user equipment, saves the expense of server, improve the development efficiency of Web page.
A kind of possible implementation, the style field of Web page described in the database purchase of the user equipment, is used for
Save the CSS style information of the Web page.
According to the corresponding CSS style information for storing the Web page of the type of the user equipment, in the css pattern
It include the CSS style after being grouped according to the type of CSS in information.The CSS style can according to existing Web page
In the CSS style that extracts, or for the CSS style that the user equipment is newly-generated.
CSS style is a kind of mode for changing HTML element pattern.HTML element pattern can be belonged to by using style
Pattern is directly added to HTML element by property, or (CSS file) is defined in independent style sheet indirectly.By making
With HTML4.0, the extensible html document of all format codes then moves into an independent style sheet.To HTML into
Row classification (setting class), and then CSS style is defined for the class of element.Identical pattern is set for identical class, or is difference
Class different patterns is set.
Specifically, can have three ways, such as following to be inserted into CSS style sheet.External style sheet:When pattern need to be to be applied
When to many pages, external style sheet would be desirable selecting.Using external style sheet, you can pass through change one
File changes the appearance of entire website.Inline style table:When single file needs special pattern, so that it may use internal sample
Formula table.You can pass through in the part head<style>Tag definition inline style table.Inline style table:When special pattern needs
When being applied to individual element, so that it may use inline style.Method using inline style is used in relevant label
Style Attributes.Style Attributes may include any CSS attribute.
A kind of possible implementation, the method also includes:
The server is if it is determined that be not present the ASP file of the feature, then according to feature life in the server
It is added at the ASP file of character pair, and by the ASP file of the feature to the ASP script for generating the Web page.
The template for only needing to call directly the ASP file by the above method, without writing corresponding ASP again
File improves the efficiency of exploitation and maintenance.
At step 104, including:
The server executes the ASP script, and the user equipment is obtained from the database of the user equipment
Data, generate the html file of the Web page;
The html file of the Web page is back to browser by the server;The browser is to receive user
The browser of the Web page request of input.
The html file for the Web page that the browser is sent according to the server, loads the html file
Corresponding html data, and after loaded, the html data is parsed, the tree construction of tag element composition is established, and is counted
The position of each label in the tree construction established is calculated, finally, showing Web page request pair after carrying out typesetting according to the position of each label
The webpage answered.
As shown in Fig. 2, the embodiment of the present invention provides a kind of flow diagram of Web page construction method, including:
Step 201:Server sends the acquisition request of the setting information of the user equipment to device databases;
Data in the setting information can be WebStyle format, or extended formatting, it is not limited here.
Step 202:The device databases return to the setting information of the user equipment;
The element that the setting information that the device databases can also return to the user equipment is shown in Web page
Configuration parameter.
Step 203:The server determines the corresponding dynamic server page of the setting information according to the setting information
The feature of face ASP file;
Specifically, the server determines the element of the Web page according to the setting information;
The element of the Web page is determined as the feature of the ASP file of the Web page by the server.
Step 204:The server generates the ASP script of the Web page according to the feature;
Specifically, the server then will include if it is determined that in the presence of the ASP file including the feature in the server
The ASP file of the feature is added into the ASP script for generating the Web page;The server is matched the ASP file
Set the configuration parameter that parameter is revised as the element of the Web page;The modified ASP file is referenced to by the server
In the ASP template script of the Web page;The ASP template script is the Web page for generating same user device type
ASP template script.
The server determines corresponding CSS style according to the element in the Web page;And the CSS style is drawn
With into the ASP script.
Step 205:The server receives the access request that user equipment sends the Web page;
Step 206:The server is visited according to the access request to the data that the database sends the Web page
Ask request;
Step 207:The server receives the data for the Web page that the database returns, and executes the ASP foot
This, generates the Web page.
Step 208:The user equipment receives the file of the Web page;
Step 209:The browser of the user equipment renders the file of the Web page and shows Web page.
As shown in figure 3, the embodiment of the present invention provides a kind of Web page construction device, including:
Processing unit 301 determines what needs were shown in the user equipment for the facility information according to user equipment
The setting information of Web page;According to the setting information, the corresponding Active Server Pages ASP text of the setting information is determined
The feature of part;It then will include the ASP text of the feature if it is determined that there is the ASP file including the feature in the server
Part is added into the ASP script for generating the Web page;
Generation unit 302 generates the Web page for executing the ASP script.
A kind of possible implementation, processing unit 301 include:
Determining module, for determining the element of the Web page according to the setting information;By the member of the Web page
Element is determined as the feature of the ASP file of the Web page.
Modified module, the configuration ginseng of the element for the configuration parameter of the ASP file to be revised as to the Web page
Number;The modified ASP file is referenced in the ASP template script of the Web page;The ASP template script is to use
In the ASP template script for the Web page for generating same user device type;
A kind of possible implementation, the modified module are also used to according to the element in the Web page, and determining pair
The CSS style answered;And the CSS style is referenced in the ASP script.
A kind of possible implementation, processing unit 301 are also used to:If it is determined that there is no the features in server
ASP file then generates the ASP file of character pair according to the feature, and the ASP file of the feature is added to generation institute
State the ASP script of Web page.
The embodiment of the present invention provides a kind of computer readable storage medium, and the computer-readable recording medium storage has meter
Calculation machine executable instruction, the computer executable instructions are for making the computer execute any one of above embodiment institute
The method stated.
The embodiment of the present invention provides a kind of calculating equipment of Web page building, including:
Memory, for storing program instruction;
Processor executes above-mentioned implementation according to the program of acquisition for calling the program instruction stored in the memory
Method described in any one of mode.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications can be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.