Page generation method, device, apparatus and storage medium
By caching page information on the server, the target page in the B/S mode is automatically generated, which solves the problem of low page development efficiency and achieves the effects of saving manpower costs and automatically rendering a unified structure.
Patent Information
- Application Number
- CN202210924003.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-02
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-08-02
AI Technical Summary
In the B/S model, page development efficiency is low, requiring separate development of front-end and back-end logic, resulting in high labor costs and low development efficiency.
Page information, including front-end and back-end page information and their corresponding relationships, is cached on the server. The target page is automatically generated upon receiving terminal requests, reducing redundant development work.
Improve page development efficiency, save labor costs, and automatically render front-end pages with a unified structure and style, eliminating the need to repeatedly develop front-end and back-end logic code.
Smart Images

Figure CN115268912B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the network technical field, and in particular to a page generation method and device, equipment and a storage medium. BACKGROUND
[0002] With the popularization of Internet technology, the Browser / Server (B / S) mode has penetrated into people's daily life. The mode adopts the working mode of browser request and server response. Based on the Internet, users can access text, data, pictures, animations, video on demand and sound information in the server through the browser.
[0003] In the related art, in order to facilitate the development of pages in the B / S mode, a page designer provided by an intelligent development platform is used to help developers draw pages. Specifically, in the page designer, the developer draws a page by dragging and dropping the controls provided by the page designer and capable of being contained in the page; and then develops the background logic according to the page. In this way, each page needs to be developed with a separate background logic, and thus the page development efficiency is low. SUMMARY
[0004] The present application provides a page generation method, device, equipment and storage medium, which can improve the efficiency of page development.
[0005] In a first aspect, the present application provides a page generation method, comprising: receiving a page drawing request from a terminal, the page drawing request being used to request front-end page information of a target page; reading, from stored page information, front-end page information corresponding to the page drawing request; sending the front-end page information to the terminal, so that the terminal draws the target page; receiving a page data request from the terminal, the page data request being used to request back-end page information of the target page; reading, from the page information, back-end page information corresponding to the page data request; and sending the back-end page information to the terminal, so that the terminal generates the target page.
[0006] Optionally, the front-end page information is in a non-hypertext markup language format, and the sending of the front-end page information to the terminal comprises: adjusting the format of the front-end page information to a hypertext markup language format, to obtain hypertext markup language data; and sending the hypertext markup language data to the terminal.
[0007] Optionally, before the receiving of the page drawing request from the terminal, the method further comprises: at startup, parsing a configuration file to obtain cache data, the configuration file comprising page information; and loading the cache data into a cache.
[0008] Optionally, the parsing of the configuration file to obtain the cache data comprises: parsing the page information in the configuration file into a JAVA object, to obtain the cache data.
[0009] Optionally, before the parsing of the configuration file to obtain the cached data, the method further comprises: obtaining and storing the configuration file, the configuration file being of a query list type and / or a pagination form type, the configuration file of the query list type being used to generate a target page of a list page type, and the configuration file of the pagination form type being used to generate a target page of a form page type.
[0010] In a second aspect, the present application provides a page generation method, comprising: receiving a page generation request from a terminal, the page generation request being used to request generation of a target page; reading front-end page information and back-end page information corresponding to the page generation request from stored page information; and sending the front-end page information and the back-end page information to the terminal for generation of the target page by the terminal.
[0011] In a third aspect, the present application provides a page generation apparatus, comprising:
[0012] a receiving module configured to receive a page drawing request from a terminal, the page drawing request being used to request front-end page information of a target page, and configured to receive a page data request from the terminal, the page data request being used to request back-end page information of the target page;
[0013] a reading module configured to read front-end page information corresponding to the page drawing request from stored page information, and configured to read back-end page information corresponding to the page data request from the page information;
[0014] a sending module configured to send the front-end page information to the terminal for drawing of the target page by the terminal, and configured to send the back-end page information to the terminal for generation of the target page by the terminal.
[0015] In a fourth aspect, the present application provides a page generation apparatus, comprising:
[0016] a receiving module configured to receive a page generation request from a terminal, the page generation request being used to request generation of a target page;
[0017] a reading module configured to read front-end page information and back-end page information corresponding to the page generation request from stored page information;
[0018] a sending module configured to send the front-end page information and the back-end page information to the terminal for generation of the target page by the terminal.
[0019] In a fifth aspect, the present application provides an electronic device, comprising: a memory, and a processor;
[0020] the memory is configured to store executable instructions;
[0021] The processor is configured to execute executable instructions to implement the page generation method of the first aspect or the second aspect.
[0022] In a sixth aspect, the present application provides a computer readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, the computer execution instructions are used to implement the page generation method of the first aspect or the second aspect.
[0023] In a seventh aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer program implements the page generation method of the first aspect or the second aspect.
[0024] The page generation method, device, equipment and storage medium provided by the present application have the following advantages. Since the page information has been stored in the server, and the page information includes the front-end page information and the back-end page information, and the back-end page information includes the correspondence between the front-end page information and the back-end page information, when the target page based on the B / S mode is generated, the user interacts with the terminal, the terminal (or called as the client) sends a page drawing request to the server, the server responds to the page drawing request, reads the front-end page information corresponding to the page drawing request from the stored page information to obtain the front-end page information, and sends a page data request to the server, the server responds to the page data request, reads the back-end page information corresponding to the page data request from the stored page information to obtain the back-end page information, and then generates the target page based on the obtained front-end page information and back-end page information. The front-end page with unified structure and style can be automatically rendered by the present application, and the repeated development work of the front-end page is not needed. In addition, the development work of the back-end logic code and the database interaction code for each function in the page is not needed, the human cost is saved, and the development efficiency of the page is improved. BRIEF DESCRIPTION OF DRAWINGS
[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0026] Figure 1 A schematic diagram of the interaction between the browser and the server in the B / S mode in the related art is shown in FIG. 1.
[0027] Figure 2 A schematic diagram of the page designer in the intelligent development platform in the related art is shown in FIG. 2.
[0028] Figure 3 An example diagram of the page drawn by the page designer in the related art is shown in FIG. 3.
[0029] Figure 4 A flowchart of the page generation method provided by an embodiment of the present application is shown in FIG. 4.
[0030] Figure 5 A flow chart of a page generation method according to another embodiment of the present application is provided.
[0031] Figure 6 A structural schematic diagram of a page generation apparatus according to an embodiment of the present application is provided.
[0032] Figure 7 A structural schematic diagram of a page generation apparatus according to another embodiment of the present application is provided.
[0033] Figure 8 A structural schematic diagram of a server according to an embodiment of the present application is provided.
[0034] Figure 9 A block diagram of an apparatus for implementing a page generation method according to an exemplary embodiment is shown.
[0035] The specific embodiments of the present application have been shown by the above-described drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application by any means, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0036] The exemplary embodiments will be described in detail herein below, with examples shown in the drawings. When the following description refers to the drawings, identical numbers on different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0037] B / S (Browser / Server) mode is a network structure mode, which centralizes the core part of system function implementation to the server, simplifying the development, maintenance and use of the system. A browser, such as Chrome, Safari, Microsoft Edge, Netscape Navigator or Internet Explorer, is installed on the terminal, and a database, such as SQL Server, Oracle or MYSQL, is installed on the server. The browser interacts with the database through the server.
[0038] Figure 1 A schematic diagram of the interaction between the browser and the server in the B / S mode is shown. As shown in FIG. 1, the browser and the server are connected through the Internet, and the browser and the server are connected through the database. Figure 1As shown, when a user accesses a database, after submitting an operation of accessing the database on a browser 11 of a terminal, the browser 11 sends a request to a server 12, and the request is generally an http request; correspondingly, the server 12 receives the request and responds to it, obtains data corresponding to the request, and sends the data to the browser 11. When the server 12 processes the request, a server technology such as JSP (Java Server Pages) is used. The database stores data requested by the user, such as web page files, pictures, sounds, and the like. When the data transmitted to the browser is generally in an HTML (HyperText Markup Language) format, the browser displays the data by interpreting and executing the HTML file.
[0039] In the development of a page in the B / S mode, generally, the development of a front-end page, i.e., a page seen by a user when the user uses the page, and the development of a back-end logic, which is used to monitor changes in the front-end page and respond to operations on the front-end page, are involved. When a page is developed in a traditional way, each page needs to be drawn separately, and after being drawn, each page needs to be matched with the configuration of the back-end logic. Such a boring and inefficient development work greatly wastes human costs.
[0040] Therefore, in the related art, a tool that assists a developer in completing the production of a front-end page appears, for example, a page designer in an intelligent development platform as shown. Figure 2 As shown, a developer designs content required by a target page in the page designer through controls such as "add", "save", "table selection", and "column chart", and the like. Figure 2 The "parameter name", "parameter value", and "parameter description" in the table are displayed as table headers in the finally formed page, and the data such as "name_" below helps form table content. For example, a page drawn through the above method is as shown. Figure 2 Figure 3 However, when such a tool is used, special deployment of the tool is required, and the deployment and maintenance costs are high. In addition, when a page is developed by using the above method, the back-end logic corresponding to the front-end page needs to be developed separately, and the human cost is high and the development efficiency is low. The generation efficiency of the front-end page is also restricted by the tool used, and the page cannot be batch copied and modified.
[0041] To solve the above problems, the application provides a page generation method, device, equipment and storage medium. The page information is cached in the server, including the front-end page information capable of drawing the page and the back-end page information capable of generating the background logic, so that after receiving the page request (such as including the page drawing request and the page data request, or the page generation request) of the terminal, the target page is automatically generated based on the page generation logic provided by the application, thereby improving the development efficiency of the page and reducing the development cost of the page.
[0042] The technical solutions of the application and how the technical solutions solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the application will be described below with reference to the drawings.
[0043] Figure 4 The flowchart of the page generation method provided by an embodiment of the application is shown in FIG. 1. Figure 4 The page generation method includes:
[0044] S401, receiving a page drawing request from a terminal.
[0045] The page drawing request is used to request the front-end page information of the target page. For example, the target page can be a web page.
[0046] When the user wants to obtain the target page, the user will input the target page request on the browser of the terminal, and the terminal sends the page drawing request to the server based on the request.
[0047] S402, reading the front-end page information corresponding to the page drawing request from the stored page information.
[0048] The page information has been cached in the server before the server receives the page drawing request. Specifically, the page information can include but is not limited to the front-end page information and the back-end page information, and the back-end page information can include but is not limited to the correspondence between the front-end page information and the back-end page information.
[0049] After the server receives the page drawing request, the front-end page information is read from the cache.
[0050] S403, sending the front-end page information to the terminal for drawing the target page.
[0051] Correspondingly, the terminal receives the front-end page information and draws the target page according to the front-end page information.
[0052] It should be noted that the target page obtained at this time only meets the appearance requirements of the target page, but cannot be used. To obtain a complete and usable page, the background logic of the drawn target page needs to be configured. Therefore, the terminal also needs to request the server for backend page information for configuring the background logic of the target page. Specifically, the terminal sends a page data request to the server, where the page data request is used to request the backend page information of the target page. The backend page information contains the background logic corresponding to the drawn target page.
[0053] S404, receiving a page data request from the terminal.
[0054] S405, reading the backend page information corresponding to the page data request in the page information.
[0055] The server reads the backend page information from the cache of the server after receiving the page data request. Optionally, the read backend page information can be logically operated, such as adding, deleting, modifying and inquiring.
[0056] S406, sending the backend page information to the terminal for generating the target page.
[0057] Correspondingly, the terminal receives the backend page information, and binds the obtained backend page information and the frontend page information according to the correspondence between the backend page information and the frontend page information in the backend page information, to generate the target page.
[0058] The page generation method provided by the embodiment of the application, because the server has stored the page information, and the page information contains the frontend page information and the backend page information, and the backend page information includes the correspondence between the frontend page information and the backend page information, when generating the target page based on the B / S mode, the user interacts with the terminal, so that the terminal sends a page drawing request to the server, the server responds to the page drawing request, reads the frontend page information corresponding to the page drawing request from the stored page information to obtain the frontend page information, and sends a page data request to the server, the server responds to the page data request, reads the backend page information corresponding to the page data request from the stored page information to obtain the backend page information, and then generates the target page based on the obtained frontend page information and the backend page information. Through the application, the frontend page with unified structure and style can be automatically rendered, without repeated development of the frontend page. In addition, there is no need to develop the background logic code and the database interaction code for each function in the page, which saves the labor cost and improves the development efficiency of the page.
[0059] On the basis of the above, when the terminal receives the backend page information, the backend page information is stored in the terminal in the form of a document. Therefore, in some embodiments, the generated target page can also be modified. Specifically, there are some function buttons on the generated target page, such as: save, delete, import, export, submit for approval. The background logic of these function buttons is dynamically generated according to the page information, without the need for code development of the background logic. Through these function buttons, the backend page information stored in the terminal can be added, deleted or modified, and when the addition, deletion or modification of the backend page information is completed, the modification of the corresponding target page is automatically completed, that is, the background logic processing and interaction with the database in the server are automatically completed. Without the development of background logic code and database interaction code for each function, the cost of manpower is saved.
[0060] In some embodiments, the front-end page information is in a non-hypertext markup language format. In this case, step S403 comprises: adjusting the format of the front-end page information to a hypertext markup language format to obtain hypertext markup language data; and sending the hypertext markup language data to the terminal.
[0061] Hypertext Markup Language, also known as HTML, is a markup language. It can describe text, graphics, animation, sound, table, link, etc. In this embodiment, the original format of the front-end page information can be JAVA object, which cannot be directly used to draw the target page. Therefore, the JAVA object format of the front-end page information will be parsed into the HTML format of the front-end page information, and then the server can read the HTML format of the front-end page information to draw the target page.
[0062] Optionally, before receiving the page drawing request from the terminal, the page information needs to be generated: the generation process of the page information is: when starting, parse the configuration file to obtain the cache data, the configuration file includes the page information; load the cache data into the cache.
[0063] A configuration file can provide a unified page configuration scheme for pages with similar structures. The configuration file can use multiple formats when generated, such as: XML, Excel, YML, TXT, etc. The configuration files in these formats do not depend on a specified editor or platform when generated, and support configuration on multiple text editors. For example, the text editor used when generating an XML format configuration file can be Notepad, VSCode, IDEA or Notepad++. The cost of deployment and maintenance of the development platform is saved.
[0064] In some embodiments, the parsing of the configuration file obtains the cache data, including: parsing the page information in the configuration file into JAVA objects to obtain the cache data. The system loads the configuration file in the format into the system cache in the form of JavaBean through the JAXB (Java Architecture for XML Binding) technology when starting, that is, the configuration file is parsed into Java objects and cached in the server.
[0065] The JAXB described above can serialize a JAVA object into XML, and reversely parse XML into a JAVA object.
[0066] Optionally, before the parsing of the configuration file obtains the cache data when starting, the method further includes: obtaining and storing the configuration file. The configuration file is of a query list type and / or a paging form type. The configuration file of the query list type is used to generate a target page of a list page type, and the configuration file of the paging form type is used to generate a target page of a form page type.
[0067] The configuration file can be an XML format file, and the configuration file in the XML format is generally divided into two types: a query list type and a paging form type. The configuration file of the query list type is used to generate a target page of a list page type, and the target page of the list page type refers to a target page capable of querying multiple data at a time. The target page of the list page type generally includes a query area and a list data area when displayed. The configuration file of the paging form type is used to generate a target page of a form page type, and the target page of the form page type refers to a target page used to display one piece of data. Generally, the configuration file simultaneously includes two types of files: a query list and a paging form.
[0068] For example, Table 1 below is an example table of the configuration file of the query list type provided in the embodiment. The element nodes in Table 1, such as "page", can also be referred to as tags. The element nodes cover all functions of the target page, for example, the table tag in the page is used to define the relationship between the page and the database, and the title in the page is used to make the page. In addition, new element nodes can be defined to dynamically expand the functions.
[0069] Table 1: Example table of the configuration file of the query list type
[0070]
[0071]
[0072] Table 2 below is an example of a configuration file of the page-list type provided by the present embodiment. Similar to Table 1, the element nodes in Table 2, such as "page", can also be referred to as tags, and the element nodes cover all functions of the target page, such as the table tag in page is used to define the page-database relationship, and the title in page is used to make the page. In addition, new element nodes can be defined to dynamically expand the functions. The tags can be divided into form tags and list tags, the tags in Table 2 are form tags, and the tags in Table 1 are list tags, and the tags constitute the target page. For example, the query area is composed of form tags, and the list data area is composed of list tags. Some tags have intersections, and it can be found that some tags exist in both Table 1 and Table 2.
[0073] Table 2 is an example of a configuration file of the page-list type
[0074]
[0075]
[0076] Figure 5 A flowchart of a page generation method provided by another embodiment of the present application is shown in FIG. 5. As shown in FIG. 5, the page generation method includes the following steps. Figure 5
[0077] S501, receiving a page generation request from a terminal.
[0078] When the terminal needs to generate a target page, it will send a page generation request to the server. The page generation request is used to request the generation of the target page.
[0079] S502, reading the front-end page information and the back-end page information corresponding to the page generation request from the stored page information.
[0080] The page information has been stored in the server before receiving the page generation request from the terminal. The page information includes front-end page information for drawing the target page, and back-end page information for generating the background logic of the target page. In addition, in some embodiments, the back-end page information also includes the correspondence between the front-end page information and the back-end page information, which can bind the background logic and the drawn target page together.
[0081] S503, sending the front-end page information and the back-end page information to the terminal for the terminal to generate the target page.
[0082] In some embodiments, the front-end page information needs to be converted into HTML format to be read by the terminal and drawn into the target page. The back-end page information forms a document and is stored in the terminal. The back-end page information is bound with the drawn target page to generate a complete target page.
[0083] It can be understood that, Figure 4 The specific generation process of the page information in the page generation method shown is also applicable to Figure 5 The page generation method shown will not be described here.
[0084] The page generation method provided in the embodiment can directly send a page generation request to obtain page information when the terminal wants to generate a target page, and then generate the target page based on the obtained page information. By developing the page in this way, the development efficiency of the page can be improved.
[0085] In summary, the present application has at least the following advantages:
[0086] I. A unified page configuration scheme is provided for target pages with similar structures.
[0087] II. In the process of generating a target page, it does not depend on a specified editor or platform, supports configuration on a normal text editor, and saves the deployment and maintenance costs of the development platform.
[0088] III. The target page with a unified structure and style is automatically generated according to the configuration file during program running. No repeated page development work is needed.
[0089] The following is a device embodiment of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0090] Figure 6 The structure diagram of the page generation device provided in an embodiment of the present application is shown. The embodiment of the present application provides a page generation device. As shown in the figure, Figure 6 The page generation device 60 includes a receiving module 601, a reading module 602, and a sending module 603. Among them:
[0091] The receiving module 601 is configured to receive a page drawing request from a terminal, the page drawing request being used to request front-end page information of a target page, and configured to receive a page data request from the terminal, the page data request being used to request back-end page information of the target page.
[0092] The reading module 602 is configured to read front-end page information corresponding to the page drawing request from the stored page information, and read back-end page information corresponding to the page data request from the page information.
[0093] The sending module 603 is configured to send the front-end page information to the terminal for drawing the target page, and send the back-end page information to the terminal for generating the target page.
[0094] Optionally, the front-end page information is in a non-hypertext markup language format, and the sending module 803 sends the front-end page information to the terminal, specifically for: adjusting the format of the front-end page information to a hypertext markup language format to obtain hypertext markup language data; and sending the hypertext markup language data to the terminal.
[0095] Optionally, the receiving module 601 is further configured to: parse a configuration file to obtain cache data at startup, the configuration file including the page information; and load the cache data into the cache.
[0096] Optionally, the receiving module 601 parses the configuration file to obtain the cache data, specifically for: parsing the page information in the configuration file into a JAVA object to obtain the cache data.
[0097] In some embodiments, the receiving module 601 is further configured to: obtain and store a configuration file, the configuration file being of a query list type and / or a paging form type, the configuration file of the query list type being used to generate a target page of a list page type, and the configuration file of the paging form type being used to generate a target page of a form page type.
[0098] Figure 7 A structural diagram of a page generation apparatus provided by another embodiment of the present application is shown in FIG. 7. As shown in FIG. 7, the page generation apparatus 70 includes a receiving module 701, a reading module 702, and a sending module 703. Figure 7
[0099] The receiving module 701 is configured to receive a page generation request from a terminal, the page generation request being used to request generation of a target page.
[0100] The reading module 702 is configured to read front-end page information and back-end page information corresponding to the page generation request from stored page information.
[0101] The sending module 703 is configured to send the front-end page information and the back-end page information to the terminal for generating the target page.
[0102] It should be noted that the page generation apparatus provided by the embodiments of the present application can be used to execute the corresponding page generation method embodiments, and the implementation principles and technical effects are similar, and thus will not be described again.
[0103] It should be noted that the division of the various modules of the above apparatus is only a logical functional division, and in actual implementation, all or part of them can be integrated into one physical entity, or can be physically separated. These modules can all be implemented in the form of software invoked by a processing element; all can be implemented in the form of hardware; or some modules can be implemented in the form of software invoked by a processing element, and some modules can be implemented in the form of hardware. For example, the processing module can be a separately established processing element, or can be integrated in a chip of the above apparatus, in addition, it can also be stored in the form of program code in the memory of the above apparatus, and the function of the above processing module can be invoked and executed by a processing element of the above apparatus. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or can be independently implemented. The processing element here can be an integrated circuit with signal processing capability. In the implementation process, each step of the above method or each module can be completed by the integrated logic circuit of hardware or the instruction of software in the processing element.
[0104] For example, the above modules can be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of program code invoked by a processing element, the processing element can be a general purpose processor, such as a central processing unit (CPU) or other processor that can invoke program code. For another example, these modules can be integrated together to implement in the form of system on a chip (SOC).
[0105] In the embodiments described above, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk (SSD)) and the like.
[0106] Figure 8 The structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 8. Referring to FIG. 8, the electronic device 80 includes a memory 801 and a processor 802. The memory 801 is configured to store executable instructions, and the processor 802 is configured to execute the executable instructions to implement the page generation method described above. Figure 8
[0107] Figure 9 FIG. 9 is a block diagram of an apparatus for implementing the page generation method according to an exemplary embodiment. For example, the apparatus 90 can be provided as a server. Referring to FIG. 9, the apparatus 90 includes a processing component 901, which further includes one or more processors, and a memory resource represented by a memory 902, for storing instructions executable by the processing component 901, such as an application program. The application program stored in the memory 902 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 901 is configured to execute the instructions to perform the page generation method described above. Figure 9
[0108] The apparatus 90 can also include a power supply component 903 configured to perform power management for the apparatus 90, a wired or wireless network interface 904 configured to connect the apparatus 90 to a network, and an input output (I / O) interface 905. The apparatus 90 can operate based on an operating system stored in the memory 902, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0109] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by a processor to realize the page generation method.
[0110] The computer readable storage medium can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The computer readable storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0111] An exemplary computer readable storage medium is coupled to the processor, thereby enabling the processor to read information from the computer readable storage medium and to write information to the computer readable storage medium. Of course, the computer readable storage medium can also be a part of the processor. The processor and the computer readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the computer readable storage medium can also exist as discrete components.
[0112] The embodiment of the present application further provides a computer program product, and the computer program product comprises a computer program, and the computer program is executed by a processor to realize the page generation method.
[0113] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a computer readable storage medium. The program is executed to perform the steps of the above-mentioned method embodiments, and the foregoing storage medium includes ROM, RAM, magnetic disk or optical disk and various storage media that can store program codes.
[0114] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present disclosure, but not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A page generation method characterized by, The application comprises the following steps: acquiring and storing configuration files, the configuration files being of a query list type and / or a paging form type, the configuration files of the query list type being used to generate a target page of a list page type, and the configuration files of the paging form type being used to generate a target page of a form page type; the configuration files automatically generating target pages of a unified structure and style; a page information generation process is as follows: at startup, configuration files are parsed to obtain cache data, the configuration files comprising page information; and the cache data is loaded into a cache; receiving a page drawing request from a terminal, the page drawing request being used to request front-end page information of a target page; in the stored page information, reading front-end page information corresponding to the page drawing request; wherein the page information comprises front-end page information and back-end page information, and the back-end page information is used to define a back-end interactive logic of the target page; sending the front-end page information to the terminal for drawing of the target page by the terminal; receiving a page data request from the terminal, the page data request being used to request back-end page information of the target page; in the page information, reading back-end page information corresponding to the page data request; sending the back-end page information to the terminal for generation of the target page; wherein the back-end page information is stored in the terminal in the form of a document; the back-end page information stored in the terminal is added, deleted or modified through a function button of the target page; and no development work of back-end logic code and database interaction code is needed for each function.
2. The page generation method of claim 1, wherein, The front-end page information is in a non-hypertext markup language format, and the sending of the front-end page information to the terminal comprises the following steps: adjusting the format of the front-end page information to a hypertext markup language format to obtain hypertext markup language data; sending the hypertext markup language data to the terminal.
3. The page generation method of claim 1, wherein, The parsing of the configuration files to obtain the cache data comprises the following step: parsing the page information in the configuration files into JAVA objects to obtain the cache data.
4. The page generation method of claim 1, wherein, Before the parsing of the configuration files to obtain the cache data at startup, the following step is further included: acquiring and storing the configuration files, the configuration files being of a query list type and / or a paging form type, the configuration files of the query list type being used to generate a target page of a list page type, and the configuration files of the paging form type being used to generate a target page of a form page type.
5. A page generation method characterized by, The application comprises the following steps: acquiring and storing configuration files, the configuration files being of a query list type and / or a paging form type, the configuration files of the query list type being used to generate a target page of a list page type, and the configuration files of the paging form type being used to generate a target page of a form page type; the configuration files automatically generating target pages of a unified structure and style; a page information generation process is as follows: at startup, configuration files are parsed to obtain cache data, the configuration files comprising page information; loading the cache data into a cache; receiving a page generation request from a terminal, the page generation request being used to request generation of a target page; In the stored page information, read the front-end page information corresponding to the page generation request and the back-end page information; The back-end page information is used to define the background interaction logic of the target page; The front-end page information and the back-end page information are sent to the terminal for the generation of the target page, and the back-end page information is stored in the terminal in the form of a document, so that the terminal adds, deletes or modifies the back-end page information stored in the terminal through the function buttons of the target page; Without developing background logic code and database interaction code for each function.
6. A page generation apparatus characterized by comprising: The page generation device comprises: The receiving module is configured to obtain and store configuration files, the configuration files being of a query list type and / or a paging form type, the configuration file of the query list type being used to generate a target page of a list page type, and the configuration file of the paging form type being used to generate a target page of a form page type; the configuration file automatically generates a target page with a unified structure and style; the generation process of page information is as follows: when starting, the configuration file is parsed to obtain cache data, the configuration file including page information; the cache data is loaded into a cache; a page drawing request from a terminal is received, the page drawing request being used to request front-end page information of a target page, and a page data request from the terminal is received, the page data request being used to request back-end page information of the target page; The reading module is configured to read, in the stored page information, front-end page information corresponding to the page drawing request, and read, in the page information, back-end page information corresponding to the page data request, the back-end page information being used to define the background interaction logic of the target page; wherein the page information includes front-end page information and back-end page information; The sending module is configured to send the front-end page information to the terminal for drawing of the target page, and send the back-end page information to the terminal for generation of the target page; wherein the back-end page information is stored in the terminal in the form of a document; The back-end page information stored in the terminal is added, deleted or modified through function buttons of the target page; without developing background logic code and database interaction code for each function.
7. A page generation apparatus characterized by comprising: The page generation device comprises: The receiving module is configured to obtain and store configuration files, the configuration files being of a query list type and / or a paging form type, the configuration file of the query list type being used to generate a target page of a list page type, and the configuration file of the paging form type being used to generate a target page of a form page type; the configuration file automatically generates a target page with a unified structure and style; a page generation request from a terminal is received, the page generation request being used to request generation of a target page; the generation process of page information is as follows: when starting, the configuration file is parsed to obtain cache data, the configuration file including page information; the cache data is loaded into a cache; The reading module is configured to read front-end page information and back-end page information corresponding to the page generation request from the stored page information, wherein the back-end page information is used to define the background interaction logic of the target page. The sending module is configured to send the front-end page information and the back-end page information to the terminal, so that the terminal generates the target page, and the back-end page information is stored in the terminal in the form of a document, so that the terminal adds, deletes or modifies the back-end page information stored in the terminal through a function button of the target page; and no development work of background logic code and database interaction code is required for each function.
8. An electronic device, comprising: The method comprises the following steps: A memory and a processor are provided. The memory is configured to store executable instructions. The processor is configured to execute the executable instructions to implement the page generation method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the page generation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Webpage rendering method and device, electronic equipment and storage medium
CN110795195A