CN113760279A - Method and device for generating page - Google Patents

Method and device for generating page Download PDF

Info

Publication number
CN113760279A
CN113760279A CN202110048555.3A CN202110048555A CN113760279A CN 113760279 A CN113760279 A CN 113760279A CN 202110048555 A CN202110048555 A CN 202110048555A CN 113760279 A CN113760279 A CN 113760279A
Authority
CN
China
Prior art keywords
page
component
template
service identifier
generating
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.)
Pending
Application number
CN202110048555.3A
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 Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110048555.3A priority Critical patent/CN113760279A/en
Publication of CN113760279A publication Critical patent/CN113760279A/en
Pending 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Abstract

The invention discloses a method and a device for generating a page, and relates to the technical field of computers. One embodiment of the method comprises: the method comprises the steps that a page can be divided into a plurality of page components, corresponding page components are selected to generate a page template according to different service requirements, when a request for generating a service page is received, the page template and the corresponding page components are automatically obtained, a page text is generated, and then the page is rendered and generated; wherein the page components may be provided by a third party; therefore, the page templates correspond to the service configurations, and each page template is configured with a plurality of independent page components, so that the modularization degree and the configurability of the page are improved, the flexibility and the expansibility of generating the page are improved, and the problem of low development efficiency caused by high page coupling is solved.

Description

Method and device for generating page
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for generating a page.
Background
In the development of internet application, front-end page development is an important component of application development; the Web front end is an important computer application technology in the internet era, and the main carriers of the Web front end are a Web browser and a mobile phone application program. Through the technology, people can conveniently and quickly browse the page content and can interact with the page content; as the size and complexity of internet applications increase, the difficulty of the development work of Web front-end pages also increases.
At present, the following problems mainly exist in the front-end page development of a complex business scene: 1) the page components are high in source code level coupling, strong in dependency and low in modularization degree, and therefore the development team is high in concentration and dependency. 2) When the page component of the newly added service exists, code modification and re-online are needed, and the expansibility is low. 3) When different services are processed, the configuration flexibility is low due to the low modularization degree.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for generating a page, which can divide a page into a plurality of page components, select a corresponding page component to generate a page template according to different service requirements, and when receiving a request for generating a service page, automatically obtain the page template and the corresponding page component, generate a page text, and render the page text to generate a page; wherein the page components may be provided by a third party; therefore, the page templates correspond to the service configurations, and each page template is configured with a plurality of independent page components, so that the modularization degree and the configurability of the page are improved, the flexibility and the expansibility of generating the page are improved, and the problem of low development efficiency caused by high page coupling is solved.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for generating a page, including: receiving a request for generating a page, wherein the request at least comprises a service identifier; acquiring a page template corresponding to the service identifier and a storage address of a page component contained in the page template according to the service identifier; the page component comprises a public component and a business component; generating a page text according to the page template and the storage address of the page component by using a template engine; and sending the page text to a client, and rendering a page by the client according to the page text.
Optionally, the method for generating a page is characterized in that, before acquiring, according to the service identifier, a page template corresponding to the service identifier and a storage address of a page component included in the page template:
and selecting a corresponding page component from a set page component set according to the page layout corresponding to the service identifier to generate the page template corresponding to the service identifier, and determining the storage address of the page component contained in the page template.
Optionally, the method for generating a page is characterized in that the page component includes a common component and a service component, and further includes: the public component belongs to one or more services and is arranged in the page template corresponding to the service identification of the one or more services; and the service component belongs to the page template corresponding to the service identifier.
Optionally, the method for generating a page is characterized in that the page component includes a common component and a service component, and further includes: the service component is a service component provided by a third party.
Optionally, the method for generating a page is characterized in that the page component is a JavaScript file.
Optionally, the method for generating a page is characterized in that, generating a page text according to the page template and the storage address of the page component by using a template engine, and includes: and acquiring the storage addresses of one or more page components associated with the page template, and writing the storage addresses into a set tag range of the page template by using a template engine to generate the page text.
To achieve the above object, according to a second aspect of the embodiments of the present invention, there is provided an apparatus for generating a page, including: the system comprises a request receiving module, a template obtaining module and a page generating module; wherein the content of the first and second substances,
the receiving request module is used for receiving a request for generating a page, wherein the request at least comprises a service identifier;
the template obtaining module is used for obtaining a page template corresponding to the service identifier and a storage address of a page component contained in the page template according to the service identifier; the page components include common components and business components.
The page generation module is used for generating a page text according to the page template and the storage address of the page component by using a template engine; and sending the page text to a client so that the client renders a page according to the page text.
Optionally, the apparatus for generating a page is characterized in that the template obtaining module is further configured to, before obtaining, according to the service identifier, a page template corresponding to the service identifier and a storage address of a page component included in the page template: and selecting a corresponding page component from a set page component set according to the page layout corresponding to the service identifier to generate the page template corresponding to the service identifier, and determining the storage address of the page component contained in the page template.
To achieve the above object, according to a third aspect of the embodiments of the present invention, there is provided an electronic device for generating a page, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the above methods of generating pages.
To achieve the above object, according to a fourth aspect of the embodiments of the present invention, there is provided a computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as any one of the methods of generating a page described above.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps that a page can be divided into a plurality of page components, corresponding page components are selected to generate a page template according to different service requirements, when a request for generating a service page is received, the page template and the corresponding page components are automatically obtained, a page text is generated, and then the page is rendered and generated; wherein the page components may be provided by a third party; therefore, the page templates correspond to the service configurations, and each page template is configured with a plurality of independent page components, so that the modularization degree and the configurability of the page are improved, the flexibility and the expansibility of generating the page are improved, and the problem of low development efficiency caused by centralized development is solved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic flowchart of a method for generating a page according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of generating a page template and a page text according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for generating a page according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, an embodiment of the present invention provides a method for generating a page, where the method may include the following steps:
step S101: receiving a request for generating a page, wherein the request at least comprises a service identifier.
Specifically, the service identifier indicates different services, and the service is to show service-related information through a page and interact with a user, for example: in the page of the electronic mall application, for the same article, there are selling business, leasing business, buying-sharing business, second-hand business and the like; respectively setting a service identifier (for example, service _ sample _111) of a sold service, a service identifier (for example, service _ release _123) of a leased service, a service identifier (for example, service _ share _666) of a purchased service, and a service identifier (for example, service _ used _999) of a second-hand service; the invention does not limit the concrete form and content of the service identifier. Further, a request to generate a page is received, such as: generating an article selling page according to the selling service identification contained in the received request, generating an article leasing page according to the leasing service identification contained in the received request, generating a splicing page according to the splicing service identification contained in the received request, and generating a second-hand article selling page according to the second-hand service identification contained in the received request.
The invention does not limit the concrete form and content of the service identifier; further, the request for generating the page may further include an item identifier or a user identifier displayed on the page, and the specific form and the specific content of the request for generating the page are not limited in the present invention.
Step S102: acquiring a page template corresponding to the service identifier and a storage address of a page component contained in the page template according to the service identifier; the page components include common components and business components.
Specifically, before acquiring a page template corresponding to a service identifier and a storage address of a page component included in the page template according to the service identifier: and selecting a corresponding page component from a set page component set according to the page layout corresponding to the service identifier to generate the page template corresponding to the service identifier, and determining the storage address of the page component contained in the page template. The set page component set includes page components related to the page, and the page components are data and service modules which are extracted and formed independently according to constituent elements of the page, for example: in an electronic mall application, a page of an item, the related page components may include: an article title assembly, an article picture assembly, an article detail assembly, an article logistics assembly, an article leasing business assembly, an article purchasing assembly and the like; further, according to the service identifier, selecting a corresponding component, for example: if the service identifier indicates the splicing service, an article title assembly, an article picture assembly, an article detail assembly, an article logistics assembly, an article splicing service assembly and the like can be selected, and a splicing service page template is generated according to the page layout of the splicing service; another example is: if the service identification indicates the rental service, an article title assembly, an article picture assembly, an article detail assembly and an article rental service assembly can be selected, and a rental service page template is generated according to the page layout of the purchase-splicing service; the format of the page template may be based on HTML (HyperText Markup Language, HTML), that is, the page template may be a fragment in the HTML format; the following is an example of a page component (page component is an "item sales tag") that a page template contains: the invention relates to a method for preparing a label of a facial template, which comprises the steps of (i) class, w-mod-t A-con, dragable, false, style, h4 class, w-tit-b J-drag, A-model-name, article sale label, clear 4, div class, clearfix pl10 pt 563 pr10 pr10 pb10, … div < li >, wherein the label < div > or < li > is a label defined by an HTML standard, and the specific content contained in the facial template is not limited.
Further, the page component includes a control required by the page and data source information corresponding to the control, and generates a file according to the control and the data source package corresponding to the control, and preferably, uploads the generated JavaScript file to a CDN server (CDN, Content Delivery Network), that is, the page component is a JavaScript file; one page component can be generated into one JavaScript file, and a plurality of page components can be generated into one JavaScript file (for example, a plurality of common components are packaged to generate one JavaScript file).
Further, storing the generated JavaScript file path (i.e., the storage address of the JavaScript file), that is, according to the service identifier, obtaining a page template corresponding to the service identifier and a storage address of a page component included in the page template; the memory address is, for example: "// cdn-shop.abcd.com/test/couponpaid.js"; the memory address is further represented in HTML format in a page template, as shown in the following example:
<scriptsrc=“//cdn-shop.abcd.com/test/couponPaid.js”></script>
further, the page component includes a common component and a business component. Wherein, the common component can become a component of a page template of a plurality of services, for example: the article title component and the article picture component can be contained in a page template of the article purchase service and can also be contained in a page template of the article rental service. It is understood that the common components are preferably different services of the same class of objects or different specifications of the same object, the same part is extracted from a plurality of page design layouts and divided into various components, preferably, the granularity of the components is controlled by a control, and it is understood that the smaller the granularity of the components, the more flexible the components are in composing the page. That is, the common component belongs to one or more services, and is set in the page template corresponding to the service identifier of the one or more services. Further, components can be developed based on Vue (Vue is a set of progressive JavaScript framework for building user interfaces); the data source corresponding to each component is a database for storing data required by the page components.
The business components are different parts in each page template, such as: the article splicing and purchasing business component and the article leasing business component of the same article are examples of business components, the article splicing and purchasing business component belongs to a splicing and purchasing business page template, and the article leasing business component belongs to a leasing business page template, namely, the business component belongs to the page template corresponding to the business identifier. Further, the business components may also be developed and provided by third parties, such as: company B develops business component C according to the page component development specification formulated by company A and provides JavaScript files (for example: c.js) of the page components to company A; the company A uploads the c.js to the CDN, and the company B is a third party of the company A; wherein, the third party obtains the specification text of the page component, for example: the method comprises the following steps of page interface specification, development frame specification, interface parameter specification and the like; the page component developed by the third party is operated in association with the local component by utilizing the bidirectional binding and message mechanism of the Vue framework through the operation (such as value taking and value assignment) on the data object associated with the page; it will be appreciated that the process of uploading to the CDN is the same for both common and business components; by modularizing the page and dividing a business component, the business component can be developed by an enterprise internal development team and also can be developed and provided by a third party, so that the flexibility and the development efficiency of page development are improved; namely, the service component is a service component provided by a third party.
Furthermore, a method for selecting a corresponding page component from a set page component set to generate the page template corresponding to the service identifier can use a tool for visually configuring the page template, wherein the tool comprises a list of the page component set, and the page template corresponding to the service identifier is generated by selecting a page component related to the service from the list; when a new page component is added to the page component set or a page component is deleted from the page component set, the tool for visually configuring the page template can be used for operation, so that the complexity of adding or reducing the page component from the page template is reduced; it can be understood that when the page components contained in the page template are changed (increased or decreased), the data corresponding to the page template is correspondingly updated in the database, so as to ensure that the generated page is an updated page when the page is rendered according to the data of the page template; the data of each page component contained in the page template is stored.
Step S103: generating a page text according to the page template and the storage address of the page component by using a template engine; and sending the page text to a client, and rendering a page by the client according to the page text.
Specifically, the template engine may adopt Velocity, which is generated to separate from the business data content using a user interface, and may generate text in a specific format, for example: the template engine can generate HTML format text; further, a page template and storage addresses stored in JavaScript files of all page components contained in the page template are obtained, a page text is generated, wherein the page text is a text in an HTML format, the page text is further sent to a client, and the client renders a page according to the HTML text by using a browser so as to display the page to a user.
Further, the memory address of one or more page components associated with the page template is obtained, and the memory address is written into a set tag range of the page template by using a template engine to generate the page text. For example: writing the storage address of the page component (JavaScript file) into a set tag range of a page template (HTML format), for example: setting tags as < head > </head >, < head > as the beginning identifier of the tag range, and </head > as the ending identifier of the tag range, namely, setting the tag range for being acquired by a browser executing the rendering page. Preferably, the generated page text is stored in the server, and when a request for generating a page is received, a page template corresponding to the service identifier included in the request is sent, so that the client renders the page through a browser of the client and displays the page to the user.
As shown in fig. 2, an embodiment of the present invention provides a method for generating a page, where the method may include the following steps:
step S201: according to the page layout corresponding to the service identifier, selecting a corresponding page component from a set page component set to generate a page template corresponding to the service identifier, and determining the storage address of the page component contained in the page template.
Specifically, the description of generating the page template according to the page component is consistent with the description of step S102, and is not described herein again; that is, the page components contain common components and business components. The public component belongs to one or more services and is arranged in the page template corresponding to the service identification of the one or more services; and the service component belongs to the page template corresponding to the service identifier. The service component is a service component provided by a third party. The page component is a JavaScript file.
Step S202: acquiring a page template corresponding to the service identifier and a storage address of a page component contained in the page template according to the service identifier; the page component comprises a public component and a business component; generating a page text according to the page template and the storage address of the page component by using a template engine; and sending the page text to a client, and rendering a page by the client according to the page text.
Specifically, the specific description of obtaining the page template corresponding to the service identifier and the storage address of the page component is consistent with the description of step S102, and is not repeated here.
The specific description of the page text generated by the template engine is consistent with the description of the step S103, and is not described herein again; that is, the memory address of one or more page components associated with the page template is obtained, and the memory address is written into a set tag range of the page template by using a template engine to generate the page text.
As shown in fig. 3, an embodiment of the present invention provides an apparatus 300 for generating a page, including: a request receiving module 301, a template obtaining module 302 and a page generating module 303; wherein the content of the first and second substances,
the request receiving module 301 is configured to receive a request for generating a page, where the request at least includes a service identifier;
the template obtaining module 302 is configured to obtain, according to the service identifier, a page template corresponding to the service identifier and a storage address of a page component included in the page template; the page components include common components and business components.
The page generation module 303 is configured to generate a page text according to the page template and the storage address of the page component by using a template engine; and rendering the page according to the page text.
Optionally, the template obtaining module 302 is further configured to, before obtaining, according to the service identifier, a page template corresponding to the service identifier and a storage address of a page component included in the page template: and selecting a corresponding page component from a set page component set according to the page layout corresponding to the service identifier to generate the page template corresponding to the service identifier, and determining the storage address of the page component contained in the page template.
An embodiment of the present invention further provides an electronic device for generating a page, including: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the method provided by any one of the above embodiments.
Embodiments of the present invention further provide a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method provided in any of the above embodiments.
Fig. 4 illustrates an exemplary system architecture 400 to which a method of generating a page or an apparatus for generating a page of an embodiment of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have various client applications installed thereon, such as an e-mall client application, a web browser application, a search-type application, and the like.
The terminal devices 401, 402, 403 may be various electronic devices having display screens and supporting various client applications, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server providing support for client applications used by users with the terminal devices 401, 402, 403. The background management server can process the received request for generating the page and feed back the page to the terminal device.
It should be noted that the method for generating a page provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the apparatus for generating a page is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the 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 illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 the present invention, 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. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart 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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules and/or units described in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware. The described modules and/or units may also be provided in a processor, and may be described as: a processor includes a request receiving module, a template obtaining module, and a page generating module. The names of the modules do not form a limitation on the modules themselves under certain circumstances, for example, the module for obtaining the template may also be described as a "module for obtaining a service page template corresponding to the service identifier according to the service identifier".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving a request for generating a page, wherein the request at least comprises a service identifier; acquiring a page template corresponding to the service identifier and a storage address of a page component contained in the page template according to the service identifier; the page component comprises a public component and a business component; generating a page text according to the page template and the storage address of the page component by using a template engine; and sending the page text to a client so that the client renders a page according to the page text.
Therefore, the page can be divided into a plurality of page components, corresponding page components are selected to generate the page template according to different business requirements, when a request for generating a business page is received, the page template and the corresponding page components are automatically obtained, and a page text is generated and then rendered to generate the page; wherein the page components may be provided by a third party; therefore, the page templates correspond to the service configurations, and each page template is configured with a plurality of independent page components, so that the modularization degree and the configurability of the page are improved, the flexibility and the expansibility of generating the page are improved, and the problem of low development efficiency caused by centralized development is solved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of generating a page, comprising:
receiving a request for generating a page, wherein the request at least comprises a service identifier;
acquiring a page template corresponding to the service identifier and a storage address of a page component contained in the page template according to the service identifier; the page component comprises a public component and a business component;
generating a page text according to the page template and the storage address of the page component by using a template engine; and sending the page text to a client so that the client renders a page according to the page text.
2. The method according to claim 1, wherein before obtaining, according to the service identifier, a page template corresponding to the service identifier and a storage address of a page component included in the page template:
and selecting a corresponding page component from a set page component set according to the page layout corresponding to the service identifier to generate the page template corresponding to the service identifier, and determining the storage address of the page component contained in the page template.
3. The method of claim 1,
the page component comprises a public component and a business component, and further comprises:
the public component belongs to one or more services and is arranged in the page template corresponding to the service identification of the one or more services;
and the service component belongs to the page template corresponding to the service identifier.
4. The method of claim 3,
the page component comprises a public component and a business component, and further comprises:
the service component is a service component provided by a third party.
5. The method of claim 1,
the page component is a JavaScript file.
6. The method according to any one of claims 1 to 5,
generating a page text according to the page template and the storage address of the page component by using a template engine, wherein the page text comprises the following steps:
and acquiring the storage addresses of one or more page components associated with the page template, and writing the storage addresses into a set tag range of the page template by using a template engine to generate the page text.
7. An apparatus for generating a page, comprising: the system comprises a request receiving module, a template obtaining module and a page generating module; wherein the content of the first and second substances,
the receiving request module is used for receiving a request for generating a page, wherein the request at least comprises a service identifier;
the template obtaining module is used for obtaining a page template corresponding to the service identifier and a storage address of a page component contained in the page template according to the service identifier; the page components include common components and business components.
The page generation module is used for generating a page text according to the page template and the storage address of the page component by using a template engine; and sending the page text to a client so that the client renders a page according to the page text.
8. The apparatus of claim 7,
the template obtaining module is used for obtaining a page template corresponding to the service identifier and a storage address of a page component contained in the page template before obtaining the page template corresponding to the service identifier according to the service identifier: and selecting a corresponding page component from a set page component set according to the page layout corresponding to the service identifier to generate the page template corresponding to the service identifier, and determining the storage address of the page component contained in the page template.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202110048555.3A 2021-01-14 2021-01-14 Method and device for generating page Pending CN113760279A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110048555.3A CN113760279A (en) 2021-01-14 2021-01-14 Method and device for generating page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110048555.3A CN113760279A (en) 2021-01-14 2021-01-14 Method and device for generating page

