Controlled webpage loading display method and device and electronic equipment

By obtaining the target address in the browser and using the service worker node to intercept the page access request, load and display the controlled web page, the problem of the lack of an independent domain name in the preview page is solved, and independent domain name support is achieved and the user experience is improved.

CN118779547APending Publication Date: 2024-10-15DOUYIN VISION CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310355895.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-04
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

In the existing technology, when the preview page is displayed in the browser after the web page is developed, the preview page lacks an independent domain name and cannot meet the display requirements of different application scenarios.

Method used

By obtaining the target address entered by the user in the browser, the registered service worker node is used to intercept the page access request, load the target resource from the locally stored data, display the controlled web page on the browser based on the target resource, and provide an independent domain name to Supports complete authentication, network-level storage and user operation logging.

Benefits of technology

It is possible to display the preview page of the developed web page in the browser, with an independent domain name, which improves the user experience and supports more flexible network development and content control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779547A_ABST
    Figure CN118779547A_ABST
Patent Text Reader

Abstract

The invention provides a controlled webpage loading and displaying method and device and electronic equipment, and a specific implementation mode of the method comprises the steps that in response to a page access request, a target address input on a browser is obtained, and the target address is an independent domain name of a controlled webpage; and intercepting a page access request on the browser through the registered service working node, loading a target resource pointed by the target address from the locally stored data under the condition of determining that the page access request is used for accessing a controlled webpage supported by the browser, and displaying the controlled webpage on the browser based on the target resource. According to the embodiment, the controlled page corresponding to the development webpage is displayed by simulating the webpage opening process, so that the development webpage has an independent domain name, a user can further perform network development on the basis, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of the Internet, and in particular to a controlled web page loading and display method, device and electronic device. Background Art

[0002] With the continuous development of Internet technology, more and more people use browsers to develop online web pages. After the web page development is completed, it is usually necessary to find an existing browser window, or create an inline frame of an existing browser window, to display the preview page corresponding to the developed web page. However, the preview page displayed by these methods does not have an independent domain name, and more display methods for developed web pages need to be provided for different application scenarios. Summary of the invention

[0003] The present invention provides a controlled web page loading and display method, device and electronic device.

[0004] According to a first aspect, a controlled web page display method is provided, the method comprising:

[0005] In response to a page access request, a target address inputted on a browser is obtained; the target address is an independent domain name of the controlled web page; the content of the controlled web page is provided by a host web page of the browser;

[0006] intercepting the page access request on the browser through a registered service working node, and loading the target resource pointed to by the target address from the locally stored data when it is determined that the page access request is for accessing the controlled web page supported by the browser; the target resource is a page resource corresponding to the controlled web page developed by the browser;

[0007] The controlled web page is displayed on the browser based on the target resource.

[0008] According to a second aspect, a controlled webpage loading and display device is provided, the device comprising:

[0009] An acquisition module, used to respond to a page access request and acquire a target address inputted on a browser; the target address is an independent domain name of the controlled web page; the content of the controlled web page is provided by a host web page of the browser;

[0010] A processing module, configured to intercept the page access request on the browser through a registered service working node, and load a target resource pointed to by the target address from locally stored data when it is determined that the page access request is for accessing the controlled web page supported by the browser; the target resource is a page resource corresponding to the controlled web page developed by the browser;

[0011] A display module is used to display the controlled web page on the browser based on the target resource.

[0012] According to a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the above-mentioned first aspects is implemented.

[0013] According to a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of the first aspects is implemented.

[0014] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0015] The embodiments of the present disclosure provide a controlled web page loading and display method and device, which displays a controlled web page corresponding to a development web page by imitating the process of opening a web page, so that the development web page has an independent domain name, so that users can further perform network development on this basis, thereby improving user experience.

[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0018] Figure 1 is a flow chart of a controlled web page loading and display method provided by an embodiment of the present disclosure;

[0019] Figure 2 It is an implementation block diagram of a controlled webpage loading and display provided by an embodiment of the present disclosure;

[0020] Figure 3 is a flow chart of a controlled web page loading and display method provided by an embodiment of the present disclosure;

[0021] Figure 4 is a block diagram of a controlled webpage loading and display device provided by an embodiment of the present disclosure;

[0022] Figure 5 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;

[0023] Figure 6is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure;

[0024] Figure 7 is a schematic diagram of a storage medium provided in some embodiments of the present disclosure. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0026] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.

[0027] The terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. The singular forms of "a", "the" and "the" used in this disclosure are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0028] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0029] With the continuous development of Internet technology, more and more people use browsers to develop online web pages. After the web page development is completed, it is usually necessary to find an existing browser window, or create an inline frame of an existing browser window, to display the preview page of the developed web page. However, the preview page displayed by these methods does not have an independent domain name, and more preview page display methods need to be provided for different application scenarios.

[0030] In the related art, the process of opening a web page is as follows: the user types the URL of the target web page in the browser window and confirms it, and the browser window displays a preview page of the target web page, and this URL contains an independent domain name. In the background, based on the URL of the target web page, the browser sends a network request to the backend server to obtain the target resource, and renders and displays the target resource returned by the backend server in the window.

[0031] In the above opening process, the content displayed in the browser window is limited by the services provided by the back-end server, and the front-end device cannot control the displayed content. In a browser-based web development environment, it is sometimes necessary to imitate a web page opening process, display the preview page corresponding to the development web page in the browser window, and control the display content of the preview page through the front-end device.

[0032] The present disclosure provides a controlled web page loading and display solution, which can obtain the target address input by the user in the controlled web page of the browser. Based on the target address, the target resource is obtained from the locally stored data. Based on the target resource, the preview page corresponding to the development web page is displayed on the controlled web page. The user can display the preview page corresponding to the development web page by inputting the target address and confirming the page loading. Since the target resource is the page resource corresponding to the development web page developed through the host web page of the browser, the display content of the preview web page can be controlled based on the host web page.

[0033] To facilitate understanding of the present embodiment, a controlled web page loading and display method disclosed in the embodiment of the present disclosure is first introduced in detail. The executor of the page number display method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities. In some possible implementation methods, the controlled web page loading and display method can be implemented by a processor calling computer-readable instructions stored in a memory.

[0034] The controlled web page loading and display method provided by the embodiment of the present disclosure is described in detail below.

[0035] Figure 1 A flow chart of a controlled webpage loading and display method provided by an embodiment of the present disclosure is shown, comprising the following steps S101-S103:

[0036] Step S101, in response to a page access request, obtain a target address input on a browser. The target address is an independent domain name of a controlled web page, and the content of the controlled web page is provided by a host web page of the browser.

[0037] The target address entered by the user on the controlled webpage of the browser includes an independent domain name, which can be a wildcard domain name or a subdomain associated with the wildcard domain name. The target address can be a URL such as https: / / local.io, https: / / id_8080 / local.io, or https: / / id_3030 / local.io.

[0038] The front-end device can be the execution subject of the controlled webpage loading and display method provided in the embodiment of the present disclosure, and the front-end device can provide a browser operating environment. The browser here refers to a browser provided by one or more suppliers, which determines the corresponding version range according to the developer or user's intention to achieve normal display of the preview page after the webpage development work is completed.

[0039] The controlled web page is an HTML page of the browser. Users can get the same experience as regular web browsing by entering the target address and confirming it in the controlled web page, and then the controlled web page will render and display the preview page corresponding to the development web page.

[0040] Since the target address contains an independent domain name, the preview page can obtain related functions supported by an independent domain name, including but not limited to: complete authentication, network-level storage, and user operation records. Among them, complete authentication is used to store user page status information to prevent illegal users from occupying network resources or preventing users from accessing illegal networks; network-level storage is used to store temporary data generated by users in forward, backward or refresh operations, as well as cache network requests and their responses; user operation records are used to provide browser history reading, allowing users to move forward or backward according to access records.

[0041] Users can further develop the preview page based on an independent domain name to improve user experience.

[0042] Step S102, intercepting the page access request on the browser through the registered service working node. When it is determined that the page access request is for accessing a controlled web page supported by the browser, the target resource pointed to by the target address is loaded from the locally stored data. The target resource is the page resource corresponding to the controlled web page developed by the browser.

[0043] The front-end device can also provide a browser-based web page development environment. Users develop web pages on the host web page of the browser, and the preview page corresponding to the developed web page is displayed on the controlled web page of the browser.

[0044] The host webpage is another HTML page of the browser, which can provide a browser-based webpage development environment. In one implementation, the function module code including but not limited to the operating system, virtual file system, and virtual machine can be written in the host webpage based on JavaScript, CSS, HTML, WebAssembly and other languages. The developed function module code is compiled to generate a target code that can be recognized by the browser. The target code is executed to generate a webpage development environment on the host webpage of the browser for users to develop webpages.

[0045] In another implementation, the function module code can also be written on the network server based on the same process, downloaded through the browser on the front-end device, compiled and executed, and a web development environment is generated in the host web page of the browser.

[0046] Therefore, the web development environment written in the present invention can realize code transplantation between various device ends. The web development environment obtained by users on different device ends is the same. The process of web development and the implementation effect do not depend on the hardware and software resources provided by each device end. Users can conveniently perform browser-based online web development.

[0047] Users can develop web pages in a browser based on a web development environment, including editing the display content and display format of a preview page, and setting one or more wildcard domain names in the web development environment to generate a target address for the user, start a virtual machine for the wildcard domain name, and establish a resource request link for developing web page access based on the target address.

[0048] The function module codes of the web development environment obtained above will be stored in the local end as the front-end device, and the page resources of the development web pages developed based on the web development environment will also be updated and saved in the same directory where the function module codes are stored.

[0049] When the preview page of the development webpage needs to be displayed, the target resource can be obtained from the locally stored data based on the target address input by the user in the controlled webpage of the browser and based on the target address, so as to display the preview page. The target resource is the page resource corresponding to the development webpage developed through the host webpage of the browser.

[0050] When obtaining the target resource from the locally stored data based on the target address, a page access request can be generated based on the target address, and based on the page access request, it is determined whether the service work node associated with the target address has been registered. If the service work node associated with the target address has been registered, the target service program associated with the target address is called through the service work node to obtain the target resource from the locally stored data.

[0051] The interface of the service work node associated with the target address is provided by the browser, the host web page may include an iframe tag, and the target service program is edited in the inline frame under the iframe tag. A communication link is established between the controlled web page and the host web page through the service work node.

[0052] The service working node associated with the target address can perform an interception operation on the page access request, and based on the page access request, determine and call the target service program associated with the target address to obtain the target resource from the target virtual machine pre-deployed locally. Before obtaining the target address input by the user, it is also necessary to register the service working node associated with the target address through the target service program.

[0053] Step S103: displaying the controlled web page on the browser based on the target resource.

[0054] Under the triggering of preset events, the browser obtains development environment resources from the local end or network server. Based on the development environment resources, the host web page is displayed in the browser.

[0055] When developing a controlled web page in a host web page, information about the development operation performed by the user on the controlled web page can be obtained. Based on the information about the development operation, page resources corresponding to the controlled web page are generated, and the page resources are stored locally.

[0056] Based on the target resource, information of the development webpage related to the target address can be obtained, and a preview page corresponding to the development webpage can be displayed on the controlled webpage.

[0057] Based on the development webpage displayed in the host webpage of the browser, the output content and rendering form of the preview page can be controlled without the participation of the backend server. The output content may include but is not limited to multimedia, pictures, documents and other information, and the content rendering form includes the displayed font, size, layout design, etc. Therefore, all information processing required for loading the preview page can be completed on the local side, including providing front-end resources and processing back-end requests, so as to achieve the effect of using a pure front-end mode to complete the back-end request, saving network resources and improving the user experience.

[0058] Figure 2 The block diagram of an implementation of a controlled webpage loading and display provided by an embodiment of the present disclosure is shown, including a controlled webpage 210, a host webpage 220, and a service work node module 230. Specifically:

[0059] The controlled web page 210 includes a display module 211 for displaying a preview page of a development web page. The development web page is developed based on the host web page 220. The content and form of the controlled web page 210 loaded and displayed are restricted by the development code in the host web page 220.

[0060] The host webpage 220 includes a code editing module 223, a processing module 224, a target service program module 221 and a target service program module 222. The target service program module 221 and the target service program module 222 receive page access requests from different wildcard domain names, respectively. It is understood that the host webpage 220 may also include other target service program modules ( Figure 2 ), establish an independent target service program module for each wildcard domain name constructed.

[0061] The host web page 220 may include a browser-based development environment for online web page development. The code editing module 223 includes at least an operating system function, which is used to build a wildcard domain name for the development web page and edit the code of the development web page. The processing module 224 includes at least a virtual file system function and a virtual machine function, which is used to process page access requests and return target resources.

[0062] The host web page 220 builds a scope isolation structure for all target service program modules to isolate the impact of changes in global variables in the target service program modules on other module codes.

[0063] The service working node module 230 includes a service working node 231 and a service working node 232 , wherein the service working node 231 corresponds to the target service program module 221 , and the service working node 232 corresponds to the target service program module 222 .

[0064] The service work node module 230 establishes a communication link between the controlled web page 210 and the host web page 220, and is used to intercept and forward page access requests issued by the controlled web page 210, and to deliver target resources returned by the host web page 220. It can be understood that the service work node module 230 can also include other service work nodes ( Figure 2 (not shown) an independent service working node is established for each target service program module.

[0065] In the browser of the front-end device, the information interaction between the controlled web page 210 and the host web page 220 can be completed through the service working node module 230 without involving a back-end server corresponding to the network layer. Therefore, the content displayed in the controlled web page is only controlled by the front-end.

[0066] like Figure 2As shown, the service work node module 230 receives the page access request sent from the controlled web page 210 through the first interface, and determines whether it is related to the constructed wildcard domain name. If it is a page access request related to the constructed wildcard domain name, the page access request is intercepted and forwarded to the host web page 220 through the second interface. If it is not a page access request related to the constructed wildcard domain name, it is not processed and is released to the back-end server on the Internet for processing.

[0067] Next, based on Figure 2 The content in introduces a controlled web page loading and display method provided by an embodiment of the present disclosure.

[0068] Figure 3 A flow chart of a controlled webpage loading and display method provided by an embodiment of the present disclosure is shown, comprising the following steps S301-S303:

[0069] Step S301, build a wildcard domain name and complete the service working node registration.

[0070] A wildcard domain name is built in the host webpage 220, and access support for multiple related URLs is achieved by building a wildcard domain name. For example, if the wildcard domain name built is https: / local.io, access to https: / / id_8080 / local.io is supported.

[0071] When building a wildcard domain name in the host webpage 220, it is necessary to provide a processing flow for access based on the target address. The target address can be a wildcard domain name or a subdomain name corresponding to the wildcard domain name. In order to process network requests for access based on the target address, a virtual machine or other function module capable of processing page access requests can be enabled for the wildcard domain name in the host webpage 220, and the corresponding target resource can be returned.

[0072] In the controlled web page 210, the page access request initiated based on the target address can be proxied and monitored by the browser. The browser can intercept the monitored target message through the service work node module 230 and forward it to the host web page 220 for processing.

[0073] In this embodiment, the service worker node can be implemented by the ServiceWorker function of the browser. ServiceWorker is a script running in the background process of the browser independent of the current page. It is a programmable network proxy that allows developers to control the network requests processed on the page.

[0074] Usually, the ServiceWorker registration is completed when the wildcard domain name is loaded for the first time. The ServiceWorker can intercept network requests for the registered wildcard domain name or the subdomain name corresponding to the wildcard domain name. That is, the browser's ServiceWorker does not have the function of intercepting the home page.

[0075] In order to enable ServiceWorker to intercept all network requests for wildcard domain names or subdomain names corresponding to wildcard domain names, the wildcard domain names can be loaded in advance and the registration of the wildcard domain names in ServiceWorker can be completed in advance. Specifically, an independent target service program module is established for each wildcard domain name constructed in the host web page 220, and the first loading process of the wildcard domain name is completed in the target service program module. The loading process includes establishing a corresponding ServiceWorker for each target service program module and completing the registration of the wildcard domain name in ServiceWorker. The registration of the wildcard domain name can be completed by calling the interface code of ServiceWorker in the target service program module, where the interface code is located in the root directory of the browser code.

[0076] After registration, ServiceWorker can intercept all network requests for wildcard domains or subdomains corresponding to wildcard domains.

[0077] Step S302, constructing a scope isolation structure.

[0078] like Figure 2 As shown, there is a scope isolation structure in the host web page 220, and this structure can be created using an iframe in the HTML page of the host web page 220. The creation process includes executing iframe initialization, completing the communication mechanism between the scope isolation structure and the host web page 220, and after the creation is completed, an operation instance of the scope isolation structure will be obtained in the host web page 220.

[0079] In the scope isolation structure, multiple target service program modules can be included. Since the target service program module can listen to the events of the parent scope, the scope isolation structure is used to limit the scope of global variables in the target service program module code. Changes to global variables in the scope isolation structure have no effect on the code outside the scope isolation structure.

[0080] After the scope isolation structure is built, the user can be notified to enter and confirm the target address in the controlled web page 210, triggering the display of the preview page corresponding to the development web page.

[0081] Step S303: receiving and processing a page access request initiated by the controlled web page, and displaying a preview web page corresponding to the target web page.

[0082] In the controlled web page 210, the user can use a target address such as https: / / id_8080 / local.io to request access to the corresponding target web page. This target web page will be loaded according to the effect of a web page opening process. The target address includes an independent domain name, which is a pre-built wildcard domain name or a subdomain related to the wildcard domain name, and the wildcard domain name has been registered in ServiceWorker in advance.

[0083] The ServiceWorker listens, receives and intercepts page access requests based on the target address through the first interface, and forwards the page access requests to the host web page 220 through the second interface.

[0084] The host web page 220 receives the page access request, calls the instance method of the scope isolation structure, and determines the target service program module corresponding to the page access request. The target service program module receives the page access request and forwards it to the processing module 224. The processing module 224 processes the page access request and determines the corresponding target resource. The target resource is returned to the controlled web page 210 through the second interface and the first interface in turn, and is rendered and displayed in the controlled web page 210.

[0085] In this process, the target service program module is used to complete the page access request and the relay delivery of the target resource. The target service program module is in a scope isolation structure and can communicate with the processing module 224 through a mechanism such as MessageChannel. MessageChannel is a network communication mechanism that creates a communication pipeline for communication between two ports of the pipeline.

[0086] The second interface may be an interface such as BroadcastChannel, which is used to complete the communication between the host web page 220 and the service working node module 230. BroadcastChannel is a browser-based network communication interface used for cross-page network communication at the front end.

[0087] The first interface may be an interface such as Fetch, which is used to complete the communication between the service work node module 230 and the controlled web page 210. Fetch is a browser-based network communication interface, which is used to achieve real-time communication between the front end and the back end.

[0088] In this embodiment, after the first loading of the target address is implemented, the communication between the service working node module 230 and the controlled web page 210 can be completed through the Websocket and EventSource interfaces. Websocket and EventSource are a browser-based network communication interface used to achieve real-time communication between the front and back ends.

[0089] However, since ServiceWorker can intercept the network and process network requests through Fetch, it cannot directly intercept page access requests from Websocket and EventSource interfaces. The functions of Websocket and EventSource interfaces need to be upgraded. Specifically, page access requests initiated through Websocket and EventSource interfaces will be converted to be sent through Fetch interface so that ServiceWorker can intercept them.

[0090] The target resource and the upgrade patch code can be returned together during the first load request of the target address processed by the host web page 220. Before the controlled web page 210 renders and displays the target resource, the upgrade patch code is used to perform a function upgrade of the EventSource and Websocket interfaces.

[0091] In this embodiment, when a target web page is opened, the page loading request will be intercepted and forwarded by ServiceWorker, and the target resource will be obtained from the front-end device. When the target resource is rendered in the controlled web page 210, it may also contain some public network resource requests, such as an image tag, a link to a picture, etc. These resource requests also need to be displayed in the controlled web page 210. For these resource requests to the public network, ServiceWorker can release them and send them to the Internet for corresponding processing, and render and display the returned resources together in the controlled web page 210. This processing process is no different from the real network resource request, so it will not be repeated.

[0092] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0093] Based on the same inventive concept, a controlled web page loading and display device corresponding to the controlled web page loading and display method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned controlled web page loading and display method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0094] Figure 4 FIG. 1 is a block diagram of a controlled webpage loading and display device provided by an embodiment of the present disclosure. Figure 4 As shown, the controlled web page loading and display device 400 may include: an acquisition module 401 , a processing module 402 , and a display module 403 .

[0095] The acquisition module 401 is used to respond to the page access request and acquire the target address input on the browser. The target address is an independent domain name of the controlled web page, and the content of the controlled web page is provided by the host web page of the browser.

[0096] Processing module 402 is used to intercept the page access request on the browser through the registered service working node, and load the target resource pointed to by the target address from the locally stored data when it is determined that the page access request is for accessing a controlled web page supported by the browser. The target resource is the page resource corresponding to the controlled web page developed by the browser.

[0097] The display module 403 is used to display the controlled web page on the browser based on the target resource.

[0098] In some implementations, when loading the target resource pointed to by the target address from the locally stored data, the processing module 402 is used to call the target service program associated with the target address through the service work node to obtain the target resource from the locally stored data.

[0099] In some implementations, the target service program is edited in an inline frame under an iframe tag of a host webpage of a browser, wherein the iframe tag is isolated from the scope of other modules of the host webpage.

[0100] In some embodiments, before obtaining the target address inputted on the browser in response to the page access request, the acquisition module 401 is further used to obtain development environment resources from the network server through the browser under the triggering of a preset event. Based on the development environment resources, the host web page is displayed in the browser. The controlled web page is developed in the host web page.

[0101] In some implementations, when developing a controlled web page in a host web page, the processing module 402 is used to obtain information about development operations performed by a user on the controlled web page, generate page resources corresponding to the controlled web page based on the development operation information, and store the page resources locally.

[0102] In some implementations, the service worker node is implemented based on the ServiceWorker function of the browser.

[0103] In some implementations, the page access request is implemented based on the browser's Fetch, Websocket, and EventSource functions.

[0104] Figure 5 A schematic block diagram of an electronic device provided in some embodiments of the present disclosure. Figure 5As shown, the electronic device 910 includes a processor 911 and a memory 912, which can be used to implement a client or a server. The memory 912 is used to store computer executable instructions (such as one or more computer program modules) non-transiently. The processor 911 is used to run the computer executable instructions, and the computer executable instructions can execute one or more steps in the controlled web page loading and display method described above when the processor 911 is running, thereby implementing the controlled web page loading and display method described above. The memory 912 and the processor 911 can be connected through a bus system and / or other forms of connection mechanisms ( Figure 5 ) interconnected.

[0105] For example, the processor 911 may be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture, etc. The processor 911 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 910 to perform desired functions.

[0106] For example, the memory 912 may include any combination of one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 911 may run one or more computer program modules to implement various functions of the electronic device 910. Various applications and various data, as well as various data used and / or generated by the application, etc. may also be stored in the computer-readable storage medium.

[0107] It should be noted that, in the embodiment of the present disclosure, the specific functions and technical effects of the electronic device 910 can refer to the above description of the controlled web page loading and display method, which will not be repeated here.

[0108] Figure 6A schematic block diagram of another electronic device provided for some embodiments of the present disclosure. The electronic device 920 is, for example, suitable for implementing the controlled web page loading and display method provided in the embodiments of the present disclosure. The electronic device 920 may be a terminal device, etc., and may be used to implement a client or a server. The electronic device 920 may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that Figure 6 The electronic device 920 shown is only an example and does not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0109] like Figure 6 As shown, the electronic device 920 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. In the RAM 923, various programs and data required for the operation of the electronic device 920 are also stored. The processing device 921, the ROM 922, and the RAM 923 are connected to each other via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.

[0110] Typically, the following devices may be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 928 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 920 is shown to have various devices, but it should be understood that it is not required to implement or possess all of the devices shown, and the electronic device 920 may alternatively implement or possess more or fewer devices.

[0111] For example, according to an embodiment of the present disclosure, the above-mentioned controlled web page loading and display method can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above-mentioned controlled web page loading and display method. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 929, or installed from the storage device 928, or installed from the ROM 922. When the computer program is executed by the processing device 921, the functions defined in the controlled web page loading and display method provided in the embodiment of the present disclosure can be implemented.

[0112] Figure 7 A schematic diagram of a storage medium provided in some embodiments of the present disclosure. Figure 7 As shown, the storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. When the non-transitory computer-executable instructions 931 are executed by the processor, the controlled webpage loading and display method described in the embodiment of the present disclosure may be implemented. For example, when the non-transitory computer-executable instructions 931 are executed by the processor, one or more steps in the controlled webpage loading and display method described above may be executed.

[0113] For example, the storage medium 930 may be applied to the above-mentioned electronic device. For example, the storage medium 930 may include a memory in the electronic device.

[0114] For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), flash memory, or any combination of the above storage media, or other applicable storage media.

[0115] For example, the description of the storage medium 930 can refer to the description of the memory in the embodiment of the electronic device, and the repeated parts are not repeated. The specific functions and technical effects of the storage medium 930 can refer to the description of the controlled webpage loading and display method above, and are not repeated here.

[0116] It should be noted that in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable medium 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, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a 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 may be used by an instruction execution system, device or device or used in combination with it. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0117] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0118] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A controlled web page loading and display method, characterized in that: The method comprises: In response to a page access request, a target address inputted on a browser is obtained; the target address is an independent domain name of the controlled web page; the content of the controlled web page is provided by a host web page of the browser; intercepting the page access request on the browser through a registered service working node, and loading the target resource pointed to by the target address from the locally stored data when it is determined that the page access request is for accessing the controlled web page supported by the browser; the target resource is a page resource corresponding to the controlled web page developed by the browser; The controlled web page is displayed on the browser based on the target resource.

2. The method according to claim 1, wherein loading the target resource pointed to by the target address from the locally stored data comprises: The target service program associated with the target address is called through the service working node to obtain the target resource from the locally stored data.

3. The method according to claim 2, wherein the target service program is edited in an inline frame under an iframe tag of a host webpage of the browser; wherein, The iframe tag is isolated from the scope of other modules of the host web page.

4. The method according to claim 1, before obtaining the target address input on the browser in response to the page access request, further comprises: When triggered by a preset event, the browser obtains development environment resources from a network server; Based on the development environment resources, displaying a host webpage in the browser; The controlled web page is developed in the host web page.

5. The method according to claim 4, wherein developing the controlled web page in the host web page comprises: Obtaining information about development operations performed by the user on the controlled webpage; Based on the information of the development operation, generating page resources corresponding to the controlled web page; The page resources are stored locally.

6. According to the method of claim 1, the service working node is implemented based on the ServiceWorker function of the browser.

7. According to the method of claim 1, the page access request is implemented based on the Fetch, Websocket, and EventSource functions of the browser.

8. A controlled web page loading and display device, characterized in that: The device comprises: An acquisition module, used to respond to a page access request and acquire a target address inputted on a browser; the target address is an independent domain name of the controlled web page; the content of the controlled web page is provided by a host web page of the browser; A processing module, configured to intercept the page access request on the browser through a registered service working node, and load a target resource pointed to by the target address from locally stored data when it is determined that the page access request is for accessing the controlled web page supported by the browser; the target resource is a page resource corresponding to the controlled web page developed by the browser; A display module is used to display the controlled web page on the browser based on the target resource.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Web page cross-domain communication method and device

    CN104301379A

  • In-domain webpage editing

    CN108780448A

  • Network information processing method and device and electronic equipment

    CN110287432A

  • Page presentation method and device, electronic equipment and storage medium

    CN114924723A

  • Isolating an iframe of a webpage

    US11089050B1