CN113486282A - Page generation method and device - Google Patents

Page generation method and device Download PDF

Info

Publication number
CN113486282A
CN113486282A CN202110841040.9A CN202110841040A CN113486282A CN 113486282 A CN113486282 A CN 113486282A CN 202110841040 A CN202110841040 A CN 202110841040A CN 113486282 A CN113486282 A CN 113486282A
Authority
CN
China
Prior art keywords
generation
data
page
configuration file
data source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110841040.9A
Other languages
Chinese (zh)
Inventor
白召雷
刘衍晴
王兆年
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Lexuebang Network Technology Co ltd
Original Assignee
Beijing Lexuebang Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Lexuebang Network Technology Co ltd filed Critical Beijing Lexuebang Network Technology Co ltd
Priority to CN202110841040.9A priority Critical patent/CN113486282A/en
Publication of CN113486282A publication Critical patent/CN113486282A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Abstract

The application provides a page generation method and a page generation device, which are applied to the field of application development, wherein the page generation method comprises the following steps: determining a CICD pipeline template, a generation language and a generation environment; pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment; and generating a target page corresponding to the CICD pipeline template based on the data source by utilizing the form generator. In the scheme, in the development or maintenance process, the target page can be generated according to the generation language corresponding to the target page and the data source corresponding to the generation environment matching. Therefore, in the process of development or maintenance, the form does not need to be written for each language and each environment, and the target page can be generated only by traversing and rendering different types of forms through the data source, so that the development and maintenance cost is reduced.

Description

Page generation method and device
Technical Field
The application relates to the field of application development, in particular to a page generation method and device.
Background
In the development process of internet application, a module which needs to develop a flow template is often encountered. In the development process, a plurality of links are generally required, each link corresponds to one environment (such as dev, test, beta, pro and the like) and can also relate to a plurality of languages (such as java, go, node and the like). For example, a pipeline may need to be released through unit testing, code scanning, building, releasing, and other links, and each link needs a user to input a form (form style includes input, checkbox, select, radio, and the like) and enter information needed by each link.
Therefore, in the front-end development process, form components need to be written for each language and each environment, resulting in higher development and maintenance costs.
Disclosure of Invention
An object of the embodiments of the present application is to provide a page generation method and apparatus, so as to solve the technical problem of high development and maintenance cost.
In order to achieve the above purpose, the technical solutions provided in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a page generation method, including: determining a CICD pipeline template, a generation language and a generation environment; pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment; and generating a target page corresponding to the CICD pipeline template based on the data source by utilizing a form generator. In the above scheme, a language and a data source corresponding to an environment can be directly pulled from a predefined configuration file. In the development or maintenance process, the target page can be generated according to the generation language corresponding to the target page and the data source corresponding to the generation environment matching. Therefore, in the process of development or maintenance, the form does not need to be written for each language and each environment, and the target page can be generated only by traversing and rendering different types of forms through the data source, so that the development and maintenance cost is reduced.
In an optional embodiment of the present application, the target page includes at least one form style, and the number of each form style is at least one. In the scheme, the form styles included in the target page can be one or multiple, the number of each form style can be one or more, and for different conditions, a language and a data source corresponding to an environment can be directly pulled from a predefined configuration file, so that the method is convenient and quick, and the cost of account opening and maintenance is reduced.
In an optional embodiment of the present application, before the determining the CICD pipeline template, the generating language, and the generating environment, the method further comprises: receiving a configuration file modification instruction; wherein the configuration file modification instruction comprises configuration parameters needing to be modified; and updating the configuration file according to the configuration file modification instruction. In the scheme, in the maintenance process, if a language or an environment needs to be added, only the initial configuration file needs to be modified, and the form does not need to be rewritten, so that the method has good expandability.
In an optional embodiment of the present application, the pulling, according to the cic d pipeline template, the generation language, and the generation environment, a corresponding data source from a predefined configuration file includes: determining data required in the CICD pipeline template according to the CICD pipeline template, the generation language and the generation environment; and pulling the data from the configuration file, and matching a unique data item for each item of data to obtain the data source. In the scheme, the data needed in the template can be determined according to the CICD pipeline template, the generation language and the generation environment, and a data source corresponding to one language and one environment is pulled from the configuration file. In the development or maintenance process, the target page can be generated according to the generation language corresponding to the target page and the data source corresponding to the generation environment matching. Therefore, in the process of development or maintenance, the form does not need to be written for each language and each environment, and the target page can be generated only by traversing and rendering different types of forms through the data source, so that the development and maintenance cost is reduced.
In an optional embodiment of the present application, after the generating, by the form generator, a target page corresponding to the CICD pipeline template based on the data source, the method further includes: acquiring supplementary data input by a user through the target page; verifying the supplementary data; if the verification is passed, storing the supplementary data in the target page; and if the verification fails, outputting prompt information. In the above scheme, after the user inputs the supplementary data through the target page, the supplementary data input by the user can be verified, so that the prompt message is output when the verification fails, and the supplementary data finally input by the user can be ensured to meet the verification requirement.
In an optional embodiment of the present application, the configuration file includes a predefined preset format of the supplementary data; the verifying the supplementary data includes: judging whether the format of the supplementary data meets the preset format or not; if yes, confirming that the supplementary data passes verification; and if not, determining that the supplementary data check fails. In the above scheme, after the user inputs the supplementary data through the target page, whether the format of the supplementary data input by the user meets the preset format or not can be judged, so that the prompt information is output when the format of the supplementary data input by the user does not meet the preset format, and therefore the supplementary data finally input by the user can be ensured to meet the preset format.
In an optional embodiment of the present application, after saving the supplementary data in the target page, the method further comprises: and filling the supplementary data into the data source. In the above scheme, after the user inputs the supplementary data through the target page, the supplementary data can be filled into the data source by matching the data source to output the page generated after the supplementary data is filled, so that the function of viewing the generated page can be realized.
In a second aspect, an embodiment of the present application provides a page generating apparatus, including: the determining module is used for determining a CICD pipeline template, a generating language and a generating environment; the pulling module is used for pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment; and the first generation module is used for generating a target page corresponding to the CICD pipeline template based on the data source by utilizing a form generator. In the above scheme, a language and a data source corresponding to an environment can be directly pulled from a predefined configuration file. In the development or maintenance process, the target page can be generated according to the generation language corresponding to the target page and the data source corresponding to the generation environment matching. Therefore, in the process of development or maintenance, the form does not need to be written for each language and each environment, and the target page can be generated only by traversing and rendering different types of forms through the data source, so that the development and maintenance cost is reduced.
In an optional embodiment of the present application, the target page includes at least one form style, and the number of each form style is at least one. In the scheme, the form styles included in the target page can be one or multiple, the number of each form style can be one or more, and for different conditions, a language and a data source corresponding to an environment can be directly pulled from a predefined configuration file, so that the method is convenient and quick, and the cost of account opening and maintenance is reduced.
In an optional embodiment of the present application, the page generating apparatus further includes: the receiving module is used for receiving a configuration file modification instruction; wherein the configuration file modification instruction comprises configuration parameters needing to be modified; and the updating module is used for updating the configuration file according to the configuration file modification instruction. In the scheme, in the maintenance process, if a language or an environment needs to be added, only the initial configuration file needs to be modified, and the form does not need to be rewritten, so that the method has good expandability.
In an optional embodiment of the present application, the pulling module is specifically configured to: determining data required in the CICD pipeline template according to the CICD pipeline template, the generation language and the generation environment; and pulling the data from the configuration file, and matching a unique data item for each item of data to obtain the data source. In the scheme, the data needed in the template can be determined according to the CICD pipeline template, the generation language and the generation environment, and a data source corresponding to one language and one environment is pulled from the configuration file. In the development or maintenance process, the target page can be generated according to the generation language corresponding to the target page and the data source corresponding to the generation environment matching. Therefore, in the process of development or maintenance, the form does not need to be written for each language and each environment, and the target page can be generated only by traversing and rendering different types of forms through the data source, so that the development and maintenance cost is reduced.
In an optional embodiment of the present application, the page generating apparatus further includes: the acquisition module is used for acquiring the supplementary data input by the user through the target page; the verification module is used for verifying the supplementary data; the storage module is used for storing the supplementary data in the target page if the verification is passed; and the output module is used for outputting prompt information if the verification fails. In the above scheme, after the user inputs the supplementary data through the target page, the supplementary data input by the user can be verified, so that the prompt message is output when the verification fails, and the supplementary data finally input by the user can be ensured to meet the verification requirement.
In an optional embodiment of the present application, the configuration file includes a predefined preset format of the supplementary data; the verification module is specifically configured to: judging whether the format of the supplementary data meets the preset format or not; if yes, confirming that the supplementary data passes verification; and if not, determining that the supplementary data check fails. In the above scheme, after the user inputs the supplementary data through the target page, whether the format of the supplementary data input by the user meets the preset format or not can be judged, so that the prompt information is output when the format of the supplementary data input by the user does not meet the preset format, and therefore the supplementary data finally input by the user can be ensured to meet the preset format.
In an optional embodiment of the present application, the page generating apparatus further includes: and the filling module is used for filling the supplementary data into the data source. In the above scheme, after the user inputs the supplementary data through the target page, the supplementary data can be filled into the data source by matching the data source to output the page generated after the supplementary data is filled, so that the function of viewing the generated page can be realized.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and a bus; the processor and the memory are communicated with each other through the bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions capable of performing the page generation method as in the first aspect.
In a fourth aspect, embodiments of the present application provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the page generation method as in the first aspect.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of a page generation method provided in an embodiment of the present application;
fig. 2 is a flowchart of step S102 provided in the embodiment of the present application;
fig. 3 is a flowchart of a data verification method according to an embodiment of the present application;
FIG. 4 is a flow chart of a data viewing method provided by an embodiment of the present application;
fig. 5 is a block diagram of a structure of a page generation apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
For convenience of description, the page generation method provided by the embodiment of the present application may be divided into four parts: firstly, defining a configuration file; secondly, generating a page; thirdly, checking the data input by the user; fourth, data input by the user is viewed. The above four sections will be described in detail in turn.
First, the parts defining the configuration file are introduced.
Specifically, first, a user may pre-define a configuration file on the front-end electronic device, so that in the subsequent process of generating a page, a corresponding data source may be pulled from the pre-defined configuration file, and a target page may be generated according to the data source. Wherein, in the process of defining the configuration file, a user needs to consider a plurality of generation languages and a plurality of generation environments. For example, the generation language may include Java, Go, Node, JavaScript, and the like; generating the environment may include: development environment (develop, dev), test environment (test), acceptance test environment (beta), production environment (product), etc.
In addition, since the form style of the form is various, for example: an input box (input), a check box (checkbox), a selection box (select), a radio box (radio), a drop-down box, a node addition and the like, wherein a user can also define one or more form styles in the process of defining the configuration file according to requirements.
For example, the following is a data format (json format) of a configuration file provided in the embodiments of the present application:
Figure BDA0003177372400000071
in the configuration file, the outmost layer is a generation language, and corresponding data items can be returned when different generation languages are switched; pipeline components represent a pipeline environment, and when a 'dev-ci' environment is selected, a page needs three links of unit test (unitTest), code scanning (sonarScan) and construction (mvnBuild); the contents of pictures (img), names (title), form data (fields), etc. of each individual link are maintained inside paramConfigs.
It should be noted that the configuration file may include, in addition to the configuration parameters, configuration logics of each link, such as the number and the order of the links, which may be set according to actual situations, for example, increase, move forward, move backward, decrease, merge, branch, and the like, which are not described in detail herein.
Moreover, the display position, the display logic, the display direction and the display sequence of each link in the page can be set by a user according to the preference of the user, for example, vertical display, horizontal display, folding display and the like, and details are not repeated.
Thus, based on the configuration file, a data source corresponding to the dev-ci environment and the Java language can be obtained, and the data source comprises an input form type.
When a plurality of generation environments and a plurality of generation languages are included in the configuration file, a plurality of data sources corresponding to each generation language and each generation environment can be obtained based on the configuration file. For example: when the configuration file comprises two generation environments of dev and test and three generation languages of Java, Go and Node, based on the configuration file, a data source corresponding to the dev environment and Java language, a data source corresponding to the dev environment and Go language, a data source corresponding to the dev environment and Node language, a data source corresponding to the test environment and Java language, a data source corresponding to the test environment and Go language, a data source corresponding to the test environment and Node language, and six data sources in total can be obtained.
It should be understood that the above configuration file is only an example provided in the embodiments of the present application, and those skilled in the art may adjust the configuration file to obtain other configuration files based on the above configuration file, which is not specifically limited in the embodiments of the present application.
After the user definition is completed, the predefined configuration file may be stored in the server, and then the electronic device may obtain the configuration file and data items (such as a form name) in the server, and obtain at least one data source according to the configuration file and the data items. The generated data source can be cached in the local, so that data can be taken from the local data source in the development process, a page is generated, and repeated UI building work is reduced greatly.
The portion of generating the page is described next. Referring to fig. 1, fig. 1 is a flowchart of a page generation method according to an embodiment of the present application, where the data source generation method may include the following steps:
step S101: and determining a CICD pipeline template, a generation language and a generation environment.
Step S102: and pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment.
Step S103: and generating a target page corresponding to the CICD pipeline template based on the data source by utilizing the form generator.
Specifically, when creating a page, a user may select a CICD pipeline template, a generation language, and a generation environment on the front-end electronic device, and then the electronic device may pull a corresponding data source from a configuration file predefined in the above embodiment based on the CICD pipeline template, the generation language, and the generation environment.
After pulling the data source corresponding to the CICD pipeline template, the generation language and the generation environment selected by the user, the electronic device can generate a target page based on the obtained data source by using the form generator.
When the target page is generated, if the data source is missing, the target page with the missing mark can be directly generated to prompt the user to add corresponding missing data into the target page according to the prompt information and the missing mark.
After adding the corresponding missing data, the missing data may also be collected, and the missing data is stored in the data source, and a mapping relationship is established, which is not described in detail herein.
In the above scheme, a language and a data source corresponding to an environment can be directly pulled from a predefined configuration file. In the development or maintenance process, the target page can be generated according to the generation language corresponding to the target page and the data source corresponding to the generation environment matching. Therefore, in the process of development or maintenance, the form does not need to be written for each language and each environment, and the target page can be generated only by traversing and rendering different types of forms through the data source, so that the development and maintenance cost is reduced.
As an implementation manner, please refer to fig. 2, fig. 2 is a flowchart of step S102 provided in an embodiment of the present application, where the step S102 specifically includes the following steps:
step S201: and determining the required data in the CICD pipeline template according to the CICD pipeline template, the generation language and the generation environment.
Step S202: and (4) data is extracted from the configuration file, and a unique data item is matched for each item of data to obtain a data source.
The step S202 may have a plurality of embodiments according to the type and number of the form styles in the target page, and each embodiment will be described in detail below.
First, when the target page includes a form style and the number of the form styles is also one, the step S202 may include the following steps:
filling data items in the configuration file, generating form data, and obtaining a data source corresponding to a generation language and a generation environment.
Because the target page only comprises one form style, the form style can be matched with the corresponding data item, and the matched data item is filled in to generate the data source corresponding to the form style.
Secondly, when the target page includes a plurality of form styles, and the number of each form style is one, the step S202 may include the following steps:
filling data items in the configuration file, and generating a plurality of form data to obtain a data source corresponding to a generation language and a generation environment.
The target page comprises a plurality of form styles, so that each form style can be matched with a corresponding data item, and the corresponding data item is filled in to generate each form data corresponding to each form style, and a plurality of form data form a data source.
In the implementation mode, if the target page comprises a plurality of form styles but the number of each form style is one, a language and a data source corresponding to an environment can be obtained by loading the form through the data item, so that the implementation mode is convenient and quick, and the cost of account opening and maintenance is reduced.
Thirdly, when the target page includes a form style and the number of the form styles is multiple, the step S202 may include the following steps:
and step one, traversing the data items corresponding to each form style in the data items.
And secondly, sequentially filling the data items corresponding to each form style in the configuration file, and sequentially generating a plurality of form data to obtain a data source corresponding to a generation language and a generation environment.
Because the target page comprises a plurality of form styles with the same type and the configuration file only comprises a code corresponding to the form style of the type, the data items corresponding to each form style in the data items can be traversed, then the corresponding data items are filled in sequence, and a plurality of form data are generated in sequence. That is, firstly, acquiring a data item corresponding to a first form style, and generating corresponding form data; then acquiring a data item corresponding to the second form style and generating corresponding form data; and so on. Similarly, a plurality of form data forms a data source.
In the implementation mode, if the target page comprises a form style but the number of the form styles is multiple, a language and a data source corresponding to an environment can be obtained by circularly traversing and loading the form through the data items, so that the implementation mode is convenient and quick, and the cost of account opening and maintenance is reduced.
Fourthly, when the target page includes a plurality of form styles, the number of some form styles is multiple, and the number of some form styles is one, it can be understood that the implementation of the form styles with the multiple numbers may refer to the third implementation, the implementation of the form presentation with the one number may refer to the second implementation, and the combination of the implementation of the form styles is the fourth implementation, which is not described herein again.
Fifth, when the target page includes multiple form styles, and the number of each form style is multiple, it can be understood that the third embodiment can be referred to for each form style implementation with multiple numbers, and the combination of the multiple form styles implementation is the fifth implementation, which is not described herein again.
In the scheme, the form styles included in the target page can be one or multiple, the number of each form style can be one or more, and for different conditions, a language and a data source corresponding to an environment can be directly pulled from a predefined configuration file, so that the method is convenient and quick, and the cost of account opening and maintenance is reduced.
As another implementation manner, before the step S101, the page generating method provided in the embodiment of the present application may further include the following steps:
first, a configuration file modification instruction is received.
And secondly, updating the configuration file according to the configuration file modification instruction.
The configuration file modification instruction comprises configuration parameters to be modified, and a user can modify the configuration file and execute the steps S101 to S103 by using the modified configuration file, so that good expandability and good maintainability can be realized.
In the foregoing solution, it has been stated that the configuration file includes configuration logic in addition to configuration parameters, and therefore, the configuration file modification instruction described herein may also be a modification instruction for each link, for example, modifications to the sequence, logic, addition/deletion, branching, merging, and the like of each configuration link, such as adding a link, deleting a link, adjusting the link sequence, and the like.
That is, the configuration file modification instruction may include not only a modification instruction for the configuration parameter but also a modification instruction for the configuration link, which is not described in detail herein.
Therefore, in the maintenance process, if a language or an environment needs to be added, only the initial configuration file needs to be modified, and the form does not need to be rewritten, so that good expandability is achieved.
Then, a part for verifying data input by a user is introduced, please refer to fig. 3, where fig. 3 is a flowchart of a data verification method provided in an embodiment of the present application, and the data verification method may include the following steps:
step S301: and acquiring supplementary data input by a user through the target page.
Step S302: the supplemental data is verified.
Step S303: and if the verification is passed, storing the supplementary data in the target page.
Step S304: and if the verification fails, outputting prompt information.
Specifically, after the user inputs the supplementary data through the destination page, the supplementary data may be verified. For example, the supplemental data may be verified in the following manner (i.e., the step S302 may include the following steps):
and judging whether the format of the supplementary data meets the preset format or not.
And if so, confirming that the supplementary data check is passed.
And if not, determining that the supplementary data check fails.
When the user predefines the configuration file, the user may add a definition of a preset format of the supplementary data to the configuration file. For example, the supplementary data of the password input box may be defined: the supplementary data input by the user does not include capital letters or lowercase letters, the electronic equipment can output corresponding prompt information on a page to prompt the user to change the input supplementary data; or more than 8-bit character is necessary, if the supplementary data input by the user does not exceed 8 bits, the electronic device may output corresponding prompt information on the page to prompt the user to change the input supplementary data.
It should be understood that the above-mentioned verification method is only an example provided in the embodiment of the present application, and a person skilled in the art may adjust the implementation of the verification method according to practical situations, and the embodiment of the present application is not limited specifically.
In the above scheme, after the user inputs the supplementary data through the target page, the supplementary data input by the user can be verified, so that the prompt message is output when the verification fails, and the supplementary data finally input by the user can be ensured to meet the verification requirement.
Finally, a part for viewing data input by the user is introduced. Referring to fig. 4, fig. 4 is a flowchart of a data viewing method according to an embodiment of the present application, where the data viewing method includes the following steps:
step S401: and acquiring supplementary data input by a user through the target page.
Step S402: the supplemental data is verified.
Step S403: and if the verification is passed, storing the supplementary data in the target page.
Step S404: the supplemental data is filled into the data source.
Specifically, after the user inputs the supplementary data through the target page, the page after the supplementary data is input by the user can be checked after the supplementary data passes verification.
First, the electronic device may fill the verified supplementary data into the data source, and then output a page generated after the supplementary data is filled.
In the above scheme, after the user inputs the supplementary data through the target page, the verified supplementary data can be filled into the data source to output the page generated after the supplementary data is filled, so that the function of viewing the generated page can be realized.
Referring to fig. 5, fig. 5 is a block diagram of a page generation apparatus according to an embodiment of the present disclosure, where the page generation apparatus 500 may include: a determining module 501, configured to determine a CICD pipeline template, a generation language, and a generation environment; a pulling module 502, configured to pull a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language, and the generation environment; a first generating module 503, configured to generate, by using a form generator, a target page corresponding to the CICD pipeline template based on the data source.
In the embodiment of the application, a language and a data source corresponding to an environment can be directly pulled from a predefined configuration file. In the development or maintenance process, the target page can be generated according to the generation language corresponding to the target page and the data source corresponding to the generation environment matching. Therefore, in the process of development or maintenance, the form does not need to be written for each language and each environment, and the target page can be generated only by traversing and rendering different types of forms through the data source, so that the development and maintenance cost is reduced.
Further, the target page comprises at least one form style, and the number of each form style is at least one.
In the embodiment of the application, the form styles included in the target page can be one or multiple, the number of each form style can be one or more, and for different conditions, a language and a data source corresponding to an environment can be directly pulled from a predefined configuration file, so that the method is convenient and fast, and the cost of account opening and maintenance is reduced.
Further, the page generating apparatus 500 further includes: the receiving module is used for receiving a configuration file modification instruction; wherein the configuration file modification instruction comprises configuration parameters needing to be modified; and the updating module is used for updating the configuration file according to the configuration file modification instruction.
In the embodiment of the application, in the maintenance process, if a language or an environment needs to be added, only the initial configuration file needs to be modified, and the form does not need to be rewritten, so that good expandability is achieved.
Further, the pulling module 502 is specifically configured to: determining data required in the CICD pipeline template according to the CICD pipeline template, the generation language and the generation environment; and pulling the data from the configuration file, and matching a unique data item for each item of data to obtain the data source.
In the embodiment of the application, the data required in the template can be determined according to the CICD pipeline template, the generation language and the generation environment, and a data source corresponding to one language and one environment is pulled from the configuration file. In the development or maintenance process, the target page can be generated according to the generation language corresponding to the target page and the data source corresponding to the generation environment matching. Therefore, in the process of development or maintenance, the form does not need to be written for each language and each environment, and the target page can be generated only by traversing and rendering different types of forms through the data source, so that the development and maintenance cost is reduced.
Further, the page generating apparatus 500 further includes: the acquisition module is used for acquiring the supplementary data input by the user through the target page; the verification module is used for verifying the supplementary data; the storage module is used for storing the supplementary data in the target page if the verification is passed; and the output module is used for outputting prompt information if the verification fails.
In the embodiment of the application, after the user inputs the supplementary data through the target page, the supplementary data input by the user can be verified, so that the prompt message is output when the verification fails, and the supplementary data finally input by the user can be ensured to meet the verification requirement.
Further, the configuration file comprises a predefined preset format of the padding data; the verification module is specifically configured to: judging whether the format of the supplementary data meets the preset format or not; if yes, confirming that the supplementary data passes verification; and if not, determining that the supplementary data check fails.
In the embodiment of the application, after the user inputs the supplementary data through the target page, whether the format of the supplementary data input by the user meets the preset format or not can be judged, and the prompt information is output when the format of the supplementary data input by the user does not meet the preset format, so that the supplementary data finally input by the user can be ensured to meet the preset format.
Further, the page generating apparatus 500 further includes: and the filling module is used for filling the supplementary data into the data source.
In the embodiment of the application, after the user inputs the supplementary data through the target page, the supplementary data can be filled into the data source by matching the data source to output the page generated after the supplementary data is filled, so that the function of viewing the generated page can be realized.
Referring to fig. 6, fig. 6 is a block diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device 600 includes: at least one processor 601, at least one communication interface 602, at least one memory 603, and at least one communication bus 604. Wherein the communication bus 604 is used for implementing direct connection communication of these components, the communication interface 602 is used for communicating signaling or data with other node devices, and the memory 603 stores machine-readable instructions executable by the processor 601. When the electronic device 600 is in operation, the processor 601 communicates with the memory 603 via the communication bus 604, and the machine-readable instructions, when called by the processor 601, perform the page generation method described above.
For example, the processor 601 of the embodiment of the present application may implement the following method by reading the computer program from the memory 603 through the communication bus 604 and executing the computer program: step S101: and determining a CICD pipeline template, a generation language and a generation environment. Step S102: and pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment. Step S103: and generating a target page corresponding to the CICD pipeline template based on the data source by utilizing the form generator.
The processor 601 may be an integrated circuit chip having signal processing capabilities. The Processor 601 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. Which may implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 603 may include, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like.
It will be appreciated that the configuration shown in FIG. 6 is merely illustrative and that electronic device 600 may include more or fewer components than shown in FIG. 6 or have a different configuration than shown in FIG. 6. The components shown in fig. 6 may be implemented in hardware, software, or a combination thereof. In this embodiment, the electronic device 600 may be, but is not limited to, an entity device such as a desktop, a laptop, a smart phone, an intelligent wearable device, and a vehicle-mounted device, and may also be a virtual device such as a virtual machine. In addition, the electronic device 600 is not necessarily a single device, but may also be a combination of multiple devices, such as a server cluster, and the like.
Embodiments of the present application further provide a computer program product, including a computer program stored on a non-transitory computer readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the steps of the page generation method in the foregoing embodiments, for example, including: determining a CICD pipeline template, a generation language and a generation environment; pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment; and generating a target page corresponding to the CICD pipeline template based on the data source by utilizing a form generator.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A page generation method is characterized by comprising the following steps:
determining a CICD pipeline template, a generation language and a generation environment;
pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment;
and generating a target page corresponding to the CICD pipeline template based on the data source by utilizing a form generator.
2. The page generation method according to claim 1, wherein the target page includes at least one form style, and the number of each form style is at least one.
3. The method for generating pages according to claim 1, wherein before said determining a CICD pipeline template, a generation language and a generation environment, said method further comprises:
receiving a configuration file modification instruction; wherein the configuration file modification instruction comprises configuration parameters needing to be modified;
and updating the configuration file according to the configuration file modification instruction.
4. The method for generating pages according to claim 1, wherein said pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment comprises:
determining data required in the CICD pipeline template according to the CICD pipeline template, the generation language and the generation environment;
and pulling the data from the configuration file, and matching a unique data item for each item of data to obtain the data source.
5. The method of claim 1, wherein after generating, by the form generator, a target page corresponding to the CICD pipeline template based on the data source, the method further comprises:
acquiring supplementary data input by a user through the target page;
verifying the supplementary data;
if the verification is passed, storing the supplementary data in the target page;
and if the verification fails, outputting prompt information.
6. The page generating method according to claim 5, wherein the configuration file includes a pre-set format of pre-defined supplementary data;
the verifying the supplementary data includes:
judging whether the format of the supplementary data meets the preset format or not;
if yes, confirming that the supplementary data passes verification;
and if not, determining that the supplementary data check fails.
7. The page generating method according to claim 5, wherein after saving the supplementary data in the target page, the method further comprises:
and filling the supplementary data into the data source.
8. A page generating apparatus, comprising:
the determining module is used for determining a CICD pipeline template, a generating language and a generating environment;
the pulling module is used for pulling a corresponding data source from a predefined configuration file according to the CICD pipeline template, the generation language and the generation environment;
and the first generation module is used for generating a target page corresponding to the CICD pipeline template based on the data source by utilizing a form generator.
9. An electronic device, comprising: a processor, a memory, and a bus;
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the page generation method of any of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions which, when executed by a computer, cause the computer to perform the page generation method of any one of claims 1 to 7.
CN202110841040.9A 2021-07-23 2021-07-23 Page generation method and device Pending CN113486282A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110841040.9A CN113486282A (en) 2021-07-23 2021-07-23 Page generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110841040.9A CN113486282A (en) 2021-07-23 2021-07-23 Page generation method and device

Publications (1)

Publication Number Publication Date
CN113486282A true CN113486282A (en) 2021-10-08

Family

ID=77942452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110841040.9A Pending CN113486282A (en) 2021-07-23 2021-07-23 Page generation method and device

Country Status (1)

Country Link
CN (1) CN113486282A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017162024A1 (en) * 2016-03-22 2017-09-28 中兴通讯股份有限公司 Method of developing component and template using visual expression, storage medium, and apparatus
CN108255799A (en) * 2018-01-03 2018-07-06 北京帕克国际工程咨询股份有限公司 Construction-engineering project manages list intelligent generating system and method
CN108984170A (en) * 2017-06-02 2018-12-11 阿里巴巴集团控股有限公司 The multilingual rendering method of the H5 page and device
CN109271162A (en) * 2018-09-03 2019-01-25 中国建设银行股份有限公司 A kind of page generation method and device
CN109614545A (en) * 2018-11-13 2019-04-12 阿里巴巴集团控股有限公司 Page loading method, device and equipment
CN111352682A (en) * 2018-12-24 2020-06-30 北京嘀嘀无限科技发展有限公司 Page rendering method, device, server and readable storage medium
CN112711411A (en) * 2020-12-22 2021-04-27 宝付网络科技(上海)有限公司 CI/CD pipeline system based on Kubernetes and docker

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017162024A1 (en) * 2016-03-22 2017-09-28 中兴通讯股份有限公司 Method of developing component and template using visual expression, storage medium, and apparatus
CN108984170A (en) * 2017-06-02 2018-12-11 阿里巴巴集团控股有限公司 The multilingual rendering method of the H5 page and device
CN108255799A (en) * 2018-01-03 2018-07-06 北京帕克国际工程咨询股份有限公司 Construction-engineering project manages list intelligent generating system and method
CN109271162A (en) * 2018-09-03 2019-01-25 中国建设银行股份有限公司 A kind of page generation method and device
CN109614545A (en) * 2018-11-13 2019-04-12 阿里巴巴集团控股有限公司 Page loading method, device and equipment
CN111352682A (en) * 2018-12-24 2020-06-30 北京嘀嘀无限科技发展有限公司 Page rendering method, device, server and readable storage medium
CN112711411A (en) * 2020-12-22 2021-04-27 宝付网络科技(上海)有限公司 CI/CD pipeline system based on Kubernetes and docker

Similar Documents

Publication Publication Date Title
CN106708480B (en) Management platform implementation method and device
JP2022529178A (en) Features of artificial intelligence recommended models Processing methods, devices, electronic devices, and computer programs
WO2022111591A1 (en) Page generation method and apparatus, storage medium, and electronic device
CN113010827B (en) Page rendering method and device, electronic equipment and storage medium
CN111125496A (en) Price query method, device and system
CN110941614A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN113031946A (en) Method and device for rendering page component
US10951486B2 (en) Terminal device, UI expansion method, and UI expansion program
CN109361628A (en) Message assemble method, device, computer equipment and storage medium
CN111046640B (en) Dynamic generation method and device for certificate
CN115599386A (en) Code generation method, device, equipment and storage medium
CN116562249A (en) Form generation method, form generation device, electronic equipment and medium
CN112926008B (en) Method, device, electronic equipment and storage medium for generating form page
CN113486282A (en) Page generation method and device
CN111651488A (en) Database service processing method, device, medium and electronic equipment
CN108196921B (en) Document development method and device, computer equipment and storage medium
CN112181408A (en) Method and device for displaying view list on front page of application program
CN108170557B (en) Method and apparatus for outputting information
CN111324787B (en) Method and device for displaying block chain data in block chain browser
CN114968235A (en) Page form generation method and device, computer equipment and storage medium
CN110765610B (en) PDM integration method, PDM integration device, computer equipment and storage medium
CN111753238A (en) Data mapping method and device and electronic equipment
CN113312900A (en) Data verification method and device
CN113704650A (en) Information display method, device, system, equipment and storage medium
CN111177279A (en) Form saving method and device, storage medium and electronic equipment

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