A web front-end page construction method, device, equipment and medium

By building a model during the display process and using Java Script objects to save display requirements, the problem of high storage pressure on web front-end servers is solved, and efficient resource utilization is achieved.

CN115329240BActive Publication Date: 2025-08-08CHINA CONSTRUCTION BANK +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210980167.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-16
Publication Date
2025-08-08
Estimated Expiration
2042-08-16

AI Technical Summary

Technical Problem

In the prior art, web front-end servers have stored a large number of models, resulting in excessive storage pressure.

Method used

During the display process, the model is built based on display instructions, rather than saving multiple models in the server, and save display requirements through Java Script objects to reduce storage pressure.

Benefits of technology

By building a model during the display process, the storage requirements of the web front-end server are reduced and resource utilization is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115329240B_ABST
    Figure CN115329240B_ABST
Patent Text Reader

Abstract

The present application relates to the field of web front-end processing technology, and in particular to a web front-end page construction method, apparatus, device, and medium. In an embodiment of the present application, a display instruction is received as input, carrying a first identifier of a target page to be displayed and a second identifier of a target business. Based on the first identifier and the second identifier, the target page and the target business are determined. A pre-stored target display type for the target page when displayed is obtained, and a pre-stored target display requirement corresponding to the target display type when the target business is displayed is obtained. A model used by the business when displaying the page is constructed based on the target display requirement and the target display type, and a web front-end page is constructed based on the model. In an embodiment of the present application, multiple models are not stored in the web front-end server, but corresponding models are constructed based on the display instruction during the display process, thereby reducing the storage pressure of the web front-end server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of web front-end processing technology, and in particular to a web front-end page construction method, device, equipment and medium. Background Art

[0002] With the advancement of science and technology, web front-end page construction has become widely used. Existing web front-end page construction is primarily based on the Model-View-Controller (MVC) architecture. Specifically, a web front-end server includes multiple pages, each corresponding to a model. For example, Page 1 displays an operation form, Page 2 displays a query form, and so on. The web front-end server stores multiple models, each corresponding to the display requirements of a page. For example, Model 1 stores a table display when Page 1 is displayed, where the first column of the table displays the user's name, the second column displays the user's gender, and so on. In other words, each page corresponds to a model, so the web front-end server stores as many models as there are pages. This results in the web front-end server needing to configure a large number of models and store the requirements corresponding to each model when storing a large number of services and pages. This places significant storage pressure on the web front-end server. Summary of the Invention

[0003] The present application provides a web front-end page construction method, device, equipment and medium to solve the problem in the prior art that a large number of models are configured in the web front-end server, resulting in high storage pressure on the web front-end server.

[0004] The present invention provides a method for constructing a web front-end page, the method comprising:

[0005] receiving an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target service;

[0006] Determine the target page and the target service according to the first identifier and the second identifier, obtain a pre-saved target display type for displaying the target page, and obtain a pre-saved target display requirement corresponding to the target display type for displaying the target service;

[0007] A model used by the business when displaying the target page is constructed according to the target display requirement and the target display type, and a web front-end page is constructed according to the model.

[0008] Furthermore, the target display requirement corresponding to the target display type when obtaining the pre-saved target service for display includes:

[0009] Acquire a first correspondence between pre-saved identification information of a service and a Java Script object, wherein the Java Script object includes display requirements of the service corresponding to the Java Script object when displayed in each display type;

[0010] Determining, according to the first corresponding relationship, a target JavaScript object corresponding to the second identifier of the target service;

[0011] The target display requirement is determined according to the target JavaScript object and the target display type.

[0012] Furthermore, the target JavaScript object generation process includes:

[0013] receiving an input Java Script object creation instruction carrying a second identifier corresponding to the target service, each sub-display requirement of the target service, and a display type corresponding to each sub-display requirement;

[0014] For each display type, determining at least one sub-display requirement corresponding to the display type carried in the Java Script object creation instruction, adding the at least one sub-display requirement to a first preset field in a preset sub-Java Script object template, and determining a sub-Java Script object corresponding to the display type;

[0015] Each child Java Script object corresponding to each display type is sequentially added to the second preset field in the preset Java Script object template, the second identifier is added to the third preset field in the Java Script object template, and the target Java Script object is determined.

[0016] Furthermore, the determining the target display requirement according to the target JavaScript object and the target display type includes:

[0017] Determining a target child Java Script object corresponding to the target display type according to a second correspondence between each child Java Script object and a display type stored in the target Java Script object, wherein the target child Java Script object carries at least one sub-display requirement;

[0018] The sub-display requirement carried in the target child Java Script object is determined as the target display requirement.

[0019] Furthermore, determining at least one display requirement carried in the target child Java Script object as the target display requirement includes:

[0020] Obtaining a pre-saved sorting method corresponding to the target display type;

[0021] The at least one sub-display requirement is sorted according to the sorting manner, and a sorting result is determined as the target display requirement.

[0022] Furthermore, the target display type includes a table, a form or others.

[0023] The present application also provides a web front-end page construction device, which includes:

[0024] A receiving module, configured to receive an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target service;

[0025] a processing module, configured to determine the target page and the target business according to the first identifier and the second identifier, obtain a pre-saved target display type for displaying the target page, and obtain a pre-saved target display requirement corresponding to the target display type for displaying the target business;

[0026] The page construction module is used to construct a model used by the business when displaying the target page according to the target display requirement and the target display type, and to construct a web front-end page according to the model.

[0027] Furthermore, the processing module is specifically used to obtain a first correspondence between the identification information of a pre-saved business and a JavaScript object, wherein the Java Script object contains display requirements for the business corresponding to the Java Script object when displayed in each display type; based on the first correspondence, determine the target Java Script object corresponding to the second identifier of the target business; and determine the target display requirements based on the target Java Script object and the target display type.

[0028] Furthermore, the device further comprises:

[0029] A generation module is used to receive an input Java Script object creation instruction carrying a second identifier corresponding to the target business, each sub-display requirement of the target business, and a display type corresponding to each sub-display requirement; for each display type, determine at least one sub-display requirement corresponding to the display type carried in the Java Script object creation instruction, add the at least one sub-display requirement to a first preset field in a preset sub-Java Script object template, and determine the sub-Java Script object corresponding to the display type; add each sub-Java Script object corresponding to each display type in turn to the second preset field in the preset Java Script object template, add the second identifier to a third preset field in the Java Script object template, and determine the target Java Script object.

[0030] Furthermore, the processing module is specifically used to determine the target child Java Script object corresponding to the target display type based on the second correspondence between each child Java Script object and the display type stored in the target Java Script object, wherein the target child Java Script object carries at least one sub-display requirement; and determine the sub-display requirement carried in the target child Java Script object as the target display requirement.

[0031] Furthermore, the processing module is specifically configured to obtain a pre-saved sorting method corresponding to the target display type; sort the at least one sub-display requirement according to the sorting method, and determine the sorting result as the target display requirement.

[0032] Furthermore, the target display type includes a table, a form or others.

[0033] An embodiment of the present application also provides an electronic device, which includes a processor, and the processor is used to implement the steps of any of the above-mentioned web front-end page construction methods when executing a computer program stored in a memory.

[0034] An embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described methods for constructing a web front-end page.

[0035] An embodiment of the present application also provides a computer program product, which includes: computer program code, which, when executed on a computer, enables the computer to execute the steps of any of the above-mentioned methods for constructing a web front-end page.

[0036] In an embodiment of the present application, a display instruction is received as input, carrying a first identifier of a target page to be displayed and a second identifier of a target business. Based on the first identifier and the second identifier, the target page and the target business are determined. A pre-stored target display type for the target page when displayed is obtained, and a pre-stored target display requirement corresponding to the target display type when the target business is displayed is obtained. Based on the target display requirement and the target display type, a model is constructed for the business when displaying the page, and a web front-end page is constructed based on the model. In an embodiment of the present application, multiple models are not stored in the web front-end server. Instead, corresponding models are constructed based on the display instruction during the display process, and then displayed based on the models, thereby reducing the storage pressure on the web front-end server. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0038] Figure 1 A schematic diagram of a web front-end page construction process provided in an embodiment of the present application;

[0039] Figure 2 A schematic diagram of the structure of the target JavaScript object provided in the embodiment of the present application;

[0040] Figure 3 A schematic diagram of the structure of a web front-end page construction device provided in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] To make the objectives, technical solutions, and advantages of this application more clear, this application will be further described in detail below with reference to the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0043] In order to reduce the storage pressure of a web front-end server, embodiments of the present application provide a web front-end page construction method, apparatus, device, and medium.

[0044] In an embodiment of the present application, an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target business is received, and the target page and the target business are determined based on the first identifier and the second identifier, and a pre-saved target display type of the target page when displayed is obtained, and a pre-saved target display requirement corresponding to the target display type when the target business is displayed is obtained, and a model used by the business when displaying the page is constructed based on the target display requirement and the target display type, and a web front-end page is constructed based on the model.

[0045] The acquisition, storage, use, and processing of data in each technical solution of this application comply with the relevant provisions of national laws and regulations.

[0046] Example 1:

[0047] Figure 1 A schematic diagram of a web front-end page construction process provided in an embodiment of the present application includes:

[0048] S101: Receive an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target service.

[0049] A web front-end page construction method provided in an embodiment of the present application is applied to an electronic device, where the electronic device can be a web front-end server or a PC, etc.

[0050] In an embodiment of the present application, when a user needs to access a certain service on a certain page, the user inputs a display instruction for displaying the target service on the target page to be displayed. The display instruction carries a first identifier of the page to be displayed and a second identifier of the target service. The web front-end server can display the content corresponding to the target service on the web front-end page based on the display instruction.

[0051] In the embodiment of the present application, when the user inputs a display instruction, the user can select the target page to be displayed and the identification information of the target business through an external device such as a mouse and a keyboard.

[0052] S102: Determine the target page and the target business according to the first identifier and the second identifier, obtain a pre-saved target display type for displaying the target page, and obtain a pre-saved target display requirement corresponding to the target display type for displaying the target business.

[0053] In order to reduce the storage pressure of the web front-end server, in an embodiment of the present application, the storage of a large number of models in the web front-end server is avoided. Instead, the display requirements corresponding to each business are saved in the web front-end server, and the display requirements corresponding to each business can be reused multiple times in the specific display process.

[0054] In an embodiment of the present application, a plurality of pages are configured in the web front-end server by technicians for displaying different contents, and the web front-end server also stores the display type of each configured page. In an embodiment of the present application, one page corresponds to one display type, and multiple pages can correspond to the same display type.

[0055] In the prior art, when a web front-end server constructs a web front-end page, it does so based on a pre-configured model. Specifically, the web front-end server stores a model corresponding to each page. In other words, the web front-end server stores as many models as there are pages, with one model corresponding to each page. This results in a waste of storage resources on the web front-end server. Furthermore, in order to better provide services to users and reduce the storage pressure on the web front-end server, in an embodiment of the present application, the web front-end server stores display requirements corresponding to each display type. Pages of the same display type are displayed using the same display requirements, and different pages can correspond to the same display type.

[0056] It should be noted that the display requirement specifies, for each display type, each content that the business needs to display and the corresponding display position of each content.

[0057] For example, the web front-end server stores the display requirements corresponding to when the display type of the deposit business is a table. The display requirements stipulate that the first row of the table displays the user name, the second row displays the user contact information, and so on.

[0058] Based on this, in an embodiment of the present application, after receiving a display instruction input by a user, the web front-end server obtains the first identifier of the target page to be displayed and the second identifier of the target service carried in the display instruction. The web front-end server determines the target page to be displayed based on the first identifier and determines the target service based on the second identifier. The web front-end server obtains the pre-stored target display type for the target page when displaying it, and based on the pre-stored correspondence between the display type and the display requirements for each service when displaying it, determines the target display requirements corresponding to the target display type when displaying the target service.

[0059] S103: Constructing a model used by the business when displaying the target page according to the target display requirement and the target display type, and constructing a web front-end page according to the model.

[0060] In an embodiment of the present application, for each display type, the web front-end server stores a skeleton template of a model used by the web front-end page when displaying a page of that display type. The web front-end server can construct a model used by the service when displaying the target page based on the skeleton template of the model corresponding to each display type, the target display requirements, and the target display type, and construct the web front-end page based on the model. In this embodiment of the present application, each skeleton template stores identification information of the display type corresponding to the skeleton template, a method for the web front-end server to construct a page based on the skeleton template, and a preset field for adding the target display requirements.

[0061] Specifically, in an embodiment of the present application, the web front-end server determines the framework template to be used based on the target display type and the correspondence between the display type and the framework template, and determines the preset field pre-set in the framework template to be used for adding the target display requirements, writes the code corresponding to the target display requirements into the preset field of the framework template to be used, obtains the model, and then builds the web front-end page based on the model.

[0062] Among them, the process of the web front-end server building the web front-end page based on the model is an existing technology and will not be described in detail here.

[0063] Since in the embodiment of the present application, multiple models are not stored in the web front-end server, but corresponding models are constructed based on display instructions during the display process, and then displayed based on the models, the storage pressure of the web front-end server is reduced.

[0064] Example 2:

[0065] In order to determine the target display requirements of the target business, thereby building a model based on the target display requirements and reducing the storage pressure of the web front-end server, based on the above embodiment, in an embodiment of the present application, the target display requirements corresponding to the target display type when the pre-saved target business is obtained for display include:

[0066] Acquire a first correspondence between pre-saved identification information of a service and a Java Script object, wherein the Java Script object includes display requirements of the service corresponding to the Java Script object when displayed in each display type;

[0067] Determining, according to the first corresponding relationship, a target JavaScript object corresponding to the second identifier of the target service;

[0068] The target display requirement is determined according to the target JavaScript object and the target display type.

[0069] In the embodiment of the present application, when the web front-end server stores the display requirements for each service in each display type, it stores the display requirements for each service in a JavaScript object. Specifically, the web front-end server stores a JavaScript object corresponding to each service, and the JavaScript object stores the display requirements for the service in each display type. The web front-end server also stores a first correspondence between the service identification information and the JavaScript object.

[0070] Based on this, in an embodiment of the present application, when the web front-end server determines the target display requirement for displaying the target service, it obtains the target display requirement from the Java Script object corresponding to the service.

[0071] Specifically, in an embodiment of the present application, the web front-end server obtains a pre-stored first correspondence between identification information of a service and a JavaScript object. Based on the first correspondence, the web front-end server determines a target JavaScript object corresponding to the second identifier of the target service, and determines the target display requirement based on the target JavaScript object and the target display type.

[0072] Example 3:

[0073] In order to save the display requirements corresponding to each business in the web front-end server, avoid saving a large number of models in the web front-end server, and reduce the storage pressure of the web front-end server, based on the above embodiments, in the embodiment of the present application, the target JavaScript object generation process includes:

[0074] receiving an input Java Script object creation instruction carrying a second identifier corresponding to the target service, each sub-display requirement of the target service, and a display type corresponding to each sub-display requirement;

[0075] For each display type, determining at least one sub-display requirement corresponding to the display type carried in the Java Script object creation instruction, adding the at least one sub-display requirement to a first preset field in a preset sub-Java Script object template, and determining a sub-Java Script object corresponding to the display type;

[0076] Each child Java Script object corresponding to each display type is sequentially added to the second preset field in the preset Java Script object template, the second identifier is added to the third preset field in the Java Script object template, and the target Java Script object is determined.

[0077] In an embodiment of the present application, for each service, the web front-end server stores the display requirements of the service in a Java Script object, where a service can have multiple display types. Specifically, the web front-end server stores a Java Script object corresponding to each service, and the Java Script object stores the display requirements of the corresponding service when displayed in each display type. Specifically, in an embodiment of the present application, the Java Script object corresponding to each service includes at least one child Java Script object, and each child Java Script object is used to store the display requirements of the service when displayed in a certain display type.

[0078] Based on this, in an embodiment of the present application, the process of the web front-end server creating a target JavaScript object corresponding to the target service includes:

[0079] The technician inputs a Java Script object creation instruction into the web front-end service, wherein the Java Script object creation instruction carries the second identifier corresponding to the target service, each sub-display requirement of the target service, and the display type corresponding to each sub-display requirement. In the embodiment of the present application, when a service is displayed in a display type, there may be multiple sub-display requirements, and these multiple sub-display requirements constitute the display requirements for the service when displayed in that display type. In addition, when the service is displayed in that display type, there may be only one sub-display requirement, and this sub-display requirement is the display requirement for the service when displayed in that display type.

[0080] Based on this, in an embodiment of the present application, after receiving the Java Script object creation instruction, the web front-end server obtains a pre-stored child Java Script object template for determining a child Java Script object. For each display type, the web front-end server adds at least one sub-display requirement corresponding to the display type in the Java Script object creation instruction to a first preset field in the child Java Script object template, thereby determining the child Java Script object corresponding to the display type. Specifically, the web front-end server stores a child Java Script object template, and the child Java Script object template is pre-stored with a first preset field for adding a sub-display requirement. The web front-end server writes the at least one sub-display requirement corresponding to the display type into the first preset field in the child Java Script object template.

[0081] It should be noted that there may be a sub-display requirement corresponding to multiple display types, and the sub-display requirement is written into the sub-Java Script object corresponding to each display type.

[0082] After the web front-end server determines each sub-Java Script object corresponding to the target business, the web server adds each created sub-Java Script object to the second preset field in the preset Java Script object template, and adds the second identifier corresponding to the target business to the third preset field in the Java Script object template, so that when subsequently searching for the target display requirements corresponding to the target business, the search can be performed based on the identifier in the third preset field of each Java Script object.

[0083] Figure 2 The schematic diagram of the structure of the target Java Script object provided in the embodiment of the present application is as follows: Figure 2 As shown, the target Java Script object includes a keyword field for identifying the target Java Script object, that is, the second identifier of the target business corresponding to the target Java Script object, and an array of basic one-way data objects, that is, at least one child Java Script object, each of which stores multiple sub-display requirements when the target business is displayed in a display type.

[0084] Example 4:

[0085] In order to further determine the target display requirements of the target business, build a model based on the target display requirements, and reduce the storage pressure of the web front-end server, based on the above embodiments, in an embodiment of the present application, determining the target display requirements according to the target JavaScript object and the target display type includes:

[0086] Determining a target child Java Script object corresponding to the target display type according to a second correspondence between each child Java Script object and a display type stored in the target Java Script object, wherein the target child Java Script object carries at least one sub-display requirement;

[0087] The sub-display requirement carried in the target child Java Script object is determined as the target display requirement.

[0088] In an embodiment of the present application, the web front-end server stores a second correspondence between each child Java Script object and a display type, wherein each display type corresponds to a child Java Script object, and each child JavaScript object carries at least one sub-display requirement. Based on this second correspondence, the web front-end server can determine the target child Java Script object corresponding to the target display type stored in the target Java Script object. Based on the at least one sub-display requirement carried in the target child Java Script object, the web front-end server can determine the target display requirement when the service is displayed using the target display type.

[0089] Example 5:

[0090] In order to further determine the target display requirements of the target business, build a model based on the target display requirements, and reduce the storage pressure of the web front-end server, based on the above embodiments, in an embodiment of the present application, determining at least one display requirement carried in the target child JavaScript object as the target display requirement includes:

[0091] Obtaining a pre-saved sorting method corresponding to the target display type;

[0092] The at least one sub-display requirement is sorted according to the sorting manner, and a sorting result is determined as the target display requirement.

[0093] In an embodiment of the present application, the web front-end server stores parsing logic corresponding to each display type, wherein the parsing logic includes a sorting method corresponding to each display type.

[0094] After the web front-end server determines at least one target child Java Script object corresponding to the target display type in the target Java Script object, the web front-end server can obtain a pre-saved sorting method corresponding to the target display type, and sort the sub-display requirements contained in the at least one target child Java Script object according to the sorting method, and determine the sorting result as the target display requirement.

[0095] For example, in an embodiment of the present application, if the target display type is a table, when displaying business 1 in a table, the web front-end server can obtain the pre-saved table parsing logic, and use the sub-display requirement saved in the target sub-JavaScript object corresponding to business 1 as a parsing parameter, sort the sub-display requirement according to the sorting method saved in the table parsing logic, and obtain the target display requirement; if the target display type is a form, when displaying business 2 in a form, the web front-end server can obtain the pre-saved form parsing logic, and use the sub-display requirement saved in the target sub-JavaScript object corresponding to business 2 as a parsing parameter, sort the sub-display requirement according to the sorting method saved in the form parsing logic, and obtain the target display requirement; if the target display type is other, when displaying business 3 in other, the web front-end server can obtain the pre-saved other parsing logic, and use the sub-display requirement saved in the target sub-JavaScript object corresponding to business 3 as a parsing parameter, sort the sub-display requirement according to the sorting method saved in the other parsing logic, and obtain the target display requirement.

[0096] Example 6:

[0097] In order to reduce the storage pressure of the web front-end server, based on the above embodiments, in an embodiment of the present application, the target display type includes a table, a form or others.

[0098] In an embodiment of the present application, the display types of pages stored in the web front-end server include but are not limited to tables, forms or others.

[0099] In an embodiment of the present application, if the target display type of the target page to be displayed is a table, the web front-end server obtains the target display requirements of the target business displayed in the table that are pre-saved; if the target display type of the target page to be displayed is a form, the web front-end server obtains the target display requirements of the target business displayed in the form that are pre-saved; if the target display type of the target page to be displayed is other, the web front-end server obtains the target display requirements of the target business displayed in other that are pre-saved.

[0100] Example 7:

[0101] Figure 3 A schematic diagram of the structure of a web front-end page construction device provided in an embodiment of the present application, the device comprising:

[0102] The receiving module 301 is configured to receive an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target service;

[0103] The processing module 302 is configured to determine the target page and the target service based on the first identifier and the second identifier, obtain a pre-stored target display type for displaying the target page, and obtain a pre-stored target display requirement corresponding to the target display type for displaying the target service;

[0104] The page construction module 303 is used to construct a model used by the business when displaying the target page according to the target display requirement and the target display type, and to construct a web front-end page according to the model.

[0105] In one possible implementation, the processing module 302 is specifically used to obtain a first correspondence between identification information of a pre-saved business and a Java Script object, wherein the Java Script object contains display requirements for the business corresponding to the JavaScript object when displayed in each display type; based on the first correspondence, determine the target Java Script object corresponding to the second identifier of the target business; and determine the target display requirements based on the target Java Script object and the target display type.

[0106] In a possible implementation, the device further includes:

[0107] The generation module 304 is used to receive an input Java Script object creation instruction carrying a second identifier corresponding to the target business, each sub-display requirement of the target business, and a display type corresponding to each sub-display requirement; for each display type, determine at least one sub-display requirement corresponding to the display type carried in the Java Script object creation instruction, add the at least one sub-display requirement to a first preset field in a preset sub-Java Script object template, and determine a sub-Java Script object corresponding to the display type; add each sub-Java Script object corresponding to each display type to a second preset field in a preset Java Script object template in sequence, add the second identifier to a third preset field in the Java Script object template, and determine the target Java Script object.

[0108] In one possible implementation, the processing module 302 is specifically configured to determine a target child Java Script object corresponding to the target display type based on a second correspondence between each child Java Script object and the display type stored in the target JavaScript object, wherein the target child Java Script object carries at least one sub-display requirement; and determine the sub-display requirement carried in the target child Java Script object as the target display requirement.

[0109] In a possible implementation, the processing module 302 is specifically configured to obtain a pre-saved sorting method corresponding to the target display type; sort the at least one sub-display requirement according to the sorting method, and determine the sorting result as the target display requirement.

[0110] In a possible implementation, the target display type includes a table, a form, or others.

[0111] Example 8:

[0112] Based on the above embodiments, the present application also provides an electronic device, Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, it includes: a processor 41, a communication interface 42, a memory 43 and a communication bus 44, wherein the processor 41, the communication interface 42, and the memory 43 communicate with each other through the communication bus 44;

[0113] The memory 43 stores a computer program. When the program is executed by the processor 41, the processor 41 performs the following steps:

[0114] receiving an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target service;

[0115] Determine the target page and the target service according to the first identifier and the second identifier, obtain a pre-saved target display type for displaying the target page, and obtain a pre-saved target display requirement corresponding to the target display type for displaying the target service;

[0116] A model used by the business when displaying the target page is constructed according to the target display requirement and the target display type, and a web front-end page is constructed according to the model.

[0117] In a possible implementation, the processor is further configured to:

[0118] Acquire a first correspondence between pre-saved identification information of a service and a Java Script object, wherein the Java Script object includes display requirements of the service corresponding to the Java Script object when displayed in each display type;

[0119] Determining, according to the first corresponding relationship, a target JavaScript object corresponding to the second identifier of the target service;

[0120] The target display requirement is determined according to the target JavaScript object and the target display type.

[0121] In a possible implementation, the processor is further configured to:

[0122] receiving an input Java Script object creation instruction carrying a second identifier corresponding to the target service, each sub-display requirement of the target service, and a display type corresponding to each sub-display requirement;

[0123] For each display type, determining at least one sub-display requirement corresponding to the display type carried in the Java Script object creation instruction, adding the at least one sub-display requirement to a first preset field in a preset sub-Java Script object template, and determining a sub-Java Script object corresponding to the display type;

[0124] Each child Java Script object corresponding to each display type is sequentially added to the second preset field in the preset Java Script object template, the second identifier is added to the third preset field in the Java Script object template, and the target Java Script object is determined.

[0125] In a possible implementation, the processor is further configured to:

[0126] Determining a target child Java Script object corresponding to the target display type according to a second correspondence between each child Java Script object and a display type stored in the target Java Script object, wherein the target child Java Script object carries at least one sub-display requirement;

[0127] The sub-display requirement carried in the target child Java Script object is determined as the target display requirement.

[0128] In a possible implementation, the processor is further configured to:

[0129] Obtaining a pre-saved sorting method corresponding to the target display type;

[0130] The at least one sub-display requirement is sorted according to the sorting manner, and a sorting result is determined as the target display requirement.

[0131] Since the principle of solving the problem by the above electronic device is similar to the web front-end page construction method, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0132] The communication bus mentioned in the above-mentioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 42 is used for communication between the above-mentioned electronic device and other devices. The memory can include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0133] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0134] Example 9:

[0135] Based on the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program executable by a processor. When the program is executed on the processor, the processor implements the following steps:

[0136] receiving an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target service;

[0137] Determine the target page and the target service according to the first identifier and the second identifier, obtain a pre-saved target display type for displaying the target page, and obtain a pre-saved target display requirement corresponding to the target display type for displaying the target service;

[0138] A model used by the business when displaying the target page is constructed according to the target display requirement and the target display type, and a web front-end page is constructed according to the model.

[0139] In a possible implementation, the acquiring of the pre-saved target service for displaying the target display type and the target display requirement corresponding to the target display type includes:

[0140] Acquire a first correspondence between pre-saved identification information of a service and a Java Script object, wherein the Java Script object includes display requirements of the service corresponding to the Java Script object when displayed in each display type;

[0141] Determining, according to the first corresponding relationship, a target JavaScript object corresponding to the second identifier of the target service;

[0142] The target display requirement is determined according to the target JavaScript object and the target display type.

[0143] In one possible implementation, the target JavaScript object generation process includes:

[0144] receiving an input Java Script object creation instruction carrying a second identifier corresponding to the target service, each sub-display requirement of the target service, and a display type corresponding to each sub-display requirement;

[0145] For each display type, determining at least one sub-display requirement corresponding to the display type carried in the Java Script object creation instruction, adding the at least one sub-display requirement to a first preset field in a preset sub-Java Script object template, and determining a sub-Java Script object corresponding to the display type;

[0146] Each child Java Script object corresponding to each display type is sequentially added to the second preset field in the preset Java Script object template, the second identifier is added to the third preset field in the Java Script object template, and the target Java Script object is determined.

[0147] In a possible implementation, determining the target display requirement according to the target JavaScript object and the target display type includes:

[0148] Determining a target child Java Script object corresponding to the target display type according to a second correspondence between each child Java Script object and a display type stored in the target Java Script object, wherein the target child Java Script object carries at least one sub-display requirement;

[0149] The sub-display requirement carried in the target child Java Script object is determined as the target display requirement.

[0150] In a possible implementation, determining at least one display requirement carried in the target child JavaScript object as the target display requirement includes:

[0151] Obtaining a pre-saved sorting method corresponding to the target display type;

[0152] The at least one sub-display requirement is sorted according to the sorting manner, and a sorting result is determined as the target display requirement.

[0153] In a possible implementation, the target display type includes a table, a form, or others.

[0154] Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to the web front-end page construction method, the implementation of the above-mentioned computer-readable storage medium can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0155] Example 10:

[0156] An embodiment of the present application also provides a computer program product, which, when executed by a computer, implements the web front-end page construction method described in any of the above method embodiments applied to electronic devices.

[0157] The above embodiments may be implemented in whole or in part through software, hardware, firmware, or any combination thereof, and may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions that, when loaded and executed on a computer, fully or partially generate the processes or functions described in the embodiments of the present application.

[0158] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0162] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A web front-end page construction method, characterized in that: The method comprises: receiving an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target service; Determine the target page and the target service according to the first identifier and the second identifier, obtain a pre-saved target display type for displaying the target page, and obtain a pre-saved target display requirement corresponding to the target display type for displaying the target service; Constructing a model for the business to use when displaying the target page according to the target display requirements and the target display type, and constructing a web front-end page according to the model; The target display requirement corresponding to the target display type when obtaining the pre-saved target service for display includes: Obtaining a first correspondence between pre-saved identification information of a service and a JavaScript object, wherein the JavaScript object includes the service corresponding to the JavaScript object and display requirements for each display type; Determining, according to the first corresponding relationship, a target JavaScript object corresponding to the second identifier of the target service; Determining the target display requirement according to the target JavaScript object and the target display type; The target Java Script object generation process includes: receiving an input Java Script object creation instruction carrying a second identifier corresponding to the target service, each sub-display requirement of the target service, and a display type corresponding to each sub-display requirement; For each display type, determining at least one sub-display requirement corresponding to the display type carried in the Java Script object creation instruction, adding the at least one sub-display requirement to a first preset field in a preset sub-Java Script object template, and determining a sub-Java Script object corresponding to the display type; The child Java Script object corresponding to each display type is sequentially added to the second preset field in the preset Java Script object template, the second identifier is added to the third preset field in the Java Script object template, and the target Java Script object is determined.

2. The method according to claim 1, characterized in that The determining the target display requirement according to the target JavaScript object and the target display type includes: Determining a target child Java Script object corresponding to the target display type according to a second correspondence between each child Java Script object and a display type stored in the target Java Script object, wherein the target child JavaScript object carries at least one sub-display requirement; The sub-display requirement carried in the target child Java Script object is determined as the target display requirement.

3. The method according to claim 2, characterized in that The determining the at least one display requirement carried in the target child Java Script object as the target display requirement includes: Obtaining a pre-saved sorting method corresponding to the target display type; The at least one sub-display requirement is sorted according to the sorting manner, and a sorting result is determined as the target display requirement.

4. The method according to claim 1, wherein The target display type includes a table or a form.

5. A web front-end page construction device, characterized in that: The device comprises: A receiving module, configured to receive an input display instruction carrying a first identifier of a target page to be displayed and a second identifier of a target service; a processing module, configured to determine the target page and the target business according to the first identifier and the second identifier, obtain a pre-saved target display type for displaying the target page, and obtain a pre-saved target display requirement corresponding to the target display type for displaying the target business; A page construction module is used to construct a model used by the business when displaying the target page according to the target display requirements and the target display type, and to construct a web front-end page according to the model; The processing module is specifically configured to obtain a first correspondence between pre-saved identification information of a service and a Java Script object, wherein the Java Script object includes the service corresponding to the Java Script object and display requirements for each display type; determine, based on the first correspondence, a target Java Script object corresponding to the second identifier of the target service; and determine, based on the target Java Script object and the target display type, the target display requirements; Wherein, the device further comprises: A generation module is used to receive an input Java Script object creation instruction carrying a second identifier corresponding to the target business, each sub-display requirement of the target business, and a display type corresponding to each sub-display requirement; for each display type, determine at least one sub-display requirement corresponding to the display type carried in the Java Script object creation instruction, add the at least one sub-display requirement to a first preset field in a preset sub-Java Script object template, and determine the sub-Java Script object corresponding to the display type; add each sub-JavaScript object corresponding to each display type to the second preset field in the preset Java Script object template in turn, add the second identifier to a third preset field in the Java Script object template, and determine the target Java Script object.

6. The device according to claim 5, characterized in that The processing module is specifically configured to determine a target child Java Script object corresponding to the target display type based on a second correspondence between each child Java Script object and the display type stored in the target Java Script object, wherein the target child Java Script object carries at least one sub-display requirement; and determine the sub-display requirement carried in the target child Java Script object as the target display requirement.

7. The device according to claim 6, characterized in that The processing module is specifically configured to obtain a pre-saved sorting method corresponding to the target display type; sort the at least one sub-display requirement according to the sorting method, and determine the sorting result as the target display requirement.

8. The device according to claim 5, characterized in that The target display type includes a table or a form.

9. An electronic device, characterized in that: The electronic device includes a processor, and the processor is used to implement the steps of the web front-end page construction method according to any one of claims 1 to 4 when executing a computer program stored in a memory.

10. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the steps of the web front-end page construction method as described in any one of claims 1 to 4.

11. A computer program product, characterized in that The computer program product includes: computer program code, which, when running on a computer, enables the computer to execute the steps of the web front-end page construction method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Display rendering system with supporting components

    CN102096694A