Publications (1)

Publication Number Publication Date
CN113760279A true CN113760279A (en) 2021-12-07

Family

ID=78786404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110048555.3A Pending CN113760279A (en) 2021-01-14 2021-01-14 Method and device for generating page

Country Status (1)

Country Link
CN (1) CN113760279A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327441A (en) * 2021-12-24 2022-04-12 中国联合网络通信集团有限公司 Webpage making processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050182768A1 (en) * 2003-10-14 2005-08-18 Waldorf Jerry A. Web browser as web service server in interaction with business process engine
CN107678736A (en) * 2017-10-09 2018-02-09 用友网络科技股份有限公司 A kind of business Page Template shows method, system and computer installation
CN110400196A (en) * 2019-06-20 2019-11-01 北京奇艺世纪科技有限公司 A kind of page processing method, device and computer readable storage medium
CN111767499A (en) * 2020-06-03 2020-10-13 汉海信息技术(上海)有限公司 Page configuration method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050182768A1 (en) * 2003-10-14 2005-08-18 Waldorf Jerry A. Web browser as web service server in interaction with business process engine
CN107678736A (en) * 2017-10-09 2018-02-09 用友网络科技股份有限公司 A kind of business Page Template shows method, system and computer installation
CN110400196A (en) * 2019-06-20 2019-11-01 北京奇艺世纪科技有限公司 A kind of page processing method, device and computer readable storage medium
CN111767499A (en) * 2020-06-03 2020-10-13 汉海信息技术(上海)有限公司 Page configuration method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵双双;李仁旺;钱小燕;张春平;: "基于B/S的跨平台用户界面可配置算法研究", 浙江理工大学学报, no. 05, 10 May 2015 (2015-05-10) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327441A (en) * 2021-12-24 2022-04-12 中国联合网络通信集团有限公司 Webpage making processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107832045B (en) Method and apparatus for cross programming language interface conversion
US11694215B2 (en) Systems and methods for managing web content
CN110020329B (en) Method, device and system for generating webpage
CN113031946B (en) Method and device for rendering page component
CN110780874B (en) Method and device for generating information
CN111294395A (en) Terminal page transmission method, device, medium and electronic equipment
CN110795649A (en) Target page display method, device and system and electronic equipment
CN109002282B (en) Method and device for realizing animation effect in web page development
CN109582317A (en) Method and apparatus for debugging boarding application
CN111381899A (en) Method and apparatus for developing target system
CN110807535A (en) Construction method and construction device of unified reservation platform and unified reservation platform system
CN113760279A (en) Method and device for generating page
CN110807162A (en) Method and device for loading occupation bitmap
CN114756228A (en) Page processing method, device, equipment and storage medium
CN112486482A (en) Page display method and device
CN113220381A (en) Click data display method and device
CN111612501A (en) Information generation method and device based on policy reuse and electronic equipment
CN112130842A (en) Page generation method and device
CN111198738A (en) Mobile terminal page display method and device and electronic equipment
CN110647327A (en) Method and device for dynamic control of user interface based on card
CN108536715B (en) Preview page generation method, device, equipment and storage medium
CN114255084A (en) Advertisement page display method, device and system
CN111782883B (en) View construction method and system
CN112926294A (en) Template file generation method and device
CN109472592B (en) Method and device for managing virtual assets

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