CN112667305A - Page display method and device - Google Patents

Page display method and device Download PDF

Info

Publication number
CN112667305A
CN112667305A CN201910953073.5A CN201910953073A CN112667305A CN 112667305 A CN112667305 A CN 112667305A CN 201910953073 A CN201910953073 A CN 201910953073A CN 112667305 A CN112667305 A CN 112667305A
Authority
CN
China
Prior art keywords
application
information
target
routing information
view
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
CN201910953073.5A
Other languages
Chinese (zh)
Inventor
张强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201910953073.5A priority Critical patent/CN112667305A/en
Publication of CN112667305A publication Critical patent/CN112667305A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a page display method and device. Wherein, the method comprises the following steps: acquiring an operation instruction of a user; determining target view routing information of an application corresponding to the operation instruction based on the operation instruction, wherein the target view routing information comprises a mapping relation between network address information corresponding to the application and target view information corresponding to the application; determining the target view information based on the target view routing information; and displaying the target view information. The method and the device solve the technical problems that in the prior art, the rendering of the view information corresponding to the application needs more processing steps, the rendering speed is low, and the rendering efficiency is low.

Description

Page display method and device
Technical Field
The application relates to the technical field of computers, in particular to a page display method and device.
Background
Currently, there is a trend for mobile applications that users do not want to load too many applications. Often a large business company will offer a range of applications, however at the user's eye they are a company and there should be only one product. Similar such trends are also emerging in the desktop Web. Aggregation is a technical trend, and the aggregation reflected in the front end is a micro-service architecture.
There are a variety of front-end micro-servitization schemes, and the currently popular solution is single-spa. Each developer independently develops the pluggable plug-in for authorization of different clients. This model solves many problems, but also has some drawbacks, such as: the sub-application components are not reusable, the routing mechanism is complex and decentralized, the rendering of the sub-applications in the page is subject to multiple steps, and the like.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a page display method and a page display device, which are used for at least solving the technical problems that in the prior art, rendering of view information corresponding to an application needs more processing steps, the rendering speed is low, and the rendering efficiency is low.
According to an aspect of an embodiment of the present application, there is provided a page display method, including: acquiring an operation instruction of a user; determining target view routing information of an application corresponding to the operation instruction based on the operation instruction, wherein the target view routing information comprises a mapping relation between network address information corresponding to the application and target view information corresponding to the application; determining the target view information based on the target view routing information; and displaying the target view information.
Optionally, before the operation instruction of the user is obtained, the method further includes: acquiring an access instruction of the target page, wherein the target page is used for displaying the target view information; sending a configuration request corresponding to the target page to a server based on the access instruction; receiving configuration information fed back by the server based on the configuration request, wherein the configuration information comprises at least one of the following: name information of the target page, directory information of the application, entry information of the application and target view routing information corresponding to the application; and creating the application based on the configuration information, and registering the target view routing information in a routing system of the target page.
Optionally, determining, based on the operation instruction, target view routing information of the application corresponding to the operation instruction includes: determining routing information of the target page based on the operation instruction; searching whether the routing information of the target view exists in a routing system of the target page; and determining the routing information of the target view according to the search result.
Optionally, determining the target view routing information according to the search result includes: and if the searching result shows that the view routing information to be searched corresponding to the operation instruction exists in the routing system of the target page, taking the view routing information to be searched as the target view routing information.
Optionally, determining the target view routing information according to the search result further includes: and if the search result shows that the view routing information to be searched corresponding to the operation instruction does not exist in the routing system of the target page, registering the view routing information corresponding to the application into the routing system of the target page.
Optionally, determining the destination view information based on the destination view routing information comprises: determining virtual DOM information corresponding to the application based on the target view routing information; and determining the target view information according to the virtual DOM information.
According to an aspect of an embodiment of the present application, there is provided a page displaying apparatus, including: the acquisition module is used for acquiring an operation instruction of a user; a first determining module, configured to determine, based on the operation instruction, target view routing information of an application corresponding to the operation instruction, where the target view routing information includes a mapping relationship between network address information corresponding to the application and target view information corresponding to the application; a second determining module to determine the target view information based on the target view routing information; and the display module is used for displaying the target view information.
According to an aspect of the embodiments of the present application, there is provided a storage medium, where the storage medium includes a stored program, and when the program runs, the storage medium is controlled to execute the above-mentioned page display method.
According to an aspect of the embodiments of the present application, there is provided a processor, where the processor is configured to execute a program, where the program executes the page display method described above.
According to an aspect of an embodiment of the present application, there is provided an electronic device including at least one processor, at least one memory, and a bus; the processor and the memory complete mutual communication through a bus; the processor is used for calling the program instructions in the memory to execute the page display method.
In the embodiment of the application, an operation instruction of a user is obtained; determining target view routing information of an application corresponding to the operation instruction based on the operation instruction, wherein the target view routing information comprises a mapping relation between network address information corresponding to the application and target view information corresponding to the application; determining the target view information based on the target view routing information; the method for displaying the target view information directly determines the corresponding target view routing information of the application based on the operation instruction for displaying the target view information, thereby reducing the determination steps of the target view routing information of the application, improving the determination speed of the target view routing information, accelerating the technical effects of the determination speed and the rendering speed of the corresponding view information, and further solving the technical problems of more steps, slower rendering speed and lower rendering efficiency of rendering of the corresponding view information of the application in the prior art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic flow chart of an alternative page display method in the prior art;
FIG. 2 is a schematic flow chart diagram illustrating an alternative page display method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating an alternative page display method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of an alternative page display apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
micro front end: the front-end micro-application is a front-end architecture similar to micro-service, projects are split into front-end micro-applications which can run independently, be developed independently and be deployed independently, and the projects can be developed and shared in parallel. The front-end polymerization mode is suitable for large-scale application.
Virtual DOM: a JavaScript object that models the DOM tree. At present, most of mainstream front-end frameworks (React and Vue) are realized by adopting virtual DOM (document object model), and the most important diff algorithm greatly reduces frequent and complicated DOM operation.
single-spa: is a solution of front-end micro-service scheme. The bridge serves as a bridge for a front-end micro-service main project and a sub-module to play a role in connection. When the route is active, it will download and execute the execution code of the module (application).
Fig. 1 is a schematic flow diagram of a page display method in the prior art, where the method is used to implement front-end microservices, and as shown in fig. 1, the page display method includes:
step S102, starting a main project;
alternatively, starting the main project may refer to opening a target page, where the target page may be a certain main page in a browser. And entering a target page from a main program inlet.
Step S104, acquiring application configuration corresponding to the main project;
optionally, when the main project is running, the server may obtain the application configuration, and the main project may be a page container corresponding to the target page.
In an optional embodiment of the present application, in the process of obtaining the application configuration corresponding to the main project, a user opens a page, and initiates a request to the server according to different user IDs to obtain an application set of the user, where the application set includes specific configurations of applications, such as a page entry, a page name, and the like.
Step S106, creating an application and binding a life cycle for the application;
optionally, after obtaining the application configuration, the applications are created one by one, and the lifecycle is bound for the applications.
In some alternative embodiments of the present application, creating an application may refer to registering an application, and the single-spa-vue may expose some information of the application (may specify a mount node) to the outside of the application, and in the main process, the information exposed by the application is obtained through a single-spa plug-in, and then the page registered in the application is registered in the main process, which is equivalent to adding an entry to the application in the main process, and this process registers the application and a lifecycle (from registration to destruction), where the application may refer to a sub-application in a target page.
Step S108, the main project detects whether the page route changes, and if so, the application corresponding to the page route is searched;
optionally, when the main project detects that the page route changes, searching whether a corresponding page route is matched with the application;
step S110, searching a corresponding application inlet according to the application; and matching the corresponding view routing information according to the application entry.
Optionally, when the corresponding application is matched, the corresponding application is loaded. The process from matching to loading is: matching the main project route to the entry of the sub-application, matching the corresponding view route entry by the sub-application, rendering the view component to the package container of the sub-application, and finally mounting the sub-application to the designated node of the main project.
Optionally, the application needs to be registered into the main project.
In some optional embodiments of the present application, the change of the page route is a process of switching the page route. If the page route exists (the route of the main project exists), directly matching the main project route; if the main project route does not exist, whether the registered entry of a certain application is matched or not is determined, if yes, the application is entered, a life cycle mount (mount) stage of the application is activated, specific view route information is matched, then mount is rendered, and if not, an empty page is 404.
Alternatively, there are roughly three cases in the process of each address switching pass: if the sub-application A page 1 is switched to the sub-application A page 2, the switching belongs to the intra-sub-application switching, and the direct jump is performed without re-registering the sub-application; if the sub-application A page 1 is switched to the sub-application B page 3, the cross-module switching is performed, the sub-application A needs to be destroyed (unmount), then the sub-application A is matched with an entrance of the sub-application B, the sub-application B is registered, the view 3 is matched, and the rendering and mounting are performed; and then the sub-application is switched to the route of the main project, the sub-application is directly destroyed, and the corresponding view is rendered.
And step S112, rendering the view information corresponding to the application based on the view routing information.
Optionally, after loading the page, entering the application entry, and matching the specific view routing information, obtaining a virtual DOM corresponding to the view routing information, and mounting the virtual DOM to a root node of the sub-application (at this time, the sub-application is a rendered real DOM), where the view information may be a real DOM corresponding to the virtual DOM, so that rendering is completed, and then the main project, while obtaining the sub-application, inserts the root node exposed to the outside by the sub-application (the real DOM completed by the sub-application) into a node specified in the main project (the node specified during registration), so that the page can be seen by a viewer.
According to the scheme, multiple matching is needed when the view corresponding to the sub-application is entered, the main project is matched to the application inlet, then the sub-application is matched to the view inlet, a front-end route matching mechanism is too complex, and manual adaptation is needed; the view process corresponding to the sub-application is too complicated to load, after the view component is matched with the page route of the sub-application, the view component is firstly rendered into a packaging container on the outermost layer of the sub-application, then the whole packaging container of the sub-application is mounted to a corresponding node of a main project, namely one or more nodes are sleeved on the outer layer of the mounted component, and the DOM rendering pressure is increased undoubtedly; in addition, the view component reuse rate is low, after the general sub-applications are registered, the main application is the view component which cannot be taken to the sub-applications at any time and any place, and the components cannot be reused correspondingly, so that redundant development is caused to the front-end engineering project in a certain sense.
In accordance with an embodiment of the present application, there is provided a page presentation method embodiment, it should be noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 2 is a schematic flowchart of a page display method according to an embodiment of the present application, and as shown in fig. 2, the method at least includes the following steps:
step S202, obtaining an operation instruction of a user;
alternatively, the operation instruction of the user may be a click instruction of the user on the application in the target page.
Step S204, determining target view routing information of an application corresponding to the operation instruction based on the operation instruction, wherein the target view routing information comprises a mapping relation between network address information corresponding to the application and target view information corresponding to the application;
in some optional embodiments of the present application, the destination view routing information is registered in the routing information corresponding to the destination page, and after the operation instruction of the application by the user is obtained, the destination view routing information corresponding to the application may be directly obtained in the routing information of the destination page.
Step S206, determining the target view information based on the target view routing information;
and step S208, displaying the target view information. Specifically, displaying the target view information refers to displaying page content corresponding to the application.
Optionally, before obtaining the operation instruction of the user, the method further needs to perform the following steps: acquiring an access instruction of the target page, wherein the target page is used for displaying the target view information; sending a configuration request corresponding to the target page to a server based on the access instruction; receiving configuration information fed back by the server based on the configuration request, wherein the configuration information comprises the following items: name information of the target page, directory information of the application, entry information of the application and target view routing information corresponding to the application; and creating the application based on the configuration information, and registering the target view routing information in a routing system of the target page.
In some optional embodiments of the present application, the target page is further used to expose application identifications of the plurality of applications.
Optionally, the configuration information further includes specific configuration information corresponding to each application.
Optionally, in the configuration information acquired in the present application: compared with the content acquired in the prior art, each sub-application is added with the respective routing configuration, namely the target view routing information, the configuration comprises the routing of the sub-application and the mapped component, namely the virtual DOM, and the virtual DOM can be multiplexed by the main project.
Optionally, the scheme of the present application requires registration of an application and target routing information corresponding to the application: registering an application as before, one additional process is to dynamically register the target view routing information corresponding to the acquired application at the same time, where the target view routing information includes the virtual DOM of the corresponding component.
Optionally, determining, based on the operation instruction, target view routing information of an application corresponding to the operation instruction may be implemented by: determining routing information of the target page based on the operation instruction; searching whether the routing information of the target view exists in a routing system of the target page; and determining the routing information of the target view according to the search result.
Optionally, in the scheme in the application, when the target view routing information is matched, the routing of the main project is preferentially matched, and since the target view routing information corresponding to the sub-application is registered in the routing of the main project, if the target view routing information is matched, the DOM corresponding to the sub-application can be rendered directly, and the target view routing information does not need to be matched through the matching application entry. Inter-application switching is also switching between registered view routing information. Wherein, the route of the main project is the route information of the target page.
Optionally, determining the target view routing information according to the search result may be implemented in the following manner: and if the searching result shows that the view routing information to be searched corresponding to the operation instruction exists in the routing system of the target page, taking the view routing information to be searched as the target view routing information.
Optionally, determining the target view routing information according to the search result may also be implemented in the following manner: and if the search result shows that the view routing information to be searched corresponding to the operation instruction does not exist in the routing system of the target page, registering the view routing information corresponding to the application into the routing system of the target page.
Optionally, determining the target view information based on the target view routing information may be implemented by: determining virtual DOM information corresponding to the application based on the target view routing information; and determining the target view information according to the virtual DOM information.
Secondly, the process of loading pages in the application is different from the prior art, and the mode in the prior art is as follows:
the method comprises the steps of firstly matching a sub-application inlet based on an operation instruction of a user on a sub-application, then matching view routing based on the sub-application inlet, inserting a corresponding virtual DOM into a corresponding node, finally exposing the rendered sub-application, inserting the rendered sub-application into a designated node (a data node operated by the virtual DOM) by a main project, inserting the virtual DOM node of the sub-application, rendering and hanging the whole sub-application, and inserting a real DOM into the designated node by the main project.
The scheme of the application is that the registered route is matched, the corresponding virtual DOM is inserted into the designated node, and when the mounted main project is rendered, the rendering is unified. And inserting a main project virtual DOM node, and then rendering the main project page.
In the scheme in the prior art, two routing distributions are needed when the sub-application view enters, namely, an application inlet is matched firstly, then an application route is matched, two steps are needed for loading and rendering the sub-view component, redundant nodes exist on the outer layer of the component, unnecessary performance consumption is caused, and the sub-application component cannot be reused; according to the scheme, starting from a micro front end routing mechanism, the purposes of simplifying routing matching and view loading processes and reducing page rendering pressure are achieved by changing the routing scheme, so that the compiling speed and the rendering performance are improved.
Fig. 3 is a schematic flowchart of a page display method according to an embodiment of the present application, and as shown in fig. 3, the method at least includes the following steps:
step S302, starting a main project;
alternatively, starting the main project may refer to opening a target page, where the target page may be a certain main page in a browser.
Step S304, acquiring application configuration corresponding to the main project;
optionally, when the main project is running, the server may obtain the application configuration, and the main project may be a page container corresponding to the target page.
In an optional embodiment of the present application, in the process of obtaining the application configuration corresponding to the main project, a user opens a page, and initiates a request to the server according to different user IDs to obtain an application set of the user, where the application set includes specific configurations of applications, such as a page entry, a page name, and the like.
Step S306, creating each application, registering view routing information corresponding to each application into routing information corresponding to the main project, and binding life cycles for each application;
optionally, after obtaining the application configuration, the main engineering creates the applications one by one, and dynamically registers the target view routing information corresponding to the sub-applications into a main engineering routing system, where the main engineering routing may be a routing corresponding to the target page.
Step S308, the main project detects whether the page route changes, and if so, the application corresponding to the page route is searched;
step S310, matching corresponding target view routing information according to the application;
step S312, rendering the view information corresponding to the application based on the target view routing information.
Optionally, when the main engineering detects a route change, it checks whether view route information corresponding to the sub-application is registered in the main engineering route. If the corresponding view routing information is registered, inserting the components corresponding to the matched view routing information into the corresponding nodes and then rendering the page; if the corresponding application is not registered, the page of the application is opened for the first time, the view routing information is registered first, then the view routing information is matched, and then the page is mounted and rendered.
The scheme in the application needs to dynamically register the route, and the main project registers the route of the sub-application into a main project route system while registering the application, so that the unified management of the micro front end route is realized; in addition, views need to be directly matched, when the URL changes, the view routing is directly matched in the main project, the view component virtual DOM is directly mounted to a defined node, and then the page is rendered, which is different from the method that the URL is firstly matched and applied to the process of matching the view routing.
The scheme in the application is that the sub-application route is directly registered in the main project route, so that the unified management of the global route is realized, and the distribution of the on-line view route is directly completed by the main project, so that the matching of the main project and the sub-application route is bypassed, and the problem that the page rollback is different from the previous link is effectively solved. Secondly, because the virtual DOM is adopted to load the sub-modules, the mounting is rendered at a time, the DOM is prevented from being changed frequently in a large amount, and the page backflow and redrawing are reduced in a large amount, so that the compiling speed, the rendering speed and other aspects are improved, the view components of the sub-modules can be reused, the mounting position can be defined by the main project, and the degree of freedom is high; in principle, the compiling method can be shared as long as the virtual DOM structure is the same, and most mainstream frameworks can be compatible.
In another alternative embodiment of the present application, the application scope of the plug-in can be expanded based on the virtual DOM, and a new idea is provided for the implementation of the micro front-end, namely, a micro front-end scheme based on the virtual DOM. The method can comprise the following implementation steps:
step S1, when the main project runs, the application configuration is obtained from the server;
step S2, after the application is acquired, the application registration route is not registered through single-spa, but the view route information of the sub-application is dynamically registered in the main project;
step S3, when detecting that the route acquired from the page changes, it is only necessary to match the corresponding view component with the registered route directly.
Because the scheme realizes matching and mounting based on the virtual DOM, the performance is much better than that of a traditional scheme which is fussy, each sub-application is independently developed in the development process, and the scheme is an integral project in the operation process, so that the development and the on-line aggregation of decoupling are realized; a new scheme can be provided for setting the authority scheme according to the view routing information corresponding to the authority registration sub-application; because the existing mainstream front-end framework mostly adopts the virtual DOM to improve the performance, the method has the opportunity of being compatible with more mainstream frameworks. The premise is that each frame provides a virtual DOM object with a similar interface, or can be adaptively modified according to a technical stack used by a main project after the virtual DOM object is taken.
In addition, the cross-application-component micro front-end mode realized based on the virtual DOM is provided by the application; the micro front end routing is in one step from matching to rendering, and does not pass through a complex matching rendering mechanism; the main engineering dynamically registers the sub-application routing, and hot deployment can be completely realized; and multiplexing the sub-module view components.
In the embodiment of the application, an operation instruction of a user is obtained; determining target view routing information of an application corresponding to the operation instruction based on the operation instruction, wherein the target view routing information comprises a mapping relation between network address information corresponding to the application and target view information corresponding to the application; determining the target view information based on the target view routing information; the method for displaying the target view information directly determines the corresponding target view routing information of the application based on the operation instruction for displaying the target view information, thereby reducing the determination steps of the target view routing information of the application, improving the determination speed of the target view routing information, accelerating the technical effects of the determination speed and the rendering speed of the corresponding view information, and further solving the technical problems of more steps, slower rendering speed and lower rendering efficiency of rendering of the corresponding view information of the application in the prior art.
According to an aspect of the embodiments of the present application, there is provided a page display apparatus, and fig. 4 is a schematic flowchart of a page display method according to the embodiments of the present application, and as shown in fig. 4, the apparatus at least includes: an acquisition module 42, a first determination module 44, a second determination module 46, a presentation module 48; wherein:
an obtaining module 42, configured to obtain an operation instruction of a user;
a first determining module 44, configured to determine, based on the operation instruction, target view routing information of an application corresponding to the operation instruction, where the target view routing information includes a mapping relationship between network address information corresponding to the application and target view information corresponding to the application;
a second determining module 46 for determining the target view information based on the target view routing information;
and a display module 48, configured to display the target view information.
Optionally, before obtaining the operation instruction of the user, the apparatus is further configured to: acquiring an access instruction of the target page, wherein the target page is used for displaying the target view information; sending a configuration request corresponding to the target page to a server based on the access instruction; receiving configuration information fed back by the server based on the configuration request, wherein the configuration information comprises at least one of the following: name information of the target page, directory information of the application, entry information of the application and target view routing information corresponding to the application; and creating the application based on the configuration information, and registering the target view routing information in a routing system of the target page.
Optionally, the first determining module 44 includes a determining sub-module, configured to determine routing information of the target page based on the operation instruction; searching whether the routing information of the target view exists in a routing system of the target page; and determining the routing information of the target view according to the search result.
Optionally, the determining sub-module is further configured to, if the search result shows that the view routing information to be searched corresponding to the operation instruction exists in the routing system of the target page, use the view routing information to be searched as the target view routing information.
Optionally, the determining sub-module is further configured to: and if the search result shows that the view routing information to be searched corresponding to the operation instruction does not exist in the routing system of the target page, registering the view routing information corresponding to the application into the routing system of the target page.
Optionally, the second determining module 46 is configured to determine, based on the target view routing information, virtual DOM information corresponding to the application; and determining the target view information according to the virtual DOM information. It should be noted that, reference may be made to the description related to the embodiment shown in fig. 1 for a preferred implementation of the embodiment shown in fig. 4, and details are not described here again.
The page display device comprises a processor and a memory, wherein the acquiring module 42, the first determining module 44, the second determining module 46, the displaying module 48 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the technical problems of more steps, lower rendering speed and lower rendering efficiency in rendering of the view information corresponding to the application in the prior art are solved by adjusting the kernel parameters.
An embodiment of the present application provides a storage medium on which a program is stored, and the program implements the page presentation method when executed by a processor.
The embodiment of the application provides a processor, wherein the processor is used for running a program, and the page display method is executed when the program runs.
An embodiment of the present application provides a structure diagram of an electronic device, as shown in fig. 5, the electronic device includes at least one processor 501, at least one memory 502, and a bus 503; the processor 501 and the memory 502 complete communication with each other through the bus 503; the processor 501 is used for calling program instructions in the memory 502 to execute the page display method described above. The electronic device 50 herein may be a server, a PC, a PAD, a cell phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
acquiring an operation instruction of a user; determining target view routing information of an application corresponding to the operation instruction based on the operation instruction, wherein the target view routing information comprises a mapping relation between network address information corresponding to the application and target view information corresponding to the application; determining the target view information based on the target view routing information; and displaying the target view information.
Acquiring an access instruction of the target page, wherein the target page is used for displaying the target view information; sending a configuration request corresponding to the target page to a server based on the access instruction; receiving configuration information fed back by the server based on the configuration request, wherein the configuration information comprises the following items: name information of the target page, directory information of the application, entry information of the application and target view routing information corresponding to the application; and creating the application based on the configuration information, and registering the target view routing information in a routing system of the target page.
Determining routing information of the target page based on the operation instruction; searching whether the target view routing system exists in the routing system of the target page; and determining the routing information of the target view according to the search result.
And if the searching result shows that the view routing information to be searched corresponding to the operation instruction exists in the routing system of the target page, taking the view routing information to be searched as the target view routing information.
And if the search result shows that the view routing information to be searched corresponding to the operation instruction does not exist in the routing system of the target page, registering the view routing information corresponding to the application into the routing system of the target page.
Determining virtual DOM information corresponding to the application based on the target view routing information; and determining the target view information according to the virtual DOM information.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A page display method is characterized by comprising the following steps:
acquiring an operation instruction of a user;
determining target view routing information of an application corresponding to the operation instruction based on the operation instruction, wherein the target view routing information comprises a mapping relation between network address information corresponding to the application and target view information corresponding to the application;
determining the target view information based on the target view routing information;
and displaying the target view information.
2. The method of claim 1, wherein before obtaining the operation instruction of the user, the method further comprises:
acquiring an access instruction of a target page, wherein the target page is used for displaying the target view information;
sending a configuration request corresponding to the target page to a server based on the access instruction;
receiving configuration information fed back by the server based on the configuration request, wherein the configuration information comprises at least one of the following: name information of the target page, directory information of the application, entry information of the application and target view routing information corresponding to the application;
and creating the application based on the configuration information, and registering the target view routing information in a routing system of the target page.
3. The method of claim 2, wherein determining, based on the operation instruction, target view routing information for an application corresponding to the operation instruction comprises:
determining routing information of the target page based on the operation instruction;
searching whether the routing information of the target view exists in a routing system of the target page;
and determining the routing information of the target view according to the search result.
4. The method of claim 3, wherein determining the target view routing information based on the lookup result comprises:
and if the searching result shows that the view routing information to be searched corresponding to the operation instruction exists in the routing system of the target page, taking the view routing information to be searched as the target view routing information.
5. The method of claim 4, wherein determining the target view routing information based on the lookup result further comprises:
and if the search result shows that the view routing information to be searched corresponding to the operation instruction does not exist in the routing system of the target page, registering the view routing information corresponding to the application into the routing system of the target page.
6. The method of claim 5, wherein determining the destination view information based on the destination view routing information comprises:
determining virtual DOM information corresponding to the application based on the target view routing information;
and determining the target view information according to the virtual DOM information.
7. A page display apparatus, comprising:
the acquisition module is used for acquiring an operation instruction of a user;
a first determining module, configured to determine, based on the operation instruction, target view routing information of an application corresponding to the operation instruction, where the target view routing information includes a mapping relationship between network address information corresponding to the application and target view information corresponding to the application;
a second determining module to determine the target view information based on the target view routing information;
and the display module is used for displaying the target view information.
8. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device where the storage medium is located is controlled to execute the page display method according to any one of claims 1 to 6.
9. A processor, configured to execute a program, wherein the program executes the page display method according to any one of claims 1 to 6.
10. An electronic device, comprising at least one processor, at least one memory, and a bus; the processor and the memory complete mutual communication through a bus; the processor is used for calling the program instructions in the memory to execute the page display method of any one of claims 1 to 6.
CN201910953073.5A 2019-09-30 2019-09-30 Page display method and device Pending CN112667305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910953073.5A CN112667305A (en) 2019-09-30 2019-09-30 Page display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910953073.5A CN112667305A (en) 2019-09-30 2019-09-30 Page display method and device

Publications (1)

Publication Number Publication Date
CN112667305A true CN112667305A (en) 2021-04-16

Family

ID=75399801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910953073.5A Pending CN112667305A (en) 2019-09-30 2019-09-30 Page display method and device

Country Status (1)

Country Link
CN (1) CN112667305A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157274A (en) * 2021-05-20 2021-07-23 北京字节跳动网络技术有限公司 Software development method and device based on micro front end, electronic equipment and storage medium
CN113254237A (en) * 2021-06-11 2021-08-13 海尔数字科技(青岛)有限公司 Front-end application calling method, device, storage medium and program product
CN113918263A (en) * 2021-11-11 2022-01-11 盐城金堤科技有限公司 Virtual routing method, device and equipment of view component and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120158798A1 (en) * 2010-12-20 2012-06-21 Patil Chatur B Executing a business process in a framework
CN107622431A (en) * 2016-07-15 2018-01-23 长沙海商网络技术有限公司 The whole network pc+ wechat+app multi-user mall systems
CN110008421A (en) * 2018-11-09 2019-07-12 阿里巴巴集团控股有限公司 Page processing method, device, equipment and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120158798A1 (en) * 2010-12-20 2012-06-21 Patil Chatur B Executing a business process in a framework
CN107622431A (en) * 2016-07-15 2018-01-23 长沙海商网络技术有限公司 The whole network pc+ wechat+app multi-user mall systems
CN110008421A (en) * 2018-11-09 2019-07-12 阿里巴巴集团控股有限公司 Page processing method, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CSDN:HTTPS://BLOQ.CSDN.NET/ALNORTHWORD/ARTICLE/DETAILS/100676704: "市面上前端微服务化研究(五):蚂蚁金服微前端框架", CSDN:HTTPS://BLOQ.CSDN.NET/ALNORTHWORD/ARTICLE/DETAILS/100676704, pages 2 - 4 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157274A (en) * 2021-05-20 2021-07-23 北京字节跳动网络技术有限公司 Software development method and device based on micro front end, electronic equipment and storage medium
CN113157274B (en) * 2021-05-20 2023-11-24 抖音视界有限公司 Software development method and device based on micro front end, electronic equipment and storage medium
CN113254237A (en) * 2021-06-11 2021-08-13 海尔数字科技(青岛)有限公司 Front-end application calling method, device, storage medium and program product
CN113918263A (en) * 2021-11-11 2022-01-11 盐城金堤科技有限公司 Virtual routing method, device and equipment of view component and computer storage medium
CN113918263B (en) * 2021-11-11 2023-09-05 盐城天眼察微科技有限公司 Virtual routing method, device and equipment of view component and computer storage medium

Similar Documents

Publication Publication Date Title
CN109002362B (en) Service method, device and system and electronic equipment
KR101366402B1 (en) Virtual execution system for resource-constrained devices
CN109634718B (en) Method and system for creating mirror image by cloud platform
CN112667305A (en) Page display method and device
CN111782668A (en) Data structure reading and updating method and device, and electronic equipment
CN111343181B (en) Message processing method and system, data pool and computer readable storage medium
CN110908707B (en) Resource packaging method, device, server and storage medium
CN104750528A (en) Management method and device for components in Android program
US10346160B2 (en) Melding of mediation flow service component architecture (SCA) components
CN111090823B (en) Page application integration system, application access method, device and equipment
CN108647032B (en) Application loading method and device, computer device and computer readable storage medium
CN112346818A (en) Container application deployment method and device, electronic equipment and storage medium
WO2024045382A1 (en) Implementation of reflective mechanism in blockchain
CN113495797A (en) Message queue and consumer dynamic creation method and system
US20170329622A1 (en) Shared virtual data structure of nested hypervisors
CN114995859A (en) Page hot updating method, device, equipment and storage medium
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN109347716B (en) Instantiation method and device of consumer VNF
CN109347661B (en) Instantiation method and device of consumer VNF
CN105103125A (en) Method for obtaining clock interruption signal, and nfv functional entity
US11249760B2 (en) Parameter management between programs
US20230083849A1 (en) Parsing tool for optimizing code for deployment on a serverless platform
CN111045746A (en) Code expansion method and framework
CN115016862A (en) Kubernetes cluster-based software starting method, device, server and storage medium
CN112835865A (en) Application hot deployment system, method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination