CN117453211A - Page generation method, page generation device, computer device, storage medium and program product - Google Patents
Page generation method, page generation device, computer device, storage medium and program product Download PDFInfo
- Publication number
- CN117453211A CN117453211A CN202311251484.2A CN202311251484A CN117453211A CN 117453211 A CN117453211 A CN 117453211A CN 202311251484 A CN202311251484 A CN 202311251484A CN 117453211 A CN117453211 A CN 117453211A
- Authority
- CN
- China
- Prior art keywords
- target
- code file
- preset
- file
- configuration information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000004590 computer program Methods 0.000 claims abstract description 31
- 238000010586 diagram Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computing Systems (AREA)
- Stored Programmes (AREA)
Abstract
The present application relates to a page generation method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring a JSON configuration information file aiming at a target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element; determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements; the object code file is run in an object program to generate the object page. By adopting the method, the working efficiency of the page generation task can be improved.
Description
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a page generating method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
The mobile phone bank is a channel mode that a bank uses a smart phone as a carrier, so that a user can use banking services on the terminal, and therefore, the user needs to perform related operations based on a functional page of the mobile phone bank.
In the prior art, a developer generally configures a functional page of a mobile phone bank based on the use requirement of a user to generate a target page.
However, this developer-based method of generating a target page is inefficient.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a page generating method, apparatus, computer device, storage medium, and computer program product that can improve the work efficiency of page generation.
In a first aspect, the present application provides a page generation method. The method comprises the following steps:
acquiring a JSON configuration information file aiming at a target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element; determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements; the object code file is run in an object program to generate the object page.
In one embodiment, the determining the object code file based on the pre-set UI element library and the JSON configuration information file comprises: determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information; based on the target UI element, the preset UI element material library and the JSON configuration information file determine the target code file.
In one embodiment, the determining the object code file based on the object UI element, the preset UI element material library, and the JSON configuration information file includes:
acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file; the object code file is determined from the first code file and the JSON configuration information file.
In one embodiment, the determining the object code file from the first code file and the JSON configuration information file includes: performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file; the object code file is determined from the second code file and the JSON configuration information file.
In one embodiment, the determining the object code file from the second code file and the JSON configuration information file comprises: and combining the second code file based on the layout information of the target UI element to obtain the target code file.
In one embodiment, the method further comprises: if it is determined that the target UI element does not exist in the plurality of UI elements in the preset UI element material library according to the target UI element information, prompt information is generated according to the target element information, and the prompt information is used for indicating to update the preset UI element material library.
In a second aspect, the present application further provides a page generating apparatus. The device comprises:
the acquisition module is used for acquiring a JSON configuration information file aiming at the target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element;
the determining module is used for determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements;
and the execution module is used for running the target code file in a target program to generate the target page.
In one embodiment, the determining module is specifically configured to: determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information;
based on the target UI element, the preset UI element material library and the JSON configuration information file determine the target code file.
In one embodiment, the determining module is specifically configured to: acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file;
the object code file is determined from the first code file and the JSON configuration information file.
In one embodiment, the determining module is specifically configured to: performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file;
the object code file is determined from the second code file and the JSON configuration information file.
In one embodiment, the determining module is specifically configured to: and combining the second code file based on the layout information of the target UI element to obtain the target code file.
In one embodiment, the determining module is specifically configured to: if it is determined that the target UI element does not exist in the plurality of UI elements in the preset UI element material library according to the target UI element information, prompt information is generated according to the target element information, and the prompt information is used for indicating to update the preset UI element material library.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of any of the above first aspects when the computer program is executed.
In a fourth aspect, the present application also provides a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the first aspects described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the first aspects described above.
The method, the device, the computer equipment, the storage medium and the computer program product for generating the page firstly acquire a JSON configuration information file aiming at the target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element, then determine a target code file based on a preset UI element material library and the JSON configuration information file, the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements, and finally operate the target code file in the target program to generate the target page. According to the page generation method, the UI elements with higher use frequency are stored in the UI element material library in advance, the corresponding code files can be produced based on the UI element material library and the analysis of the JSON configuration information files, then the required pages can be obtained based on the code files, the problem that a developer needs to manually and repeatedly write similar codes in a large number of similar page structures can be effectively avoided, and the work efficiency of page generation tasks can be effectively improved by adopting the page generation method.
Drawings
FIG. 1 is a flow diagram of a page generation method in one embodiment;
FIG. 2 is a flow diagram of a method for determining the object code file based on the library of pre-set UI element materials and the JSON configuration information file in one embodiment;
FIG. 3 is a flow diagram of a method for determining the object code file based on the object UI element, the library of pre-set UI element materials, and the JSON configuration information file in one embodiment;
FIG. 4 is a flow diagram of a method for determining the object code file based on the first code file and the JSON configuration information file in one embodiment;
FIG. 5 is a flowchart of a page generation method in another embodiment;
FIG. 6 is a block diagram of a page generation apparatus in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The mobile phone bank is a channel mode that a bank uses a smart phone as a carrier, so that a user can use banking services on the terminal, and therefore, the user needs to perform related operations based on a functional page of the mobile phone bank.
In the prior art, a developer generally configures a functional page of a mobile phone bank based on the use requirement of a user to generate a target page.
However, this developer-based method of generating a target page is inefficient.
In view of this, the embodiments of the present application provide a page generation method capable of improving the work efficiency of page generation.
According to the page generation method provided by the embodiment of the application, the execution main body can be a computer device, and the computer device can be a server.
In one embodiment, as shown in fig. 1, there is provided a page generation method including the steps of:
step 101, acquiring a JSON configuration information file for a target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element.
Optionally, the target page refers to a page that the user needs to generate.
Alternatively, the JSON refers to a lightweight data exchange format, a compact and clear text format can be used to represent data, and the JSON profile can be used to describe the target page
In one possible implementation manner, an initial JSON configuration information file may be provided to the user, and the user may fill in the initial JSON configuration information file according to his own requirement, so as to obtain the JSON configuration information file for the target page, for example, the user may fill in a UI element in the initial JSON configuration information file according to his own requirement, where the UI element corresponds to attribute information and layout information.
In another possible implementation manner, an initial JSON configuration information file may be provided to the user, and the user may fill in the initial JSON configuration information file according to his own requirement, so as to obtain the JSON configuration information file for the target page, for example, a plurality of UI elements exist in the initial JSON configuration information file, and the user may select according to his own requirement, and then fill in corresponding attribute information and layout information after selecting.
The UI element refers to all visual elements in the page.
In one possible implementation, assuming that the target UI element is a table, the attribute element of the target UI may be a line color of the table, a number of rows and columns of the table, and a fill color of the table.
In another possible implementation manner, assuming that the target UI element is a plurality of tables, the attribute element of the target UI may be a line color, a line number and a filling color corresponding to the plurality of tables, and the layout information of the target UI element may be an arrangement manner and an arrangement order of the plurality of tables.
In another possible implementation, assuming the target UI element is a graphic, the attribute elements of the target UI may be the color, shape, and size of the image.
In another possible implementation manner, assuming that the target UI element is a plurality of graphics, the attribute element of the target UI may be a color, a shape, and a size corresponding to the plurality of graphics, and the layout information of the target UI element may be an arrangement manner and an arrangement order of the plurality of images.
Step 102, determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements.
Optionally, the preset UI element material library is set in advance by a technician.
In one possible implementation manner, the use frequency of each UI element may be obtained, and the UI element with the higher use frequency and the initial code file of the UI element are stored in the preset UI element material library.
In another possible implementation manner, all UI elements in a plurality of function pages of the mobile banking may be acquired, and all UI elements and initial code files of the UI elements are stored in the preset UI element material.
As described above, when the technician sets the preset UI element library, the object code file may be determined based on the preset UI element library and the JSON configuration information file.
In one possible implementation, the object code file may be processed by an algorithm and determined based on a library of preset UI element materials and the JSON configuration information file.
In another possible implementation manner, the JSON configuration information file may be parsed based on a keyword algorithm, and then the object code file may be determined according to the parsed result and the preset UI element material library.
Step 103, running the target code file in the target program to generate the target page.
Alternatively, the target program refers to a program that can generate pages.
In one possible implementation, an object code file may be entered into the object program, which runs based on the object code file to generate the target page.
According to the page generation method, a JSON configuration information file for a target page is firstly obtained, the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element, then a target code file is determined based on a preset UI element material library and the JSON configuration information file, the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements, and finally the target code file is operated in a target program to generate the target page. According to the page generation method, the UI elements with higher use frequency are stored in the UI element material library in advance, the corresponding code files can be produced based on the UI element material library and the analysis of the JSON configuration information files, then the required pages can be obtained based on the code files, the problem that a developer needs to manually and repeatedly write similar codes in a large number of similar page structures can be effectively avoided, and the work efficiency of page generation tasks can be effectively improved by adopting the page generation method.
In one embodiment, as shown in fig. 2, the determining the object code file based on the preset UI element material library and the JSON configuration information file includes the steps of:
step 201, determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information.
In one possible implementation manner, the target UI element information may be determined according to the JSON configuration information file first, and if the target UI element information is an a element, a B element, and a C element, the a element, the B element, and the C element are determined as target UI elements from a plurality of UI elements in the preset UI element material library according to the target UI element information.
In another possible implementation manner, the target UI element information may be determined according to the JSON configuration information file first, and if the target UI element information is an a element, the a element is determined to be a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information.
In one possible implementation manner, the target UI element information may be determined according to the JSON configuration information file first, and assuming that the target UI element information is a B element and a C element, then determining, according to the target UI element information, that the B element and the C element are target UI elements from a plurality of UI elements in the preset UI element material library.
Step 202, determining the target code file based on the target UI element, the preset UI element material library and the JSON configuration information file.
In one possible implementation manner, if determining that the a element, the B element, and the C element are target UI elements from the plurality of UI elements in the preset UI element material library according to the target UI element information, the target code file may be determined by the a element, the B element, the C element, the preset UI element material library, and the JSON configuration information file.
In another possible implementation manner, if it is determined that the a element is the target UI element from the plurality of UI elements in the preset UI element material library according to the target UI element information, the target code file may be determined according to the a element, the preset UI element material library, and the JSON configuration information file.
In another possible implementation manner, if the B element and the C element are determined to be target UI elements from the plurality of UI elements in the preset UI element material library according to the target UI element information, the target code file may be determined according to the B element, the C element, the preset UI element material library, and the JSON configuration information file.
In one embodiment, as shown in fig. 3, the determining the object code file based on the target UI element, the preset UI element material library and the JSON configuration information file includes the following steps:
step 301, acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file.
In one possible implementation manner, if determining that the element a, the element B and the element C are target UI elements from the plurality of UI elements in the preset UI element material library according to the target UI element information, the initial code file of the element a, the initial code file of the element B and the initial code file of the element C may be obtained based on the preset UI element material library, and the initial code file of the element a, the initial code file of the element B and the initial code file of the element C may be determined as the first code file.
In another possible implementation manner, if it is determined that the a element is the target UI element from the plurality of UI elements in the preset UI element material library according to the target UI element information, the initial code file of the a element may be obtained based on the preset UI element material library, and it is determined that the initial code file of the a element is the first code file.
In another possible implementation manner, if the B element and the C element are determined to be the target UI elements from the plurality of UI elements in the preset UI element material library according to the target UI element information, the initial code file of the B element and the initial code file of the C element may be obtained based on the preset UI element material library, and the initial code file of the B element and the initial code file of the C element may be determined to be the first code file.
Step 302, determining the target code file according to the first code file and the JSON configuration information file.
In one possible implementation, the target code file may be determined from the target UI element attribute information in the first code file and the JSON configuration information file.
In one embodiment, as shown in fig. 4, the determining the object code file from the first code file and the JSON configuration information file includes the steps of:
and step 401, performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file.
In one possible implementation manner, if the target UI element is an a element, a B element, and a C element, attribute information of the a element, the attribute information of the B element, and the attribute information of the C element may be obtained through the JSON configuration information file, for example, the a element is an edit box, the attribute information of the a element is that the edit box is black, and the size of the edit box is 2×4cm, then configuration processing may be performed on an initial code file of the a element in the first code file according to the attribute information of the a element, and configuration processing may be performed on the initial code file of the B element and the initial code file of the C element according to the above procedure, so as to obtain the second code file.
Step 402, determining the target code file according to the second code file and the JSON configuration information file.
In one possible implementation, the object code file is determined according to the layout information of the object UI element in the second code file and the JSON configuration information file.
In one embodiment, the determining the object code file from the second code file and the JSON configuration information file comprises: and combining the second code file based on the layout information of the target UI element to obtain the target code file.
In one possible implementation manner, if the target UI element is an a element, a B element, and a C element, the layout information of the target UI element is that the a element > the B element > the C element, and the distance is 3cm, that is, the a element is up, the B element is down, and the C element is 3cm, and the codes in the second code file are combined based on the layout information of the target UI element, so as to obtain the target code file.
In another possible implementation manner, if the target UI element is an a element and a B element, the layout information of the target UI element is a B element > an element, and the distance is 2cm, that is, the B element is above, the a element is below, and the distance is 3cm, then the code in the second code file is combined based on the layout information of the target UI element, so as to obtain the target code file.
In one embodiment, if it is determined that the target UI element does not exist in the plurality of UI elements in the preset UI element material library according to the target UI element information, the method further includes: and generating prompt information according to the target element information, wherein the prompt information is used for indicating to update the preset UI element material library.
In one possible implementation manner, if the target UI element information is an a element, but the a element does not exist in the preset UI element material library, a prompt message is generated, and a technician may update the preset UI element material library according to the prompt message, that is, add the a element and the initial code file of the a element in the preset UI element material library.
In an optional embodiment of the present application, the preset UI element material library is updated only when the number of the prompt messages is greater than a preset threshold, where the preset threshold may be preset by a technician.
If it is determined that the target UI element does not exist in the plurality of UI elements in the preset UI element database according to the target UI element information, generating prompt information according to the target element information, where the prompt information is used to indicate a method for updating the preset UI element database, so that the preset UI element database can be continuously optimized to improve the working efficiency of the page generating task.
In one embodiment, as shown in fig. 5, another page generation method is provided, which includes the steps of:
step 501, a JSON configuration information file for a target page is obtained, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element.
Step 502, determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information, where the preset UI element material library includes a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements.
Step 503, acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file.
And step 504, performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file.
Step 505, performing a combination process on the second code file based on the layout information of the target UI element, so as to obtain the target code file.
Step 506, running the object code file in the object program to generate the object page.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a page generating device for realizing the page generating method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more page generating devices provided below may refer to the limitation of the page generating method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 6, there is provided a page generating apparatus including: the device comprises an acquisition module, a determination module and an execution module, wherein:
the acquisition module is used for acquiring a JSON configuration information file aiming at the target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element;
the determining module is used for determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements;
and the execution module is used for running the target code file in a target program to generate the target page.
In one embodiment, the determining module is specifically configured to: determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information; based on the target UI element, the preset UI element material library and the JSON configuration information file determine the target code file.
In one embodiment, the determining module is specifically configured to: acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file; the object code file is determined from the first code file and the JSON configuration information file.
In one embodiment, the determining module is specifically configured to: performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file; the object code file is determined from the second code file and the JSON configuration information file.
In one embodiment, the determining module is specifically configured to: and combining the second code file based on the layout information of the target UI element to obtain the target code file.
In one embodiment, the determining module is specifically configured to: if it is determined that the target UI element does not exist in the plurality of UI elements in the preset UI element material library according to the target UI element information, prompt information is generated according to the target element information, and the prompt information is used for indicating to update the preset UI element material library.
The respective modules in the above-described page generating apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a page generation method.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: acquiring a JSON configuration information file aiming at a target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element; determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements; the object code file is run in an object program to generate the object page.
In one embodiment, the determining the object code file based on the preset UI element material library and the JSON configuration information file further comprises: determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information; based on the target UI element, the preset UI element material library and the JSON configuration information file determine the target code file.
In one embodiment, the determining the object code file based on the object UI element, the preset UI element material library and the JSON configuration information file further comprises: acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file; the object code file is determined from the first code file and the JSON configuration information file.
In one embodiment, the determining the object code file based on the first code file and the JSON configuration information file further comprises: performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file; the object code file is determined from the second code file and the JSON configuration information file.
In one embodiment, the determining the object code file based on the second code file and the JSON configuration information file further comprises: and combining the second code file based on the layout information of the target UI element to obtain the target code file.
In one embodiment, the processor when executing the computer program further performs the steps of: if it is determined that the target UI element does not exist in the plurality of UI elements in the preset UI element material library according to the target UI element information, prompt information is generated according to the target element information, and the prompt information is used for indicating to update the preset UI element material library.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a JSON configuration information file aiming at a target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element; determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements; the object code file is run in an object program to generate the object page.
In one embodiment, the determining the object code file based on the pre-set UI element library and the JSON configuration information file further comprises: determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information; based on the target UI element, the preset UI element material library and the JSON configuration information file determine the target code file.
In one embodiment, the determining the object code file based on the object UI element, the preset UI element material library and the JSON configuration information file further comprises: acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file; the object code file is determined from the first code file and the JSON configuration information file.
In one embodiment, the determining the object code file based on the first code file and the JSON configuration information file, the computer program when executed by the processor further performs the steps of: performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file; the object code file is determined from the second code file and the JSON configuration information file.
In one embodiment, the determining the object code file based on the second code file and the JSON configuration information file further comprises: and combining the second code file based on the layout information of the target UI element to obtain the target code file.
In one embodiment, the computer program when executed by the processor further performs the steps of: if it is determined that the target UI element does not exist in the plurality of UI elements in the preset UI element material library according to the target UI element information, prompt information is generated according to the target element information, and the prompt information is used for indicating to update the preset UI element material library.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
acquiring a JSON configuration information file aiming at a target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element; determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements; the object code file is run in an object program to generate the object page.
In one embodiment, the determining the object code file based on the pre-set UI element library and the JSON configuration information file further comprises: determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information; based on the target UI element, the preset UI element material library and the JSON configuration information file determine the target code file.
In one embodiment, the determining the object code file based on the object UI element, the preset UI element material library and the JSON configuration information file further comprises: acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file; the object code file is determined from the first code file and the JSON configuration information file.
In one embodiment, the determining the object code file based on the first code file and the JSON configuration information file, the computer program when executed by the processor further performs the steps of: performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file; the object code file is determined from the second code file and the JSON configuration information file.
In one embodiment, the determining the object code file based on the second code file and the JSON configuration information file further comprises: and combining the second code file based on the layout information of the target UI element to obtain the target code file.
In one embodiment, the computer program when executed by the processor further performs the steps of: if it is determined that the target UI element does not exist in the plurality of UI elements in the preset UI element material library according to the target UI element information, prompt information is generated according to the target element information, and the prompt information is used for indicating to update the preset UI element material library.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (10)
1. A method of generating a page, the method comprising:
acquiring a JSON configuration information file aiming at a target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element;
determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements;
and running the target code file in a target program to generate the target page.
2. The method of claim 1, wherein the determining the object code file based on the library of preset UI element materials and the JSON configuration information file comprises:
determining a target UI element from a plurality of UI elements in the preset UI element material library according to the target UI element information;
and determining the target code file based on the target UI element, the preset UI element material library and the JSON configuration information file.
3. The method of claim 2, wherein the determining the object code file based on the object UI element, the library of preset UI element stories, and the JSON configuration information file comprises:
acquiring an initial code file of the target UI element based on the preset UI element material library, and determining the initial code file as a first code file;
and determining the target code file according to the first code file and the JSON configuration information file.
4. A method according to claim 3, wherein said determining said object code file from said first code file and said JSON configuration information file comprises:
performing configuration processing on the first code file based on the attribute information of the target UI element to obtain a second code file;
and determining the target code file according to the second code file and the JSON configuration information file.
5. The method of claim 4, wherein said determining said object code file from said second code file and said JSON configuration information file comprises:
and combining the second code file based on the layout information of the target UI element to obtain the target code file.
6. The method according to claim 2, wherein the method further comprises:
if the target UI element does not exist in the plurality of UI elements in the preset UI element material library according to the target UI element information, generating prompt information according to the target element information, wherein the prompt information is used for indicating to update the preset UI element material library.
7. A page generating apparatus, the apparatus comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring a JSON configuration information file aiming at a target page, wherein the JSON configuration information file comprises target UI element information, attribute information of the target UI element and layout information of the target UI element;
the determining module is used for determining an object code file based on a preset UI element material library and the JSON configuration information file, wherein the preset UI element material library comprises a plurality of preset UI elements and initial code files corresponding to the plurality of UI elements;
and the execution module is used for running the target code file in a target program to generate the target page.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311251484.2A CN117453211A (en) | 2023-09-26 | 2023-09-26 | Page generation method, page generation device, computer device, storage medium and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311251484.2A CN117453211A (en) | 2023-09-26 | 2023-09-26 | Page generation method, page generation device, computer device, storage medium and program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117453211A true CN117453211A (en) | 2024-01-26 |
Family
ID=89582610
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311251484.2A Pending CN117453211A (en) | 2023-09-26 | 2023-09-26 | Page generation method, page generation device, computer device, storage medium and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117453211A (en) |
-
2023
- 2023-09-26 CN CN202311251484.2A patent/CN117453211A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117573911A (en) | Automatic layout method, device, equipment and storage medium of physical architecture view | |
CN117332766A (en) | Flow chart generation method, device, computer equipment and storage medium | |
CN112001615A (en) | Process creation method, system, computer device, and storage medium | |
CN117453211A (en) | Page generation method, page generation device, computer device, storage medium and program product | |
CN115857929A (en) | Resource data processing method and device, computer equipment and storage medium | |
CN114547066A (en) | Nuclear power business data standardization method and device and computer equipment | |
CN115686706B (en) | Terminal view configuration method, device, computer equipment and storage medium | |
CN111179175A (en) | Image processing method and device based on convolutional neural network and storage medium | |
CN117130606A (en) | Front-end page configuration method, front-end page configuration device, computer equipment and storage medium | |
CN116737140A (en) | Business component construction method, device, computer equipment and storage medium | |
CN116450240A (en) | Text file loading method, text file loading device, computer equipment and storage medium | |
CN117612192A (en) | Electronic drawing information identification method, system, electronic equipment and storage medium | |
CN117789938A (en) | Medical image typesetting and printing method, device, computer equipment and storage medium | |
CN117435197A (en) | Service page generation method, device, computer equipment and storage medium | |
CN117389649A (en) | Service selector generation method, device, equipment, storage medium and program product | |
CN117492722A (en) | Code generation method, device, computer equipment and storage medium | |
CN117407156A (en) | Target data extraction method, device, computer equipment and storage medium | |
CN115878929A (en) | Webpage rendering method and device | |
CN117130704A (en) | Page generation method, page generation device, computer equipment and storage medium | |
CN117873464A (en) | Component generating method, device, computer apparatus, storage medium, and program product | |
CN116204334A (en) | Data transmission method, device, computer equipment and storage medium | |
CN116910115A (en) | Group query method, device, computer equipment and storage medium | |
CN117150311A (en) | Data processing method, device, equipment and storage medium | |
CN117196924A (en) | Watermark adding method, watermark adding device, computer equipment and storage medium | |
CN117574871A (en) | Report generation method, apparatus, device, medium, and program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |