CN111443909B - Method and device for generating page - Google Patents

Method and device for generating page Download PDF

Info

Publication number
CN111443909B
CN111443909B CN202010208637.5A CN202010208637A CN111443909B CN 111443909 B CN111443909 B CN 111443909B CN 202010208637 A CN202010208637 A CN 202010208637A CN 111443909 B CN111443909 B CN 111443909B
Authority
CN
China
Prior art keywords
markup language
language file
page
display template
file
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.)
Active
Application number
CN202010208637.5A
Other languages
Chinese (zh)
Other versions
CN111443909A (en
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010208637.5A priority Critical patent/CN111443909B/en
Publication of CN111443909A publication Critical patent/CN111443909A/en
Application granted granted Critical
Publication of CN111443909B publication Critical patent/CN111443909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a method and a device for generating pages. One embodiment of the method comprises the following steps: inquiring a markup language file of a page to be generated; constructing a page display template corresponding to the markup language file through a front end frame; establishing a corresponding relation between the page display template and the markup language file; and generating a target page through the page display template in response to detecting a page generation instruction corresponding to the page display template. This embodiment improves the compatibility of the markup language file with the front-end framework.

Description

Method and device for generating page
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method and apparatus for generating a page.
Background
Markdown belongs to one type of markup language. Markdown can be written as a convenient document, and therefore, markdown needs to be combined with some front end framework (which may be Vue, react, angular, qucikUI, layui, for example). The Markdown file can be rendered in the page through the front end framework, so that the efficiency of generating the page is improved.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for generating a page.
In a first aspect, embodiments of the present disclosure provide a method for generating a page, the method comprising: inquiring a markup language file of a page to be generated; constructing a page display template corresponding to the markup language file through a front end frame, wherein the page display template is used for displaying the content of the markup language file in the page to be generated; establishing a corresponding relation between the page display template and the markup language file; and generating a target page through the page display template in response to detecting a page generation instruction corresponding to the page display template, wherein the target page contains the content of the markup language file.
In a second aspect, embodiments of the present disclosure provide an apparatus for generating a page, the apparatus comprising: the file inquiring unit is configured to inquire a markup language file of a page to be generated; a template construction unit configured to construct a page display template corresponding to the markup language file through a front end frame, the page display template being used for displaying contents of the markup language file in the page to be generated; the corresponding relation establishing unit is configured to establish the corresponding relation between the page display template and the markup language file; and a page generation unit configured to generate a target page including contents of the markup language file through the page display template in response to detection of a page generation instruction corresponding to the page display template.
In a third aspect, embodiments of the present disclosure provide an electronic device, comprising: one or more processors; and a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the method for generating pages of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the method for generating pages of the first aspect described above.
The embodiment of the disclosure provides a method and a device for generating a page, firstly, a markup language file of the page to be generated is queried; then constructing a page display template corresponding to the markup language file through the front end frame, and improving the compatibility of the markup language file and the front end frame; then establishing a corresponding relation between the page display template and the markup language file, and improving the efficiency of calling the markup language file; and finally, when a page generation instruction corresponding to the page display template is detected, generating a target page through the page display template, so that the compatibility of the markup language file and the front end frame is improved, and the efficiency of generating the target page is improved.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a method for generating a page according to the present disclosure;
FIG. 3 is a flow chart of another embodiment of a method for generating a page according to the present disclosure;
FIG. 4 is a schematic illustration of one application scenario of a method for generating pages according to the present disclosure;
FIG. 5 is a schematic structural diagram of one embodiment of an apparatus for generating pages according to the present disclosure;
fig. 6 is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be noted that, for convenience of description, only the portions related to the present application are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary system architecture 100 of a method for generating pages or an apparatus for generating pages to which embodiments of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages or the like. Various page display applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, and the like, may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting page browsing, including but not limited to smartphones, tablet computers, electronic book readers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., to provide distributed services), or as a single software or software module, without limitation.
The server 105 may be a server providing various services, such as a background web server providing display pages to the terminal devices 101, 102, 103. The background web server may generate corresponding display pages according to different front end frames of the terminal devices 101, 102, 103, and feed back processing results (e.g., web pages) to the terminal devices 101, 102, 103 to display on the terminal devices 101, 102, 103.
It should be noted that, the method for generating a page provided by the embodiments of the present disclosure is generally performed by the server 105, and accordingly, the apparatus for generating a page is generally disposed in the server 105.
The server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (for example, to provide a distributed service), or may be implemented as a single software or software module, which is not specifically limited herein.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for generating pages according to the present disclosure is shown. The method for generating the page comprises the following steps:
step 201, query the markup language file of the page to be generated.
In the present embodiment, the execution subject of the method for generating a page (e.g., the server 105 shown in fig. 1) may acquire the markup language file through a wired connection or a wireless connection. Wherein a markup language is a computer literal code that combines text with other information related to the text to reveal details about the structure of the document and the processing of the data. Other information related to the text, including the structure and representation of the text, etc., is combined with the original text, but identified using a tag. The markup language file is a file formed by markup language. It should be noted that the wireless connection may include, but is not limited to, 3G/4G connections, wiFi connections, bluetooth connections, wiMAX connections, zigbee connections, UWB (Ultra Wideband) connections, and other now known or later developed wireless connection means.
The markup language has the advantages of simple grammar, strong compatibility, convenient derivation, uniform typesetting across platforms and the like. When applying markup language files to the production of pages (which may be, for example, the generation of browser web pages), it is often necessary to develop corresponding plug-ins so that the markup language files are applied to the front end framework of the development page. This makes it necessary for the plug-in to develop the front-end framework in a targeted manner, since the front-end framework differs in terms of data type, data processing architecture, etc. The plug-in cannot be reused in different front end frameworks, limiting the application of the markup language.
When the execution body generates the page, the execution body can firstly inquire the markup language file of the page to be generated. After determining the content of the page to be generated, the execution body may search for a markup language file corresponding to the page to be generated.
Step 202, constructing a page display template corresponding to the markup language file through a front end framework.
In general, when generating a page, a corresponding front end frame needs to be selected to generate the corresponding page. Therefore, the execution body can construct the page display template corresponding to the markup language file, so that the markup language file generates a page through the page display template, and the compatibility of the markup language file and the front end frame is improved.
Step 203, establishing a corresponding relation between the page display template and the markup language file.
After the page display template is constructed, the execution body can establish the corresponding relation between the page display template and the markup language file. The correspondence may be an information path of the markup language file on the execution body or other device. Thus, when a page is generated through the page display template, the corresponding markup language file can be directly called.
And 204, generating a target page through the page display template in response to detecting a page generation instruction corresponding to the page display template.
When a page generation instruction of the page display template is detected, the execution subject can generate a target page through the page display template. The target page contains the content of the markup language file. Therefore, the generation of pages by using the markup language file in a way of developing plug-ins is avoided, and the universality of the markup language file is improved.
With continued reference to fig. 3, a flow 300 of one embodiment of a method for generating pages according to the present disclosure is shown. The method for generating the page comprises the following steps:
step 301, query a markup language file of a page to be generated.
The content of step 301 is the same as that of step 201, and will not be described in detail here.
Step 302, query the front end framework for type information.
Different front end frameworks differ in the way the page is constructed, the data processing, and the like. The execution body may first view type information of the front end framework corresponding to the page to be generated. The type information may be Vue, react, angular, qucikUI, layui, etc.
And 303, constructing a page display template of the front-end framework according to the type information.
After the type information is determined, the execution body can control the corresponding front-end framework to generate the page display template. For example, the execution body may query pages to be generated for both devices. The page to be generated of the first device is used for generating the page on the notebook computer, the page to be generated of the second device is used for generating the page on the smart phone, and the front end frames of the page generated by the first device and the page generated by the second device are different. At this time, the execution body needs to construct a page display template corresponding to the front end frame according to the type information of the front end frame, which is beneficial to improving the compatibility of the markup language file and the front end frame.
Step 304, converting the markup language file into a hypertext markup language file.
In order to improve the compatibility of the markup language file with the front-end framework, the execution body may also convert the markup language file into a hypertext markup language file. Hypertext markup language is an application under standard general markup language, also a specification, a standard that marks parts of a web page to be displayed by markup symbols.
In some optional implementations of this embodiment, the converting the markup language file into the hypertext markup language file may include the steps of:
first, in response to the existence of script calling information in the markup language file, obtaining link information of the script calling information.
The markup language file can be text, picture or video information, and other related information can be called. When script call information exists in the markup language file, the execution subject may acquire link information of the script call information. The script calling information may be used to call the target script. Correspondingly, the link information corresponds to the target script.
And step two, importing the target script corresponding to the link information into the markup language file.
In order to increase the data processing speed, the execution subject may import the target script corresponding to the link information into the markup language file. For example, the target script may be saved before or after the body content of the markup language file. When the markup language file requires a corresponding target script, the target script may be obtained directly from before or after the text content.
And thirdly, converting the markup language file after the target script is imported into a hypertext markup language file.
After the target script is imported, the execution body may convert the markup language file into a hypertext markup language file. The execution body can directly convert the markup language file into the hypertext markup language file according to different data types, and can also convert the markup language file into the hypertext markup language file through a data conversion tool, and the execution body is specific to the actual requirement.
In some optional implementations of this embodiment, the converting the markup language file into a hypertext markup language file may further include: and combining the link information corresponding to the script call information in response to the existence of the script call information in the markup language file.
In practice, there is a case where a markup language file may call a script at multiple places. The common practice is as follows: each time script call information is encountered, the execution subject performs a call script operation. In order to improve the efficiency of executing the script call by the execution subject, the execution subject may first obtain a plurality of pieces of script call information contained in the markup language file, and query each piece of script call information in the plurality of pieces of script call information. When there is a case of calling the same script in the pieces of script call information, the execution subject may merge the link information. Therefore, the execution main body can reduce the data processing amount when the script is called through the link information, and the speed of calling the script is improved.
Step 305, establishing a calling relationship between the page display template and the hypertext markup language file.
The execution body may establish a call relationship between the page display template and the hypertext markup language file. Therefore, when the page is generated through the page display template, the content of the hypertext markup language file can be used as the content of the page, and the efficiency of generating the page is improved.
And step 306, generating a target page through the page display template in response to detecting a page generation instruction corresponding to the page display template.
The content of step 306 is the same as that of step 204, and will not be described in detail here.
With continued reference to fig. 4, fig. 4 is a schematic diagram of an application scenario of the method for generating a page according to the present embodiment. The server 105 may generate corresponding target pages for the terminal device 102 and the terminal device 103, and the target page of the terminal device 102 may be the same as the target page of the terminal device 103. The terminal device 102 may be a smart phone, and the terminal device 103 may be a notebook computer. Server 105 may employ different front end frameworks to generate pages for terminal device 102 and terminal device 103, respectively. The server 105 first queries the markup language file required to generate the page. Then, the server 105 generates corresponding page display templates according to the front end frames of the terminal device 102 and the terminal device 103, respectively, and establishes a correspondence relationship between the markup language file and each front end frame. When the server 105 detects a page generation instruction of the corresponding page display template, the corresponding page display template may be controlled to generate a target page. Therefore, the compatibility of the markup language file and different front end frames is improved, and the efficiency of generating the target page is improved.
The method provided by the embodiment of the disclosure includes the steps of firstly, inquiring a markup language file of a page to be generated; then constructing a page display template corresponding to the markup language file through the front end frame, and improving the compatibility of the markup language file and the front end frame; then establishing a corresponding relation between the page display template and the markup language file, and improving the efficiency of calling the markup language file; and finally, when a page generation instruction corresponding to the page display template is detected, generating a target page through the page display template, so that the compatibility of the markup language file and the front end frame is improved, and the efficiency of generating the target page is improved.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of an apparatus for generating a page, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied in various electronic devices.
As shown in fig. 5, the apparatus 500 for generating a page of the present embodiment may include: a file inquiry unit 501, a template construction unit 502, a correspondence relation establishment unit 503, and a page generation unit 504. Wherein the file querying unit 501 is configured to query a markup language file of a page to be generated; the template construction unit 502 is configured to construct, through a front end framework, a page display template corresponding to the markup language file, the page display template being used to display contents of the markup language file in the page to be generated; the correspondence establishing unit 503 is configured to establish a correspondence between the page display template and the markup language file; the page generating unit 504, in response to detecting a page generating instruction corresponding to the page display template, is configured to generate a target page including the content of the markup language file through the page display template.
In some optional implementations of this embodiment, the template building unit 502 may include: a type information query subunit (not shown) and a template construction subunit (not shown). Wherein the type information querying subunit is configured to query the type information of the front-end framework; the template construction subunit is configured to construct a page display template of the front-end framework based on the type information.
In some optional implementations of the present embodiment, the correspondence establishing unit 503 may include: a file conversion subunit (not shown) and a call relationship establishment subunit (not shown). Wherein the file conversion subunit is configured to convert the markup language file into a hypertext markup language file; the call relation establishing subunit is configured to establish a call relation between the page display template and the hypertext markup language file.
In some optional implementations of this embodiment, the file conversion subunit may include: a link information acquisition module (not shown), a file import module (not shown), and a file conversion module (not shown). The link information acquisition module is used for responding to the existence of script calling information in the markup language file and is configured to acquire the link information of the script calling information, wherein the script calling information is used for calling a target script, and the link information corresponds to the target script; the file importing module is configured to import the target script corresponding to the link information into the markup language file; the file conversion module is configured to convert the markup language file imported into the target script into a hypertext markup language file.
In some optional implementations of this embodiment, the file conversion subunit may include: the link information merging module (not shown in the figure) is configured to merge link information corresponding to a plurality of pieces of script call information in response to the plurality of pieces of script call information existing in the markup language file.
The embodiment also provides an electronic device, including: one or more processors; and a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the method for generating pages described above.
The present embodiment also provides a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the above-described method for generating pages.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use with an electronic device (e.g., server 105 of FIG. 1) implementing embodiments of the present disclosure. The electronic device shown in fig. 6 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 601.
It should be noted that, the above-mentioned computer readable medium according to the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the above-mentioned two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: inquiring a markup language file of a page to be generated; constructing a page display template corresponding to the markup language file through a front end frame, wherein the page display template is used for displaying the content of the markup language file in the page to be generated; establishing a corresponding relation between the page display template and the markup language file; and generating a target page through the page display template in response to detecting a page generation instruction corresponding to the page display template, wherein the target page contains the content of the markup language file.
Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes a file querying unit, a template constructing unit, a correspondence establishing unit, and a page generating unit. The names of these units do not constitute a limitation on the unit itself in some cases, and for example, the page generation unit may also be described as "a unit for generating a page of a corresponding markup language file".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the application referred to in this disclosure is not limited to the specific combination of features described above, but encompasses other embodiments in which features described above or their equivalents may be combined in any way without departing from the spirit of the application. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (10)

1. A method for generating a page, comprising:
inquiring a markup language file of a page to be generated;
constructing a page display template corresponding to the markup language file through a front end framework, wherein the page display template comprises: inquiring type information of the front end frame; constructing a page display template of the front end frame according to the type information, wherein the page display template is used for displaying the content of the markup language file in the page to be generated;
establishing a corresponding relation between the page display template and the markup language file;
and generating a target page through the page display template in response to detecting a page generation instruction corresponding to the page display template, wherein the target page contains the content of the markup language file.
2. The method of claim 1, wherein the establishing the correspondence of the page display template and the markup language file comprises:
converting the markup language file into a hypertext markup language file;
and establishing a calling relation between the page display template and the hypertext markup language file.
3. The method of claim 2, wherein the converting the markup language file to a hypertext markup language file comprises:
responding to script calling information in the markup language file, and acquiring link information of the script calling information, wherein the script calling information is used for calling a target script, and the link information corresponds to the target script;
importing the target script corresponding to the link information into the markup language file;
and converting the markup language file imported into the target script into a hypertext markup language file.
4. The method of claim 3, wherein said converting said markup language file to a hypertext markup language file comprises:
and in response to the existence of a plurality of pieces of script calling information in the markup language file, merging the link information corresponding to the script calling information.
5. An apparatus for generating a page, comprising:
the file inquiring unit is configured to inquire a markup language file of a page to be generated;
a template construction unit configured to construct a page display template corresponding to the markup language file through a front end frame, the page display template being used for displaying contents of the markup language file in the page to be generated;
the corresponding relation establishing unit is configured to establish a corresponding relation between the page display template and the markup language file;
a page generation unit configured to generate a target page including contents of the markup language file through the page display template in response to detection of a page generation instruction corresponding to the page display template;
wherein the template construction unit includes:
a type information querying subunit configured to query type information of the front-end framework;
and a template construction subunit configured to construct a page display template of the front-end framework according to the type information.
6. The apparatus of claim 5, wherein the correspondence establishing unit comprises:
a file conversion subunit configured to convert the markup language file into a hypertext markup language file;
and the call relation establishing subunit is configured to establish a call relation between the page display template and the hypertext markup language file.
7. The apparatus of claim 6, wherein the file conversion subunit comprises:
the link information acquisition module is used for responding to the existence of script calling information in the markup language file and is configured to acquire link information of the script calling information, wherein the script calling information is used for calling a target script, and the link information corresponds to the target script;
a file importing module configured to import the target script corresponding to the link information into the markup language file;
and the file conversion module is configured to convert the markup language file imported into the target script into a hypertext markup language file.
8. The apparatus of claim 7, wherein the file conversion subunit comprises:
and the link information merging module is used for responding to the existence of a plurality of pieces of script calling information in the markup language file and is configured to merge the link information corresponding to the script calling information.
9. An electronic device, comprising:
one or more processors;
a memory having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-4.
10. A computer readable medium on which a computer program is stored, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1 to 4.
CN202010208637.5A 2020-03-23 2020-03-23 Method and device for generating page Active CN111443909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010208637.5A CN111443909B (en) 2020-03-23 2020-03-23 Method and device for generating page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010208637.5A CN111443909B (en) 2020-03-23 2020-03-23 Method and device for generating page

Publications (2)

Publication Number Publication Date
CN111443909A CN111443909A (en) 2020-07-24
CN111443909B true CN111443909B (en) 2023-09-29

Family

ID=71654314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010208637.5A Active CN111443909B (en) 2020-03-23 2020-03-23 Method and device for generating page

Country Status (1)

Country Link
CN (1) CN111443909B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162729A (en) * 2020-09-23 2021-01-01 北京首钢自动化信息技术有限公司 VUE-based component development and display method
CN112099793B (en) * 2020-09-25 2023-08-22 成都极米科技股份有限公司 Interface generation method and device, electronic equipment and storage medium
CN113722026A (en) * 2020-10-23 2021-11-30 北京沃东天骏信息技术有限公司 Communication method, device, equipment and computer readable medium
CN112800724A (en) * 2020-12-29 2021-05-14 杭州涂鸦信息技术有限公司 Readable file export method of visual configuration template and related device
CN115357252B (en) * 2022-10-08 2022-12-27 成都数联云算科技有限公司 Source code file generation method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6684369B1 (en) * 1997-06-19 2004-01-27 International Business Machines, Corporation Web site creator using templates
CN104798036A (en) * 2012-08-14 2015-07-22 微软公司 User interface control framework for stamping out controls using a declarative template
CN105827733A (en) * 2016-05-12 2016-08-03 北京金山安全软件有限公司 Data pushing method and device and electronic equipment
US9577889B1 (en) * 2013-01-29 2017-02-21 Amazon Technologies, Inc. Managing page-level usage data
CN107632826A (en) * 2016-07-14 2018-01-26 腾讯科技(深圳)有限公司 The Compilation Method and client of a kind of source code
CN110297999A (en) * 2019-05-09 2019-10-01 京东方科技集团股份有限公司 A kind of web page template generation method and device, webpage loading method and front-end server and Website server
CN110347984A (en) * 2019-05-20 2019-10-18 中国平安财产保险股份有限公司 Declaration form page variation, device, computer equipment and storage medium
CN110347953A (en) * 2019-05-20 2019-10-18 中国平安财产保险股份有限公司 Page generation method, device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060150082A1 (en) * 2004-12-30 2006-07-06 Samir Raiyani Multimodal markup language tags
US8352444B1 (en) * 2011-07-11 2013-01-08 Peter Hon-You Chang User-driven menu generation system with dynamic generation of target files with placeholders for persistent change or temporary security change over cloud computing virtual storage from template files
US20150012819A1 (en) * 2013-07-02 2015-01-08 Linkedin Corporation Template-driven decoration engine

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6684369B1 (en) * 1997-06-19 2004-01-27 International Business Machines, Corporation Web site creator using templates
CN104798036A (en) * 2012-08-14 2015-07-22 微软公司 User interface control framework for stamping out controls using a declarative template
US9577889B1 (en) * 2013-01-29 2017-02-21 Amazon Technologies, Inc. Managing page-level usage data
CN105827733A (en) * 2016-05-12 2016-08-03 北京金山安全软件有限公司 Data pushing method and device and electronic equipment
CN107632826A (en) * 2016-07-14 2018-01-26 腾讯科技(深圳)有限公司 The Compilation Method and client of a kind of source code
CN110297999A (en) * 2019-05-09 2019-10-01 京东方科技集团股份有限公司 A kind of web page template generation method and device, webpage loading method and front-end server and Website server
CN110347984A (en) * 2019-05-20 2019-10-18 中国平安财产保险股份有限公司 Declaration form page variation, device, computer equipment and storage medium
CN110347953A (en) * 2019-05-20 2019-10-18 中国平安财产保险股份有限公司 Page generation method, device, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
L. M. Hillah 等.PNML Framework: An Extendable Reference Implementation of the Petri Net Markup Language.《Electronic Notes in Theor. Comp. Sci.》.2008,第214卷第231–254页. *
孙斌 等.基于模板的BREW应用可视化界面设计及代码生成.《软件工程师》.2010,(第131、132期),第117-119页. *
马翔宇.基于MVC的Canvas框架的设计与实现.《中国优秀硕士学位论文全文数据库 信息科技辑》.2020,I138-397. *

Also Published As

Publication number Publication date
CN111443909A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN111443909B (en) Method and device for generating page
US10635735B2 (en) Method and apparatus for displaying information
US11563674B2 (en) Content based routing method and apparatus
US11016716B2 (en) Picture interface display method and apparatus according to jump protocol
CN110020329B (en) Method, device and system for generating webpage
CN109558323B (en) System, method and apparatus for debugging pages
CN112507005B (en) Method and device for processing message
CN110780874B (en) Method and device for generating information
US11886798B2 (en) Method and apparatus for obtaining loading time length of image in webpage, and electronic device
WO2018177032A1 (en) Method and device for processing response data, client device and electronic device
CN113505302A (en) Method, device and system for supporting dynamic acquisition of buried point data and electronic equipment
CN113076294A (en) Information sharing method and device
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
US20210224103A1 (en) Method and apparatus for generating information
CN113553123A (en) Data processing method and device, electronic equipment and storage medium
CN110708238B (en) Method and apparatus for processing information
US10931791B2 (en) Method and apparatus for processing request
CN110069186B (en) Method and equipment for displaying operation interface of application
CN109582580B (en) System, method and apparatus for debugging pages
CN111400581A (en) System, method and apparatus for annotating samples
CN110827037A (en) Data interaction method and device based on block chain
CN110727692A (en) Method and device for setting linkage diagram
US20190172263A1 (en) Method and apparatus for augmenting reality
CN110619101A (en) Method and apparatus for processing information
CN113835790B (en) Paging page display method and device based on Android

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
GR01 Patent grant
GR01 Patent grant