CN111752598A - Page generation method and device, electronic equipment and storage medium - Google Patents

Page generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111752598A
CN111752598A CN202010612659.8A CN202010612659A CN111752598A CN 111752598 A CN111752598 A CN 111752598A CN 202010612659 A CN202010612659 A CN 202010612659A CN 111752598 A CN111752598 A CN 111752598A
Authority
CN
China
Prior art keywords
service logic
page
configuration file
template
target
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
CN202010612659.8A
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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010612659.8A priority Critical patent/CN111752598A/en
Publication of CN111752598A publication Critical patent/CN111752598A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a page generation method, a page generation device, an electronic device and a storage medium. The method comprises the following steps: acquiring a target service logic; searching a target template page corresponding to the target service logic according to a preset route, wherein the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic; determining a configuration file corresponding to the service logic of the same part of the target service logic as the template service logic as a default configuration file; configuring the service logic of the part of the target service logic, which is different from the template service logic, to obtain a user-defined configuration file; and combining the default configuration file and the user-defined configuration file to obtain the target service page. The default configuration file is a pre-configured file, and only a user-defined configuration file needs to be configured in the process of obtaining the target service page according to the target service logic, a large number of service pages do not need to be developed one by one, and the problem of project code redundancy can be avoided.

Description

Page generation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a page generation method and apparatus, an electronic device, and a storage medium.
Background
With the continuous development of internet technology, a great variety of software development requirements emerge greatly. In the process of software development according to different business requirements, developers can develop various pages for demanders according to specific business requirements. Different business requirements require a large number of user-oriented pages to be developed, and even in the same business requirement, a large number of user-oriented pages also need to be developed. Developers must develop a plurality of service pages meeting the service requirements according to the corresponding service requirements to meet the project requirements of the demander.
However, according to the requirements of the development project, a large number of service pages meeting the service requirements may need to be developed, and the development of a large number of service pages may cause a problem of project code redundancy, which increases the difficulty of project maintenance.
Disclosure of Invention
The disclosure provides a page generation method, a page generation device, an electronic device and a storage medium, which are used for at least solving the problem of project code redundancy in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a page generation method, including:
acquiring a target service logic; the target business logic comprises business logic for realizing a page function and a page style corresponding to a target page;
searching a target template page corresponding to the target service logic according to a preset route; the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic;
determining a configuration file corresponding to the service logic of the same part of the target service logic as the template service logic as a default configuration file;
configuring the service logic of the part of the target service logic, which is different from the template service logic, to obtain a user-defined configuration file;
and combining the default configuration file and the user-defined configuration file to obtain a target service page corresponding to the target service logic.
In an exemplary embodiment, before searching for a target template page corresponding to the target service logic according to a preset route, the method includes:
acquiring at least one service logic;
configuring the at least one service logic to obtain a configuration file and a template page corresponding to the configuration file;
and storing the template page to the preset route.
In an exemplary embodiment, at least one template page is stored in the preset route, and the template page corresponds to at least one service type and at least one page type;
the searching for the target template page corresponding to the target service logic according to the preset route includes:
and searching a template page consistent with the service type and the page type of the target service logic according to the preset route to obtain the target template page.
In an exemplary embodiment, the determining that the configuration file corresponding to the service logic in the same part of the target service logic as the template service logic is a default configuration file includes:
searching a service logic which is the same as the target service logic in the template service logic;
if the service logic which is the same as the target service logic is found in the template service logic, determining a configuration file corresponding to the same service logic as an initial configuration file;
setting the page attribute corresponding to the initial configuration file as a displayable page to obtain the default configuration file.
In an exemplary embodiment, the configuring the service logic of the portion of the target service logic different from the template service logic to obtain a custom configuration file includes:
searching a service logic which is the same as the target service logic in the template service logic;
if the service logic which is the same as the target service logic cannot be found in the template service logic, configuring the service logic which cannot be found in the target service logic according to preset requirements to obtain a user-defined background logic;
configuring page displays corresponding to the service logics which cannot be found in the target service logics to obtain custom page logics;
and integrating the user-defined background logic and the user-defined page logic to obtain the user-defined configuration file.
In an exemplary embodiment, the merging the default configuration file and the custom configuration file to obtain a target service page corresponding to the target service logic includes:
acquiring dynamic configuration parameters from the target service logic; the dynamic configuration parameters comprise calling parameters and calling rules between the default configuration file and the custom configuration file;
and connecting the default configuration file and the custom configuration file according to the calling parameters and calling rules in the dynamic configuration parameters to obtain the target service page.
According to a second aspect of the embodiments of the present disclosure, there is provided a page generating apparatus, including:
a target service logic acquisition unit configured to execute acquisition of a target service logic; the target business logic comprises business logic for realizing a page function and a page style corresponding to a target page;
the template page searching unit is configured to search a target template page corresponding to the target service logic according to a preset route; the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic;
a default configuration file determining unit, configured to execute determining a configuration file corresponding to a service logic of a same portion of the target service logic as the template service logic, as a default configuration file;
the user-defined configuration file generating unit is configured to execute configuration on the service logic of the part, which is different from the template service logic, in the target service logic to obtain a user-defined configuration file;
and the target service page generating unit is configured to execute merging of the default configuration file and the custom configuration file to obtain a target service page corresponding to the target service logic.
In an exemplary embodiment, the page generating apparatus further includes a template page configuring unit configured to perform:
acquiring at least one service logic;
configuring the at least one service logic to obtain a configuration file and a template page corresponding to the configuration file;
and storing the template page to the preset route.
In an exemplary embodiment, at least one template page is stored in the preset route, and the template page corresponds to at least one service type and at least one page type;
the template page lookup unit is further configured to perform:
and searching a template page consistent with the service type and the page type of the target service logic according to the preset route to obtain the target template page.
In an exemplary embodiment, the default profile determination unit is further configured to perform:
searching a service logic which is the same as the target service logic in the template service logic;
if the service logic which is the same as the target service logic is found in the template service logic, determining a configuration file corresponding to the same service logic as an initial configuration file;
setting the page attribute corresponding to the initial configuration file as a displayable page to obtain the default configuration file.
In an exemplary embodiment, the custom profile generation unit is further configured to perform:
searching a service logic which is the same as the target service logic in the template service logic;
if the service logic which is the same as the target service logic cannot be found in the template service logic, configuring the service logic which cannot be found in the target service logic according to preset requirements to obtain a user-defined background logic;
configuring page displays corresponding to the service logics which cannot be found in the target service logics to obtain custom page logics;
and integrating the user-defined background logic and the user-defined page logic to obtain the user-defined configuration file.
In an exemplary embodiment, the target business page generating unit is further configured to perform:
acquiring dynamic configuration parameters from the target service logic; the dynamic configuration parameters comprise calling parameters and calling rules between the default configuration file and the custom configuration file;
and connecting the default configuration file and the custom configuration file according to the calling parameters and calling rules in the dynamic configuration parameters to obtain the target service page.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page generation method in any embodiment of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium, where instructions, when executed by a processor of an electronic device, enable the electronic device to perform the page generation method described in any one of the above first aspects.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, the program product comprising a computer program, the computer program being stored in a readable storage medium, from which the at least one processor of the apparatus reads and executes the computer program, so that the apparatus performs the page generation method described in any one of the above-mentioned first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
acquiring a target service logic; the target business logic comprises business logic for realizing a page function and a page style corresponding to a target page; searching a target template page corresponding to the target service logic according to a preset route; the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic; determining a configuration file corresponding to the service logic of the same part of the target service logic as the template service logic as a default configuration file; configuring the service logic of the part of the target service logic, which is different from the template service logic, to obtain a user-defined configuration file; and combining the default configuration file and the user-defined configuration file to obtain a target service page corresponding to the target service logic. In the process of searching the target template page through the preset route, the searching mode of the target template page is determined in the mode of the preset route, so that the searching difficulty of the target template page can be reduced to a certain extent, and the code redundancy of project development is reduced. After the target template page is obtained, in the process of determining the default configuration file and the user-defined configuration file according to the target service logic and the template service logic in the target template page, the default configuration file corresponding to the target template page is a file which can be directly obtained from the target template page, and additional development or configuration is not needed. Meanwhile, the default configuration files are uniformly configured by early developers, so that codes in the project are more standard, and the problem of redundancy of the project codes can be avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a method of page generation in accordance with an exemplary embodiment.
Fig. 2 is a flowchart illustrating an implementable method prior to step S200 according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating one possible implementation of step S300 according to an example embodiment.
Fig. 4 is a flowchart illustrating one possible implementation of step S400 according to an example embodiment.
Fig. 5 is a flowchart illustrating one possible implementation of step S500 according to an example embodiment.
FIG. 6 is a flowchart illustrating page generation and enumeration acquisition, according to an example embodiment.
Fig. 7 is a block diagram illustrating a page generating apparatus according to an example embodiment.
Fig. 8 is an internal block diagram illustrating an apparatus for page generation in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a page generation method according to an exemplary embodiment, and as shown in fig. 1, the method specifically includes the following steps:
in step S100, a target service logic is acquired; the target business logic comprises business logic for realizing the page function and the page style corresponding to the target page.
In step S200, a target template page corresponding to the target service logic is searched according to a preset route; the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic.
In step S300, a configuration file corresponding to a service logic in the same portion of the target service logic as the template service logic is determined as a default configuration file.
In step S400, service logics of the portions of the target service logics different from the template service logics are configured to obtain a custom configuration file.
In step S500, the default configuration file and the custom configuration file are merged to obtain a target service page corresponding to the target service logic.
Wherein, the service logic refers to the process description for completing each service characteristic. The target business logic refers to business logic which needs to be developed in a project development process, for example, an evaluation function and an order function of an online shopping page need to be developed, implementation logic corresponding to the evaluation function and the order function is the target business logic, and the target business logic comprises corresponding background logic and page logic. The preset route refers to a fixed route designated for searching the target template page, and the fixed route designated for the target template page can reduce the searching difficulty of the target template page to a certain extent and reduce the code redundancy of a development project. The target template page is abstracted according to a plurality of similar business logics, and a unified front-end template page and corresponding background logics related to business components, code logics and the like are summarized and developed. The configuration file refers to a set of linkage parameters which can realize certain background logic, front-end page display logic and all logics. The template business logic refers to a collection of business logic for realizing certain background logic and front-end page display logic.
Specifically, after the target service logic is obtained, the template page is searched according to the target service logic and the preset route. And after the template page is found, comparing the template service logic in the template page with the target service logic, determining a self-defined configuration file according to the comparison result and the service logic part with different target service logic and template service logic, and determining a default configuration file according to the same service logic part in the target service logic and the template service logic. The user-defined configuration file is a configuration file obtained by configuration according to the target service logic, and the default configuration file is a configuration file determined from the template page according to the same service logic part in the target service logic and the template service logic. And configuring the user-defined configuration file, combining the configured user-defined configuration file with a default configuration file obtained from the template page to obtain a page configuration file, and rendering the page according to the page configuration file to obtain a target service page.
The page generating method acquires a target service logic; the target business logic comprises business logic for realizing a page function and a page style corresponding to a target page; searching a target template page corresponding to the target service logic according to a preset route; the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic; determining a configuration file corresponding to the service logic of the same part of the target service logic as the template service logic as a default configuration file; configuring the service logic of the part of the target service logic, which is different from the template service logic, to obtain a user-defined configuration file; and combining the default configuration file and the user-defined configuration file to obtain a target service page corresponding to the target service logic. In the process of searching the target template page through the preset route, the searching mode of the target template page is determined in the mode of the preset route, so that the searching difficulty of the target template page can be reduced to a certain extent, and the code redundancy of project development is reduced. After the target template page is obtained, in the process of determining the default configuration file and the user-defined configuration file according to the target service logic and the template service logic in the target template page, the default configuration file corresponding to the target template page is a file which can be directly obtained from the target template page, and additional development or configuration is not needed. Meanwhile, the default configuration files are uniformly configured by early developers, so that codes in the project are more standard, and the problem of redundancy of the project codes can be avoided.
Fig. 2 is a flowchart of an implementable method before step S200 according to an exemplary embodiment, and specifically includes the following steps, as shown in fig. 2:
in step S201, at least one business logic is acquired.
In step S202, at least one service logic is configured to obtain a configuration file and a template page corresponding to the configuration file.
In step S203, the template page is stored to a preset route.
Wherein, the service logic refers to the process description for completing each service characteristic.
Specifically, after at least one business logic is obtained, abstracting and summarizing requirements corresponding to the at least one business logic, and developing a unified front-end template page related to business components, code logic and the like. Wherein the page module and the business logic of the template page are configurable. For example, a requirement corresponding to a certain specific service logic is to display a picture in a specific area of a page, and a requirement corresponding to another specific service logic is to display text content in a specific area of a page, at this time, the area where the picture and text content are displayed may be abstracted to a page module capable of displaying content, and the service logic is to display specific content. According to the thought, at least one business logic is abstracted to obtain a template page comprising a plurality of page modules and corresponding business logic. And storing the template page according to a preset route for calling when a subsequent specific page is developed.
In the above exemplary embodiment, at least one service logic is obtained; configuring at least one service logic to obtain a configuration file and a template page corresponding to the configuration file; and storing the template page to a preset route. The template page corresponding to at least one business logic is configured, so that the template page can be used for subsequent concrete page development, one-time template page development and multiple calling are realized, the content obtained by abstraction does not need to be developed for multiple times, the workload of developers can be reduced, and a large amount of labor cost and time cost are saved. Meanwhile, the template pages are uniformly configured by developers, so that the codes in the project are more standard, and the problem of redundancy of the project codes can be avoided.
In an exemplary embodiment, step S200, searching for a target template page corresponding to a target service logic according to a preset route, includes:
and searching a template page consistent with the service type and the page type of the target service logic according to a preset route to obtain a target template page.
At least one template page is stored in the preset route, and the template page corresponds to at least one service type and at least one page type.
Specifically, one or more template pages which are configured in advance and can realize a specific function are stored according to a preset route, when the template pages need to be called, the template pages which are consistent with the service type and the page type of the target service logic are searched from the one or more template pages according to the preset route, and the searched template pages are determined as the target template pages.
In the above exemplary embodiment, according to the preset route, the template page consistent with the service type and the page type of the target service logic is searched to obtain the target template page. When the page template is needed, manual configuration is not needed, the page template is searched according to a preset route, one-time development and multiple calling of the template page are achieved, multiple development on the abstracted content is not needed, the workload of developers can be reduced, and a large amount of labor cost and time cost are saved. Meanwhile, the operation makes the codes in the project more standard, and can avoid the problem of redundancy of the project codes.
Fig. 3 is a flowchart illustrating an implementable manner of step S300 according to an exemplary embodiment, and specifically includes the following steps, as illustrated in fig. 3:
in step S310, the same business logic as the target business logic is searched for in the template business logic.
In step S320, if the service logic identical to the target service logic is found in the template service logic, the configuration file corresponding to the identical service logic is determined as the initial configuration file.
In step S330, the page attribute corresponding to the initial configuration file is set as a displayable page, so as to obtain a default configuration file.
Specifically, the service logic identical to the target service logic is searched in the template service logic, and the target service logic is compared with the template service logic in the template page. The target service logic may have a case where a part of the service logic is the same as a part of the template service logic, or may have a case where the service logic in the target service logic is completely different from the logic in the template service logic. If the target business logic and the template business logic have the same part, the configuration file corresponding to the same logic is used as a default configuration file, the default configuration file is determined from the template page, and the default configuration file exists in the template page and can be directly called without being developed again by developers. For example, if there is a configuration file corresponding to the requirement in the template page, the configuration file corresponding to the requirement in the template page may be directly called without re-development.
In the above exemplary embodiment, the service logic identical to the target service logic is searched in the template service logic; if the service logic which is the same as the target service logic is found in the template service logic, determining a configuration file corresponding to the same service logic as an initial configuration file; and setting the page attribute corresponding to the initial configuration file as a displayable page to obtain a default configuration file. The default configuration file is a file directly acquired from the template page, and additional configuration is not needed, so that the workload of developers can be reduced, and a large amount of labor cost and time cost can be saved. Meanwhile, the default configuration files are uniformly configured by early developers, so that codes in the project are more standard, and the problem of redundancy of the project codes can be avoided.
Fig. 4 is a flowchart illustrating an implementable manner of step S400 according to an exemplary embodiment, and specifically includes the following steps, as illustrated in fig. 4:
in step S410, the same business logic as the target business logic is searched for in the template business logic.
In step S420, if the service logic identical to the target service logic cannot be found in the template service logic, the service logic that cannot be found in the target service logic is configured according to a preset requirement, so as to obtain a custom background logic.
In step S430, the page display corresponding to the service logic that cannot be found in the target service logic is configured to obtain the customized page logic.
In step S440, the custom background logic and the custom page logic are integrated to obtain a custom configuration file.
Specifically, the service logic identical to the target service logic is searched in the template service logic, and the target service logic is compared with the template service logic in the template page. The target service logic may have a case where a part of the service logic is the same as a part of the template service logic, or may have a case where the service logic in the target service logic is completely different from the logic in the template service logic. If the target business logic and the template business logic do not have the same part, the configuration files corresponding to different logics are used as the user-defined configuration files, and the user-defined configuration files are configured, so that the logic in the user-defined configuration files can meet the requirements in the target business logic. Specifically, in the process that a developer develops a page according to target service logic, the developer develops a corresponding page module according to the target service logic to obtain a target service page module, the target service logic and the target service page module are jointly used as a self-defined configuration file, background logic and page display of a development page are achieved, page rendering is carried out, and a target service page is obtained. For example, a logic that shows specific content in a specific area of a specific page needs to be developed, and if there is no configuration file corresponding to the requirement in the template page, the development and configuration are performed again by a developer.
In the above exemplary embodiment, the service logic identical to the target service logic is searched in the template service logic; if the service logic which is the same as the target service logic cannot be found in the template service logic, configuring the service logic which cannot be found in the target service logic according to preset requirements to obtain a user-defined background logic; configuring page display corresponding to service logic which cannot be found in the target service logic to obtain custom page logic; and integrating the self-defined background logic and the self-defined page logic to obtain a self-defined configuration file. In the whole project development, only the user-defined configuration file is required to be configured, and the target service page is obtained according to the user-defined configuration file and the default configuration file, so that the workload of developers can be reduced, and a large amount of labor cost and time cost can be saved.
Fig. 5 is a flowchart illustrating an implementable manner of step S500 according to an exemplary embodiment, and specifically includes the following steps, as illustrated in fig. 5:
in step S510, obtaining dynamic configuration parameters from the target service logic; the dynamic configuration parameters comprise calling parameters and calling rules between the default configuration files and the custom configuration files.
In step S520, the default configuration file and the custom configuration file are connected according to the call parameter and the call rule in the dynamic configuration parameter, so as to obtain the target service page.
Specifically, the default configuration file and the custom configuration file are overall configuration files corresponding to the target service logic, the configuration files include parameters for rendering a WEB page, and the corresponding target service page can be obtained by rendering according to the configuration files. And connecting the default configuration file and the user-defined configuration file according to the calling parameters and the calling rules in the dynamic configuration parameters to obtain the target service page. Optionally, the obtained target service page may be a background logic corresponding to the target service logic according to a page frame of the WEB page obtained by the target service logic. And when the page frame is obtained, the configuration of various dynamic forms or the configuration of constant data can be realized, whether a query exists in the URL can be queried, and the page configuration is carried out according to the query result of the query.
For example, after the target business page is obtained, the target business page may already implement the background logic of the target business logic and display the page presented to the user. In a display area, components such as a pull-down menu can be set, the pull-down menu is not influenced by more overall target service logic, and the pull-down menu can be realized by detecting whether enumeration acquisition is configured or not.
Fig. 6 is a flowchart illustrating a page generation and enumeration acquisition according to an exemplary embodiment, where as shown in fig. 6, first, bizType and pageType in a URL are acquired, further, a custom configuration file and a default configuration file are acquired, and a target service page is generated according to the custom configuration file and the default configuration file; the target business surface at this time is a frame of a page, can be displayed in a WEB page, and can also execute certain logic, but there is no specific dynamic form or constant data. Next, it needs to detect whether enumeration acquisition is configured, and if not, a step of detecting whether to execute initialization query operation is performed. If yes, further acquiring enumeration interface parameters, calling the enumeration interface, and processing interface return data until executing the step of detecting whether to execute initialization query operation. If the initial query operation needs to be executed, acquiring query parameters, calling a query interface, processing query data, and finally completing the display configuration of the target service page. Optionally, whether a query exists in the URL may also be detected, and corresponding configuration is performed; and/or, detecting whether a dynamic form is configured or not, and carrying out corresponding configuration; and/or, detecting whether the page type is a specific page type, and performing corresponding configuration; and/or, detecting whether the query form is necessary to be checked and carrying out corresponding configuration; and/or detecting whether the page resetting times are reached and carrying out corresponding configuration. The present disclosure is only exemplary, and there may be a variety of configurations of dynamic forms or configurations of constant data in a specific implementation process, which are not listed here, and this exemplary description is not used to limit the present disclosure.
In the above exemplary embodiment, the dynamic configuration parameters are obtained from the target service logic; the dynamic configuration parameters comprise calling parameters and calling rules between a default configuration file and a custom configuration file; and connecting the default configuration file and the user-defined configuration file according to the calling parameters and the calling rules in the dynamic configuration parameters to obtain the target service page. In the process of obtaining the target service page, the default configuration file can be directly obtained from the target template page without additional development or configuration, in the development of the whole project, only the user-defined configuration file needs to be configured, the target service page is obtained according to the user-defined configuration file and the default configuration file, a large number of service pages do not need to be developed one by one, the problem of project code redundancy is avoided, meanwhile, the workload of developers can be reduced, and a large amount of labor cost and time cost are saved. Meanwhile, the default configuration files are uniformly configured by early developers, so that codes in the project are more standard, and the problem of redundancy of the project codes can be avoided.
In a specific exemplary embodiment, the page generation method may further be implemented by the following steps: abstracting the existing service requirement (at least one service logic), summarizing components, code logics and the like related to the service, and developing a uniform front-end template page, wherein the page needs to ensure that both page modules and logic links can be configured on the premise of ensuring the main flow of the whole service. And defines a fixed route (preset route) uniformly for the service, for example: and # frame/: bizType/: pageType, the system code redundancy can be reduced through fixed routing, and bizType can distinguish different service types, pageType can distinguish different page types, and thus the page and the corresponding configuration thereof can be uniquely determined.
And determining a user-defined configuration file and a default configuration file according to the target service logic and the template service logic. The default configuration file comprises two types of page attributes and hook functions (calling parameters and calling rules), wherein the page attributes can configure whether the page module is displayed, and the hook functions can be personalized in the logic processing process. Because the processing logic of a specific page of the service platform is relatively fixed, some fixed configurations are defined as default configurations. The service configuration cost can be reduced and the service consistency can be ensured. For a specific bizType + pageType, a developer can create a custom configuration file according to business personalized requirements, and the default configuration is covered by the custom configuration before a page is allowed, so that final page configuration data is obtained. And configuring the user-defined configuration file, combining the configured user-defined configuration file with a default configuration file obtained from the template page to obtain a page configuration file, and rendering the page according to the page configuration file to obtain a target service page.
It should be understood that although the various steps in the flow charts of fig. 1-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
Fig. 7 is a block diagram illustrating a page generation apparatus according to an example embodiment. Referring to fig. 7, the apparatus includes a target service logic obtaining unit 701, a template page searching unit 702, a default configuration file determining unit 703, a custom configuration file generating unit 704, and a target service page generating unit 705:
a target service logic acquiring unit 701 configured to execute acquiring a target service logic; the target business logic comprises business logic for realizing a page function and a page style corresponding to a target page;
a template page searching unit 702 configured to perform searching for a target template page corresponding to the target service logic according to a preset route; the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic;
a default configuration file determining unit 703 configured to execute determining a configuration file corresponding to a service logic of a portion of the target service logic that is the same as the template service logic, as a default configuration file;
a custom configuration file generating unit 704 configured to perform configuration on a service logic of a portion of the target service logic different from the template service logic to obtain a custom configuration file;
the target service page generating unit 705 is configured to execute merging the default configuration file and the custom configuration file to obtain a target service page corresponding to the target service logic.
In an exemplary embodiment, the page generating apparatus further includes a template page configuring unit configured to perform:
acquiring at least one service logic; configuring at least one service logic to obtain a configuration file and a template page corresponding to the configuration file; and storing the template page to a preset route.
In an exemplary embodiment, at least one template page is stored in the preset route, and the template page corresponds to at least one service type and at least one page type; the template page look-up unit 702 is further configured to perform: and searching a template page consistent with the service type and the page type of the target service logic according to a preset route to obtain a target template page.
In an exemplary embodiment, the default profile determination unit 703 is further configured to perform: searching a service logic which is the same as the target service logic in the template service logic; if the service logic which is the same as the target service logic is found in the template service logic, determining a configuration file corresponding to the same service logic as an initial configuration file; and setting the page attribute corresponding to the initial configuration file as a displayable page to obtain a default configuration file.
In an exemplary embodiment, the custom profile generation unit 704 is further configured to perform: searching a service logic which is the same as the target service logic in the template service logic; if the service logic which is the same as the target service logic cannot be found in the template service logic, configuring the service logic which cannot be found in the target service logic according to preset requirements to obtain a user-defined background logic; configuring page display corresponding to service logic which cannot be found in the target service logic to obtain custom page logic; and integrating the self-defined background logic and the self-defined page logic to obtain a self-defined configuration file.
In an exemplary embodiment, the target business page generating unit 705 is further configured to perform: acquiring dynamic configuration parameters from a target service logic; the dynamic configuration parameters comprise calling parameters and calling rules between a default configuration file and a custom configuration file; and connecting the default configuration file and the user-defined configuration file according to the calling parameters and the calling rules in the dynamic configuration parameters to obtain the target service page.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 is an internal block diagram illustrating an apparatus 800 for page generation in accordance with an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and so forth.
Referring to fig. 8, device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communications component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile storage devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communications component 816 is configured to facilitate communications between device 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, communications component 816 further includes a Near Field Communications (NFC) module to facilitate short-range communications.
In an exemplary embodiment, the device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, there is also provided an electronic device including: a processor 820; a memory 804 for storing instructions executable by processor 820; wherein the processor 820 is configured to execute the instructions to implement the page generation method in any of the above embodiments.
In an exemplary embodiment, there is also provided a storage medium having instructions that, when executed by the processor 820 of the electronic device, enable the device 800 to perform the page generation method in any of the above embodiments.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A page generation method is characterized by comprising the following steps:
acquiring a target service logic; the target business logic comprises business logic for realizing a page function and a page style corresponding to a target page;
searching a target template page corresponding to the target service logic according to a preset route; the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic;
determining a configuration file corresponding to the service logic of the same part of the target service logic as the template service logic as a default configuration file;
configuring the service logic of the part of the target service logic, which is different from the template service logic, to obtain a user-defined configuration file;
and combining the default configuration file and the user-defined configuration file to obtain a target service page corresponding to the target service logic.
2. The method for generating pages according to claim 1, wherein before searching for the target template page corresponding to the target service logic according to the preset route, the method comprises:
acquiring at least one service logic;
configuring the at least one service logic to obtain a configuration file and a template page corresponding to the configuration file;
and storing the template page to the preset route.
3. The page generation method according to claim 1 or 2, wherein at least one template page is stored in the preset route, and the template page corresponds to at least one service type and at least one page type;
the searching for the target template page corresponding to the target service logic according to the preset route includes:
and searching a template page consistent with the service type and the page type of the target service logic according to the preset route to obtain the target template page.
4. The method according to claim 1, wherein said determining that the configuration file corresponding to the service logic in the same portion of the target service logic as the template service logic is a default configuration file comprises:
searching a service logic which is the same as the target service logic in the template service logic;
if the service logic which is the same as the target service logic is found in the template service logic, determining a configuration file corresponding to the same service logic as an initial configuration file;
setting the page attribute corresponding to the initial configuration file as a displayable page to obtain the default configuration file.
5. The method for generating pages according to claim 1, wherein said configuring the service logic of the part of the target service logic different from the template service logic to obtain a custom configuration file comprises:
searching a service logic which is the same as the target service logic in the template service logic;
if the service logic which is the same as the target service logic cannot be found in the template service logic, configuring the service logic which cannot be found in the target service logic according to preset requirements to obtain a user-defined background logic;
configuring page displays corresponding to the service logics which cannot be found in the target service logics to obtain custom page logics;
and integrating the user-defined background logic and the user-defined page logic to obtain the user-defined configuration file.
6. The method for generating pages according to claim 1, wherein said merging the default configuration file and the custom configuration file to obtain a target service page corresponding to the target service logic comprises:
acquiring dynamic configuration parameters from the target service logic; the dynamic configuration parameters comprise calling parameters and calling rules between the default configuration file and the custom configuration file;
and connecting the default configuration file and the custom configuration file according to the calling parameters and calling rules in the dynamic configuration parameters to obtain the target service page.
7. A page generating apparatus, comprising:
a target service logic acquisition unit configured to execute acquisition of a target service logic; the target business logic comprises business logic for realizing a page function and a page style corresponding to a target page;
the template page searching unit is configured to search a target template page corresponding to the target service logic according to a preset route; the target template page comprises a configurable configuration file, and the configuration file corresponds to the template service logic;
a default configuration file determining unit, configured to execute determining a configuration file corresponding to a service logic of a same portion of the target service logic as the template service logic, as a default configuration file;
the user-defined configuration file generating unit is configured to execute configuration on the service logic of the part, which is different from the template service logic, in the target service logic to obtain a user-defined configuration file;
and the target service page generating unit is configured to execute merging of the default configuration file and the custom configuration file to obtain a target service page corresponding to the target service logic.
8. The page generating apparatus according to claim 7, wherein said default profile determining unit is further configured to perform:
searching a service logic which is the same as the target service logic in the template service logic;
if the service logic which is the same as the target service logic is found in the template service logic, determining a configuration file corresponding to the same service logic as an initial configuration file;
setting the page attribute corresponding to the initial configuration file as a displayable page to obtain the default configuration file.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page generation method of any of claims 1 to 6.
10. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the page generation method of any of claims 1 to 6.
CN202010612659.8A 2020-06-30 2020-06-30 Page generation method and device, electronic equipment and storage medium Pending CN111752598A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010612659.8A CN111752598A (en) 2020-06-30 2020-06-30 Page generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010612659.8A CN111752598A (en) 2020-06-30 2020-06-30 Page generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111752598A true CN111752598A (en) 2020-10-09

Family

ID=72676709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010612659.8A Pending CN111752598A (en) 2020-06-30 2020-06-30 Page generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111752598A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407284A (en) * 2021-06-25 2021-09-17 远光软件股份有限公司 Navigation interface generation method and device, storage medium and electronic equipment
CN113805864A (en) * 2021-11-19 2021-12-17 北京明略昭辉科技有限公司 Project engineering generation method and device, electronic equipment and storage medium
CN115550239A (en) * 2022-10-18 2022-12-30 康键信息技术(深圳)有限公司 Medical service page access method and device, storage medium and computer equipment
CN116204201A (en) * 2023-04-26 2023-06-02 烽台科技(北京)有限公司 Service processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631650A (en) * 2015-12-22 2016-06-01 北京奇虎科技有限公司 Method and device for realizing universal front end payment service
CN106843901A (en) * 2017-02-10 2017-06-13 广州优视网络科技有限公司 A kind of page rendering and the method and apparatus of checking
CN107391169A (en) * 2017-06-09 2017-11-24 口碑控股有限公司 The dynamic updating method and device of the Android page
CN108446116A (en) * 2018-02-26 2018-08-24 平安普惠企业管理有限公司 Generation method, device, computer equipment and the storage medium of the application program page
CN109597617A (en) * 2019-01-25 2019-04-09 北京字节跳动网络技术有限公司 The method and apparatus for quickly generating the business page based on template

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631650A (en) * 2015-12-22 2016-06-01 北京奇虎科技有限公司 Method and device for realizing universal front end payment service
CN106843901A (en) * 2017-02-10 2017-06-13 广州优视网络科技有限公司 A kind of page rendering and the method and apparatus of checking
US20180232212A1 (en) * 2017-02-10 2018-08-16 Guangzhou Uc Network Technology Co., Ltd. Method and device for page rendering and validation
CN107391169A (en) * 2017-06-09 2017-11-24 口碑控股有限公司 The dynamic updating method and device of the Android page
CN108446116A (en) * 2018-02-26 2018-08-24 平安普惠企业管理有限公司 Generation method, device, computer equipment and the storage medium of the application program page
CN109597617A (en) * 2019-01-25 2019-04-09 北京字节跳动网络技术有限公司 The method and apparatus for quickly generating the business page based on template

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407284A (en) * 2021-06-25 2021-09-17 远光软件股份有限公司 Navigation interface generation method and device, storage medium and electronic equipment
CN113805864A (en) * 2021-11-19 2021-12-17 北京明略昭辉科技有限公司 Project engineering generation method and device, electronic equipment and storage medium
CN115550239A (en) * 2022-10-18 2022-12-30 康键信息技术(深圳)有限公司 Medical service page access method and device, storage medium and computer equipment
CN116204201A (en) * 2023-04-26 2023-06-02 烽台科技(北京)有限公司 Service processing method and device
CN116204201B (en) * 2023-04-26 2023-07-25 烽台科技(北京)有限公司 Service processing method and device

Similar Documents

Publication Publication Date Title
CN107329743B (en) Application page display method and device and storage medium
CN111752598A (en) Page generation method and device, electronic equipment and storage medium
CN107193606B (en) Application distribution method and device
CN105808305B (en) Static resource loading method and device
CN109710259B (en) Data processing method, device and storage medium
EP2947567A1 (en) User interface text appearance customization
CN107193441B (en) Desktop pendant previewing method and device
EP3239858A1 (en) Method and apparatus for searching resource
CN112269556A (en) Information display method, device, system, equipment, server and storage medium
CN110704053B (en) Style information processing method and device
CN106708967B (en) Page display method and device
CN109684112B (en) Program file operation method, device, terminal and storage medium
CN107179837B (en) Input method and device
CN105468606B (en) Webpage saving method and device
CN110971974B (en) Configuration parameter creating method, device, terminal and storage medium
CN106506808B (en) Method and device for prompting communication message
CN106447747B (en) Image processing method and device
CN111695064A (en) Embedded point loading method and device
CN114025317B (en) Method, device, server, terminal and storage medium for spreading multimedia resources
CN107256149B (en) User interface updating method and device
CN114268802B (en) Virtual space display method and device, electronic equipment and storage medium
CN113128181B (en) Information processing method and device
CN110457084B (en) Loading method and device
CN113391804A (en) Page generation method and device, electronic equipment and storage medium
CN107257384B (en) Service state monitoring method and device

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