CN113885998A - Page rendering method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113885998A
CN113885998A CN202111223113.4A CN202111223113A CN113885998A CN 113885998 A CN113885998 A CN 113885998A CN 202111223113 A CN202111223113 A CN 202111223113A CN 113885998 A CN113885998 A CN 113885998A
Authority
CN
China
Prior art keywords
component
page
sub
page rendering
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
CN202111223113.4A
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.)
Guahao Net Hangzhou Technology Co Ltd
Original Assignee
Guahao Net Hangzhou 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 Guahao Net Hangzhou Technology Co Ltd filed Critical Guahao Net Hangzhou Technology Co Ltd
Priority to CN202111223113.4A priority Critical patent/CN113885998A/en
Publication of CN113885998A publication Critical patent/CN113885998A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a page rendering method, a page rendering device, electronic equipment and a storage medium, wherein the method comprises the following steps: when a page rendering instruction is received, calling a page rendering file corresponding to the page rendering instruction; analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component; determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file; and obtaining a target page corresponding to the page rendering file by rendering the at least one target sub-component. The problem of repeated operation in the page rendering process is solved, and the effects of sub-assembly leading-in and rendering flow simplification in the page rendering process are achieved.

Description

Page rendering method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a page rendering method and device, electronic equipment and a storage medium.
Background
In the process of page rendering, when a more complex page is encountered, the page is generally split into a plurality of sub-components, and then all the sub-components are introduced into the page.
At present, when sub-components in a page are introduced, the sub-components are generally required to be introduced and rendered, and the introduction and rendering processes are required to be repeated every time a new sub-component is added, but the result is that code becomes redundant and is not easy to maintain, and the system performance is reduced.
Therefore, in order to solve the problem of repetitive processing in the page rendering process, the operations of importing and rendering the subcomponents need to be optimized during page rendering.
Disclosure of Invention
The invention provides a page rendering method, a page rendering device, electronic equipment and a storage medium, and achieves the effects of sub-assembly leading-in and rendering flow simplification in the page rendering process.
In a first aspect, an embodiment of the present invention provides a page rendering method, which is characterized by including:
when a page rendering instruction is received, calling a page rendering file corresponding to the page rendering instruction;
analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component;
determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file;
and obtaining a target page corresponding to the page rendering file by rendering the at least one target sub-component.
In a second aspect, an embodiment of the present invention further provides a page rendering apparatus, including:
the rendering file calling module is used for calling a page rendering file corresponding to a page rendering instruction when the page rendering instruction is received;
the association information determining module is used for analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component;
a target sub-component determination module for determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file;
and the target page determining module is used for rendering the at least one target sub-component to obtain a target page corresponding to the page rendering file.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the page rendering method according to any of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the page rendering method according to any one of the embodiments of the present invention.
According to the technical scheme, when a page rendering instruction is received, a page rendering file corresponding to the page rendering instruction is called, and corresponding components are obtained in a component library based on components corresponding to display contents required by the page rendering file. And analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component, and further determining a target sub-component matched with the configuration file according to the component association information. Determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file, generating a component list according to the at least one target sub-component, and acquiring the target sub-component from a component library according to the component list. And rendering the at least one target sub-assembly to obtain a target page corresponding to the page rendering file, so as to display the obtained target page to a user. The method and the device solve the problems that in the page rendering process, each sub-component needs to be rendered, so that code redundancy is caused, and maintenance is not easy, and achieve the effects that all sub-components are led in at one time, corresponding sub-components are called according to page rendering requirements, and the corresponding sub-components are displayed on a target page.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a flowchart of a page rendering method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a page rendering method according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart illustrating a specific implementation of a page rendering method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a page rendering apparatus according to a fourth embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a page rendering method according to an embodiment of the present invention, where the method may be applied to a situation where a page is imported once for subcomponents required by the page before page rendering, and then a corresponding page is generated based on the imported subcomponents, and the method may be executed by a page rendering device, where the device may be implemented in the form of software and/or hardware, and the hardware may be an electronic device, such as a mobile terminal or a PC.
As shown in fig. 1, the method of the present embodiment includes:
s110, when a page rendering instruction is received, calling a page rendering file corresponding to the page rendering instruction.
When a page is processed, the page may be divided into a plurality of page areas, each page area may correspond to one subassembly, page rendering may be understood as displaying the subassemblies corresponding to each area of the page on the page, and a page rendering instruction may be understood as a control command when page rendering is performed, and specifically may be a command control, a control button, a command line, or a control trigger area in the page, and the like. The page rendering file may be understood as a file corresponding to the presentation content in the page, and a plurality of subfiles related to the presentation content of the page may be contained in one page rendering file, and the page rendering file may be an vue file which may be generated based on HTML elements, for example.
Specifically, when the user renders the page, the page rendering may be performed by triggering a preset page rendering instruction. And when a page rendering instruction is received, calling a page rendering file related to the page rendering instruction according to the page rendering instruction.
Optionally, when a page rendering instruction is received, invoking a page rendering file corresponding to the page rendering instruction includes: determining the page rendering instruction based on command information in a command line control; and determining at least one page rendering file according to the page rendering file identifier of the page rendering instruction.
In this embodiment, the instruction line control may be understood as an instruction line window, and the instruction line control may be used to edit program code lines to generate instruction information for generating an instruction having a certain function. The page rendering file identifier may be understood as identification information corresponding to the page rendering file during the page rendering process, the page rendering file identifier is used to represent uniqueness of the page rendering file, may be location information or name information of the page rendering file, and the page rendering file corresponding to the identifier may be found through the page rendering file identifier.
Specifically, a page rendering instruction related to page rendering is generated by editing command information in the command line control, where the page rendering instruction includes a page rendering file and information related to the page rendering file, such as a page rendering file identifier. Based on the page rendering file identification, at least one corresponding page rendering file may be determined.
S120, analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component.
A component library is understood to be a storage space in which various sub-components are stored, which may be of different types, for example, a car sub-component, a news sub-component, a sports sub-component, a user sub-component, and so on. And a plurality of subfiles are contained in the page rendering file, and each sub-component corresponds to one subfile in the page rendering file. The component association information may be understood as information associated with the component, such as storage location information and name information of the sub-component in the component library.
Specifically, when the page rendering is performed, after at least one page rendering file is determined based on the page rendering identifier, the page rendering file includes a plurality of subfiles related to the page display content, and each subfile corresponds to one sub-component in the component library. After the page rendering file is determined, analyzing each sub-component in the component library corresponding to each sub-file of the page rendering file based on the determined page rendering file, and obtaining component association information related to each sub-component, namely storage position information of the name information of the sub-component and the storage position information in the component library.
Optionally, the obtaining component association information of each sub-component by analyzing each sub-component in the component library corresponding to the page rendering file includes: analyzing each sub-component in a pre-constructed component library through a target analysis function according to a packaging module corresponding to the page rendering file to obtain component association information of at least one sub-component; and taking the component association information of the at least one sub-component as the component association information corresponding to the page rendering file.
The packaging module can be understood as a module packaging tool, such as a module packager webpack, and the packaging module can construct a module dependency graph containing each module required by the program and then package the modules. The packaging module comprises an objective analysis function, the objective analysis function can be understood as a function for analyzing the sub-components, and component association information in the sub-components can be obtained through the objective analysis function.
Specifically, according to a packaging module corresponding to the page rendering file, each sub-component in a pre-constructed component library is analyzed based on an object analysis function contained in the packaging module, so that component association information in at least one sub-component is obtained, wherein the component association information includes storage location information and name information of the sub-component in the component library, and a corresponding relation between the sub-component and a sub-file in the page rendering file. According to the component association information of the sub-component, the sub-component and a sub-file in the page rendering file can be determined, and then the component association information of at least one sub-component is taken as the corresponding component association relation of the page rendering file.
S130, determining at least one target sub-component corresponding to the page rendering file based on the component association information and the configuration file in the page rendering file.
The configuration file may be understood as a file corresponding to the page display content when the page rendering is performed, and includes configuration information associated with the page display content. It will be appreciated that typically the configuration file is included in the page rendering file, corresponding to subfiles of the page rendering file. A plurality of configuration files may be included in the page rendering file, each configuration file corresponding to one of the subfiles in the page rendering file. Determining sub-components in a component library corresponding to the page rendering file through the configuration file; the target sub-component may be a sub-component in the component library that corresponds to the configuration file.
Specifically, the sub-components in the component library correspond to the name information and the location information of the sub-files in the page rendering file one by one through the component association information, and the configuration file also correspondingly includes the name information and the location information of the sub-files in the page rendering file. When the page is rendered, a configuration file corresponding to the display content on the page is determined, then based on the component association information and the configuration file in the page rendering file, sub-components in a component library corresponding to the page rendering file can be matched, the sub-components matched with the configuration file are used as target sub-components, and then at least one target sub-component corresponding to the page rendering file is determined.
Optionally, the determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file includes: determining at least one target sub-component from the at least one sub-component according to configuration information of a configuration file in the page rendering file; generating a component list corresponding to the page rendering file based on the at least one target sub-component; and the component list comprises the names of the sub components and the storage position information of the sub components in the component library.
The configuration information may be understood as the contained information in the configuration file, for example, the configuration information may be location information and name information of a subfile in the page rendering file. The component list can be understood as a list formed by all sub-components required by page rendering, and the list can be formed by name information of the sub-components required by page presentation, storage position information of the sub-components required by page presentation in a component library, ID information of the sub-components required by page presentation, or any symbolic information of the sub-components.
Specifically, when at least one target sub-component corresponding to the page rendering file is acquired, a sub-component matching the configuration information may be determined according to the configuration information of the configuration file in the page rendering file, the sub-component is used as a target sub-component, and the at least one target sub-component is determined based on the configuration information. During the page rendering process, one or more target sub-components may be required, and the identification information of at least one target sub-component corresponding to the page rendering may be generated into a component list corresponding to the page rendering file. The name of the sub-component and the storage position information in the component library where the sub-component is located are contained in the component list.
S140, performing rendering processing on the at least one target sub-component to obtain a target page corresponding to the page rendering file.
Wherein, the rendering process can be understood as displaying the determined target sub-components on a target page, and the target page can be understood as a page displayed to a user.
Specifically, a sub-component in a component library corresponding to the configuration file is used as a target sub-component, then a component list corresponding to page rendering can be generated based on the target sub-component, the target sub-component can be obtained based on the component list, and then at least one obtained target sub-component is displayed on a target page, so that a target page corresponding to the page rendering file is obtained.
According to the technical scheme, when a page rendering instruction is received, a page rendering file corresponding to the page rendering instruction is called, and corresponding components are obtained in a component library based on components corresponding to display contents required by the page rendering file. And analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component, and further determining a target sub-component matched with the configuration file according to the component association information. Determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file, generating a component list according to the at least one target sub-component, and acquiring the target sub-component from a component library according to the component list. And rendering the at least one target sub-assembly to obtain a target page corresponding to the page rendering file, so as to display the obtained target page to a user. The method and the device solve the problems that in the page rendering process, each sub-component needs to be rendered, so that code redundancy is caused, and maintenance is not easy, and achieve the effects that all sub-components are led in at one time, corresponding sub-components are called according to page rendering requirements, and the corresponding sub-components are displayed on a target page.
Example two
As an optional embodiment of the foregoing embodiment, fig. 2 is a flowchart of a page rendering method according to a second embodiment of the present invention, and optionally, the target page corresponding to the page rendering file obtained by rendering the at least one target sub-component is further refined.
As shown in fig. 2, the method specifically includes:
s210, when a page rendering instruction is received, calling a page rendering file corresponding to the page rendering instruction.
S220, analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component.
And S230, determining target sub-components used by each program segment based on the program codes in the page rendering file.
The page rendering file may include various program codes and may also include various function instructions, for example, an import instruction, which may be used to determine a corresponding target sub-component.
Specifically, based on a program code in the page rendering file, a connection can be established with a target parsing function in the component library, the target parsing function in the component library can be called through the program code to parse the sub-component, component association information of the sub-component is obtained, and a corresponding relation can be established between the sub-component and a sub-file in the page rendering file according to the component association information. In turn, the target sub-components used by each program segment may be determined.
Illustratively, a car file and a sports file are contained in the page rendering file, each file includes a file name and file location information of the file, and component information such as the name and location information of the car file, the name and location information of the sports file, and the name and location information of the user file are stored in the component library. Analyzing each subassembly through a function in the subassembly library to obtain the subassembly association information of each subassembly, calling the function in the subassembly library based on a program code or an instruction in the page rendering file, and determining a target subassembly corresponding to a car file corresponding to the page rendering file and a target subassembly corresponding to a sports file in the subassembly library based on the subassembly association information of each subassembly.
S240, according to the component names and the storage position information stored in the component list, the target sub-components corresponding to the program segments are called from the component library.
Specifically, a component list may be generated according to at least one target sub-component required in the page rendering process, and then a target sub-component corresponding to each program segment is acquired from the component library according to name information of each component included in the component list and storage location information of each component in the component library.
Illustratively, based on a configuration file of a page rendering file and determining target sub-components used by each program segment through program codes in the page rendering file, target sub-components corresponding to page display content can be determined, a component list is generated from at least one required target sub-component, name information of the target sub-components and storage position information in a component library are contained in the component list, and the target sub-components corresponding to the program segments can be called from the component library through the information.
S250, determining a target rendering page based on each target sub-component, and processing the target rendering page to obtain the target page.
The target rendered page may be understood as a page including various target sub-components, parameter information of each sub-component may be included in the target rendered page, and when the sub-components are images, the target rendered page may include sizes, colors, text information in the images, and the like of the images, and may further include layout information of each target sub-component. The destination page may be understood as a page presented to the user.
Specifically, after target sub-components corresponding to the program code segments are called, a target rendering page can be determined based on the target sub-components, and then information corresponding to various components in a target rendering file is correspondingly processed, so that the target page can be obtained.
Optionally, the determining a target rendered page based on each target sub-component and processing the target rendered page to obtain the target page includes: determining layout information of a target rendering page based on each target sub-component; and obtaining the target page through rendering the typesetting information.
The layout information may be understood as an arrangement position and an arrangement manner of each sub-component in the page, and may be, for example, a full-screen arrangement, a horizontal arrangement, a vertical arrangement, or a rolling arrangement.
Specifically, based on the layout information of each target subassembly in the target rendered page, each target subassembly is laid out in the page according to a certain rule to obtain a target page, and finally the obtained target page can be displayed to a user.
According to the technical scheme of the embodiment, the target sub-components used by each program segment are determined based on the program codes in the page rendering file, a component list is generated according to the determined target sub-components, and then the corresponding target sub-components in the component library can be determined based on the associated information in the component list. And calling target sub-components corresponding to the program segments from the component library according to the component names and the storage position information stored in the component list, and rendering the obtained target sub-components to obtain a target rendering page. And determining a target rendering page based on each target sub-component, processing the target rendering page to obtain the target page, and finally displaying the target page to a user. The problem that each sub-component needs to be re-introduced and re-rendered in the page rendering process is solved, and the effect that the corresponding sub-component is displayed on the target page according to the page rendering requirement is achieved.
EXAMPLE III
In a specific example, as shown in fig. 3, when a browser accesses vue a file (i.e., a page rendering file), webpack (i.e., a packaging module) in the page rendering file may parse all sub-components in a component library through a requirement. Meanwhile, the configuration file in the page rendering file contains the subcomponents depending on the page rendering and the parameter information required by each subcomponent, and the subcomponent corresponding to the configuration file is determined as the target subcomponent. And then, generating a component list corresponding to the page rendering file based on a target sub-component required by page rendering, wherein the component list comprises a component name and storage position information of the sub-component in a component library, calling the target sub-component corresponding to each program segment based on the component list, arranging the target sub-component according to arrangement information set in the target rendering page to obtain a target page, and displaying the target page to a user.
According to the technical scheme, when a page rendering instruction is received, a page rendering file corresponding to the page rendering instruction is called, and corresponding components are obtained in a component library based on components corresponding to display contents required by the page rendering file. And analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component, and further determining a target sub-component matched with the configuration file according to the component association information. Determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file, generating a component list according to the at least one target sub-component, and acquiring the target sub-component from a component library according to the component list. And rendering the at least one target sub-assembly to obtain a target page corresponding to the page rendering file, so as to display the obtained target page to a user. The method and the device solve the problems that in the page rendering process, each sub-component needs to be rendered, so that code redundancy is caused, and maintenance is not easy, and achieve the effect that all sub-components are led in at one time and corresponding sub-components are called according to the page rendering requirements.
Example four
Fig. 4 is a page rendering apparatus according to a fourth embodiment of the present invention, where the apparatus includes: a rendered file retrieval module 410, an associated information determination module 420, a target subcomponent determination module 430 and a target page determination module 440.
The rendering file retrieving module 410 is configured to, when a page rendering instruction is received, retrieve a page rendering file corresponding to the page rendering instruction;
the association information determining module 420 is configured to obtain component association information of each sub-component by analyzing each sub-component in the component library corresponding to the page rendering file;
a target sub-component determination module 430, configured to determine at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file;
a target page determining module 440, configured to obtain a target page corresponding to the page rendering file by performing rendering processing on the at least one target sub-component.
According to the technical scheme, when a page rendering instruction is received, a page rendering file corresponding to the page rendering instruction is called, and corresponding components are obtained in a component library based on components corresponding to display contents required by the page rendering file. And analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component, and further determining a target sub-component matched with the configuration file according to the component association information. Determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file, generating a component list according to the at least one target sub-component, and acquiring the target sub-component from a component library according to the component list. And rendering the at least one target sub-assembly to obtain a target page corresponding to the page rendering file, so as to display the obtained target page to a user. The method and the device solve the problems that in the page rendering process, each sub-component needs to be rendered, so that code redundancy is caused, and maintenance is not easy, and achieve the effect that all sub-components are led in at one time and corresponding sub-components are called according to the page rendering requirements.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the rendering file retrieving module specifically includes:
the rendering command determination sub-module is used for determining the page rendering instruction based on command information in the command line control;
and the rendering file determining submodule is used for determining at least one page rendering file according to the page rendering file identifier of the page rendering instruction.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the association information determining module specifically includes:
the related information determining submodule is used for analyzing each subassembly in a pre-constructed subassembly library through a target analysis function according to a packaging module corresponding to the page rendering file to obtain the subassembly related information of at least one subassembly;
and the page association information determining submodule is used for taking the component association information of the at least one sub-component as the component association information corresponding to the page rendering file.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the target sub-component determining module specifically includes:
the target sub-component determining sub-module is used for determining at least one target sub-component from the at least one sub-component according to the configuration information of the configuration file in the page rendering file;
a component list generation sub-module for generating a component list corresponding to the page rendering file based on the at least one target sub-component; and the component list comprises a component name and storage position information of the sub-components in the component library.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the target page determining module specifically includes:
a target sub-component determination sub-module, configured to determine, based on the program code in the page rendering file, a target sub-component used by each program segment;
the target sub-component calling sub-module is used for calling the target sub-components corresponding to the program segments from the component library according to the component names and the storage position information stored in the component list;
and the target page determining submodule is used for determining a target rendering page based on each target subassembly and processing the target rendering page to obtain the target page.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the target page determining sub-module specifically includes:
a layout information determination unit for determining layout information of the target rendered page based on each target sub-component;
and the target page unit is used for rendering the typesetting information to obtain the target page.
The page rendering device provided by the embodiment of the invention can execute the page rendering method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, electronic device 40 is embodied in the form of a general purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 40, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing, for example, implementing a page rendering method provided by an embodiment of the present invention, by executing a program stored in the system memory 402.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a page rendering method, including: when a page rendering instruction is received, calling a page rendering file corresponding to the page rendering instruction; analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component; determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file; and obtaining a target page corresponding to the page rendering file by rendering the at least one target sub-component.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A page rendering method, comprising:
when a page rendering instruction is received, calling a page rendering file corresponding to the page rendering instruction;
analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component;
determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file;
and obtaining a target page corresponding to the page rendering file by rendering the at least one target sub-component.
2. The method of claim 1, wherein when a page rendering instruction is received, invoking a page rendering file corresponding to the page rendering instruction comprises:
determining the page rendering instruction based on command information in a command line control;
and determining at least one page rendering file according to the page rendering file identifier of the page rendering instruction.
3. The method of claim 1, wherein obtaining component association information for each sub-component by parsing each sub-component in a component library corresponding to the page rendering file comprises:
analyzing each sub-component in a pre-constructed component library through a target analysis function according to a packaging module corresponding to the page rendering file to obtain component association information of at least one sub-component;
and taking the component association information of the at least one sub-component as the component association information corresponding to the page rendering file.
4. The method of claim 1, wherein determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file comprises:
determining at least one target sub-component from the at least one sub-component according to configuration information of a configuration file in the page rendering file;
generating a component list corresponding to the page rendering file based on the at least one target sub-component; and the component list comprises the names of the sub components and the storage position information of the sub components in the component library.
5. The method of claim 1, wherein the obtaining a target page corresponding to the page rendering file by rendering the at least one target subcomponent comprises:
determining a target sub-component used by each program segment based on program code in the page rendering file;
calling target sub-components corresponding to all program segments from the component library according to the component names and the storage position information stored in the component list;
and determining a target rendering page based on each target sub-component, and processing the target rendering page to obtain the target page.
6. The method of claim 5, wherein determining a target rendered page based on each target subcomponent and processing the target rendered page to obtain the target page comprises:
determining layout information of a target rendering page based on each target sub-component;
and obtaining the target page through rendering the typesetting information.
7. A page rendering apparatus, comprising:
the rendering file calling module is used for calling a page rendering file corresponding to a page rendering instruction when the page rendering instruction is received;
the association information determining module is used for analyzing each sub-component in the component library corresponding to the page rendering file to obtain component association information of each sub-component;
a target sub-component determination module for determining at least one target sub-component corresponding to the page rendering file based on the component association information and a configuration file in the page rendering file;
and the target page determining module is used for rendering the at least one target sub-component to obtain a target page corresponding to the page rendering file.
8. The apparatus of claim 7, wherein the target subcomponent determining module comprises:
the target sub-component determining sub-module is used for determining at least one target sub-component from the at least one sub-component according to the configuration information of the configuration file in the page rendering file;
a component list generation sub-module for generating a component list corresponding to the page rendering file based on the at least one target sub-component; and the component list comprises a component name and storage position information of the sub-components in the component library.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the page rendering method of any one of claims 1-6.
10. A storage medium containing computer-executable instructions for performing the page rendering method of any of claims 1-6 when executed by a computer processor.
CN202111223113.4A 2021-10-20 2021-10-20 Page rendering method and device, electronic equipment and storage medium Pending CN113885998A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111223113.4A CN113885998A (en) 2021-10-20 2021-10-20 Page rendering method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111223113.4A CN113885998A (en) 2021-10-20 2021-10-20 Page rendering method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113885998A true CN113885998A (en) 2022-01-04

Family

ID=79003869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111223113.4A Pending CN113885998A (en) 2021-10-20 2021-10-20 Page rendering method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113885998A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116013130A (en) * 2023-01-19 2023-04-25 扬州浩海蓝生海洋装备有限公司 VR simulation-based deep sea Christmas tree operation method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631604A (en) * 2020-12-30 2021-04-09 武汉达梦数据技术有限公司 Velk front-end framework implementation method and device
CN112732239A (en) * 2020-12-29 2021-04-30 望海康信(北京)科技股份公司 Page dynamic generation method and system, corresponding equipment and storage medium
CN113157345A (en) * 2021-04-30 2021-07-23 中国工商银行股份有限公司 Automatic starting method and device for front-end engineering
CN113342330A (en) * 2021-06-03 2021-09-03 中国工商银行股份有限公司 Front-end engineering generation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732239A (en) * 2020-12-29 2021-04-30 望海康信(北京)科技股份公司 Page dynamic generation method and system, corresponding equipment and storage medium
CN112631604A (en) * 2020-12-30 2021-04-09 武汉达梦数据技术有限公司 Velk front-end framework implementation method and device
CN113157345A (en) * 2021-04-30 2021-07-23 中国工商银行股份有限公司 Automatic starting method and device for front-end engineering
CN113342330A (en) * 2021-06-03 2021-09-03 中国工商银行股份有限公司 Front-end engineering generation method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
点燃火柴: ""vue使用‘require.context()‘局部批量注册组件,并通过component 标签动态绑定组件"", pages 1 - 2, Retrieved from the Internet <URL:https://blog.csdn.net/qw8704149/article/details/113446163> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116013130A (en) * 2023-01-19 2023-04-25 扬州浩海蓝生海洋装备有限公司 VR simulation-based deep sea Christmas tree operation method and system
CN116013130B (en) * 2023-01-19 2024-01-30 扬州浩海蓝生海洋装备有限公司 VR simulation-based deep sea Christmas tree operation method and system

Similar Documents

Publication Publication Date Title
CN109002510B (en) Dialogue processing method, device, equipment and medium
CN109474847B (en) Search method, device and equipment based on video barrage content and storage medium
CN113158101B (en) Visual page rendering method, device, equipment and storage medium
CN112905933A (en) Page jump method and device, electronic equipment and storage medium
CN113051514A (en) Element positioning method and device, electronic equipment and storage medium
US11423219B2 (en) Generation and population of new application document utilizing historical application documents
CN111913922B (en) Binary structured log generation method, device, equipment and storage medium
CN109753644B (en) Rich text editing method and device, mobile terminal and storage medium
CN111241043A (en) Multimedia file sharing method, terminal and storage medium
CN107862035B (en) Network reading method and device for conference record, intelligent tablet and storage medium
CN110888791A (en) Log processing method, device, equipment and storage medium
CN113885998A (en) Page rendering method and device, electronic equipment and storage medium
CN114373460A (en) Instruction determination method, device, equipment and medium for vehicle-mounted voice assistant
CN110609981A (en) Text processing method and device, electronic equipment and computer readable storage medium
CN113760894A (en) Data calling method and device, electronic equipment and storage medium
CN113312036A (en) Large-screen display method, device and equipment of Web page and storage medium
CN108259958B (en) Remote control key response method, device, equipment and storage medium
CN112799760A (en) Form rendering method and device
CN109684207B (en) Method and device for packaging operation sequence, electronic equipment and storage medium
CN107992457B (en) Information conversion method, device, terminal equipment and storage medium
CN114528509A (en) Page display processing method and device, electronic equipment and storage medium
CN114461214A (en) Page display method and device, electronic equipment and storage medium
CN110753136B (en) Domain name resolution method, device, equipment and storage medium
CN114356475A (en) Display processing method, device, equipment and storage medium
CN114036431A (en) Page cache skipping method and device, electronic equipment and storage medium

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