WO2022267809A1 - Page embedding method and apparatus, storage medium and electronic device - Google Patents

Page embedding method and apparatus, storage medium and electronic device Download PDF

Info

Publication number
WO2022267809A1
WO2022267809A1 PCT/CN2022/095160 CN2022095160W WO2022267809A1 WO 2022267809 A1 WO2022267809 A1 WO 2022267809A1 CN 2022095160 W CN2022095160 W CN 2022095160W WO 2022267809 A1 WO2022267809 A1 WO 2022267809A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
embedding
message
event
custom
Prior art date
Application number
PCT/CN2022/095160
Other languages
French (fr)
Chinese (zh)
Inventor
郑仁杰
王舒源
暨灿
Original Assignee
北京有竹居网络技术有限公司
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 北京有竹居网络技术有限公司 filed Critical 北京有竹居网络技术有限公司
Publication of WO2022267809A1 publication Critical patent/WO2022267809A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, to a page embedding method, device, storage medium and electronic equipment.
  • Page modular reuse refers to quickly embedding a system or a page in a system into other systems as a similar component, such as the ability of a third-party system to embed a similar business cashier interface, or Or some systems hope to embed some chart analysis capabilities of other platforms.
  • the present disclosure provides a page embedding method, the method comprising:
  • the front-end function package encapsulates the function functions required in the page embedding process and called by the custom page embedding label;
  • the second page is embedded into the first page system through the page module instance.
  • the present disclosure provides a page embedding device, the device comprising:
  • the installation module is used to install the front-end function package in the first page system, and the front-end function package encapsulates the function functions required in the page embedding process and called by custom page embedding tags;
  • An acquisition module configured to acquire the page address of the second page to be embedded
  • the calling module is used to determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain the page module Instance, wherein the message interface of the page module instance supports message transmission in the form of non-character strings;
  • An embedding module configured to embed the second page into the first page system through the page module instance.
  • the present disclosure provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect are implemented.
  • an electronic device including:
  • a processor configured to execute the computer program in the memory to implement the steps of the method in the first aspect.
  • the front-end function package can be installed in the first page system.
  • the front-end function package encapsulates the function functions required in the page embedding process and is called through the custom page embedding tag, so that the user can subsequently use the custom page
  • the embed tag and the front-end feature pack embed the second page into the first page system.
  • the message interface of the page module instance obtained by calling the front-end function package can be transmitted in the form of a non-string, so that the communication between the first page system and the second page to be embedded can be carried out in the form of a non-string Message passing, and then realize more complex page message interaction logic, to meet the usage requirements in different scenarios.
  • Fig. 1 is a flowchart of a page embedding method according to an exemplary embodiment of the present disclosure
  • Fig. 2 is a block diagram of a page embedding device according to an exemplary embodiment of the present disclosure
  • Fig. 3 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • Iframe Natively provided by the browser.
  • Iframe is an old technology launched by browsers more than ten years ago.
  • page embedding through Iframe tags has exposed many problems in the current background. For example, the performance bottleneck, every time you switch between the embedded page and the embedded page, you need to reload the page resources completely, resulting in slow resource loading efficiency.
  • inter-process communication is limited to the use of serialized strings in the underlying implementation of the computer, so the page to be embedded and the page to be embedded can only be serialized Message interaction in the form of character strings, and the format of message transmission is limited, which cannot flexibly meet the usage requirements in various scenarios.
  • this method still does not solve the problem that the Iframe tag cannot transmit non-string type data, and the premise that the embedding party and the embedded system want to establish message communication is to ensure that the domain names of the two are exactly the same. That is to say, there is also the problem of limited communication between the embedding party and the embedded system through the portal tag.
  • the present disclosure provides a page embedding method to implement page embedding by customizing page embedding tags, solve the resource loading problem existing in page embedding through Iframe tags, and realize the non-uniformity between the embedding party and the embedded system.
  • String messaging improves the applicability of page embedding scenarios.
  • Fig. 1 is a flowchart of a page embedding method according to an exemplary embodiment of the present disclosure.
  • the page embedding method includes:
  • Step 101 install the front-end function package in the first page system, the front-end function package encapsulates the functions required in the page embedding process and called by custom page embedding tags.
  • Step 102 obtaining the page address of the second page to be embedded.
  • Step 103 Determine the parameters of the custom page embed tag according to the page address of the second page, and call the front-end function package through the custom page embed tag after passing in the parameters to obtain a page module instance whose message interface supports Message passing in non-string form.
  • Step 104 embedding the second page into the first page system through the page module instance.
  • the front-end function package may be pre-packaged with functions required by the page embedding process and invoked through custom page embedding tags, such as page resource loading functions and the like. Therefore, after the front-end function package is installed in the first page system, the page resource loading function can be called to load resources. That is to say, the corresponding resources can be loaded in advance, so that there is no need to reload resources during each page switching process, which can solve the problem of resource loading existing in page embedding through Iframe tags.
  • the function functions in the front-end function package may be set according to the actual situation, and may include various types of micro-front-end basic function functions, which are not limited in the implementation of the present disclosure.
  • the page address of the second page to be embedded can be obtained, for example, the page address of the second page can be obtained from the address bar of the browser displaying the second page, the embodiment of the present disclosure There is no limit to this. Then, parameters of the custom page embedding tag can be determined according to the page address of the second page.
  • the custom page embedding tag can be understood as a hypertext markup language HTML tag used to call a pre-packaged function in the front-end function package. That is to say, in the embodiment of the present disclosure, a kind of HTML tag is customized, and a front-end function package corresponding to the HTML tag is preset, so that the custom page embedding can be completed by calling the function function in the front-end function package The page display function corresponding to the label.
  • determining the parameters of the custom page embed tag according to the page address of the second page may be: using the page address of the second page as the parameter of the custom page embed tag; or, according to the page address of the second page.
  • Resource parsing obtain the structured data address of the completed resource parsing, and use the structured data address as a parameter of the custom page embedding tag.
  • HTML parsing requires a built-in HTML code parser, and the parser will bring more codes to be parsed at runtime, and even just adding a line of code at runtime will bring additional performance consumption. And the parser will parse the user's incoming HTML file sentence by sentence, which further increases additional performance overhead. Therefore, the embodiments of the present disclosure can reduce performance consumption by passing the address of the structured data that has completed resource resolution.
  • the runtime parsing cost can be transferred to compile time, so as to ensure that there is no difference between the content parsed at compile time and the content parsed at runtime, and reduce runtime performance consumption.
  • the general execution function of PuzzleWebpackPlugin can be used to enable direct transmission of the structured data address of the completed resource analysis during the page embedding process with less code writing. As a result, the running cost can be reduced and the code running performance can be improved.
  • the custom embedded tag is named magic-portal tag
  • the page address of the second page to be embedded is https://example.com/
  • you can first perform resource analysis based on the page address of the second page to obtain the structured address of the completed resource analysis, and then use the structured data address as a parameter of the custom page embedding tag in the following manner: ⁇ magic-portal manifest "https://example.com/puzzle-manifest.json"> ⁇ /magic-portal>. Therefore, in addition to directly introducing the page address of the second page through the html field, the custom embedded tag can also pass a structured data address that has completed resource parsing through the manifest field, reducing performance and running consumption.
  • the front-end function package After determining the parameters of the custom page embed tag according to the page address of the second page, that is, after passing in the corresponding parameters to the custom page embed tag, the front-end function package can be called through the custom page embed tag to obtain a page module instance,
  • the message interface of the page module instance supports message transmission in the form of non-character strings.
  • the page embedding is performed through the Iframe tag, and the message communication capability provided by the early message event of the browser is mainly reused in the process of message transmission to complete the data transmission of the event. Therefore, in the Iframe embedding scheme, both the embedder and the embedded party can dispatch message events with corresponding specific business data, or listen to whether someone else dispatches message events to obtain the data attached to the other party to complete some specific tasks. the behavior of.
  • the constraints of the original event dispatch can be broken, and any custom event can be dispatched through a simple interface method.
  • the format of the transferred data will no longer be restricted. For example, pointer data that is not a string type and cannot be serialized normally can also be transferred in this way.
  • the message event can be delivered to the second page through the first message interface of the page module instance and the event dispatching mechanism, wherein the message event to be delivered is stored in the memory when the event is dispatched, so that the second page can retrieve the message from the memory Get the message event.
  • the message event can be passed to the second page through the postMessage interface of the page module instance (that is, the first message interface) and the event dispatch mechanism,
  • the message event to be delivered can be stored in the memory when the event is dispatched, so that the second page can obtain the message event from the memory.
  • the memory management mechanism can be used to implement message transmission between the first page system and the second page, thereby solving the problem of communication limitation between the first page system and the second page.
  • the embodiments of the present disclosure provide a third message interface and a fourth message interface for the custom event, so as to perform message transmission of corresponding data types through different types of message interfaces, thereby improving message transmission efficiency.
  • page messages other than the message event can be delivered to the second page through the third message interface of the page module instance and the event delivery mechanism, wherein the page message to be delivered can be sent when the event is delivered Stored in memory so that the second page gets page messages from memory.
  • the second page can be sent to the second page through the general emitEvent interface (ie, the third message interface) Pass the custom event, where the custom event to be passed can be stored in memory when the event is dispatched, so that the second page can obtain the custom event from the memory.
  • the embedded first page system listens to custom events from the embedded second page, you can listen to the second page delivered by the page module instance through the addPortalEventListener interface (that is, the fourth message interface) and the event dispatch mechanism.
  • the custom event wherein the second page can store the custom event to be delivered in memory when dispatching the event, so that the system of the first page can obtain the custom event from the memory when receiving the event.
  • the message transmission of custom events can be realized between the first page system and the second page through the memory management mechanism, which can not only meet the page communication requirements in various scenarios, but also solve the problem of limited communication between pages.
  • the page module instance can also inject global interface objects into the global environment of the page module instance, so that The page module instance has the capability of transmitting messages from the second page to the first page system or monitoring messages from the first page system.
  • the second page can transmit message data to the first page system through the fifth message interface on the page module instance, or the second page can listen to events triggered by the first page system through the sixth message interface on the page module instance.
  • a front-end system In practical applications, the content or functions of various parts of a front-end system are often switched or scheduled through routing or page jumps, and at the same time as page switching and jumping, they are often accompanied by the content in the browser address bar. address change.
  • a commercial platform has a cash register system that supports payment-related business logic, and often completes a complete payment process, which generally requires jumping through the following pages: confirmation information on the order page, input payment method on the bank card page, etc.
  • Data and payment completion pages each page usually has its own page address and completes the jump according to the user's operation (next step or return to the previous step). Or, on the front-end page, switch functions and navigate through routing jumps.
  • routing jumps may not meet expectations in many cases.
  • the cash register system is only embedded in the page of the mall platform as a called third-party module.
  • a small part of , or just a pop-up window, at this time the address of the mall page is a link to the product.
  • the cashier module is evoked or some cashier operations cause the page address to change, it is often not as expected, because most of the content on the page is still product details, and because a small part of the content on the page (that is, the cashier module ) causes the address of the browser to change, which is not in line with the user's intuition. Therefore, routing isolation between the embedded party and the embedded party is necessary.
  • the embodiments of the present disclosure provide two strategies of route isolation and route non-isolation, which can be configured through parameters during the implementation of the present disclosure to determine route isolation and route non-isolation isolation.
  • the routing parameter may be obtained first, and the routing parameter is used to represent the routing status of the first page system and the second page, and the routing status includes a routing isolation enabled state or a routing isolation disabled state. If the routing parameter indicates that the routing isolation is enabled, then determine the custom routing information of the second page, and control the routing of the second page according to the custom routing information, so that after the second page is embedded in the system of the first page, the The routing is different from the routing of the first page system. If the route parameter represents the route isolation closed state, then control the route of the second page according to the route information of the first page system, so that after the second page is embedded in the first page system, the route of the second page is the same as the route of the first page system same.
  • the custom page embed tag can have a routing parameter, so that the routing status of the first page system and the second page can be determined by configuring the routing parameter in the custom page embed tag. For example, if routing parameters are configured, it is determined that the routing status of the first page system and the second page is the route isolation enabled state; otherwise, if no routing parameters are configured, then the routing status of the first page system and the second page is determined Isolation off state for routing.
  • the embedded tag of the custom page is named magic-portal tag.
  • routing parameter history-isolation is configured as follows, it can be determined that the routing status of the system on the first page and the routing status of the second page are route isolation enabled: ⁇ magic- portal history-isolation> ⁇ /magic-portal>. Conversely, if the routing parameter history-isolation is not configured, the routing status of the system on the first page and the routing status of the second page can be determined as routing isolation disabled.
  • the custom routing information of the second page can be determined, and the routing of the second page can be controlled according to the custom routing information, so that the second page embeds the second page.
  • the route of the second page after the first page system is different from the route of the first page system.
  • the custom routing information is used to represent the routing information of the second page, and may be obtained when the page address of the second page is obtained, which is not limited in this embodiment of the present disclosure.
  • the custom route information can make the route of the second page after the second page is embedded in the first page system different from the route of the first page system. Therefore, after the second page is embedded, the page address displayed by the first page system in the address bar of the browser may not change, which reduces the impact of page embedding on the first page system and improves user perception.
  • the route of the second page can be controlled according to the route information of the first page system, so that after the second page is embedded in the first page system, the route of the second page is the same as that of the first page system. Routing is the same.
  • the second page can declare its own namespace namespace on the first page system, so that the routing of the second page can be consistent with the first page system, otherwise there may be a second page in the routing process.
  • the second page will not find the page resource problem. For example, the system on the first page has completed the switch from /home to /about, and the second page will also perform the same process, but if the second page does not implement the /about page, the corresponding page cannot be found.
  • the routing process can be synchronized for the same page corresponding to the second page and the first page system, and vice versa. Perform routing synchronization to avoid the problem that the second page cannot find page resources.
  • the second page can be embedded into the first page system according to the page module instance.
  • the custom display parameters are used to define the display style or display content of the second page embedded in the first page system, which can be set according to the actual situation, such as including parameters for injecting metadata into the first page system, etc. , which is not limited in the embodiments of the present disclosure.
  • the external interface for custom display can be set for the page module instance, and the parameter rules of the external interface can be set, so that the corresponding custom display parameters can be passed in according to the parameters required by the external interface. That is, obtain the custom display parameters for the second page, and pass the custom display parameters into the page module instance, so as to realize the custom display configuration of the second page and meet the page embedding requirements in various scenarios. That is to say, the embodiment of the present disclosure can add customized parameters and configuration information to the page module instance through the interface provided by the page module instance, so as to realize customized capabilities or presentations.
  • the second page can be embedded into the first page system according to the target page module instance.
  • the target display position may be set according to actual conditions, which is not limited in this embodiment of the present disclosure.
  • a front-end function package is pre-packaged for custom page embedding tags, so the page module instance is placed in any desired position of the embedded page, and the page module instance will automatically complete resource loading and Internal initialization, so that after the resource loading and initialization operations of the page module instance are completed, the second page can be displayed at the target display position of the first page system.
  • page embedding can be realized by customizing the page embedding tag, solving the resource loading problem existing in page embedding through Iframe tags, and realizing non-string message transmission between the embedding party and the embedded system, improving the scene of page embedding applicability.
  • the page embedding device 200 includes:
  • the installation module 201 is used to install the front-end function package in the first page system, and the front-end function package encapsulates the function functions required in the page embedding process and called by custom page embedding tags;
  • Obtaining module 202 configured to obtain the page address of the second page to be embedded
  • the calling module 203 is configured to determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain the page A module instance, wherein the message interface of the page module instance supports message transmission in the form of a non-character string;
  • the embedding module 204 is configured to embed the second page into the first page system through the page module instance.
  • the device 200 also includes:
  • the first communication module is configured to transmit the message event to the second page through the first message interface and the event distribution mechanism of the page module instance after obtaining the page module instance, wherein the message event to be transmitted is sent when the event is dispatched
  • the message event is stored in the memory, so that the second page obtains the message event from the memory;
  • the second communication module is configured to listen to the message event delivered by the second page through the second message interface of the page module instance and the event distribution mechanism, wherein the second page will send the message to be delivered when the event is dispatched
  • the event is stored in the memory, so that the first page system obtains the message event from the memory when receiving the event.
  • the device 200 also includes:
  • the third communication module is configured to transmit page messages other than the message event to the second page through the third message interface and the event distribution mechanism of the page module instance after obtaining the page module instance, wherein the event is dispatched storing the page message to be delivered in the memory, so that the second page obtains the page message from the memory;
  • the fourth communication module is configured to monitor the page messages delivered by the second page, except the message event, through the fourth message interface of the page module instance and the event distribution mechanism, wherein the second page will send the event when dispatching the event.
  • the page message to be delivered is stored in memory, so that the first page system acquires the page message from memory when receiving an event.
  • the device 200 also includes:
  • a first parameter acquisition module configured to acquire routing parameters, the routing parameters are used to characterize the routing status of the first page system and the second page, and the routing status includes a routing isolation enabled state or a routing isolation disabled state;
  • the first determining module is configured to determine the custom routing information of the second page when the routing parameter indicates that the routing isolation is enabled, and control the routing of the second page according to the custom routing information, After the second page is embedded in the first page system, the route of the second page is different from the route of the first page system;
  • the second determining module is configured to control the routing of the second page according to the routing information of the first page system when the routing parameter indicates that the routing isolation is off, so that the second page is embedded in the The route of the second page after the first page system is the same as the route of the first page system.
  • the calling module 203 is used for:
  • Resource parsing is performed according to the page address of the second page to obtain a structured data address that has completed resource parsing, and the structured data address is used as a parameter of the custom page embedding tag.
  • the device 200 also includes:
  • a second parameter acquisition module configured to acquire custom display parameters for the second page, and pass the custom display parameters into the page module instance to obtain a target page module instance;
  • the embedded module 204 is used for:
  • the embedding module 204 is used for:
  • the second page is displayed at the target display position of the first page system.
  • an embodiment of the present disclosure further provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the above page embedding methods are implemented.
  • an electronic device including:
  • a processor configured to execute the computer program in the memory, so as to realize the steps of any page embedding method described above.
  • FIG. 3 it shows a schematic structural diagram of an electronic device 300 suitable for implementing an embodiment of the present disclosure.
  • the terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like.
  • the electronic device shown in FIG. 3 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
  • an electronic device 300 may include a processor (such as a central processing unit, a graphics processing unit, etc.) (RAM) 303 to execute various appropriate actions and processing.
  • a processor such as a central processing unit, a graphics processing unit, etc.
  • RAM random access memory
  • various programs and data necessary for the operation of the electronic device 300 are also stored.
  • the processor 301, ROM 302, and RAM 303 are connected to each other through a bus 304.
  • An input/output (I/O) interface 305 is also connected to the bus 304 .
  • the following devices can be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibrating an output device 307 such as a computer; a memory 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309.
  • the communication means 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data. While FIG. 3 shows electronic device 300 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 309, or from memory 308, or from ROM 302.
  • the processor 301 When the computer program is executed by the processor 301, the above functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) can be used to communicate, and can communicate with digital data in any form or medium (for example, communication network) interconnection.
  • Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: installs a front-end function package in the first page system, and the front-end function package encapsulates The function function required in the page embedding process and called by the custom page embedding tag; obtaining the page address of the second page to be embedded; determining the parameters of the custom page embedding tag according to the page address of the second page, And call the front-end function package by passing in the custom page embedding tag after the parameters to obtain a page module instance, wherein the message interface of the page module instance supports message transmission in the form of a non-character string; through the A page module instance embeds the second page into the first page system.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" 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.
  • the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider to connected via the Internet.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation on the module itself under certain circumstances.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • Example 1 provides a page embedding method, the method comprising:
  • the front-end function package encapsulates the function functions required in the page embedding process and called by the custom page embedding label;
  • the second page is embedded into the first page system through the page module instance.
  • Example 2 provides the method of Example 1. After obtaining the page module instance, the method further includes:
  • Example 3 provides the method of Example 1 or 2. After obtaining the page module instance, the method further includes:
  • Example 4 provides the method of Example 1 or 2, the method further comprising:
  • the routing parameters are used to characterize the routing status of the first page system and the second page, and the routing status includes a routing isolation enabled state or a routing isolation disabled state;
  • routing parameter indicates that the routing isolation is enabled
  • determine the custom routing information of the second page and control the routing of the second page according to the custom routing information, so that the second page After embedding the first page system, the route of the second page is different from the route of the first page system;
  • routing parameter represents the routing isolation off state
  • control the routing of the second page according to the routing information of the first page system, so that after the second page is embedded in the first page system, the The route of the second page is the same as the route of the first page system.
  • Example 5 provides the method of Example 1 or 2, determining parameters of the custom page embedding tag according to the page address of the second page, including:
  • Resource parsing is performed according to the page address of the second page to obtain a structured data address that has completed resource parsing, and the structured data address is used as a parameter of the custom page embedding tag.
  • Example 6 provides the method of Example 1 or 2, the method further comprising:
  • Embedding the second page into the first page system according to the page module instance includes:
  • Example 7 provides the method of Example 1 or 2, embedding the second page into the first page system according to the page module instance, including:
  • the second page is displayed at the target display position of the first page system.
  • Example 8 provides a page embedding device, the device comprising:
  • the installation module is used to install the front-end function package in the first page system, and the front-end function package encapsulates the function functions required in the page embedding process and called by custom page embedding tags;
  • An acquisition module configured to acquire the page address of the second page to be embedded
  • the calling module is used to determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain the page module Instance, wherein the message interface of the page module instance supports message transmission in the form of non-character strings;
  • An embedding module configured to embed the second page into the first page system through the page module instance.
  • Example 9 provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, any one of Examples 1-7 can be implemented. steps of the method described above.
  • Example 10 provides an electronic device, comprising:
  • a processor configured to execute the computer program in the memory, so as to implement the steps of any one of the methods in Examples 1-7.

