CN110633081A - Page generation method and device - Google Patents

Page generation method and device Download PDF

Info

Publication number
CN110633081A
CN110633081A CN201910783024.1A CN201910783024A CN110633081A CN 110633081 A CN110633081 A CN 110633081A CN 201910783024 A CN201910783024 A CN 201910783024A CN 110633081 A CN110633081 A CN 110633081A
Authority
CN
China
Prior art keywords
page
style
file
module
page module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201910783024.1A
Other languages
Chinese (zh)
Inventor
贾少龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201910783024.1A priority Critical patent/CN110633081A/en
Publication of CN110633081A publication Critical patent/CN110633081A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The page generation method and device provided by the application acquire at least one page module selected by a user and the style of each page module, generate a template file and a style file of a page according to the at least one page module selected by the user and the style of each page module, and finally generate the page according to the template file and the style file. Therefore, the method provided by the invention can automatically generate the page only by acquiring the page module of the page selected by the user and the style of each page module, does not need to compile a whole set of page codes for generating the page, saves the page development time and can quickly generate the page.

Description

Page generation method and device
Technical Field
The present application relates to the field of web page development technologies, and in particular, to a method and an apparatus for generating a page.
Background
With the development of the internet, the front-end page development technology is widely applied. In front-end page development, a page template of a page generally comprises a head part, a bottom part, a main body, a banner of the page and other page modules, and each page module has different styles, so that the page formed by the page templates with different styles can present different effects.
The existing front-end page development technology needs to write a whole set of page codes for generating a front-end page, wherein the page codes comprise all page modules and the style information of each page module, so that a large amount of time for writing the codes is often consumed for the front-end page with rich hierarchical content. Therefore, how to generate a page quickly becomes a problem to be solved urgently at present.
Disclosure of Invention
The application provides a page generation method and device, and aims to solve the problem of how to generate a page quickly.
In order to achieve the above object, the present application provides the following technical solutions:
a page generation method includes:
acquiring at least one page module selected by a user and the style of each page module;
generating a template file and a style file of the page according to the at least one page module and the style of each page module;
and generating the page according to the template file and the style file.
In the above method, optionally, the page module is a page module selected by the user from a plurality of page modules to be selected in the initial page.
In the above method, optionally, the style of the page module is a style input by the user in the page module.
Optionally, the above method, generating a template file and a style file of a page according to the at least one page module and the style of each page module, includes:
generating a template file of the page according to each page module;
and generating a style file of the page according to each page module and the style of each page module.
Optionally, the above method, generating the page according to the template file and the style file, includes:
finding the associated label in the template file;
according to the association label, creating a path link of the style file, and enabling the template file and the style file to be associated;
and executing the template file associated with the style file to generate the page.
A page generating apparatus, comprising:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring at least one page module selected by a user and the style of each page module;
the first generating unit is used for generating a template file and a style file of the page according to the at least one page module and the style of each page module;
and the second generating unit is used for generating the page according to the template file and the style file.
In the above apparatus, optionally, the page module is a page module selected by the user from a plurality of page modules to be selected of the initial page.
Optionally, in the apparatus described above, the style of the page module is a style input by a user in the page module.
Optionally, the above apparatus, wherein the first generating unit is specifically configured to: generating a template file of the page according to each page module; and generating a style file of the page according to each page module and the style of each page module.
Optionally, the second generating unit is specifically configured to: finding the associated label in the template file; according to the association label, creating a path link of the style file, and enabling the template file and the style file to be associated; and executing the template file associated with the style file to generate the page.
The page generation method and device provided by the application acquire at least one page module selected by a user and the style of each page module, generate a template file and a style file of a page according to the at least one page module selected by the user and the style of each page module, and finally generate the page according to the template file and the style file. Therefore, the method provided by the invention can automatically generate the page only by acquiring the page module of the page selected by the user and the style of each page module, does not need to compile a whole set of page codes for generating the page, saves the page development time and can quickly generate the page.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a page generation method disclosed in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a process for generating a page according to a template file and a style file according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of another page generation method disclosed in the embodiments of the present application;
fig. 4 is a schematic structural diagram of a page generation apparatus disclosed in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 discloses a page generation method for a back-end processing module of a server, which may include the following steps:
s101, obtaining at least one page module selected by a user and the style of each page module.
The page module comprises a head part, a bottom part, a main body of the page, a banner of the page and the like, and the page module selected by the user can be one or more of the head part, the bottom part, the main body and the banner of the page. The style of the page module can comprise the position, height and width of the page module, and various styles such as text content, text font and text color of the page module.
The back-end processing module of the server can acquire the page module and the style of each page module through the page module selected by the user on the front-end interface of the server and the style of each page module output on the front-end interface.
S102, generating a template file and a style file of the page according to at least one page module and the style of each page module.
According to at least one page module and the style of each page module, one way of generating the template file and the style file of the page may be: and generating a template file of the page according to each page module, and generating a style file of the page according to each page module and the style of each page module.
One way of generating the template file of the page according to each page module may be to extract data information of all the page modules from the obtained data information of the page modules and the styles of the page modules, and generate the template file of the page according to the extracted data information of all the page modules, so that all the page modules are included in the template file.
For example, the obtained data information includes: and the data information of the head and the body are respectively written into the same document as independent fields to obtain a template file, and the layout of the page is regulated through the template file. The template file of the page may be an HTML (Hyper Text Mark-up Language) file.
The style file of the page can be generated according to the style of each page module and each page module, wherein the style of each page module and each page module is taken as an integral data segment, and all the data segments are written into the same document, so that the style file is obtained, the obtained style file comprises a plurality of mutually independent data segments, and each data segment comprises the page module and the data of the style of each page module.
As described in the previous paragraph, for example, the obtained data information includes: two page modules, a header and a body, and a style of the header and the body. The header and the style of the header are taken as an integral data segment, the body and the style of the body are taken as another integral data segment, and the two independent data segments are written into the same document, so that a style file is obtained. The styles of all page modules of a page are specified by the style file, i.e. the height, width, position, etc. of the page modules are specified. Among them, the Style file of the page may be a CSS (Cascading Style Sheets) file.
And S103, generating a page according to the template file and the style file.
The template file specifies the page layout of the page, i.e. the page modules comprised in the page, and the distribution of the page modules. The style file specifies the specific style of each page module in the page, so that a complete page can be obtained through the template file and the style file. The implementation manner of generating the page according to the template file and the style file may refer to the flow illustrated in fig. 2.
The page generation method provided by the embodiment of the application obtains at least one page module selected by a user and the style of each page module, generates a template file and a style file of a page according to the at least one page module selected by the user and the style of each page module, and finally generates the page according to the template file and the style file. Therefore, the method provided by the application can automatically generate the page only by acquiring the page module of the page selected by the user and the style of each page module, does not need to write a whole set of page codes for generating the page, saves the page development time, and can quickly generate the page.
Fig. 2 is an embodiment of generating a page according to the template file and the style file in S103 in fig. 1, which may include the following steps:
s201, finding the associated label in the template file.
The associated tag is a pre-existing tag in the template file, and is used for linking external resources, for example, linking an external file and an external website.
S202, creating a path link of the style file according to the associated label, and enabling the template file and the style file to be associated.
And creating a path link of the style file in the associated tag, namely creating an address of the linked style file, and associating the template file with the style file by creating the path link of the style file in the associated tag, thereby realizing the introduction of the style file into the template file.
And S203, executing the template file associated with the style file to generate a page.
And after the template file is associated with the style file, executing the template file associated with the style file to enable the generated page to be matched with the page module selected by the user and the style of the page module.
According to the method provided by the embodiment, after the template file and the style file are generated, the template file and the style file are associated according to the associated tags, and finally the template file associated with the style file is executed, so that the generated page is matched with the page module selected by the user and the style of the page module.
Fig. 3 discloses another page generation method applied to a server according to an embodiment of the present application, where the server includes a front-end page generator, a server resolver, and a page manager, where the server resolver and the page manager belong to a back-end processing module of the server. The page generation method of the embodiment of the application can comprise the following steps:
s301, the front-end page generator transmits at least one page module selected by the user and data information of the style of each page module to the server-side resolver.
The page module is a page module selected by a user from a plurality of page modules to be selected of an initial page, and the initial page is a page displayed by a front-end page generator. A plurality of page modules to be selected, such as the head, the bottom and the body of the page and the banner of the page, are included in the initial page of the front-end page generator.
After the front-end page generator determines that the user finishes the selection of the page module in the initial page, the front-end page generator generates a page template according to the page module selected by the user, the generated page template comprises the page module selected by the user, each page module is provided with an input frame, the input frame of each page module is a window for the user to input the style of the page module, and the user can input the style of the page module in the input frame of the page module according to the own requirements.
And after determining that the style is input in each page module by the user, the front-end page generator transmits the page module selected by the user and the data information of the style of each page module to the server-side resolver, wherein the data information of the page module transmitted by the front-end page generator and the style of each page module is transmitted in a JSON (Java Script Object Notation) data format.
S302, the server-side analyzer analyzes the received data information into data information meeting the format requirement of the page manager, and transmits the data information to the page manager.
And presetting a data analysis mode in the service analyzer, analyzing the data information according to the preset data analysis mode after the service analyzer receives the data information, enabling the analyzed data information to meet the format requirement of the page manager, and finally packaging and transmitting the analyzed data to the page manager.
S303, the page manager generates an HTML file and a CSS file according to the received data information, and generates a page according to the HTML file and the CSS file.
After receiving the data information transmitted by the server-side parser, the page manager extracts the data information of the page modules from the data information transmitted by the server-side parser, and writes each page module as an independent field into the same document as described in the foregoing embodiment, thereby obtaining an HTML file. Meanwhile, each page module and the style of each page module are taken as an integral data segment, and all the data segments are written into the same document, so that a CSS file is obtained, the obtained CSS comprises a plurality of mutually independent data segments, and each data segment comprises the page module and the data of the style of each page module.
And finally, the page manager introduces the CSS file into the HTML file according to the associated tag in the HTML file, associates the CSS file with the HTML file, and executes the HTML file introduced with the CSS file, so that the front-end page generator displays the page corresponding to the page module selected by the user and the input style.
In the method provided by this embodiment, the front-end page generator generates a page template according to a page module selected by a user, and transmits data information of the page module selected by the user and an input style to the server-side parser, and the server-side parser parses the received data and transmits the parsed data to the page manager, so that the page manager generates an HTML file and a CSS file, and finally, a page is obtained according to the HTML file and the CSS file. Therefore, the method provided by the embodiment can obtain the layout of the page according to the page module selected by the user, and can realize the configurability of the page style and the page layout according to the style input by the user, thereby saving the development time of the page.
Corresponding to the method in fig. 1, an embodiment of the present invention further provides a page generating apparatus, which is used for specifically implementing the method in fig. 1, and a schematic structural diagram of the page generating apparatus is shown in fig. 4, and specifically includes:
an obtaining unit 401, configured to obtain at least one page module selected by a user and a style of each page module;
a first generating unit 402, configured to generate a template file and a style file of a page according to at least one page module and a style of each page module;
the second generating unit 403 is configured to generate a page according to the template file and the style file.
The page module obtained by the obtaining unit 401 is a page module selected by the user from a plurality of page modules to be selected in the initial page.
The obtaining unit 401 obtains the style of the page module as the style input by the user in the page module.
The first generating unit 402 generates the template file of the page and the implementation manner of the style file according to at least one page module and the style of each page module, including but not limited to: and generating a template file of the page according to each page module, and generating a style file of the page according to each page module and the style of each page module.
The second generating unit 403 generates the template file and the style file, and the implementation manner of generating the page includes but is not limited to: and searching the associated label in the template file, creating a path link of the style file according to the associated label, associating the template file with the style file, executing the template file associated with the style file, and generating a page.
The page generation device provided by the embodiment of the application obtains at least one page module selected by a user and the style of each page module, generates a template file and a style file of a page according to the at least one page module selected by the user and the style of each page module, and finally generates the page according to the template file and the style file. Therefore, the device provided by the invention can automatically generate the page only by acquiring the page module of the page selected by the user and the style of each page module, does not need to compile a whole set of page codes for generating the page, saves the page development time and can quickly generate the page.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A page generation method is characterized by comprising the following steps:
acquiring at least one page module selected by a user and the style of each page module;
generating a template file and a style file of the page according to the at least one page module and the style of each page module;
and generating the page according to the template file and the style file.
2. The method according to claim 1, wherein the page module is a page module selected by the user from a plurality of page modules to be selected of an initial page.
3. The method of claim 1, wherein the style of the page module is a style entered by the user in the page module.
4. The method of claim 1, wherein generating a template file and a style file of pages according to the at least one page module and the style of each page module comprises:
generating a template file of the page according to each page module;
and generating a style file of the page according to each page module and the style of each page module.
5. The method of claim 1, wherein generating the page from the template file and the style file comprises:
finding the associated label in the template file;
according to the association label, creating a path link of the style file, and enabling the template file and the style file to be associated;
and executing the template file associated with the style file to generate the page.
6. A page generating apparatus, comprising:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring at least one page module selected by a user and the style of each page module;
the first generating unit is used for generating a template file and a style file of the page according to the at least one page module and the style of each page module;
and the second generating unit is used for generating the page according to the template file and the style file.
7. The apparatus of claim 6, wherein the page module is a page module selected by the user from a plurality of page modules to be selected from an initial page.
8. The apparatus of claim 6, wherein the style of the page module is a style entered by the user in the page module.
9. The apparatus according to claim 6, wherein the first generating unit is specifically configured to: generating a template file of the page according to each page module; and generating a style file of the page according to each page module and the style of each page module.
10. The apparatus according to claim 6, wherein the second generating unit is specifically configured to: finding the associated label in the template file; according to the association label, creating a path link of the style file, and enabling the template file and the style file to be associated; and executing the template file associated with the style file to generate the page.
CN201910783024.1A 2019-08-23 2019-08-23 Page generation method and device Withdrawn CN110633081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910783024.1A CN110633081A (en) 2019-08-23 2019-08-23 Page generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910783024.1A CN110633081A (en) 2019-08-23 2019-08-23 Page generation method and device

Publications (1)

Publication Number Publication Date
CN110633081A true CN110633081A (en) 2019-12-31

Family

ID=68968938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910783024.1A Withdrawn CN110633081A (en) 2019-08-23 2019-08-23 Page generation method and device

Country Status (1)

Country Link
CN (1) CN110633081A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488731A (en) * 2020-04-15 2020-08-04 深圳前海环融联易信息科技服务有限公司 File generation method and device, computer equipment and storage medium
CN111949266A (en) * 2020-07-23 2020-11-17 上海硬通网络科技有限公司 Webpage generation method and device and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095445A (en) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 Page generation method and system
CN105159686A (en) * 2015-09-28 2015-12-16 北京奇虎科技有限公司 Website page development method and apparatus
CN105204860A (en) * 2015-09-28 2015-12-30 上海斐讯数据通信技术有限公司 Method and device for rapidly generating user-defined static Web page
CN106648555A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Page generation method and device
CN106682120A (en) * 2016-12-09 2017-05-17 北京深思数盾科技股份有限公司 Method and system for page generation
CN106980508A (en) * 2017-04-01 2017-07-25 百度在线网络技术(北京)有限公司 Method and apparatus for generating the page
CN109271162A (en) * 2018-09-03 2019-01-25 中国建设银行股份有限公司 A kind of page generation method and device
CN109918607A (en) * 2019-03-20 2019-06-21 杭州网易再顾科技有限公司 Page building method and device, medium and calculating equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095445A (en) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 Page generation method and system
CN105159686A (en) * 2015-09-28 2015-12-16 北京奇虎科技有限公司 Website page development method and apparatus
CN105204860A (en) * 2015-09-28 2015-12-30 上海斐讯数据通信技术有限公司 Method and device for rapidly generating user-defined static Web page
CN106648555A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Page generation method and device
CN106682120A (en) * 2016-12-09 2017-05-17 北京深思数盾科技股份有限公司 Method and system for page generation
CN106980508A (en) * 2017-04-01 2017-07-25 百度在线网络技术(北京)有限公司 Method and apparatus for generating the page
CN109271162A (en) * 2018-09-03 2019-01-25 中国建设银行股份有限公司 A kind of page generation method and device
CN109918607A (en) * 2019-03-20 2019-06-21 杭州网易再顾科技有限公司 Page building method and device, medium and calculating equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488731A (en) * 2020-04-15 2020-08-04 深圳前海环融联易信息科技服务有限公司 File generation method and device, computer equipment and storage medium
CN111488731B (en) * 2020-04-15 2023-09-29 深圳前海环融联易信息科技服务有限公司 File generation method, device, computer equipment and storage medium
CN111949266A (en) * 2020-07-23 2020-11-17 上海硬通网络科技有限公司 Webpage generation method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US7447706B2 (en) Method and system for generating an auto-completion list for a cascading style sheet selector
US7979793B2 (en) Graphical creation of a document conversion template
CN103970750B (en) A kind of method and apparatus generating html web page
EP2938044B1 (en) System, method, apparatus, and server for displaying network medium information
US20060224607A1 (en) Method and system for aggregating rules that define values for the same property associated with the same document element
CN108733375A (en) Web front-end configuration melts forwarding method, device, storage medium and computer equipment
CN108710490B (en) Method and device for editing Web page
US9672197B2 (en) Universal rebranding engine
CN103166981A (en) Wireless webpage transcoding method and device
US11170051B2 (en) Information processing device, information processing method, and dialog control system
CN103699591A (en) Page body extraction method based on sample page
US20110041052A1 (en) Markup language-based authoring and runtime environment for interactive content platform
CN110633081A (en) Page generation method and device
US9286272B2 (en) Method for transformation of an extensible markup language vocabulary to a generic document structure format
KR20050002895A (en) Browser-independent pop-up windows
CN107145591B (en) Title-based webpage effective metadata content extraction method
US20100037131A1 (en) System and method for designing and generating online stationery
CN111311461B (en) Editor of structured dynamic medical record form based on B-S and generation method
CN113419729A (en) Front-end page building method, device, equipment and storage medium based on modularization
CN112433995A (en) File format conversion method, system, computer equipment and storage medium
CN112596688A (en) Web end custom printing method based on TinyMCE rich text
US20080201356A1 (en) System and method of report representation
CN103034990A (en) Method and device for checking publications
CN113297425B (en) Document conversion method, device, server and storage medium
CN102902723A (en) Method and device for analyzing network data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20191231