CN114168139A - Page generation method and device, electronic equipment and program product - Google Patents

Page generation method and device, electronic equipment and program product Download PDF

Info

Publication number
CN114168139A
CN114168139A CN202111507476.0A CN202111507476A CN114168139A CN 114168139 A CN114168139 A CN 114168139A CN 202111507476 A CN202111507476 A CN 202111507476A CN 114168139 A CN114168139 A CN 114168139A
Authority
CN
China
Prior art keywords
page
source code
environment
translation
field
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
CN202111507476.0A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111507476.0A priority Critical patent/CN114168139A/en
Publication of CN114168139A publication Critical patent/CN114168139A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

According to the page generation method, the page generation device, the electronic equipment and the program product, page source codes of pages requested by page browsing requests are obtained by responding to the page browsing requests triggered by users; the page source code comprises an environment field and a component field; determining a translation environment of the page source code according to an environment field in the page source code; translating the component fields in the page source codes based on the translation environment to obtain page executable codes; the method comprises the steps of carrying out mounting rendering example processing on the page executable code, and generating a page corresponding to the page source code so as to obtain the page executable code capable of directly carrying out mounting rendering example.

Description

Page generation method and device, electronic equipment and program product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a page generation method and apparatus, an electronic device, and a program product.
Background
With the development of the internet industry, the web front-end based page development technology is gradually developing. Js and its associated dependencies are one of the open-source Web front-end development frameworks and solutions.
Js-based page development is generally implemented in the prior art by developers encoding based on business logic of the business system.
However, the encoding style and the encoding level of developers are inconsistent, which causes different executable codes to be adopted by different developers when writing the business logic of the same business system, which increases the complexity of the executable code of the page and is not beneficial to subsequent maintenance.
Disclosure of Invention
The embodiment of the application provides a page generation method, a page generation device, electronic equipment and a program product, so as to simplify the complexity of executable codes of a page.
In a first aspect, the present application provides a page generation method, including:
responding to a page browsing request triggered by a user, and acquiring a page source code of a page requested by the page browsing request; wherein, the page source code comprises an environment field and a component field;
determining a translation environment of the page source code according to an environment field in the page source code;
translating the component fields in the page source codes based on the translation environment to obtain page executable codes;
and carrying out mount rendering example processing on the page executable code to generate a page corresponding to the page source code.
Therefore, the page executable code capable of directly carrying out the mount rendering example is obtained by translating the component fields in the page source code according to the environment fields in the page source code, and the page executable code is obtained by translating the page executable code, so that the code complexity is low, and meanwhile, the code style is uniform, and the follow-up management is facilitated.
In an alternative embodiment, the method further comprises:
acquiring a source code to be processed of each page;
and performing static grammar detection processing on the source code to be processed of each page to generate the page source code.
In an optional embodiment, the performing static syntax detection processing on the source code to be processed of each page to generate the page source code includes:
detecting and processing the field length, and/or the field format, and/or the legality of the corresponding value of the field in the source code to be processed;
if any field in the source code to be processed does not pass the detection processing, stopping the generation of the page and prompting a user to recompile the page source code;
and if all fields in the source code to be processed pass the detection processing, taking the source code to be processed as the page source code.
Therefore, static grammar detection processing is carried out on the source code to be processed, so that the problem that the source code cannot be translated subsequently due to grammar problems is avoided, and the generation efficiency of the page executable code is effectively improved.
In an optional embodiment, the determining the translation environment of the page source code according to the environment field in the page source code includes:
determining a server address and an access address of an environment corresponding to a value according to the value of the environment field in the page source code;
and packaging the server address and the access address of the environment to obtain the translation environment of the page source code.
Therefore, by adopting the mode of assigning the environment field in the page source code, the translation environment required by translation can be quickly determined during translation, and the transfer efficiency is improved.
In an optional embodiment, the translating, based on the translation environment, the component field in the page source code to obtain the page executable code includes:
calling translation codes of an interface corresponding to the translation environment according to the translation environment;
and translating the component fields in the page source codes by using the translation codes to obtain the page executable codes.
In a second aspect, the present application provides a page generating apparatus, including:
the code acquisition module is used for responding to a page browsing request triggered by a user and acquiring a page source code of a page requested by the page browsing request; wherein, the page source code comprises an environment field and a component field;
the translation module is used for determining the translation environment of the page source code according to the environment field in the page source code; translating the component fields in the page source codes based on the translation environment to obtain page executable codes;
and the page generation module is used for carrying out mounting rendering example processing on the page executable code and generating a page corresponding to the page source code.
In an optional embodiment, the method further comprises: a grammar detection module;
the grammar detection module is configured to:
acquiring a source code to be processed of each page; and performing static grammar detection processing on the source code to be processed of each page to generate the page source code.
In an optional embodiment, the syntax detection module is specifically configured to:
detecting and processing the field length, and/or the field format, and/or the legality of the corresponding value of the field in the source code to be processed;
if any field in the source code to be processed does not pass the detection processing, stopping the generation of the page and prompting a user to recompile the page source code;
and if all fields in the source code to be processed pass the detection processing, taking the source code to be processed as the page source code.
In an alternative embodiment, the translation module is specifically configured to:
determining a server address and an access address of an environment corresponding to a value according to the value of the environment field in the page source code;
and packaging the server address and the access address of the environment to obtain the translation environment of the page source code.
In an alternative embodiment, the translation module is specifically configured to:
calling translation codes of an interface corresponding to the translation environment according to the translation environment;
and translating the component fields in the page source codes by using the translation codes to obtain the page executable codes.
In a third aspect, the present application provides an electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement the method of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect.
According to the page generation method, the page generation device, the electronic equipment and the program product, page source codes of pages requested by page browsing requests are obtained by responding to the page browsing requests triggered by users; wherein, the page source code comprises an environment field and a component field; determining a translation environment of the page source code according to an environment field in the page source code; translating the component fields in the page source codes based on the translation environment to obtain page executable codes; and carrying out mounting rendering example processing on the page executable code, and generating a page corresponding to the page source code to obtain the page executable code capable of directly carrying out mounting rendering example.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic diagram of a network architecture on which the present application is based;
FIG. 2 is a schematic flow chart diagram illustrating a page generation method provided in the present application;
fig. 3 is a schematic structural diagram of a page generation apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another page generation apparatus provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of systems and methods consistent with certain aspects of the present application, as detailed in the appended claims.
With the development of the internet industry, the web front-end based page development technology is gradually developing. Js and its associated dependencies are one of the open-source Web front-end development frameworks and solutions.
Js-based page development is generally implemented by developers encoding based on business logic and business systems in the prior art. That is, the developer autonomously performs coding development according to the requirement prototype to obtain executable code, and then renders the executable code to present the page.
However, since Vue related technology is a general development framework, the framework does not impose any limitation on the development manner, so that multiple code implementations can be adopted for the same business logic. Meanwhile, because the coding style and the coding level of each developer are different, the executable codes obtained by different developers when writing the business logic of the same business system are different. For the whole business system, the same or similar business logic pages are realized based on different executable codes, which causes the whole business system to have higher complexity and is not beneficial to the subsequent maintenance of the business system.
In order to solve the above problem, according to the page generation method, the page generation device, the electronic device, and the program product provided by the embodiment of the application, a page source code of a page requested by a page browsing request is obtained by responding to the page browsing request triggered by a user; wherein, the page source code comprises an environment field and a component field; determining a translation environment of the page source code according to an environment field in the page source code; translating the component fields in the page source codes based on the translation environment to obtain page executable codes; and carrying out mounting rendering example processing on the page executable code, and generating a page corresponding to the page source code to obtain the page executable code capable of directly carrying out mounting rendering example.
The method provided by the present application will be described below with reference to different implementations.
Referring to fig. 1, fig. 1 is a schematic diagram of a network architecture on which the present application is based, where the network architecture shown in fig. 1 may specifically include a user equipment 1 and a server 2;
the user equipment 1 may be specifically a hardware device that can be used to participate in various activities, including but not limited to a mobile device, a desktop computer, a tablet computer, and other devices having a page browsing function. By interacting with the server 2, the user equipment 1 may obtain a page of the business system generated by the server 2.
The server 2 may specifically be a cloud server cluster of the service system, and the server 2 may respond to the page browsing request triggered by the user equipment 1, so as to provide the page browsing service of the service system for the user equipment 1. The page generation device provided by the application is integrated in the server 2, and when the server 2 provides a page browsing service for the user equipment 1, the page generation device in the server 2 is started and performs page generation processing based on a page source code compiled by a developer so as to render and generate a page for the user equipment 1 to browse.
For convenience of description, the page generation method in the present application will be described with reference to the accompanying drawings and a page generation apparatus as an execution main body.
Example one
Fig. 2 is a schematic flowchart of a page generation method provided in the present application. As shown in fig. 2, the page generation method includes:
step 201, responding to a page browsing request triggered by a user, and acquiring a page source code of a page requested by the page browsing request; wherein, the page source code comprises an environment field and a component field.
Step 202, determining a translation environment of the page source code according to the environment field in the page source code.
Step 203, translating the component field in the page source code based on the translation environment to obtain a page executable code.
And 204, carrying out mount rendering example processing on the page executable code to generate a page corresponding to the page source code.
In the embodiment of the application, the page source code related in the page generation method is compiled in advance by a developer and uploaded to a server where the page generation device is located, and the component fields in the page source code are translated according to the environment fields in the page source code to obtain the page executable code capable of directly mounting the rendering example.
The scheme provided by the present application will be further explained by combining the above steps:
it should be noted that the page source code is obtained by a developer through a light-weight DSL (domain specific language) compilation. In the lightweight DSL, a context field and a component field are defined.
The environment field corresponds to different interface, data source, route and other call logics under different field values, for example, the environment field may be defined as a field of "targetrendime", and a developer may configure the value for the environment field of the page based on actual conditions of the service, for example, the field may be set as "micro application", so that a subsequent page generation device will call the interface, data source, route and other logics corresponding to the value.
In addition, the component field defines the business logic of the code and the component library of the applicable business system, and similar to the aforementioned environment field, in the component field, developers need to compile for the implementation of the business logic based on the actual component library adapted by the business requirements.
That is, through the above-mentioned light-weight DSL, a developer can compile a code according to an actual service requirement, obtain and upload a compiled code to a server, so as to be acquired by a page generation apparatus.
Based on the above, the server will store a large amount of page source codes of each page of the pre-compiled service system. These page source codes include the aforementioned context field and component field.
Firstly, a page generating device responds to a page browsing request triggered by a user and acquires a page source code of a page requested by the page browsing request; wherein, the page source code comprises an environment field and a component field. Then, the page generation device determines the translation environment of the page source code according to the environment field in the page source code.
Specifically, the determination of the translation context is determined based on the value of the context field. As described above, for differences in component libraries used by a page, a developer configures corresponding values in an environment field of a page source code corresponding to the page, so as to represent an environment in which the page source code runs, and the translation environment includes various configurations in the environment. For example, if the value in the environment field is used to characterize that the code runs in a certain environment, the translation environment will include information such as server address, access address, etc. Namely, the page generation device determines the server address and the access address of the environment corresponding to the value according to the value of the environment field in the page source code; and packaging the server address and the access address of the environment to obtain the translation environment of the page source code. And by adopting the mode of assigning the environment field in the page source code, the translation environment required by translation can be quickly determined during translation, and the transfer efficiency is improved.
And based on the translation environment, the page generation device translates the component fields in the page source code to obtain page executable code. Specifically, based on the environment information of various environments packaged in the translation environment, the page generation apparatus may perform translation processing on the code described in the component field in the aforementioned page source code, for example, if the component field in a certain page source code is used to describe a file upload function, during translation, the page generation apparatus needs to determine the specific code content of the executable code after the transfer based on the server address and the access address corresponding to the file upload function described in the environment field. That is, a translation encoding of an interface corresponding to the translation environment is called according to the translation environment; and translating the component fields in the page source codes by using the translation codes to obtain the page executable codes.
In this way, the page generation apparatus will obtain executable code with correct syntax, uniform format, and code quality close to the code sequence of manual coding. In an alternative, the developer may also make further refinements to the executable code to further improve the code quality.
After the executable code of the page is obtained, the page generation device mounts the rendering example on the executable code to generate the actual page. In the process, the page generating device executes the executable code to determine the code content characterized by the executable code, and calls Vue a corresponding rendering function in the framework to perform mount rendering of the instance, so as to generate the page.
Subsequently, the page generating device also returns the page to the user equipment through the server for the user to view and interactively use.
On the basis of the foregoing embodiments, in an optional embodiment, in order to ensure the translation efficiency of the subsequent page source code and avoid the problem that the page source code cannot be transferred due to an error in coding syntax, the page generation apparatus further performs static detection processing on the code, that is, the page generation apparatus first obtains the source code to be processed of each page, and then performs static syntax detection processing on the source code to be processed of each page to generate the page source code.
Specifically, the static syntax detection method is a process of detecting each field in the code and a value corresponding to each field by using a preset syntax detection rule. Further, the static grammar detection includes detecting and processing the field length, and/or the field format, and/or the legality of the corresponding value of the field in the source code to be processed. Correspondingly, if any field in the source code to be processed does not pass the detection processing, stopping the generation of the page and prompting a user to recompile the page source code; and if all fields in the source code to be processed pass the detection processing, taking the source code to be processed as the page source code.
By carrying out static grammar detection processing on the source code to be processed, the called page source code is all the code processed by the static grammar detection, the problem that the follow-up code cannot be translated due to grammar problems in the source code is effectively avoided, and the generation efficiency of the page executable code is effectively improved.
According to the page generation method provided by the embodiment of the application, the page source code of the page requested by the page browsing request is obtained by responding to the page browsing request triggered by a user; wherein, the page source code comprises an environment field and a component field; determining a translation environment of the page source code according to an environment field in the page source code; translating the component fields in the page source codes based on the translation environment to obtain page executable codes; and carrying out mounting rendering example processing on the page executable code, and generating a page corresponding to the page source code to obtain the page executable code capable of directly carrying out mounting rendering example.
Example two
Corresponding to the page generating method in the foregoing embodiment, fig. 3 is a schematic structural diagram of a page generating device provided in the embodiment of the present application, and as shown in fig. 3, the page generating device includes: a code acquisition module 310, a translation module 320, and a page generation module 330.
A code obtaining module 310, configured to respond to a page browsing request triggered by a user, and obtain a page source code of a page requested by the page browsing request; the page source code comprises an environment field and a component field;
the translation module 320 is used for determining the translation environment of the page source code according to the environment field in the page source code; translating the component fields in the page source codes based on the translation environment to obtain page executable codes;
the page generating module 330 is configured to perform mount rendering on the page executable code, and generate a page corresponding to the page source code.
In an optional embodiment, fig. 4 is a schematic structural diagram of another page generating apparatus provided in the embodiment of the present application, and as shown in fig. 4, the page generating apparatus further includes: a grammar detection module 340;
a grammar detection module 340 for:
acquiring a source code to be processed of each page; and performing static grammar detection processing on the source code to be processed of each page to generate a page source code.
In an optional embodiment, the syntax detecting module 340 is specifically configured to:
detecting and processing the field length, and/or the field format, and/or the legality of the value corresponding to the field of each field in the source code to be processed;
if any field in the source code to be processed does not pass the detection processing, stopping the generation of the page and prompting a user to recompile the page source code;
and if all fields in the source code to be processed pass the detection processing, taking the source code to be processed as the page source code.
In an alternative embodiment, the translation module 320 is specifically configured to:
determining a server address and an access address of an environment corresponding to a value according to the value of the environment field in the page source code;
and encapsulating the server address and the access address of the environment to obtain a translation environment of the page source code.
In an alternative embodiment, the translation module 320 is specifically configured to:
calling translation codes of an interface corresponding to the translation environment according to the translation environment;
and translating the component fields in the page source code by using the translation codes to obtain the page executable code.
The page generation device provided by the embodiment of the application acquires the page source code of the page requested by the page browsing request by responding to the page browsing request triggered by the user; the page source code comprises an environment field and a component field; determining a translation environment of the page source code according to an environment field in the page source code; translating the component fields in the page source codes based on the translation environment to obtain page executable codes; the method comprises the steps of carrying out mounting rendering example processing on the page executable code, and generating a page corresponding to the page source code so as to obtain the page executable code capable of directly carrying out mounting rendering example.
EXAMPLE III
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, an electronic device 500 according to an embodiment of the present invention includes: memory 501, processor 502 and computer programs.
Wherein a computer program is stored in the memory 501 and configured to be executed by the processor 502 to implement the page generation method provided by any one of the embodiments of the present invention. The related descriptions and effects corresponding to the steps in the drawings can be correspondingly understood, and redundant description is not repeated here.
In this embodiment, the memory 501 and the processor 502 are connected by a bus.
Example four
The embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the page generating method provided by any embodiment of the invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, a division of modules is merely a logical division, and an actual implementation may have another division, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
Program code for implementing the methods of the present invention may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable question answering system, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Furthermore, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the aforementioned method for data synchronization based on a displaced multi-live system.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (13)

1. A page generation method is characterized by comprising the following steps:
responding to a page browsing request triggered by a user, and acquiring a page source code of a page requested by the page browsing request; wherein, the page source code comprises an environment field and a component field;
determining a translation environment of the page source code according to an environment field in the page source code;
translating the component fields in the page source codes based on the translation environment to obtain page executable codes;
and carrying out mount rendering example processing on the page executable code to generate a page corresponding to the page source code.
2. The page generating method according to claim 1, further comprising:
acquiring a source code to be processed of each page;
and performing static grammar detection processing on the source code to be processed of each page to generate the page source code.
3. The method for generating pages according to claim 2, wherein the performing static syntax detection processing on the source code to be processed of each page to generate the page source code includes:
detecting and processing the field length, and/or the field format, and/or the legality of the corresponding value of the field in the source code to be processed;
if any field in the source code to be processed does not pass the detection processing, stopping the generation of the page and prompting a user to recompile the page source code;
and if all fields in the source code to be processed pass the detection processing, taking the source code to be processed as the page source code.
4. The method for generating pages according to claim 1, wherein said determining a translation context of said page source code according to a context field in said page source code comprises:
determining a server address and an access address of an environment corresponding to a value according to the value of the environment field in the page source code;
and packaging the server address and the access address of the environment to obtain the translation environment of the page source code.
5. The page generation method according to claim 1, wherein said translating, based on the translation environment, the component fields in the page source code to obtain page executable code comprises:
calling translation codes of an interface corresponding to the translation environment according to the translation environment;
and translating the component fields in the page source codes by using the translation codes to obtain the page executable codes.
6. A page generating apparatus, comprising:
the code acquisition module is used for responding to a page browsing request triggered by a user and acquiring a page source code of a page requested by the page browsing request; wherein, the page source code comprises an environment field and a component field;
the translation module is used for determining the translation environment of the page source code according to the environment field in the page source code; translating the component fields in the page source codes based on the translation environment to obtain page executable codes;
and the page generation module is used for carrying out mounting rendering example processing on the page executable code and generating a page corresponding to the page source code.
7. The page generating apparatus according to claim 6, further comprising: a grammar detection module;
the grammar detection module is used for acquiring the source codes to be processed of all the pages;
and performing static grammar detection processing on the source code to be processed of each page to generate the page source code.
8. The page generating apparatus of claim 7, wherein the syntax detecting module is specifically configured to:
detecting and processing the field length, and/or the field format, and/or the legality of the corresponding value of the field in the source code to be processed;
if any field in the source code to be processed does not pass the detection processing, stopping the generation of the page and prompting a user to recompile the page source code;
and if all fields in the source code to be processed pass the detection processing, taking the source code to be processed as the page source code.
9. The page generating apparatus of claim 6, wherein the translation module is specifically configured to:
determining a server address and an access address of an environment corresponding to a value according to the value of the environment field in the page source code;
and packaging the server address and the access address of the environment to obtain the translation environment of the page source code.
10. The page generating apparatus of claim 6, wherein the translation module is specifically configured to:
calling translation codes of an interface corresponding to the translation environment according to the translation environment;
and translating the component fields in the page source codes by using the translation codes to obtain the page executable codes.
11. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of claims 1-5.
12. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1-5.
13. A computer program product comprising a computer program, characterized in that the computer program realizes the method of any of claims 1-5 when executed by a processor.
CN202111507476.0A 2021-12-10 2021-12-10 Page generation method and device, electronic equipment and program product Pending CN114168139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111507476.0A CN114168139A (en) 2021-12-10 2021-12-10 Page generation method and device, electronic equipment and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111507476.0A CN114168139A (en) 2021-12-10 2021-12-10 Page generation method and device, electronic equipment and program product

Publications (1)

Publication Number Publication Date
CN114168139A true CN114168139A (en) 2022-03-11

Family

ID=80485604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111507476.0A Pending CN114168139A (en) 2021-12-10 2021-12-10 Page generation method and device, electronic equipment and program product

Country Status (1)

Country Link
CN (1) CN114168139A (en)

Similar Documents

Publication Publication Date Title
CN109032706B (en) Intelligent contract execution method, device, equipment and storage medium
CN109002362B (en) Service method, device and system and electronic equipment
CN111176626B (en) Cross-programming-language code calling method and device, medium and equipment
CN108345531B (en) Test method, device and system
US11720344B2 (en) Code hot-update method and device, storage medium, processor, and terminal
US20190102201A1 (en) Component invoking method and apparatus, and component data processing method and apparatus
CN113010181B (en) Deployment method and device of operators in deep learning framework and electronic equipment
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
US8549506B2 (en) Resumable methods
GB2589658A (en) Method and apparatus for running an applet
AU2020342392B2 (en) Techniques for interfacing between media processing workflows and serverless functions
CN111176629A (en) Application development method and device
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
CN113805882A (en) Method and device for developing application program, electronic equipment and storage medium
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
CN112114789B (en) Service development method and equipment
CN111506368A (en) Method, device, equipment and storage medium for transferring asynchronous call to synchronous call
CN112988175A (en) Cross-platform application installation package generation method, device, medium and electronic equipment
CN116841559A (en) Transcoding method, device, apparatus, medium and program product
CN114168139A (en) Page generation method and device, electronic equipment and program product
CN104461557A (en) Puppet configuration data processing method and device
CN114327405A (en) Data processing method, device, equipment and storage medium
CN111782196A (en) MVP architecture-based development method and device
CN113778451A (en) File loading method and device, computer system and computer readable storage medium
CN112860447A (en) Interaction method and system between different applications

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