Abstract

The present disclosure relates to a page embedding method and apparatus, a storage medium and an electronic device, the method comprising: installing a front-end function package in a first page system, the front-end function package packaging a functional function which is needed in a page embedding process and which is called by means of a custom page embed label; acquiring a page address of a second page to be embedded; determining parameters of the custom page embed label according to the page address of the second page, and calling the front-end function package by means of the custom page embed label after having the parameters introduced, so as to obtain a page module instance, wherein a message interface of the page module instance supports message transmission by using a non-character-string means; and embedding the second page into the first page system by means of the page module instance. Therefore, page embedding may be achieved by means of a custom page embed label, a resource loading problem which exists due to performing page embedding by means of an iframe label is solved, and non-character-string message transmission between an embedding party and an embedded system is achieved.

Description

页面嵌入方法、装置、存储介质及电子设备Page embedding method, device, storage medium and electronic equipment
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年06月21日提交的,申请号为202110686401.7、发明名称为“页面嵌入方法、装置、存储介质及电子设备”的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110686401.7 and the title of the invention "page embedding method, device, storage medium and electronic equipment" filed on June 21, 2021, the entire content of which is incorporated by reference in this application.
技术领域technical field
本公开涉及计算机技术领域,具体地,涉及一种页面嵌入方法、装置、存储介质及电子设备。The present disclosure relates to the field of computer technology, and in particular, to a page embedding method, device, storage medium and electronic equipment.
背景技术Background technique
页面模块化复用指的是将某个系统或者是某个系统中的某个页面,作为类似组件的方式快速嵌入到别的系统中,例如第三方系统嵌入类似业务收银台界面的能力,亦或是有些系统希望嵌入一些其他平台的图表分析能力。Page modular reuse refers to quickly embedding a system or a page in a system into other systems as a similar component, such as the ability of a third-party system to embed a similar business cashier interface, or Or some systems hope to embed some chart analysis capabilities of other platforms.
相关技术中,如果想要在页面系统中嵌入另一页面,主要是通过浏览器原生提供的Iframe标签实现的。但是,通过Iframe标签进行页面嵌入,资源加载较慢,并且由于浏览器使用的是进程间通信,而进程间通信在计算机底层实现上限制了只能使用序列化的字符串形式,因此待嵌入的页面和被嵌入的页面之间只能通过可序列化的字符串形式进行消息交互,消息传递的格式受限,无法灵活满足各种场景下的使用需求。In related technologies, if you want to embed another page in the page system, it is mainly realized through the Iframe tag natively provided by the browser. However, when the page is embedded through the Iframe tag, the resource loading is slow, and because the browser uses inter-process communication, and the inter-process communication restricts the use of serialized strings in the underlying implementation of the computer, so the to-be-embedded The page and the embedded page can only exchange messages in the form of serializable strings, and the format of message transmission is limited, which cannot flexibly meet the needs of various scenarios.
发明内容Contents of the invention
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This Summary is provided to introduce a simplified form of concepts that are described in detail later in the Detailed Description. This summary of the invention is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
第一方面,本公开提供一种页面嵌入方法,所述方法包括:In a first aspect, the present disclosure provides a page embedding method, the method comprising:
在第一页面系统中安装前端功能包,所述前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数;Installing the front-end function package in the first page system, the front-end function package encapsulates the function functions required in the page embedding process and called by the custom page embedding label;
获取待嵌入的第二页面的页面地址;Obtain the page address of the second page to be embedded;
根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,并通过传入所述参数后的自定义页面嵌入标签调用所述前端功能包,以得到页面模块实例,其中所述页面模块实例的消息接口支持通过非字符串的形式进行消息传递;Determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain a page module instance, wherein the The message interface of the page module instance supports message passing in the form of non-string;
通过所述页面模块实例将所述第二页面嵌入所述第一页面系统。The second page is embedded into the first page system through the page module instance.
第二方面,本公开提供一种页面嵌入装置,所述装置包括:In a second aspect, the present disclosure provides a page embedding device, the device comprising:
安装模块,用于在第一页面系统中安装前端功能包,所述前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数;The installation module is used to install the front-end function package in the first page system, and the front-end function package encapsulates the function functions required in the page embedding process and called by custom page embedding tags;
获取模块,用于获取待嵌入的第二页面的页面地址;An acquisition module, configured to acquire the page address of the second page to be embedded;
调用模块,用于根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,并通过传入所述参数后的自定义页面嵌入标签调用所述前端功能包,以得到页面模块实例,其中所述页面模块实例的消息接口支持通过非字符串的形式进行消息传递;The calling module is used to determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain the page module Instance, wherein the message interface of the page module instance supports message transmission in the form of non-character strings;
嵌入模块,用于通过所述页面模块实例将所述第二页面嵌入所述第一页面系统。An embedding module, configured to embed the second page into the first page system through the page module instance.
第三方面,本公开提供一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现第一方面所述方法的步骤。In a third aspect, the present disclosure provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect are implemented.
第四方面,本公开提供一种电子设备,包括:In a fourth aspect, the present disclosure provides an electronic device, including:
存储器,其上存储有计算机程序;a memory on which a computer program is stored;
处理器,用于执行所述存储器中的所述计算机程序,以实现第一方面所述方法的步骤。A processor configured to execute the computer program in the memory to implement the steps of the method in the first aspect.
通过上述技术方案,可以在第一页面系统中安装前端功能包,该前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数,从而后续可以通过该自定义页面嵌入标签和前端功能包将第二页面嵌入第一页面系统。由此,可以不依赖浏览器原生的Iframe标签进行页面嵌入,从而可以解决通过Iframe标签进行页面嵌入而存在的资源加载问题。并且,通过调用前端功能包得到的页面模块实例,其消息接口可以通过非字符串的形式进行消息传递,从而使得第一页面系统与待嵌入的第二页面之间可以通过非字符串的形式进行消息传递,进而实现更复杂的页面消息交互逻辑,满足不同场景下的使用需求。Through the above technical solution, the front-end function package can be installed in the first page system. The front-end function package encapsulates the function functions required in the page embedding process and is called through the custom page embedding tag, so that the user can subsequently use the custom page The embed tag and the front-end feature pack embed the second page into the first page system. Thus, page embedding can be performed without relying on the native Iframe tag of the browser, thereby solving the resource loading problem existing in page embedding through the Iframe tag. Moreover, the message interface of the page module instance obtained by calling the front-end function package can be transmitted in the form of a non-string, so that the communication between the first page system and the second page to be embedded can be carried out in the form of a non-string Message passing, and then realize more complex page message interaction logic, to meet the usage requirements in different scenarios.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.
附图说明Description of drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the attached picture:
图1是根据本公开一示例性实施例示出的一种页面嵌入方法的流程图;Fig. 1 is a flowchart of a page embedding method according to an exemplary embodiment of the present disclosure;
图2是根据本公开一示例性实施例示出的一种页面嵌入装置的框图;Fig. 2 is a block diagram of a page embedding device according to an exemplary embodiment of the present disclosure;
图3是根据本公开一示例性实施例示出的一种电子设备的框图。Fig. 3 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method implementations of the present disclosure may be executed in different orders, and/or executed in parallel. Additionally, method embodiments may include additional steps and/or omit performing illustrated steps. The scope of the present disclosure is not limited in this respect.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "comprise" and its variations are open-ended, ie "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one further embodiment"; the term "some embodiments" means "at least some embodiments." Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。另外需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the sequence of functions performed by these devices, modules or units or interdependence. In addition, it should be noted that the modifications of "a" and "plurality" mentioned in the present disclosure are illustrative and not restrictive. Those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "a or more".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are used for illustrative purposes only, and are not used to limit the scope of these messages or information.
正如背景技术所言,相关技术中,如果想要在页面系统中嵌入另一页面,主要是通过浏览器原生提供的Iframe标签实现的。但是,Iframe是浏览器十多年前推出的老技术,随着行业的技术更新迭代,通过Iframe标签进行页面嵌入,在现阶段的背景下也暴露了许多问题。比如性能瓶颈,每次在嵌入页面和被嵌入页面之间切换时都需要重新完整加载页面资源,导致资源加载效率过慢。并且由于浏览器使用的是进程间通信,而进程间通信在计算机底层实现上限制了只能使用序列化的字符串形式,因此待嵌入的页面和被嵌入的页面之间只能通过可序列化的字符串形式进行消息交互,消息传递的格式受限,无法灵活满足各种场景下的使用需求。As mentioned in the background art, in related technologies, if you want to embed another page in the page system, it is mainly realized through the Iframe tag natively provided by the browser. However, Iframe is an old technology launched by browsers more than ten years ago. With the industry's technology updates and iterations, page embedding through Iframe tags has exposed many problems in the current background. For example, the performance bottleneck, every time you switch between the embedded page and the embedded page, you need to reload the page resources completely, resulting in slow resource loading efficiency. And because the browser uses inter-process communication, and inter-process communication is limited to the use of serialized strings in the underlying implementation of the computer, so the page to be embedded and the page to be embedded can only be serialized Message interaction in the form of character strings, and the format of message transmission is limited, which cannot flexibly meet the usage requirements in various scenarios.
发明人研究发现,相关技术中还存在通过portal标签的另一种页面嵌入方式。具体地,可以对portal标签附上一个src属性,而属性对应的值就是期望嵌入的子系统页面,这样可以在需要嵌入子页面的系统中的任意位置放置这标签,实现页面嵌入。但是此种方式依然没有解决Iframe标签无法传递非字符串类型数据的问题,并且嵌入方与被嵌入系统想要建立消息通信的前提是保证两者的域名完全一致。也即是说,通过portal标签的方式也存在嵌入方与被嵌入系统之间通信受限的问题。The inventor found through research that there is another page embedding method through the portal tag in the related art. Specifically, a src attribute can be attached to the portal tag, and the value corresponding to the attribute is the subsystem page to be embedded. In this way, the tag can be placed anywhere in the system that needs to embed the subpage to realize page embedding. However, this method still does not solve the problem that the Iframe tag cannot transmit non-string type data, and the premise that the embedding party and the embedded system want to establish message communication is to ensure that the domain names of the two are exactly the same. That is to say, there is also the problem of limited communication between the embedding party and the embedded system through the portal tag.
有鉴于此,本公开提供一种页面嵌入方法,以通过自定义页面嵌入标签实现页面嵌入,解决通过Iframe标签进行页面嵌入而存在的资源加载问题,并实现嵌入方和被嵌入系统之间的非字符串消息传递,提升页面嵌入的场景适用性。In view of this, the present disclosure provides a page embedding method to implement page embedding by customizing page embedding tags, solve the resource loading problem existing in page embedding through Iframe tags, and realize the non-uniformity between the embedding party and the embedded system. String messaging improves the applicability of page embedding scenarios.
图1是根据本公开一示例性实施例示出的一种页面嵌入方法的流程图。参照图1,该页面嵌入方法包括:Fig. 1 is a flowchart of a page embedding method according to an exemplary embodiment of the present disclosure. Referring to Figure 1, the page embedding method includes:
步骤101,在第一页面系统中安装前端功能包,该前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数。 Step 101, install the front-end function package in the first page system, the front-end function package encapsulates the functions required in the page embedding process and called by custom page embedding tags.
步骤102,获取待嵌入的第二页面的页面地址。 Step 102, obtaining the page address of the second page to be embedded.
步骤103,根据第二页面的页面地址确定自定义页面嵌入标签的参数,并通过传入参数后的自定义页面嵌入标签调用前端功能包,以得到页面模块实例,该页面模块实例的消息接口支持通过非字符串的形式进行消息传递。Step 103: Determine the parameters of the custom page embed tag according to the page address of the second page, and call the front-end function package through the custom page embed tag after passing in the parameters to obtain a page module instance whose message interface supports Message passing in non-string form.
步骤104,通过页面模块实例将第二页面嵌入第一页面系统。 Step 104, embedding the second page into the first page system through the page module instance.
示例地,前端功能包可以预先封装有页面嵌入过程所需的、通过自定义页面嵌入标签调用的功能函数,比如页面资源加载函数等。因此在第一页面系统中安装前端功能包后,可以调用页面资源加载函数进行资源加载。也即是说可以提前加载好对应的资源,从而在每次页面切换过程中无需重新进行资源加载,可以解决通过Iframe标签进行页面嵌入而存在的资源加载问题。应当理解的是,前端功能包中的功能函数可以根据实际情况设定,可以包括各种类型的微前端基础功能函数,本公开实施对此不作限定。Exemplarily, the front-end function package may be pre-packaged with functions required by the page embedding process and invoked through custom page embedding tags, such as page resource loading functions and the like. Therefore, after the front-end function package is installed in the first page system, the page resource loading function can be called to load resources. That is to say, the corresponding resources can be loaded in advance, so that there is no need to reload resources during each page switching process, which can solve the problem of resource loading existing in page embedding through Iframe tags. It should be understood that the function functions in the front-end function package may be set according to the actual situation, and may include various types of micro-front-end basic function functions, which are not limited in the implementation of the present disclosure.
在第一页面系统安装前端功能包后,可以获取待嵌入的第二页面的页面地址,比如可以从显示有第二页面的浏览器的地址栏中获取第二页面的页面地址,本公开实施例对此不作限定。然后,可以根据第二页面的页面地址确定自定义页面嵌入标签的参数。After the front-end function package is installed in the first page system, the page address of the second page to be embedded can be obtained, for example, the page address of the second page can be obtained from the address bar of the browser displaying the second page, the embodiment of the present disclosure There is no limit to this. Then, parameters of the custom page embedding tag can be determined according to the page address of the second page.
示例地,自定义页面嵌入标签可以理解为是用于调用前端功能包中预先封装的功能函数的超文本标记语言HTML标签。也即是说,本公开实施例,自定义了一种HTML标签,并预先设置了与该HTML标签对应的前端功能包,从而可以通过调用该前端功能包中的功能函数完成该自定义页面嵌入标签对应的页面显示功能。并且,应当理解的是,相关技术中用户在使用传统的Iframe方案嵌入一个页面时,在最理想的情况下(不需要有嵌入方和被嵌入方的业务通信以及一些特定的业务逻辑),被嵌入方不需要进行任何的改造,只需在嵌入时向Iframe标签的src接口属性传递被嵌入页面的地址即可。同理,本公开实施例中,在最理想的情况下通过该自定义页面嵌入标签也能达到这样的效果,从而对于长期无人维护的历史系统,或者对于外部不可控的页面,可以实现零成本改造设计,减少页面嵌入的操作过程。Exemplarily, the custom page embedding tag can be understood as a hypertext markup language HTML tag used to call a pre-packaged function in the front-end function package. That is to say, in the embodiment of the present disclosure, a kind of HTML tag is customized, and a front-end function package corresponding to the HTML tag is preset, so that the custom page embedding can be completed by calling the function function in the front-end function package The page display function corresponding to the label. Moreover, it should be understood that when a user embeds a page using the traditional Iframe solution in related technologies, in the most ideal case (there is no need for business communication between the embedding party and the embedded party and some specific business logic), the The embedding party does not need to carry out any modification, and only needs to pass the address of the embedded page to the src interface attribute of the Iframe tag when embedding. Similarly, in the embodiment of the present disclosure, such an effect can also be achieved by embedding tags on the custom page in the most ideal case, so that for long-term unmaintained historical systems or for external uncontrollable pages, zero Cost transformation design, reducing the operation process of page embedding.
在可能的方式中,根据第二页面的页面地址确定自定义页面嵌入标签的参数可以是: 将第二页面的页面地址作为自定义页面嵌入标签的参数;或者,根据第二页面的页面地址进行资源解析,得到已完成资源解析的结构化数据地址,并将结构化数据地址作为自定义页面嵌入标签的参数。In a possible manner, determining the parameters of the custom page embed tag according to the page address of the second page may be: using the page address of the second page as the parameter of the custom page embed tag; or, according to the page address of the second page. Resource parsing, obtain the structured data address of the completed resource parsing, and use the structured data address as a parameter of the custom page embedding tag.
应当理解的是,传统的HTML解析需要内置HTML代码解析器,解析器将会带来更多代码并在运行时进行解析,而在运行时即使只是增加一行代码都会带来额外的性能消耗。并且解析器将会逐句逐字解析用户传入HTML文件,这进一步增加了额外的性能开销。因此,本公开实施例可以通过传递已完成资源解析的结构化数据地址来减少性能消耗。It should be understood that traditional HTML parsing requires a built-in HTML code parser, and the parser will bring more codes to be parsed at runtime, and even just adding a line of code at runtime will bring additional performance consumption. And the parser will parse the user's incoming HTML file sentence by sentence, which further increases additional performance overhead. Therefore, the embodiments of the present disclosure can reduce performance consumption by passing the address of the structured data that has completed resource resolution.
示例地,可以通过引用同一个处理函数将运行时的解析代价转到编译时完成,从而既可以保证编译时解析得到的内容与运行时解析得到的内容没有差别,又可以减少运行性能消耗。另外,可以通过PuzzleWebpackPlugin通用执行函数,通过较少的代码编写使得页面嵌入过程中支持直接传递已完成资源解析的结构化数据地址。由此,既可以降低运行成本,又可以提升代码运行性能。For example, by referring to the same processing function, the runtime parsing cost can be transferred to compile time, so as to ensure that there is no difference between the content parsed at compile time and the content parsed at runtime, and reduce runtime performance consumption. In addition, the general execution function of PuzzleWebpackPlugin can be used to enable direct transmission of the structured data address of the completed resource analysis during the page embedding process with less code writing. As a result, the running cost can be reduced and the code running performance can be improved.
例如,自定义嵌入标签命名为magic-portal标签,待嵌入的第二页面的页面地址为https://example.com/,则可以按照如下方式将第二页面的页面地址作为自定义嵌入标签的参数:<magic-portal html="https://example.com/"></magic-portal>。或者,可以先根据第二页面的页面地址进行资源解析,得到已完成资源解析的结构化地址,然后按照如下方式将该结构化数据地址作为自定义页面嵌入标签的参数:<magic-portal manifest="https://example.com/puzzle-manifest.json"></magic-portal>。由此,自定义嵌入标签除了可以通过html字段直接引入第二页面的页面地址外,还可以通过manifest字段传递一个已经完成资源解析的结构化数据地址,减少性能运行消耗。For example, if the custom embedded tag is named magic-portal tag, and the page address of the second page to be embedded is https://example.com/, then the page address of the second page can be used as the custom embedded tag in the following manner Parameters: <magic-portal html="https://example.com/"></magic-portal>. Or, you can first perform resource analysis based on the page address of the second page to obtain the structured address of the completed resource analysis, and then use the structured data address as a parameter of the custom page embedding tag in the following manner: <magic-portal manifest= "https://example.com/puzzle-manifest.json"></magic-portal>. Therefore, in addition to directly introducing the page address of the second page through the html field, the custom embedded tag can also pass a structured data address that has completed resource parsing through the manifest field, reducing performance and running consumption.
在根据第二页面的页面地址确定自定义页面嵌入标签的参数后,即对自定义页面嵌入标签传入对应参数后,可以通过该自定义页面嵌入标签调用前端功能包,以得到页面模块实例,其中该页面模块实例的消息接口支持通过非字符串的形式进行消息传递。After determining the parameters of the custom page embed tag according to the page address of the second page, that is, after passing in the corresponding parameters to the custom page embed tag, the front-end function package can be called through the custom page embed tag to obtain a page module instance, The message interface of the page module instance supports message transmission in the form of non-character strings.
应当理解的是,相关技术中通过Iframe标签进行页面嵌入,在消息传递过程中主要是复用了浏览器早期的message事件提供的消息通信能力,来完成事件的数据传递。因此,在Iframe嵌入方案中,嵌入方和被嵌入方都可以通过派发message事件并附带上相应的特定的业务数据,或者监听是否有其他人派发了message事件以获取到对方附带的数据完成一些特定的行为。但是,此种方式由于使用的是进程间通信,而进程间通信在计算机底层实现上限制了只能使用序列化的字符串形式,因此待嵌入页面和被嵌入页面之间只能通过可序列化的字符串形式进行消息交互,消息传递的格式受限,无法灵活满足各种场景下的使用需求。It should be understood that in the related art, the page embedding is performed through the Iframe tag, and the message communication capability provided by the early message event of the browser is mainly reused in the process of message transmission to complete the data transmission of the event. Therefore, in the Iframe embedding scheme, both the embedder and the embedded party can dispatch message events with corresponding specific business data, or listen to whether someone else dispatches message events to obtain the data attached to the other party to complete some specific tasks. the behavior of. However, because this method uses inter-process communication, and inter-process communication is limited to the use of serialized strings in the underlying implementation of the computer, so the link between the page to be embedded and the page to be embedded can only be serialized Message interaction in the form of character strings, and the format of message transmission is limited, which cannot flexibly meet the usage requirements in various scenarios.
而本公开实施例中,可以在事件派发机制中,即事件通信过程中,结合内存管理机制, 打破原有事件派发的约束,能够通过简单的接口方法派发任意的自定义事件。由此,传递的数据格式将不再受到限制,比如非字符串类型且无法正常完成序列化的指针类数据,也可以通过这样的方式完成传递。However, in the embodiments of the present disclosure, in the event dispatch mechanism, that is, in the event communication process, combined with the memory management mechanism, the constraints of the original event dispatch can be broken, and any custom event can be dispatched through a simple interface method. As a result, the format of the transferred data will no longer be restricted. For example, pointer data that is not a string type and cannot be serialized normally can also be transferred in this way.
在可能的方式中,可以通过页面模块实例的第一消息接口和事件派发机制向第二页面传递message事件,其中在派发事件时将待传递的message事件存入内存,以便第二页面从内存中获取message事件。或者,通过页面模块实例的第二消息接口和事件派发机制监听第二页面传递的message事件,其中第二页面在派发事件时将待传递的message事件存入内存,以便第一页面系统在接收事件时从内存中获取message事件。In a possible way, the message event can be delivered to the second page through the first message interface of the page module instance and the event dispatching mechanism, wherein the message event to be delivered is stored in the memory when the event is dispatched, so that the second page can retrieve the message from the memory Get the message event. Or, listen to the message event passed by the second page through the second message interface and the event dispatching mechanism of the page module instance, wherein the second page stores the message event to be transferred in the memory when dispatching the event, so that the first page system receives the event Get the message event from the memory at the time.
例如,如果期望从被嵌入的第一页面系统向嵌入的第二页面传递message事件,则可以通过页面模块实例的postMessage接口(即第一消息接口)和事件派发机制向第二页面传递message事件,其中在派发事件时可以将待传递的message事件存入内存,以便第二页面从内存中获取message事件。或者,如果期望被嵌入的第一页面系统监听来自嵌入的第二页面的message事件,则可以通过页面模块实例的addEventListener接口(即第二消息接口)和事件派发机制监听第二页面传递的message事件,其中第二页面在派发事件时可以将待传递的message事件存入内存,以便第一页面系统在接收事件时从内存中获取message事件。由此,第一页面系统和第二页面之间可以通过内存管理机制实现消息传递,从而可以解决第一页面系统和第二页面之间的通信受限问题。For example, if it is desired to pass a message event from the embedded first page system to the embedded second page, the message event can be passed to the second page through the postMessage interface of the page module instance (that is, the first message interface) and the event dispatch mechanism, The message event to be delivered can be stored in the memory when the event is dispatched, so that the second page can obtain the message event from the memory. Or, if the embedded first page system is expected to listen to the message event from the embedded second page, you can listen to the message event delivered by the second page through the addEventListener interface of the page module instance (that is, the second message interface) and the event dispatch mechanism , where the second page can store the message event to be delivered in the memory when dispatching the event, so that the system of the first page can obtain the message event from the memory when receiving the event. Thus, the memory management mechanism can be used to implement message transmission between the first page system and the second page, thereby solving the problem of communication limitation between the first page system and the second page.
在实际应用中,除了message事件,还可能需要传递其他类型的自定义事件。对此,本公开实施例提供了针对该自定义事件的第三消息接口和第四消息接口,以通过不同类型的消息接口进行对应数据类型的消息传递,从而提升消息传递效率。In practical applications, in addition to the message event, other types of custom events may also need to be delivered. In this regard, the embodiments of the present disclosure provide a third message interface and a fourth message interface for the custom event, so as to perform message transmission of corresponding data types through different types of message interfaces, thereby improving message transmission efficiency.
也即是说,在可能的方式中,可以通过页面模块实例的第三消息接口和事件派发机制向第二页面传递除message事件外的页面消息,其中在派发事件时可以将待传递的页面消息存入内存,以便第二页面从内存中获取页面消息。或者,通过页面模块实例的第四消息接口和事件派发机制监听第二页面传递的、除message事件外的页面消息,其中第二页面在派发事件时可以将待传递的页面消息存入内存,以便第一页面系统在接收事件时从内存中获取页面消息。That is to say, in a possible manner, page messages other than the message event can be delivered to the second page through the third message interface of the page module instance and the event delivery mechanism, wherein the page message to be delivered can be sent when the event is delivered Stored in memory so that the second page gets page messages from memory. Or, monitor the page messages delivered by the second page, except the message event, through the fourth message interface and the event dispatching mechanism of the page module instance, wherein the second page can store the page message to be delivered in the memory when dispatching the event, so that The first page system fetches page messages from memory when an event is received.
例如,如果期望从被嵌入的第一页面系统向嵌入的第二页面传递通用的自定义事件,则可以通过页面模块实例的通用emitEvent接口(即第三消息接口)和事件派发机制向第二页面传递该自定义事件,其中在派发事件时可以将待传递的自定义事件存入内存,以便第二页面从内存中获取该自定义事件。或者,如果期望被嵌入的第一页面系统监听来自嵌入的第二页面的自定义事件,则可以通过页面模块实例的通过addPortalEventListener接口(即第四消息接口)和事件派发机制监听第二页面传递的该自定义事件,其中第二页面在派发 事件时可以将待传递的自定义事件存入内存,以便第一页面系统在接收事件时从内存中获取该自定义事件。For example, if it is desired to pass a general custom event from the embedded first page system to the embedded second page, the second page can be sent to the second page through the general emitEvent interface (ie, the third message interface) Pass the custom event, where the custom event to be passed can be stored in memory when the event is dispatched, so that the second page can obtain the custom event from the memory. Or, if it is desired that the embedded first page system listens to custom events from the embedded second page, you can listen to the second page delivered by the page module instance through the addPortalEventListener interface (that is, the fourth message interface) and the event dispatch mechanism. The custom event, wherein the second page can store the custom event to be delivered in memory when dispatching the event, so that the system of the first page can obtain the custom event from the memory when receiving the event.
由此,第一页面系统和第二页面之间可以通过内存管理机制实现自定义事件的消息传递,既可以满足各种场景下的页面通信需求,又可以解决页面之间的通信受限问题。As a result, the message transmission of custom events can be realized between the first page system and the second page through the memory management mechanism, which can not only meet the page communication requirements in various scenarios, but also solve the problem of limited communication between pages.
应当理解的是,在可能的方式,第三消息接口和第四消息接口也可以用于传递message事件,但第一消息接口和第二消息接口可以仅用于传递message事件。另外,页面模块实例除了可以提供各种消息接口供第一页面系统向第二页面传递消息或监听来自第二页面的消息外,还可以在页面模块实例的全局环境中,注入全局接口对象,以便页面模块实例具备从第二页面向第一页面系统传递消息或监听来自第一页面系统的消息的能力。比如,可以通过页面模块实例上的第五消息接口由第二页面向第一页面系统传递消息数据或者第二页面可以通过页面模块实例上的第六消息接口监听来自第一页面系统触发的事件。It should be understood that, in a possible manner, the third message interface and the fourth message interface may also be used to transmit message events, but the first message interface and the second message interface may only be used to transmit message events. In addition, in addition to providing various message interfaces for the first page system to transmit messages to the second page or monitor messages from the second page, the page module instance can also inject global interface objects into the global environment of the page module instance, so that The page module instance has the capability of transmitting messages from the second page to the first page system or monitoring messages from the first page system. For example, the second page can transmit message data to the first page system through the fifth message interface on the page module instance, or the second page can listen to events triggered by the first page system through the sixth message interface on the page module instance.
在实际应用中,一个前端系统的各部分内容或者功能,很多时候都是通过路由或者页面跳转完成切换或者调度的,并且在页面切换和跳转的同时,往往都会伴随着浏览器地址栏中的地址变化。例如,商业化平台有一个收银台系统,支撑支付相关的业务逻辑,往往完成一个完整的支付流程,大体都需要经过以下几个页面的跳转:订单页面确认信息、银行卡页面输入支付方式等数据、支付完成页面,每个页面通常都会有自己的页面地址并根据用户的操作(下一步或返回上一步)完成跳转。或者,在前端页面中,通过路由跳转进行功能的切换及导航。In practical applications, the content or functions of various parts of a front-end system are often switched or scheduled through routing or page jumps, and at the same time as page switching and jumping, they are often accompanied by the content in the browser address bar. address change. For example, a commercial platform has a cash register system that supports payment-related business logic, and often completes a complete payment process, which generally requires jumping through the following pages: confirmation information on the order page, input payment method on the bank card page, etc. Data and payment completion pages, each page usually has its own page address and completes the jump according to the user's operation (next step or return to the previous step). Or, on the front-end page, switch functions and navigate through routing jumps.
但是路由跳转在许多时候会有不符合预期的表现,比如在一个类似商城平台的系统页面中,收银台系统只是作为被调用的第三方模块被嵌入在商城平台的页面中,可能只是页面中的一小部分,或者仅仅是一个弹窗,此时商城页面的地址是商品的链接。如果唤起了收银台模块或进行了一些收银台操作导致页面地址发生了变化,往往是不符合预期的,因为页面的大部分内容还是商品详情,而因为页面中的小部分内容(即收银台模块)导致浏览器的地址发生了变化,反而并不是贴合用户的使用直觉。因此,嵌入方和被嵌入方之间的路由隔离,是有必要的。However, routing jumps may not meet expectations in many cases. For example, in a system page similar to a mall platform, the cash register system is only embedded in the page of the mall platform as a called third-party module. A small part of , or just a pop-up window, at this time the address of the mall page is a link to the product. If the cashier module is evoked or some cashier operations cause the page address to change, it is often not as expected, because most of the content on the page is still product details, and because a small part of the content on the page (that is, the cashier module ) causes the address of the browser to change, which is not in line with the user's intuition. Therefore, routing isolation between the embedded party and the embedded party is necessary.
而相关技术中的微前端方案,大都期望在任何情况下嵌入方和被嵌入方的地址都保持一致。有鉴于此,本公开实施例为了支持不同业务系统下的前端路由场景,提供了路由隔离与路由不隔离两种策略,在本公开实施过程中可以通过参数进行配置,以确定路由隔离与路由不隔离。Most of the micro-frontend solutions in related technologies expect the addresses of the embedding party and the embedded party to be consistent under any circumstances. In view of this, in order to support front-end routing scenarios under different business systems, the embodiments of the present disclosure provide two strategies of route isolation and route non-isolation, which can be configured through parameters during the implementation of the present disclosure to determine route isolation and route non-isolation isolation.
在可能的方式中,可以先获取路由参数,该路由参数用于表征第一页面系统和第二页面的路由状态,该路由状态包括路由隔离开启状态或路由隔离关闭状态。若路由参数表征的是路由隔离开启状态,则确定第二页面的自定义路由信息,并根据自定义路由信息控制 第二页面的路由,以使第二页面嵌入第一页面系统后第二页面的路由与第一页面系统的路由不同。若路由参数表征的是路由隔离关闭状态,则根据第一页面系统的路由信息控制第二页面的路由,以使第二页面嵌入第一页面系统后第二页面的路由与第一页面系统的路由相同。In a possible manner, the routing parameter may be obtained first, and the routing parameter is used to represent the routing status of the first page system and the second page, and the routing status includes a routing isolation enabled state or a routing isolation disabled state. If the routing parameter indicates that the routing isolation is enabled, then determine the custom routing information of the second page, and control the routing of the second page according to the custom routing information, so that after the second page is embedded in the system of the first page, the The routing is different from the routing of the first page system. If the route parameter represents the route isolation closed state, then control the route of the second page according to the route information of the first page system, so that after the second page is embedded in the first page system, the route of the second page is the same as the route of the first page system same.
也即是说,自定义页面嵌入标签可以具有路由参数,从而通过在自定义页面嵌入标签中配置该路由参数,确定第一页面系统和第二页面的路由状态。示例地,可以设定配置了路由参数,则确定第一页面系统和第二页面的路由状态为路由隔离开启状态,反之若没有配置路由参数,则确定第一页面系统和第二页面的路由状态为路由隔离关闭状态。比如,自定义页面嵌入标签为命名为magic-portal标签,若按照如下方式配置了路由参数history-isolation,则可以确定第一页面系统和第二页面的路由状态为路由隔离开启状态:<magic-portal history-isolation></magic-portal>。反之,若没有配置路由参数history-isolation,则可以确定第一页面系统和第二页面的路由状态为路由隔离关闭状态。That is to say, the custom page embed tag can have a routing parameter, so that the routing status of the first page system and the second page can be determined by configuring the routing parameter in the custom page embed tag. For example, if routing parameters are configured, it is determined that the routing status of the first page system and the second page is the route isolation enabled state; otherwise, if no routing parameters are configured, then the routing status of the first page system and the second page is determined Isolation off state for routing. For example, the embedded tag of the custom page is named magic-portal tag. If the routing parameter history-isolation is configured as follows, it can be determined that the routing status of the system on the first page and the routing status of the second page are route isolation enabled: <magic- portal history-isolation></magic-portal>. Conversely, if the routing parameter history-isolation is not configured, the routing status of the system on the first page and the routing status of the second page can be determined as routing isolation disabled.
在获取路由参数后,若路由参数表征的是路由隔离开启状态,则可以确定第二页面的自定义路由信息,并根据该自定义路由信息控制第二页面的路由,以使第二页面嵌入第一页面系统后第二页面的路由与第一页面系统的路由不同。其中,自定义路由信息用于表征第二页面的路由信息,可以是在获取第二页面的页面地址时获取到的,本公开实施例对此不作限定。然后,在路由隔离开启的情况下,通过该自定义路由信息可以使得第二页面嵌入第一页面系统后第二页面的路由与第一页面系统的路由不同。由此,在第二页面嵌入后,第一页面系统在浏览器地址栏中显示的页面地址可以不发生改变,减少页面嵌入对第一页面系统的影响,提升用户观感。After obtaining the routing parameters, if the routing parameters indicate that the routing isolation is enabled, the custom routing information of the second page can be determined, and the routing of the second page can be controlled according to the custom routing information, so that the second page embeds the second page. The route of the second page after the first page system is different from the route of the first page system. Wherein, the custom routing information is used to represent the routing information of the second page, and may be obtained when the page address of the second page is obtained, which is not limited in this embodiment of the present disclosure. Then, when the route isolation is turned on, the custom route information can make the route of the second page after the second page is embedded in the first page system different from the route of the first page system. Therefore, after the second page is embedded, the page address displayed by the first page system in the address bar of the browser may not change, which reduces the impact of page embedding on the first page system and improves user perception.
若路由参数表征的是路由隔离关闭状态,则可以根据第一页面系统的路由信息控制第二页面的路由,以使第二页面嵌入第一页面系统后第二页面的路由与第一页面系统的路由相同。应当理解的是,在此种情况下,第二页面可以声明自身在第一页面系统上的命名空间namespace,从而第二页面的路由可以和第一页面系统保持一致,否则可能存在路由过程中第二页面将找不到页面资源的问题。比如,第一页面系统完成了/home到/about的切换,第二页面也会同样执行这一过程,但如果第二页面没有实现/about页面,则找不到对应的页面。在此种情况下,若第二页面预先在第一页面系统上维护了自身的命名空间namespace,则路由过程中可以针对第二页面和第一页面系统对应的相同页面进行路由同步,反之则不进行路由同步,从而避免第二页面找不到页面资源的问题。If the route parameter represents the route isolation closed state, the route of the second page can be controlled according to the route information of the first page system, so that after the second page is embedded in the first page system, the route of the second page is the same as that of the first page system. Routing is the same. It should be understood that in this case, the second page can declare its own namespace namespace on the first page system, so that the routing of the second page can be consistent with the first page system, otherwise there may be a second page in the routing process. The second page will not find the page resource problem. For example, the system on the first page has completed the switch from /home to /about, and the second page will also perform the same process, but if the second page does not implement the /about page, the corresponding page cannot be found. In this case, if the second page maintains its own namespace namespace on the first page system in advance, the routing process can be synchronized for the same page corresponding to the second page and the first page system, and vice versa. Perform routing synchronization to avoid the problem that the second page cannot find page resources.
接下来,可以根据页面模块实例将第二页面嵌入第一页面系统。在可能的方式中,可以先获取针对第二页面的自定义显示参数,然后将自定义显示参数传入页面模块实例,得到目标页面模块实例,最后根据该目标页面模块实例将第二页面嵌入第一页面系统。Next, the second page can be embedded into the first page system according to the page module instance. In a possible way, you can first obtain the custom display parameters for the second page, and then pass the custom display parameters into the page module instance to obtain the target page module instance, and finally embed the second page into the second page module instance according to the target page module instance One page system.
示例地,自定义显示参数用于定义第二页面嵌入第一页面系统后的显示样式或显示内容,可以根据实际情况设定,比如可以包括用于往第一页面系统中注入元数据的参数等,本公开实施例对此不作限定。在具体实施时,可以针对页面模块实例设定用于自定义显示的对外接口,并设定该对外接口的参数规则,从而后续根据该对外接口所需的参数传入对应的自定义显示参数,即获取针对第二页面的自定义显示参数,并将该自定义显示参数传入页面模块实例,可以实现对第二页面的自定义显示配置,满足各种场景下的页面嵌入需求。也即是说,本公开实施例可以通过页面模块实例提供的接口为页面模块实例追加定制化参数和配置信息,以实现自定义的能力或呈现。For example, the custom display parameters are used to define the display style or display content of the second page embedded in the first page system, which can be set according to the actual situation, such as including parameters for injecting metadata into the first page system, etc. , which is not limited in the embodiments of the present disclosure. In specific implementation, the external interface for custom display can be set for the page module instance, and the parameter rules of the external interface can be set, so that the corresponding custom display parameters can be passed in according to the parameters required by the external interface. That is, obtain the custom display parameters for the second page, and pass the custom display parameters into the page module instance, so as to realize the custom display configuration of the second page and meet the page embedding requirements in various scenarios. That is to say, the embodiment of the present disclosure can add customized parameters and configuration information to the page module instance through the interface provided by the page module instance, so as to realize customized capabilities or presentations.
在得到目标页面模块实例后,则可以根据目标页面模块实例将第二页面嵌入第一页面系统。在可能的方式中,可以先确定将页面模块实例置于第一页面系统的目标显示位置,然后在页面模块实例完成资源加载和初始化操作后,在第一页面系统的目标显示位置显示第二页面。After obtaining the target page module instance, the second page can be embedded into the first page system according to the target page module instance. In a possible manner, it is possible to first determine to place the page module instance at the target display position of the first page system, and then display the second page at the target display position of the first page system after the page module instance completes resource loading and initialization operations .
示例地,目标显示位置可以是根据实际情况设定得到,本公开实施例对此不作限定。应当理解的是,本公开实施例中,针对自定义页面嵌入标签预先封装有前端功能包,因此将页面模块实例放置于被嵌入页面的任意所需位置,该页面模块实例会自动完成资源加载及内部初始化,从而在页面模块实例完成资源加载和初始化操作后,可以在第一页面系统的目标显示位置显示第二页面。由此,可以通过自定义页面嵌入标签实现页面嵌入,解决通过Iframe标签进行页面嵌入而存在的资源加载问题,并实现嵌入方和被嵌入系统之间的非字符串消息传递,提升页面嵌入的场景适用性。For example, the target display position may be set according to actual conditions, which is not limited in this embodiment of the present disclosure. It should be understood that in the embodiment of the present disclosure, a front-end function package is pre-packaged for custom page embedding tags, so the page module instance is placed in any desired position of the embedded page, and the page module instance will automatically complete resource loading and Internal initialization, so that after the resource loading and initialization operations of the page module instance are completed, the second page can be displayed at the target display position of the first page system. As a result, page embedding can be realized by customizing the page embedding tag, solving the resource loading problem existing in page embedding through Iframe tags, and realizing non-string message transmission between the embedding party and the embedded system, improving the scene of page embedding applicability.
基于同一发明构思,本公开实施例提供一种页面嵌入装置,该装置可以通过软件、硬件或者两者结合的方式成为电子设备的部分或全部。参照图2,该页面嵌入装置200包括:Based on the same inventive concept, an embodiment of the present disclosure provides a page embedding device, which can become part or all of an electronic device through software, hardware or a combination of both. Referring to FIG. 2, the page embedding device 200 includes:
安装模块201,用于在第一页面系统中安装前端功能包,所述前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数;The installation module 201 is used to install the front-end function package in the first page system, and the front-end function package encapsulates the function functions required in the page embedding process and called by custom page embedding tags;
获取模块202,用于获取待嵌入的第二页面的页面地址;Obtaining module 202, configured to obtain the page address of the second page to be embedded;
调用模块203,用于根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,并通过传入所述参数后的自定义页面嵌入标签调用所述前端功能包,以得到页面模块实例,其中所述页面模块实例的消息接口支持通过非字符串的形式进行消息传递;The calling module 203 is configured to determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain the page A module instance, wherein the message interface of the page module instance supports message transmission in the form of a non-character string;
嵌入模块204,用于通过所述页面模块实例将所述第二页面嵌入所述第一页面系统。The embedding module 204 is configured to embed the second page into the first page system through the page module instance.
可选地,所述装置200还包括:Optionally, the device 200 also includes:
第一通信模块,用于在得到所述页面模块实例后,通过所述页面模块实例的第一消息接口和事件派发机制向所述第二页面传递message事件,其中在派发事件时将待传递的所述message事件存入内存,以便所述第二页面从内存中获取所述message事件;The first communication module is configured to transmit the message event to the second page through the first message interface and the event distribution mechanism of the page module instance after obtaining the page module instance, wherein the message event to be transmitted is sent when the event is dispatched The message event is stored in the memory, so that the second page obtains the message event from the memory;
第二通信模块,用于通过所述页面模块实例的第二消息接口和事件派发机制监听所述第二页面传递的message事件,其中所述第二页面在派发事件时将待传递的所述message事件存入内存,以便所述第一页面系统在接收事件时从内存中获取所述message事件。The second communication module is configured to listen to the message event delivered by the second page through the second message interface of the page module instance and the event distribution mechanism, wherein the second page will send the message to be delivered when the event is dispatched The event is stored in the memory, so that the first page system obtains the message event from the memory when receiving the event.
可选地,所述装置200还包括:Optionally, the device 200 also includes:
第三通信模块,用于在得到所述页面模块实例后,通过所述页面模块实例的第三消息接口和事件派发机制向所述第二页面传递除message事件外的页面消息,其中在派发事件时将待传递的所述页面消息存入内存,以便所述第二页面从内存中获取所述页面消息;The third communication module is configured to transmit page messages other than the message event to the second page through the third message interface and the event distribution mechanism of the page module instance after obtaining the page module instance, wherein the event is dispatched storing the page message to be delivered in the memory, so that the second page obtains the page message from the memory;
第四通信模块,用于通过所述页面模块实例的第四消息接口和事件派发机制监听所述第二页面传递的、除message事件外的页面消息,其中所述第二页面在派发事件时将待传递的所述页面消息存入内存,以便所述第一页面系统在接收事件时从内存中获取所述页面消息。The fourth communication module is configured to monitor the page messages delivered by the second page, except the message event, through the fourth message interface of the page module instance and the event distribution mechanism, wherein the second page will send the event when dispatching the event. The page message to be delivered is stored in memory, so that the first page system acquires the page message from memory when receiving an event.
可选地,所述装置200还包括:Optionally, the device 200 also includes:
第一参数获取模块,用于获取路由参数,所述路由参数用于表征所述第一页面系统和所述第二页面的路由状态,所述路由状态包括路由隔离开启状态或路由隔离关闭状态;A first parameter acquisition module, configured to acquire routing parameters, the routing parameters are used to characterize the routing status of the first page system and the second page, and the routing status includes a routing isolation enabled state or a routing isolation disabled state;
第一确定模块,用于当所述路由参数表征的是路由隔离开启状态时,确定所述第二页面的自定义路由信息,并根据所述自定义路由信息控制所述第二页面的路由,以使所述第二页面嵌入所述第一页面系统后所述第二页面的路由与所述第一页面系统的路由不同;The first determining module is configured to determine the custom routing information of the second page when the routing parameter indicates that the routing isolation is enabled, and control the routing of the second page according to the custom routing information, After the second page is embedded in the first page system, the route of the second page is different from the route of the first page system;
第二确定模块,用于当所述路由参数表征的是路由隔离关闭状态时,根据所述第一页面系统的路由信息控制所述第二页面的路由,以使所述第二页面嵌入所述第一页面系统后所述第二页面的路由与所述第一页面系统的路由相同。The second determining module is configured to control the routing of the second page according to the routing information of the first page system when the routing parameter indicates that the routing isolation is off, so that the second page is embedded in the The route of the second page after the first page system is the same as the route of the first page system.
可选地,所述调用模块203用于:Optionally, the calling module 203 is used for:
将所述第二页面的页面地址作为所述自定义页面嵌入标签的参数;或者using the page address of the second page as a parameter of the custom page embedding tag; or
根据所述第二页面的页面地址进行资源解析,得到已完成资源解析的结构化数据地址,并将所述结构化数据地址作为所述自定义页面嵌入标签的参数。Resource parsing is performed according to the page address of the second page to obtain a structured data address that has completed resource parsing, and the structured data address is used as a parameter of the custom page embedding tag.
可选地,所述装置200还包括:Optionally, the device 200 also includes:
第二参数获取模块,用于获取针对所述第二页面的自定义显示参数,并将所述自定义显示参数传入所述页面模块实例,得到目标页面模块实例;A second parameter acquisition module, configured to acquire custom display parameters for the second page, and pass the custom display parameters into the page module instance to obtain a target page module instance;
所述嵌入模块204用于:The embedded module 204 is used for:
根据所述目标页面模块实例将所述第二页面嵌入所述第一页面系统。Embedding the second page into the first page system according to the target page module instance.
可选地,所述嵌入模块204用于:Optionally, the embedding module 204 is used for:
确定将所述页面模块实例置于所述第一页面系统的目标显示位置;determining to place the page module instance at a target display position of the first page system;
在所述页面模块实例完成资源加载和初始化操作后,在所述第一页面系统的所述目标 显示位置显示所述第二页面。After the resource loading and initialization operations are completed by the page module instance, the second page is displayed at the target display position of the first page system.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
基于同一发明构思,本公开实施例还提供一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述任一页面嵌入方法的步骤。Based on the same inventive concept, an embodiment of the present disclosure further provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the above page embedding methods are implemented.
基于同一发明构思,本公开实施例还提供一种电子设备,包括:Based on the same inventive concept, an embodiment of the present disclosure also provides an electronic device, including:
存储器,其上存储有计算机程序;a memory on which a computer program is stored;
处理器,用于执行所述存储器中的所述计算机程序,以实现上述任一页面嵌入方法的步骤。A processor, configured to execute the computer program in the memory, so as to realize the steps of any page embedding method described above.
下面参考图3,其示出了适于用来实现本公开实施例的电子设备300的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图3示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 3 , it shows a schematic structural diagram of an electronic device 300 suitable for implementing an embodiment of the present disclosure. The terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like. The electronic device shown in FIG. 3 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
如图3所示,电子设备300可以包括处理器(例如中央处理器、图形处理器等)301,其可以根据存储在只读存储器(ROM)302中的程序或者从存储器308加载到随机访问存储器(RAM)303中的程序而执行各种适当的动作和处理。在RAM 303中,还存储有电子设备300操作所需的各种程序和数据。处理器301、ROM 302以及RAM 303通过总线304彼此相连。输入/输出(I/O)接口305也连接至总线304。As shown in FIG. 3 , an electronic device 300 may include a processor (such as a central processing unit, a graphics processing unit, etc.) (RAM) 303 to execute various appropriate actions and processing. In the RAM 303, various programs and data necessary for the operation of the electronic device 300 are also stored. The processor 301, ROM 302, and RAM 303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to the bus 304 .
通常,以下装置可以连接至I/O接口305:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置306;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置307;包括例如磁带、硬盘等的存储器308;以及通信装置309。通信装置309可以允许电子设备300与其他设备进行无线或有线通信以交换数据。虽然图3示出了具有各种装置的电子设备300,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices can be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibrating an output device 307 such as a computer; a memory 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data. While FIG. 3 shows electronic device 300 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置309从网络上被下载和安装,或者从存储器308被安装,或者从ROM 302被安装。在该计算机程序被处理器301执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 309, or from memory 308, or from ROM 302. When the computer program is executed by the processor 301, the above functions defined in the methods of the embodiments of the present disclosure are executed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机 可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) can be used to communicate, and can communicate with digital data in any form or medium (for example, communication network) interconnection. Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:在第一页面系统中安装前端功能包,所述前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数;获取待嵌入的第二页面的页面地址;根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,并通过传入所述参数后的自定义页面嵌入标签调用所述前端功能包,以得到页面模块实例,其中所述页面模块实例的消息接口支持通过非字符串的形式进行消息传递;通过所述页面模块实例将所述第二页面嵌入所述第一页面系统。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: installs a front-end function package in the first page system, and the front-end function package encapsulates The function function required in the page embedding process and called by the custom page embedding tag; obtaining the page address of the second page to be embedded; determining the parameters of the custom page embedding tag according to the page address of the second page, And call the front-end function package by passing in the custom page embedding tag after the parameters to obtain a page module instance, wherein the message interface of the page module instance supports message transmission in the form of a non-character string; through the A page module instance embeds the second page into the first page system.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包 执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" 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 cases involving a remote computer, the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定。The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation on the module itself under certain circumstances.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described herein above may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System on Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
根据本公开的一个或多个实施例,示例1提供了一种页面嵌入方法,所述方法包括:According to one or more embodiments of the present disclosure, Example 1 provides a page embedding method, the method comprising:
在第一页面系统中安装前端功能包,所述前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数;Installing the front-end function package in the first page system, the front-end function package encapsulates the function functions required in the page embedding process and called by the custom page embedding label;
获取待嵌入的第二页面的页面地址;Obtain the page address of the second page to be embedded;
根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,并通过传入所述 参数后的自定义页面嵌入标签调用所述前端功能包,以得到页面模块实例,其中所述页面模块实例的消息接口支持通过非字符串的形式进行消息传递;Determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain a page module instance, wherein the The message interface of the page module instance supports message passing in the form of non-string;
通过所述页面模块实例将所述第二页面嵌入所述第一页面系统。The second page is embedded into the first page system through the page module instance.
根据本公开的一个或多个实施例,示例2提供了示例1的方法,在得到所述页面模块实例后,所述方法还包括:According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1. After obtaining the page module instance, the method further includes:
通过所述页面模块实例的第一消息接口和事件派发机制向所述第二页面传递message事件,其中在派发事件时将待传递的所述message事件存入内存,以便所述第二页面从内存中获取所述message事件;Pass the message event to the second page through the first message interface of the page module instance and the event distribution mechanism, wherein when dispatching the event, store the message event to be transferred into the memory, so that the second page can retrieve the message from the memory Get the message event in;
通过所述页面模块实例的第二消息接口和事件派发机制监听所述第二页面传递的message事件,其中所述第二页面在派发事件时将待传递的所述message事件存入内存,以便所述第一页面系统在接收事件时从内存中获取所述message事件。Monitor the message event delivered by the second page through the second message interface of the page module instance and the event distribution mechanism, wherein the second page stores the message event to be delivered in memory when dispatching the event, so that The first page system obtains the message event from the memory when receiving the event.
根据本公开的一个或多个实施例,示例3提供了示例1或2的方法,在得到所述页面模块实例后,所述方法还包括:According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1 or 2. After obtaining the page module instance, the method further includes:
通过所述页面模块实例的第三消息接口和事件派发机制向所述第二页面传递除message事件外的页面消息,其中在派发事件时将待传递的所述页面消息存入内存,以便所述第二页面从内存中获取所述页面消息;Pass the page message except the message event to the second page through the third message interface of the page module instance and the event distribution mechanism, wherein when the event is dispatched, the page message to be transmitted is stored in the memory, so that the The second page obtains the page message from memory;
通过所述页面模块实例的第四消息接口和事件派发机制监听所述第二页面传递的、除message事件外的页面消息,其中所述第二页面在派发事件时将待传递的所述页面消息存入内存,以便所述第一页面系统在接收事件时从内存中获取所述页面消息。Through the fourth message interface of the page module instance and the event distribution mechanism, monitor the page message delivered by the second page, except for the message event, wherein the second page will send the page message to be delivered when the event is dispatched Stored in the memory, so that the first page system acquires the page message from the memory when receiving an event.
根据本公开的一个或多个实施例,示例4提供了示例1或2的方法,所述方法还包括:According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1 or 2, the method further comprising:
获取路由参数,所述路由参数用于表征所述第一页面系统和所述第二页面的路由状态,所述路由状态包括路由隔离开启状态或路由隔离关闭状态;Acquiring routing parameters, the routing parameters are used to characterize the routing status of the first page system and the second page, and the routing status includes a routing isolation enabled state or a routing isolation disabled state;
若所述路由参数表征的是路由隔离开启状态,则确定所述第二页面的自定义路由信息,并根据所述自定义路由信息控制所述第二页面的路由,以使所述第二页面嵌入所述第一页面系统后所述第二页面的路由与所述第一页面系统的路由不同;If the routing parameter indicates that the routing isolation is enabled, then determine the custom routing information of the second page, and control the routing of the second page according to the custom routing information, so that the second page After embedding the first page system, the route of the second page is different from the route of the first page system;
若所述路由参数表征的是路由隔离关闭状态,则根据所述第一页面系统的路由信息控制所述第二页面的路由,以使所述第二页面嵌入所述第一页面系统后所述第二页面的路由与所述第一页面系统的路由相同。If the routing parameter represents the routing isolation off state, then control the routing of the second page according to the routing information of the first page system, so that after the second page is embedded in the first page system, the The route of the second page is the same as the route of the first page system.
根据本公开的一个或多个实施例,示例5提供了示例1或2的方法,根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,包括:According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1 or 2, determining parameters of the custom page embedding tag according to the page address of the second page, including:
将所述第二页面的页面地址作为所述自定义页面嵌入标签的参数;或者using the page address of the second page as a parameter of the custom page embedding tag; or
根据所述第二页面的页面地址进行资源解析,得到已完成资源解析的结构化数据地址, 并将所述结构化数据地址作为所述自定义页面嵌入标签的参数。Resource parsing is performed according to the page address of the second page to obtain a structured data address that has completed resource parsing, and the structured data address is used as a parameter of the custom page embedding tag.
根据本公开的一个或多个实施例,示例6提供了示例1或2的方法,所述方法还包括:According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1 or 2, the method further comprising:
获取针对所述第二页面的自定义显示参数,并将所述自定义显示参数传入所述页面模块实例,得到目标页面模块实例;Acquire custom display parameters for the second page, and pass the custom display parameters into the page module instance to obtain a target page module instance;
根据所述页面模块实例将所述第二页面嵌入所述第一页面系统,包括:Embedding the second page into the first page system according to the page module instance includes:
根据所述目标页面模块实例将所述第二页面嵌入所述第一页面系统。Embedding the second page into the first page system according to the target page module instance.
根据本公开的一个或多个实施例,示例7提供了示例1或2的方法,根据所述页面模块实例将所述第二页面嵌入所述第一页面系统,包括:According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1 or 2, embedding the second page into the first page system according to the page module instance, including:
确定将所述页面模块实例置于所述第一页面系统的目标显示位置;determining to place the page module instance at a target display position of the first page system;
在所述页面模块实例完成资源加载和初始化操作后,在所述第一页面系统的所述目标显示位置显示所述第二页面。After the resource loading and initialization operations of the page module instance are completed, the second page is displayed at the target display position of the first page system.
根据本公开的一个或多个实施例,示例8提供了一种页面嵌入装置,所述装置包括:According to one or more embodiments of the present disclosure, Example 8 provides a page embedding device, the device comprising:
安装模块,用于在第一页面系统中安装前端功能包,所述前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数;The installation module is used to install the front-end function package in the first page system, and the front-end function package encapsulates the function functions required in the page embedding process and called by custom page embedding tags;
获取模块,用于获取待嵌入的第二页面的页面地址;An acquisition module, configured to acquire the page address of the second page to be embedded;
调用模块,用于根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,并通过传入所述参数后的自定义页面嵌入标签调用所述前端功能包,以得到页面模块实例,其中所述页面模块实例的消息接口支持通过非字符串的形式进行消息传递;The calling module is used to determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain the page module Instance, wherein the message interface of the page module instance supports message transmission in the form of non-character strings;
嵌入模块,用于通过所述页面模块实例将所述第二页面嵌入所述第一页面系统。An embedding module, configured to embed the second page into the first page system through the page module instance.
根据本公开的一个或多个实施例,示例9提供了一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现示例1-7中任一项所述方法的步骤。According to one or more embodiments of the present disclosure, Example 9 provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, any one of Examples 1-7 can be implemented. steps of the method described above.
根据本公开的一个或多个实施例,示例10提供了一种电子设备,包括:According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, comprising:
存储器,其上存储有计算机程序;a memory on which a computer program is stored;
处理器,用于执行所述存储器中的所述计算机程序,以实现示例1-7中任一项所述方法的步骤。A processor, configured to execute the computer program in the memory, so as to implement the steps of any one of the methods in Examples 1-7.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。 同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, while operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

Claims (10)

  1. 一种页面嵌入方法,其特征在于,所述方法包括:A page embedding method, characterized in that the method comprises:
    在第一页面系统中安装前端功能包,所述前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数;Installing the front-end function package in the first page system, the front-end function package encapsulates the function functions required in the page embedding process and called by the custom page embedding label;
    获取待嵌入的第二页面的页面地址;Obtain the page address of the second page to be embedded;
    根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,并通过传入所述参数后的自定义页面嵌入标签调用所述前端功能包,以得到页面模块实例,其中所述页面模块实例的消息接口支持通过非字符串的形式进行消息传递;Determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain a page module instance, wherein the The message interface of the page module instance supports message passing in the form of non-string;
    通过所述页面模块实例将所述第二页面嵌入所述第一页面系统。The second page is embedded into the first page system through the page module instance.
  2. 根据权利要求1所述的方法,其特征在于,在得到所述页面模块实例后,所述方法还包括:The method according to claim 1, wherein after obtaining the page module instance, the method further comprises:
    通过所述页面模块实例的第一消息接口和事件派发机制向所述第二页面传递message事件,其中在派发事件时将待传递的所述message事件存入内存,以便所述第二页面从内存中获取所述message事件;Pass the message event to the second page through the first message interface of the page module instance and the event distribution mechanism, wherein when dispatching the event, store the message event to be transferred into the memory, so that the second page can retrieve the message from the memory Get the message event in;
    通过所述页面模块实例的第二消息接口和事件派发机制监听所述第二页面传递的message事件,其中所述第二页面在派发事件时将待传递的所述message事件存入内存,以便所述第一页面系统在接收事件时从内存中获取所述message事件。Monitor the message event delivered by the second page through the second message interface of the page module instance and the event distribution mechanism, wherein the second page stores the message event to be delivered in memory when dispatching the event, so that The first page system obtains the message event from the memory when receiving the event.
  3. 根据权利要求1或2所述的方法,其特征在于,在得到所述页面模块实例后,所述方法还包括:The method according to claim 1 or 2, wherein after obtaining the page module instance, the method further comprises:
    通过所述页面模块实例的第三消息接口和事件派发机制向所述第二页面传递除message事件外的页面消息,其中在派发事件时将待传递的所述页面消息存入内存,以便所述第二页面从内存中获取所述页面消息;Pass the page message except the message event to the second page through the third message interface of the page module instance and the event distribution mechanism, wherein when the event is dispatched, the page message to be transmitted is stored in the memory, so that the The second page obtains the page message from memory;
    通过所述页面模块实例的第四消息接口和事件派发机制监听所述第二页面传递的、除message事件外的页面消息,其中所述第二页面在派发事件时将待传递的所述页面消息存入内存,以便所述第一页面系统在接收事件时从内存中获取所述页面消息。Through the fourth message interface of the page module instance and the event distribution mechanism, monitor the page message delivered by the second page, except for the message event, wherein the second page will send the page message to be delivered when the event is dispatched Stored in the memory, so that the first page system acquires the page message from the memory when receiving an event.
  4. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that the method further comprises:
    获取路由参数,所述路由参数用于表征所述第一页面系统和所述第二页面的路由状态,所述路由状态包括路由隔离开启状态或路由隔离关闭状态;Acquiring routing parameters, the routing parameters are used to characterize the routing status of the first page system and the second page, and the routing status includes a routing isolation enabled state or a routing isolation disabled state;
    若所述路由参数表征的是路由隔离开启状态,则确定所述第二页面的自定义路由信息,并根据所述自定义路由信息控制所述第二页面的路由,以使所述第二页面嵌入所述第一页面系统后所述第二页面的路由与所述第一页面系统的路由不同;If the routing parameter indicates that the routing isolation is enabled, then determine the custom routing information of the second page, and control the routing of the second page according to the custom routing information, so that the second page After embedding the first page system, the route of the second page is different from the route of the first page system;
    若所述路由参数表征的是路由隔离关闭状态,则根据所述第一页面系统的路由信息控制所述第二页面的路由,以使所述第二页面嵌入所述第一页面系统后所述第二页面的路由 与所述第一页面系统的路由相同。If the routing parameter represents the routing isolation off state, then control the routing of the second page according to the routing information of the first page system, so that after the second page is embedded in the first page system, the The route of the second page is the same as the route of the first page system.
  5. 根据权利要求1或2所述的方法,其特征在于,根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,包括:The method according to claim 1 or 2, wherein determining the parameters of the custom page embedding tag according to the page address of the second page includes:
    将所述第二页面的页面地址作为所述自定义页面嵌入标签的参数;或者using the page address of the second page as a parameter of the custom page embedding tag; or
    根据所述第二页面的页面地址进行资源解析,得到已完成资源解析的结构化数据地址,并将所述结构化数据地址作为所述自定义页面嵌入标签的参数。Resource parsing is performed according to the page address of the second page to obtain a structured data address that has completed resource parsing, and the structured data address is used as a parameter of the custom page embedding tag.
  6. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that the method further comprises:
    获取针对所述第二页面的自定义显示参数,并将所述自定义显示参数传入所述页面模块实例,得到目标页面模块实例;Acquire custom display parameters for the second page, and pass the custom display parameters into the page module instance to obtain a target page module instance;
    根据所述页面模块实例将所述第二页面嵌入所述第一页面系统,包括:Embedding the second page into the first page system according to the page module instance includes:
    根据所述目标页面模块实例将所述第二页面嵌入所述第一页面系统。Embedding the second page into the first page system according to the target page module instance.
  7. 根据权利要求1或2所述的方法,其特征在于,根据所述页面模块实例将所述第二页面嵌入所述第一页面系统,包括:The method according to claim 1 or 2, wherein embedding the second page into the first page system according to the page module instance comprises:
    确定将所述页面模块实例置于所述第一页面系统的目标显示位置;determining to place the page module instance at a target display position of the first page system;
    在所述页面模块实例完成资源加载和初始化操作后,在所述第一页面系统的所述目标显示位置显示所述第二页面。After the resource loading and initialization operations of the page module instance are completed, the second page is displayed at the target display position of the first page system.
  8. 一种页面嵌入装置,其特征在于,所述装置包括:A page embedding device, characterized in that the device comprises:
    安装模块,用于在第一页面系统中安装前端功能包,所述前端功能包封装有页面嵌入过程中所需的、通过自定义页面嵌入标签调用的功能函数;The installation module is used to install the front-end function package in the first page system, and the front-end function package encapsulates the function functions required in the page embedding process and called by custom page embedding tags;
    获取模块,用于获取待嵌入的第二页面的页面地址;An acquisition module, configured to acquire the page address of the second page to be embedded;
    调用模块,用于根据所述第二页面的页面地址确定所述自定义页面嵌入标签的参数,并通过传入所述参数后的自定义页面嵌入标签调用所述前端功能包,以得到页面模块实例,其中所述页面模块实例的消息接口支持通过非字符串的形式进行消息传递;The calling module is used to determine the parameters of the custom page embedding tag according to the page address of the second page, and call the front-end function package through the custom page embedding tag passed in the parameters to obtain the page module Instance, wherein the message interface of the page module instance supports message transmission in the form of non-character strings;
    嵌入模块,用于通过所述页面模块实例将所述第二页面嵌入所述第一页面系统。An embedding module, configured to embed the second page into the first page system through the page module instance.
  9. 一种非临时性计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现权利要求1-7中任一项所述方法的步骤。A non-transitory computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, the steps of the method in any one of claims 1-7 are implemented.
  10. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    存储器,其上存储有计算机程序;a memory on which a computer program is stored;
    处理器,用于执行所述存储器中的所述计算机程序,以实现权利要求1-7中任一项所述方法的步骤。A processor, configured to execute the computer program in the memory, so as to implement the steps of the method according to any one of claims 1-7.
PCT/CN2022/095160 2021-06-21 2022-05-26 Page embedding method and apparatus, storage medium and electronic device WO2022267809A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110686401.7A CN113296762B (en) 2021-06-21 2021-06-21 Page embedding method and device, storage medium and electronic equipment
CN202110686401.7 2021-06-21

Publications (1)

Publication Number Publication Date
WO2022267809A1 true WO2022267809A1 (en) 2022-12-29

Family

ID=77328973

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/095160 WO2022267809A1 (en) 2021-06-21 2022-05-26 Page embedding method and apparatus, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN113296762B (en)
WO (1) WO2022267809A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296762B (en) * 2021-06-21 2023-07-21 北京有竹居网络技术有限公司 Page embedding method and device, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070300149A1 (en) * 2006-06-27 2007-12-27 Gems Tv Ltd. Computer system
CN104573066A (en) * 2015-01-26 2015-04-29 中国工商银行股份有限公司 Page reusing method and page reusing device
CN104714980A (en) * 2013-12-17 2015-06-17 阿里巴巴集团控股有限公司 Page nesting path determination method and device
CN108228181A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 The method and device of embedded html page in html page
CN112753032A (en) * 2018-09-24 2021-05-04 微软技术许可有限责任公司 Calling application programming interfaces across isolated portions of network applications
CN113296762A (en) * 2021-06-21 2021-08-24 北京有竹居网络技术有限公司 Page embedding method and device, storage medium and electronic equipment

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095762B (en) * 2011-11-02 2017-05-31 腾讯科技(深圳)有限公司 Web page cross-domain communication method and apparatus
CN103064747A (en) * 2012-12-13 2013-04-24 郑州威科姆科技股份有限公司 Communication method for different WEB window pages in WES7 environment
CN105574049B (en) * 2014-10-30 2020-07-03 阿里巴巴集团控股有限公司 Page processing method, device and system for mobile application
US10263838B2 (en) * 2016-08-23 2019-04-16 International Business Machines Corporation Assigning resources to a workload that utilizes embedded computing entities
CN107678820B (en) * 2017-09-29 2021-08-24 北京金山安全软件有限公司 Webpage processing method, device, server, terminal equipment and medium
CN110300133B (en) * 2018-03-22 2023-04-28 财付通支付科技有限公司 Cross-domain data transmission method, device, equipment and storage medium
CN109445775B (en) * 2018-10-12 2023-08-11 平安科技(深圳)有限公司 One-key active embedded code method, device and computer readable storage medium
CN109783752A (en) * 2018-12-14 2019-05-21 深圳壹账通智能科技有限公司 Page loading method and device, electronic equipment and computer readable storage medium
CN111783004A (en) * 2020-07-06 2020-10-16 上海乾臻信息科技有限公司 Page embedding method, device and system
CN111930382B (en) * 2020-09-21 2021-02-09 浙江口碑网络技术有限公司 Application page access method, device and equipment
CN112394931A (en) * 2020-11-18 2021-02-23 浩云科技股份有限公司 Static page configuration optimization control method and device for front-end page
CN112818270B (en) * 2021-01-25 2023-07-25 上海哔哩哔哩科技有限公司 Data cross-domain transfer method and device and computer equipment
CN112925586B (en) * 2021-03-10 2024-02-27 深圳市活力天汇科技股份有限公司 Applet routing method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070300149A1 (en) * 2006-06-27 2007-12-27 Gems Tv Ltd. Computer system
CN104714980A (en) * 2013-12-17 2015-06-17 阿里巴巴集团控股有限公司 Page nesting path determination method and device
CN104573066A (en) * 2015-01-26 2015-04-29 中国工商银行股份有限公司 Page reusing method and page reusing device
CN108228181A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 The method and device of embedded html page in html page
CN112753032A (en) * 2018-09-24 2021-05-04 微软技术许可有限责任公司 Calling application programming interfaces across isolated portions of network applications
CN113296762A (en) * 2021-06-21 2021-08-24 北京有竹居网络技术有限公司 Page embedding method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113296762B (en) 2023-07-21
CN113296762A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN110489101B (en) Interface simulation method, system, medium and electronic equipment
CN111274760B (en) Rich text data processing method and device, electronic equipment and computer storage medium
US11016716B2 (en) Picture interface display method and apparatus according to jump protocol
US20140122996A1 (en) Method, system, and program for automatic generation of screens for mobile apps based on back-end services
WO2020119800A1 (en) List display method, apparatus and device, and storage medium
CN110069308B (en) Page starting method and device, electronic equipment and storage medium
CN111581555B (en) Document loading method, device, equipment and storage medium
CN111367516B (en) Application interface generation method and device and electronic equipment
CN111443909B (en) Method and device for generating page
US11714866B2 (en) Method and device for page processing, electronic device, and computer-readable storage medium
CN110795649A (en) Target page display method, device and system and electronic equipment
CN112463729A (en) Data file storage method and device, electronic equipment and medium
CN111338944B (en) Remote Procedure Call (RPC) interface testing method, device, medium and equipment
WO2022267809A1 (en) Page embedding method and apparatus, storage medium and electronic device
CN111857658A (en) Method, device, medium and electronic equipment for rendering dynamic component
US9251267B2 (en) Generating behavior information for a link
CN113761871A (en) Rich text rendering method and device, electronic equipment and storage medium
CN110618811B (en) Information presentation method and device
CN112905281A (en) View display method and device, electronic equipment and storage medium
CN111273967A (en) Remote hook setting method and device suitable for Android system and electronic equipment
CN111258786B (en) Decoupling method, device, terminal and storage medium in layered architecture
CN109669720B (en) Chain type asynchronous request processing method and device based on Promise and electronic equipment
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22827306

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE