CN113760438A - Page display method and device for webpage application - Google Patents
Page display method and device for webpage application Download PDFInfo
- Publication number
- CN113760438A CN113760438A CN202111118182.9A CN202111118182A CN113760438A CN 113760438 A CN113760438 A CN 113760438A CN 202111118182 A CN202111118182 A CN 202111118182A CN 113760438 A CN113760438 A CN 113760438A
- Authority
- CN
- China
- Prior art keywords
- page
- loaded
- component
- native high
- native
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 230000004044 response Effects 0.000 claims abstract description 25
- 238000009877 rendering Methods 0.000 claims abstract description 22
- 238000004590 computer program Methods 0.000 claims description 10
- 230000000694 effects Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 230000003993 interaction Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a page display method and device of a webpage application. One embodiment of the method comprises: determining a page to be loaded according to the received page loading request; in response to determining that the page to be loaded comprises the placeholder components corresponding to the native high-consumption components, determining attribute information of the placeholder components; and loading the native high-consumption components in the page to be loaded based on the attribute information, and displaying the page to be loaded with the native high-consumption components. The application provides a method for directly loading and rendering a native high-consumption component in a page of a webpage application to display the page, solves the problem that the webpage application cannot realize the high-consumption component, and improves the display effect of the page.
Description
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a page display method and device for a webpage application.
Background
In order to reduce development cost, more and more mobile applications adopt Web technology to develop functional modules. However, Web applications have significant performance deficiencies compared to native applications, especially for high-consumption components with frequent interaction and complex rendering, such as line graphs and columns of stock tickets. For the high-consumption component scene, the page is generally made into a simplified version by adopting the modes of reducing data operation, reducing rendering effect and the like, or is directly realized by a native page, and the page jumps to the native page when the page in the Web application needs to be displayed.
Disclosure of Invention
The embodiment of the application provides a page display method and device of a webpage application.
In a first aspect, an embodiment of the present application provides a page display method for a web application, including: determining a page to be loaded according to the received page loading request; in response to determining that the page to be loaded comprises the placeholder components corresponding to the native high-consumption components, determining attribute information of the placeholder components; and loading the native high-consumption components in the page to be loaded based on the attribute information, and displaying the page to be loaded with the native high-consumption components.
In some embodiments, the loading, based on the attribute information, the native high-consumption component in the page to be loaded includes: converting the attribute value represented by the attribute information of the placeholder component into an attribute value matched with the native high-consumption component; and rendering the native high-consumption components in the page to be loaded through the webpage view control according to the attribute values matched with the native high-consumption components.
In some embodiments, the rendering the native high-consumption component in the page to be loaded through the web page view control according to the attribute value matched with the native high-consumption component includes: adjusting the native code of the native high-consumption component according to the attribute value; and rendering the native high-consumption component in the page to be loaded through a sub-view adding method in the webpage view control, wherein the sub-view adding method is used for adding a sub-view corresponding to the native high-consumption component in the page to be loaded.
In some embodiments, the determining the attribute information of the placeholder component in response to determining that the page to be loaded includes the placeholder component corresponding to the native consumable component includes: loading a page to be loaded through a webpage view control; and in response to determining that the page to be loaded comprises the placeholder component, determining the attribute information of the placeholder component through the webpage view control when the page to be loaded is loaded.
In some embodiments, before determining the property information of the placeholder component in response to determining that the placeholder component corresponding to the native consumable component is included in the page to be loaded, the method further includes: setting an identifier for the native high-consumption component, and establishing a corresponding relation between the identifier and the placeholder component; according to the received page development instruction, an identifier is declared in a class label of the page to be loaded, and a placeholder component is arranged in the page to be loaded.
In some embodiments, before setting the identifier for the native high-consumption component and establishing the correspondence between the identifier and the placeholder component, the method further includes: the native high-consumption component is implemented based on native code.
In a second aspect, an embodiment of the present application provides a page display apparatus for a web application, including: a first determining unit configured to determine a page to be loaded according to the received page loading request; the second determining unit is configured to determine attribute information of the placeholder component in response to determining that the placeholder component corresponding to the native high-consumption component is included in the page to be loaded; and the display unit is configured to load the native high-consumption components in the page to be loaded based on the attribute information and display the page to be loaded with the native high-consumption components.
In some embodiments, the display unit is further configured to: converting the attribute value represented by the attribute information of the placeholder component into an attribute value matched with the native high-consumption component; and rendering the native high-consumption components in the page to be loaded through the webpage view control according to the attribute values matched with the native high-consumption components.
In some embodiments, the display unit is further configured to: adjusting the native code of the native high-consumption component according to the attribute value matched with the native high-consumption component; and rendering the native high-consumption component in the page to be loaded through a sub-view adding method in the webpage view control, wherein the sub-view adding method is used for adding a sub-view corresponding to the native high-consumption component in the page to be loaded.
In some embodiments, the second determining unit is further configured to: loading a page to be loaded through a webpage view control; and in response to determining that the page to be loaded comprises the placeholder component, determining the attribute information of the placeholder component through the webpage view control when the page to be loaded is loaded.
In some embodiments, the above apparatus further comprises: the establishing unit is configured to set an identifier for the native high-consumption component and establish a corresponding relation between the identifier and the placeholder component; and the development unit is configured to declare an identifier in a class tag of the page to be loaded according to the received page development instruction, and set a placeholder component in the page to be loaded.
In some embodiments, the above apparatus further comprises: an implementation unit configured to implement the native high-consumption component based on the native code.
In a third aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement a method as described in any implementation of the first aspect.
According to the page display method and device for the webpage application, the page to be loaded is determined according to the received page loading request; in response to determining that the page to be loaded comprises the placeholder components corresponding to the native high-consumption components, determining attribute information of the placeholder components; based on the attribute information, the native high-consumption component is loaded in the page to be loaded, and the page to be loaded with the native high-consumption component is displayed, so that a method for directly loading and rendering the native high-consumption component in the page of the webpage application to display the page is provided, the problem that the high-consumption component cannot be realized by the webpage application is solved, and the display effect of the page is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a page display method for a web application according to the present application;
fig. 3 is a schematic diagram of an application scenario of a page display method of a web application according to the present embodiment;
FIG. 4 is a flow diagram of yet another embodiment of a page display method of a web application according to the present application;
FIG. 5 is a block diagram of one embodiment of a page display device of a web application according to the present application;
FIG. 6 is a block diagram of a computer system suitable for use in implementing embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary architecture 100 in which the page display method and apparatus of the web application of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The communication connections between the terminal devices 101, 102, 103 form a topological network, and the network 104 serves to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 101, 102, 103 may be hardware devices or software that support network connections for data interaction and data processing. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices supporting network connection, information acquisition, interaction, processing, display, and the like, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, for example, a background processing server that obtains a page loading request sent by a user through the terminal devices 101, 102, and 103, and directly loads and renders native high-consumption components in a page to be loaded of a web application. Optionally, the server may feed back the page to be loaded with the native high-consumption component to the terminal device to display the page to be loaded through the terminal device. As an example, the server 105 may be a cloud server.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be further noted that the page display method of the web application provided in the embodiment of the present application may be executed by a server, or may be executed by a terminal device, or may be executed by the server and the terminal device in cooperation with each other. Accordingly, each part (for example, each unit) included in the page display device of the web application may be entirely provided in the server, may be entirely provided in the terminal device, and may be separately provided in the server and the terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. When the electronic device on which the page display method of the web application is executed does not need to perform data transmission with other electronic devices, the system architecture may include only the electronic device (e.g., a server or a terminal device) on which the page display method of the web application is executed.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for page display of a web application is shown, comprising the steps of:
In this embodiment, an execution body (for example, a server in fig. 1) of the page display method of the web application may receive a page loading request for loading a page of the web application, and determine a page to be loaded according to the received page loading request.
The Web application, i.e. the Web application, is an application program accessed through the Web, and a user can access the Web application only through a browser without installing other software. The Web application generally adopts a B/S (Browser/Server) mode, and is composed of various Web Components (Web Components) for completing specific tasks, all of which coordinate with each other to provide a set of complete services for users, and the services are displayed to the outside through the Web.
The page loading request is used for requesting a corresponding page to be loaded from the execution main body. The page to be loaded can be various pages in various types of web applications, including but not limited to social web applications, life service web applications, office web applications, shopping web applications, financial web applications, entertainment web applications, and camera web applications.
As an example, the execution main body or the electronic device communicatively connected to the execution main body may display a web application to a user, receive an action instruction or a voice instruction of the user on an interface of the web application, such as clicking and touching, obtain a page loading request, and determine a page to be loaded.
In this embodiment, the execution subject may determine the attribute information of the placeholder component in response to determining that the page to be loaded includes the placeholder component corresponding to the native high-consumption component.
Native high-consumption components characterize components that consume more computing power (e.g., frequent interaction, complex rendering) implemented based on native code.
A placeholder component can be understood as a placeholder element of a native, high-consumption component, which itself sets only the location and size attribute information, and does not implement any functionality of the high-consumption component. And the position information of the position representation occupying component in the corresponding page is the size of the area occupied by the position representation occupying component in the corresponding page.
As an example, the execution subject may establish a correspondence table representing a correspondence between each placeholder component and the corresponding native high-consumption component, and after determining the placeholder component in the page to be loaded, determine the native high-consumption component corresponding to the placeholder component according to the correspondence table.
At present, the native end has abundant third-party high-consumption components. The native high-consumption component in the present embodiment may adopt a third-party high-consumption component. In some optional implementations of the present embodiment, the execution subject may implement the native high-power components based on native code.
After implementing the native high-consumption component based on the native code, the execution subject may perform the following preparation operations to directly load and render the native high-consumption component in the page of the web application:
firstly, setting an identifier for the native high-consumption component, and establishing a corresponding relation between the identifier and the placeholder component. Then, according to the received page development instruction, an identifier is declared in a class tag of the page to be loaded, and a placeholder component is arranged in the page to be loaded.
The identifier of the native high-consumption component is used for uniquely identifying the native high-consumption component, so that when the execution main body loads the page to be loaded, the corresponding native high-consumption component is determined according to the identifier.
In some optional implementations of this embodiment, the executing main body may execute the step 202 by:
firstly, a page to be loaded is loaded through a webpage view control. And then, in response to determining that the page to be loaded includes the placeholder component, when the page to be loaded is loaded, determining the attribute information of the placeholder component through the webpage view control.
A high-performance browser with a webkit (an open source browser engine) kernel is built in the android system, and a webpage view control WebView is a control packaged on the basis. WebView interprets the webpage view, and can be simply regarded as a browser control which can be nested on an interface. When the WebView loads a page to be loaded containing a native high-consumption component, once the page to be loaded is loaded, the WebView calls back a method onPageFinishd (WebView, String url), and attribute information such as the size and the position of the placeholder component is acquired by executing a JavaScript script in the call-back.
And step 203, loading the native high-consumption components in the page to be loaded based on the attribute information, and displaying the page to be loaded with the native high-consumption components.
In this embodiment, the execution body may load the native high-consumption component in the page to be loaded based on the attribute information, and display the page to be loaded with the native high-consumption component.
As an example, the execution subject may determine the position and size of the placeholder component in the page to be loaded based on the attribute information of the placeholder component, and further load the native high-consumption component by using the position of the placeholder component in the page to be loaded as the position of the native high-consumption component and the size of the region occupied by the placeholder component in the page to be loaded as the size of the native high-consumption component, and display the page to be loaded with the native high-consumption component.
It should be noted that, in each process of loading the page to be loaded, the placeholder component in the page to be loaded is loaded first, and then the native high-consumption component is loaded to cover the placeholder component, but the time consumed from the process of loading the placeholder component to the process of loading the native high-consumption component to cover the placeholder component is very short, and the user hardly feels the above change process. The viewed page to be loaded is the page to be loaded with the native high-consumption component from the user's view.
In some optional implementations of this embodiment, the executing main body may execute the step 203 by:
first, the attribute values characterized by the attribute information of the placeholder component are converted into attribute values matched by the native high-consumption component.
In this implementation, the attribute value of the native high-consumption component is converted from the attribute value of the Web unit.
And secondly, rendering the native high-consumption components in the page to be loaded through the webpage view control according to the attribute values matched with the native high-consumption components.
In this implementation, based on the conversion of the attribute value, the execution subject may more accurately load the native high-consumption component in the page to be loaded.
In some optional implementations of this embodiment, the executing body may execute the second step by:
firstly, adjusting the native code of the native high-consumption component according to the matched attribute value of the native high-consumption component. And then, rendering the native high-consumption component in the page to be loaded by a method of adding a child view in the webpage view control. The method for adding the child views is used for adding the child views corresponding to the native high-consumption components in the page to be loaded.
Specifically, the execution subject may modify a relevant attribute in the native code of the native high-consumption component to the determined attribute value, and render the native high-consumption component in the page to be loaded by using an addView method of WebView.
With continued reference to fig. 3, fig. 3 is a schematic diagram 300 of an application scenario of a page display method of a web application according to the present embodiment. In the application scenario of fig. 3, a user 301 sends a page load request to a server 303 through a terminal device 302. The page load request is used to generate a line graph of stock classes. After receiving the page loading request, the server 303 determines a page to be loaded according to the page loading request. And then, in response to determining that the page to be loaded comprises the placeholder component corresponding to the native high-consumption component, determining the attribute information of the placeholder component. And finally, loading the native high-consumption components in the page to be loaded based on the information such as the size, the position and the like in the attribute information, and displaying the page to be loaded with the native high-consumption components.
In the method provided by the above embodiment of the present application, the page to be loaded is determined according to the received page loading request; in response to determining that the page to be loaded comprises the placeholder components corresponding to the native high-consumption components, determining attribute information of the placeholder components; based on the attribute information, the native high-consumption component is loaded in the page to be loaded, and the page to be loaded with the native high-consumption component is displayed, so that a method for directly loading and rendering the native high-consumption component in the page of the webpage application to display the page is provided, the problem that the high-consumption component cannot be realized by the webpage application is solved, and the display effect of the page is improved.
With continuing reference to FIG. 4, an exemplary flow 400 of one embodiment of a method for page display of a web application according to the present application is shown and includes the steps of:
And 405, loading the page to be loaded through the webpage view control.
In step 406, in response to determining that the page to be loaded includes the placeholder component, when the page to be loaded is completely loaded, determining the attribute information of the placeholder component through the web view control.
And step 408, rendering the native high-consumption components in the page to be loaded through the webpage view control according to the attribute values matched with the native high-consumption components.
As can be seen from this embodiment, compared with the embodiment corresponding to fig. 2, the flow 400 of the page display method for the web application in this embodiment specifically illustrates an implementation process of the native high-consumption component, an establishment process of a corresponding relationship between the native high-consumption component and the placeholder component, and a process of loading the native high-consumption component to cover the placeholder component, thereby providing a completion process from the development of the page to the display of the page, and improving a display effect of the page.
With continuing reference to fig. 5, as an implementation of the method shown in the above-mentioned figures, the present application provides an embodiment of a page display apparatus for a web application, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the page display apparatus of the web application includes: a first determining unit 501, configured to determine a page to be loaded according to the received page loading request; a second determining unit 502, configured to determine attribute information of a placeholder component in response to determining that the placeholder component corresponding to the native high-consumption component is included in the page to be loaded; a display unit 503 configured to load the native high-consumption component in the page to be loaded based on the attribute information, and display the page to be loaded with the native high-consumption component loaded.
In some optional implementations of this embodiment, the display unit 503 is further configured to: converting the attribute value represented by the attribute information of the placeholder component into an attribute value matched with the native high-consumption component; and rendering the native high-consumption components in the page to be loaded through the webpage view control according to the attribute values matched with the native high-consumption components.
In some optional implementations of this embodiment, the display unit 503 is further configured to: adjusting the native code of the native high-consumption component according to the attribute value matched with the native high-consumption component; and rendering the native high-consumption component in the page to be loaded through a sub-view adding method in the webpage view control, wherein the sub-view adding method is used for adding a sub-view corresponding to the native high-consumption component in the page to be loaded.
In some optional implementations of this embodiment, the second determining unit 502 is further configured to: loading a page to be loaded through a webpage view control; and in response to determining that the page to be loaded comprises the placeholder component, determining the attribute information of the placeholder component through the webpage view control when the page to be loaded is loaded.
In some optional implementations of this embodiment, the apparatus further includes: the establishing unit (not shown in the figure) is configured to set an identifier for the native high-consumption component, and establish a corresponding relationship between the identifier and the placeholder component; and the development unit (not shown in the figure) is configured to declare an identifier in a class tag of the page to be loaded according to the received page development instruction, and set a placeholder component in the page to be loaded.
In some optional implementations of this embodiment, the apparatus further includes: an implementation unit (not shown in the figures) configured to implement the native high-consumption components based on the native code.
In this embodiment, a first determining unit in a page display device of a web application determines a page to be loaded according to a received page loading request; the second determining unit determines attribute information of the placeholder component in response to determining that the placeholder component corresponding to the native high-consumption component is included in the page to be loaded; the display unit loads the native high-consumption component in the page to be loaded based on the attribute information and displays the page to be loaded with the native high-consumption component, so that the device for directly loading and rendering the native high-consumption component in the page of the webpage application to display the page is provided, the problem that the high-consumption component cannot be realized in the webpage application is solved, and the display effect of the page is improved.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing devices of embodiments of the present application (e.g., devices 101, 102, 103, 105 shown in FIG. 1). The apparatus shown in fig. 6 is only an example, and should not bring any limitation to the function and use range of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a processor (e.g., CPU, central processing unit) 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the system 600 are also stored. The processor 601, the ROM602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the method of the present application.
It should be noted that the computer readable medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the client computer, partly on the client computer, as a stand-alone software package, partly on the client computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the client computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). 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 the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a first determination unit, a second determination unit, and a display unit. For example, the second determination unit may also be described as a "unit that loads a page to be loaded and determines attribute information of a placeholder component in response to determining that the placeholder component corresponding to the native consumable component is included in the page to be loaded".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the computer device to: determining a page to be loaded according to the received page loading request; in response to determining that the page to be loaded comprises the placeholder components corresponding to the native high-consumption components, determining attribute information of the placeholder components; and loading the native high-consumption components in the page to be loaded based on the attribute information, and displaying the page to be loaded with the native high-consumption components.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.
Claims (14)
1. A page display method of a web application includes:
determining a page to be loaded according to the received page loading request;
in response to determining that the page to be loaded comprises placeholders corresponding to native high-consumption components, determining attribute information of the placeholders;
and loading the native high-consumption component in the page to be loaded based on the attribute information, and displaying the page to be loaded with the native high-consumption component.
2. The method of claim 1, wherein the loading the native high-consumption component in the page to be loaded based on the attribute information comprises:
converting the attribute value represented by the attribute information of the placeholder component into the attribute value matched with the native high-consumption component;
and rendering the native high-consumption component in the page to be loaded through a webpage view control according to the attribute value matched with the native high-consumption component.
3. The method of claim 2, wherein the rendering the native high-cost component in the page to be loaded through a web page view control according to the attribute value matched by the native high-cost component comprises:
adjusting the native code of the native high-consumption component according to the attribute value matched with the native high-consumption component;
and rendering the native high-consumption component in the page to be loaded through a sub-view adding method in the webpage view control, wherein the sub-view adding method is used for adding a sub-view corresponding to the native high-consumption component in the page to be loaded.
4. The method of claim 1, wherein the determining attribute information of the placeholder component in response to determining that the page to be loaded includes a placeholder component corresponding to a native consumable component comprises:
loading the page to be loaded through a webpage view control;
and in response to determining that the page to be loaded comprises the placeholder assembly, determining the attribute information of the placeholder assembly through the webpage view control when the page to be loaded is loaded.
5. The method of any of claims 1-4, wherein prior to the determining the property information of the placeholder component in response to determining that the page to be loaded includes a placeholder component corresponding to a native consumable component, further comprising:
setting an identifier for the native high-consumption component, and establishing a corresponding relation between the identifier and the placeholder component;
according to the received page development instruction, declaring the identification in the class tag of the page to be loaded, and setting the placeholder component in the page to be loaded.
6. The method of claim 5, wherein before the setting an identifier for the native high-consumption component and establishing a correspondence between the identifier and the placeholder component, further comprising:
implementing the native high-consumption component based on native code.
7. A page display apparatus of a web application, comprising:
a first determining unit configured to determine a page to be loaded according to the received page loading request;
the second determining unit is configured to determine attribute information of the placeholder component in response to determining that the placeholder component corresponding to the native high-consumption component is included in the page to be loaded;
a display unit configured to load the native high-consumption component in the page to be loaded based on the attribute information and display the page to be loaded with the native high-consumption component loaded.
8. The apparatus of claim 7, wherein the display unit is further configured to:
converting the attribute value represented by the attribute information of the placeholder component into the attribute value matched with the native high-consumption component; and rendering the native high-consumption component in the page to be loaded through a webpage view control according to the attribute value matched with the native high-consumption component.
9. The apparatus of claim 8, wherein the display unit is further configured to:
adjusting the native code of the native high-consumption component according to the attribute value matched with the native high-consumption component; and rendering the native high-consumption component in the page to be loaded through a sub-view adding method in the webpage view control, wherein the sub-view adding method is used for adding a sub-view corresponding to the native high-consumption component in the page to be loaded.
10. The apparatus of claim 7, wherein the second determining unit is further configured to:
loading the page to be loaded through a webpage view control; and in response to determining that the page to be loaded comprises the placeholder assembly, determining the attribute information of the placeholder assembly through the webpage view control when the page to be loaded is loaded.
11. The apparatus of any of claims 7-10, further comprising:
the establishing unit is configured to set an identifier for the native high-consumption component and establish a corresponding relation between the identifier and the placeholder component;
and the development unit is configured to declare the identifier in the class tag of the page to be loaded according to the received page development instruction, and set the placeholder component in the page to be loaded.
12. The apparatus of claim 11, further comprising:
an implementation unit configured to implement the native high-consumption component based on native code.
13. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-6.
14. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111118182.9A CN113760438A (en) | 2021-09-22 | 2021-09-22 | Page display method and device for webpage application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111118182.9A CN113760438A (en) | 2021-09-22 | 2021-09-22 | Page display method and device for webpage application |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113760438A true CN113760438A (en) | 2021-12-07 |
Family
ID=78797169
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111118182.9A Pending CN113760438A (en) | 2021-09-22 | 2021-09-22 | Page display method and device for webpage application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113760438A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114385273A (en) * | 2022-03-25 | 2022-04-22 | 深圳市维度数据科技股份有限公司 | Page display method and device |
WO2023165190A1 (en) * | 2022-03-01 | 2023-09-07 | 腾讯科技(深圳)有限公司 | Data processing method and apparatus, program product, computer device, and medium |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107301182A (en) * | 2016-04-15 | 2017-10-27 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus for the webpage for showing embedded picture |
CN108153565A (en) * | 2016-12-02 | 2018-06-12 | 阿里巴巴集团控股有限公司 | The method and device of page info is provided |
CN108427597A (en) * | 2018-03-16 | 2018-08-21 | 崔红保 | Accelerate the method and device of page rendering |
CN110020307A (en) * | 2017-11-30 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of method for drafting and device of client's end-view |
CN110321177A (en) * | 2019-06-18 | 2019-10-11 | 北京奇艺世纪科技有限公司 | A kind of mobile application localization loading method, device and electronic equipment |
CN110543343A (en) * | 2019-06-13 | 2019-12-06 | 银联商务股份有限公司 | Financial interaction page generation method and device based on native android application |
CN110634049A (en) * | 2019-09-05 | 2019-12-31 | 北京无限光场科技有限公司 | Page display content processing method and device, electronic equipment and readable medium |
CN111324834A (en) * | 2020-01-20 | 2020-06-23 | 北京无限光场科技有限公司 | Image-text mixed arranging method and device, electronic equipment and computer readable medium |
CN112364277A (en) * | 2020-11-23 | 2021-02-12 | 北京三快在线科技有限公司 | Webpage loading method and device |
CN112800359A (en) * | 2020-12-18 | 2021-05-14 | 成都泛微网络科技有限公司 | Data processing method and related equipment |
CN112988284A (en) * | 2021-05-13 | 2021-06-18 | 太平金融科技服务(上海)有限公司 | Application program starting method and device, computer equipment and storage medium |
CN113051015A (en) * | 2021-03-30 | 2021-06-29 | 北京达佳互联信息技术有限公司 | Page rendering method and device, electronic equipment and storage medium |
CN113297522A (en) * | 2021-05-10 | 2021-08-24 | 广州虎牙科技有限公司 | Page rendering method and device, electronic equipment and readable storage medium |
-
2021
- 2021-09-22 CN CN202111118182.9A patent/CN113760438A/en active Pending
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107301182A (en) * | 2016-04-15 | 2017-10-27 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus for the webpage for showing embedded picture |
CN108153565A (en) * | 2016-12-02 | 2018-06-12 | 阿里巴巴集团控股有限公司 | The method and device of page info is provided |
CN110020307A (en) * | 2017-11-30 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of method for drafting and device of client's end-view |
CN108427597A (en) * | 2018-03-16 | 2018-08-21 | 崔红保 | Accelerate the method and device of page rendering |
CN110543343A (en) * | 2019-06-13 | 2019-12-06 | 银联商务股份有限公司 | Financial interaction page generation method and device based on native android application |
CN110321177A (en) * | 2019-06-18 | 2019-10-11 | 北京奇艺世纪科技有限公司 | A kind of mobile application localization loading method, device and electronic equipment |
CN110634049A (en) * | 2019-09-05 | 2019-12-31 | 北京无限光场科技有限公司 | Page display content processing method and device, electronic equipment and readable medium |
CN111324834A (en) * | 2020-01-20 | 2020-06-23 | 北京无限光场科技有限公司 | Image-text mixed arranging method and device, electronic equipment and computer readable medium |
CN112364277A (en) * | 2020-11-23 | 2021-02-12 | 北京三快在线科技有限公司 | Webpage loading method and device |
CN112800359A (en) * | 2020-12-18 | 2021-05-14 | 成都泛微网络科技有限公司 | Data processing method and related equipment |
CN113051015A (en) * | 2021-03-30 | 2021-06-29 | 北京达佳互联信息技术有限公司 | Page rendering method and device, electronic equipment and storage medium |
CN113297522A (en) * | 2021-05-10 | 2021-08-24 | 广州虎牙科技有限公司 | Page rendering method and device, electronic equipment and readable storage medium |
CN112988284A (en) * | 2021-05-13 | 2021-06-18 | 太平金融科技服务(上海)有限公司 | Application program starting method and device, computer equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023165190A1 (en) * | 2022-03-01 | 2023-09-07 | 腾讯科技(深圳)有限公司 | Data processing method and apparatus, program product, computer device, and medium |
CN114385273A (en) * | 2022-03-25 | 2022-04-22 | 深圳市维度数据科技股份有限公司 | Page display method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110020329B (en) | Method, device and system for generating webpage | |
CN106874519B (en) | Page display method and device | |
CN111443909B (en) | Method and device for generating page | |
CN113760438A (en) | Page display method and device for webpage application | |
CN109582317B (en) | Method and apparatus for debugging hosted applications | |
CN109766127A (en) | Method for updating application version information | |
CN113010405A (en) | Application program testing method and device | |
US11438403B2 (en) | Page presentation method and system, computer system, and computer readable medium | |
CN110109983B (en) | Method and device for operating Redis database | |
CN110377273B (en) | Data processing method, device, medium and electronic equipment | |
CN112486482A (en) | Page display method and device | |
CN111324376A (en) | Function configuration method and device, electronic equipment and computer readable medium | |
CN110647327A (en) | Method and device for dynamic control of user interface based on card | |
CN111984888A (en) | Page rendering method and device, electronic equipment and computer readable medium | |
CN112965916B (en) | Page testing method, page testing device, electronic equipment and readable storage medium | |
CN110874172A (en) | Method, device, medium and electronic equipment for amplifying APP interface | |
CN111767498A (en) | Method and device for realizing file information sharing | |
CN112818267A (en) | Data processing method and device, computer readable storage medium and electronic equipment | |
CN113779122B (en) | Method and device for exporting data | |
CN110020320A (en) | The method and apparatus for caching page pictures | |
CN110858240A (en) | Front-end module loading method and device | |
CN113835790B (en) | Paging page display method and device based on Android | |
CN113448578A (en) | Page data processing method, processing system, electronic device and readable storage medium | |
CN113656041A (en) | Data processing method, device, equipment and storage medium | |
CN113778566A (en) | Native application calling method and device, electronic equipment and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |