CN116524100A - Interface hybrid rendering method, device, equipment and storage medium - Google Patents

Interface hybrid rendering method, device, equipment and storage medium Download PDF

Info

Publication number
CN116524100A
CN116524100A CN202310288929.8A CN202310288929A CN116524100A CN 116524100 A CN116524100 A CN 116524100A CN 202310288929 A CN202310288929 A CN 202310288929A CN 116524100 A CN116524100 A CN 116524100A
Authority
CN
China
Prior art keywords
interface
rendering
node
rendering data
rendered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310288929.8A
Other languages
Chinese (zh)
Inventor
柳杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202310288929.8A priority Critical patent/CN116524100A/en
Publication of CN116524100A publication Critical patent/CN116524100A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/40Hidden part removal
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/23Input arrangements for video game devices for interfacing with the game device, e.g. specific interfaces between game controller and console
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/02Non-photorealistic rendering
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • A63F2300/6653Methods for processing data by generating or executing the game program for rendering three dimensional images for altering the visibility of an object, e.g. preventing the occlusion of an object, partially hiding an object
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Graphics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Image Generation (AREA)

Abstract

The invention provides an interface hybrid rendering method, device, equipment and storage medium, wherein the method comprises the following steps: the game engine is controlled to load the interface to be rendered and traverse interface nodes of the interface to be rendered; when traversing the primary interface node, rendering and drawing are carried out according to the primary interface node, so that first rendering data are obtained; when traversing the H5 interface node, sending an H5 interface rendering request to the browser kernel; the browser kernel loads and draws the H5 interface based on the H5 interface parameter in the H5 interface rendering request to obtain second rendering data, and transmits the second rendering data to the game engine; the game engine renders and draws according to the first rendering data and the second rendering data. In the method, when a browser kernel or a game engine rendering process encounters a mixed node, the other party is requested to draw the interfaces, rendering data is finally generated and transmitted back to the requesting party, and the requesting party renders the rendering data.

Description

Interface hybrid rendering method, device, equipment and storage medium
Technical Field
The present invention relates to the field of game technologies, and in particular, to an interface hybrid rendering method, apparatus, device, and storage medium.
Background
When the game interface is developed, H5 interface development or native technology development is generally used, H5 and native technology are mixed for development, and when the H5 and the native technology are mixed for development, when the client displays the interface and the native interface, the interface shielding problem can occur. The normal shielding relation is determined according to the interface level, and the normal level shielding relation cannot be displayed because the native interface and the H5 interface render the interface by using completely different technologies. The original interfaces represent normal shielding relations according to the hierarchical relation, when the H5 interfaces are embedded, errors occur in the shielding relations, and the H5 interfaces in the second layer shield the original interfaces in the third layer.
In order to avoid the above problems, there are two conventional types, one is that the H5 interface is always displayed at the forefront, and when other interfaces need to be displayed, the H5 interface needs to be hidden. In another way, the native interface and the H5 interface are tiled and distributed in different areas, so that the shielding problem is avoided. When the third layer of the native interface needs to be displayed, the H5 interface of the second layer is hidden, however, these methods cannot well reflect the hierarchical relationship between the H5 interface and the native interface.
Disclosure of Invention
The invention mainly aims to solve the technical problem that the hierarchical relationship between the developed H5 interface and the native interface cannot be embodied when the existing H5 technology and the native technology are used for page development.
The first aspect of the invention provides an interface hybrid rendering method, which comprises the following steps:
loading a preset first interface to be rendered through a game engine and traversing interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node;
when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained;
when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node;
loading and drawing an H5 interface based on H5 interface parameters in the H5 interface rendering request through the browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to the game engine;
And drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data.
The second aspect of the present invention provides an interface hybrid rendering apparatus, comprising:
the node traversing module is used for loading a preset first interface to be rendered through the game engine and traversing interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node;
the first rendering module is used for rendering and drawing according to the original interface node through the game engine when the interface node traversed by the game engine is the original interface node, so as to obtain corresponding first rendering data;
the request sending module is used for sending an H5 interface rendering request to a preset browser kernel through the game engine when the interface node traversed by the game engine is an H5 interface node, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node;
the second rendering module is used for loading and drawing the H5 interface based on the H5 interface parameter in the H5 interface rendering request through the browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to the game engine;
And the interface drawing module is used for drawing the first interface to be rendered on a preset front-end interface through the game engine according to the first rendering data and the second rendering data.
A third aspect of the present invention provides an interface hybrid rendering apparatus, including: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the interface blending rendering device to perform the steps of the interface blending rendering method described above.
A fourth aspect of the present invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the steps of the interface blending rendering method described above.
The interface hybrid rendering method, the device, the equipment and the storage medium load the preset first interface to be rendered through the game engine and traverse the interface node of the first interface to be rendered, wherein the interface node comprises a native interface node and an H5 interface node; when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained; when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node; loading and drawing an H5 interface based on H5 interface parameters in an H5 interface rendering request through a browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to a game engine; and drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data. In the method, when a browser kernel or a game engine rendering process encounters a mixed node, the other party is requested to draw the interfaces, rendering data is finally generated and transmitted back to the requesting party, and the requesting party renders the rendering data.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
FIG. 1 is a schematic diagram of a first embodiment of an interface blending rendering method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a second embodiment of an interface blending rendering method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an interface hybrid rendering apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of an interface blending rendering apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an embodiment of an interface hybrid rendering apparatus according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides an interface hybrid rendering method, device, equipment and storage medium, wherein a game engine loads a preset first interface to be rendered and traverses interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node; when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained; when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node; loading and drawing an H5 interface based on H5 interface parameters in an H5 interface rendering request through a browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to a game engine; and drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data. In the method, when a browser kernel or a game engine rendering process encounters a mixed node, the other party is requested to draw the interfaces, rendering data is finally generated and transmitted back to the requesting party, and the requesting party renders the rendering data.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For easy understanding, the following describes a specific flow of an embodiment of the present invention, referring to fig. 1, and a first embodiment of an interface blending rendering method in an embodiment of the present invention includes:
101. loading a preset first interface to be rendered through a game engine and traversing interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node;
In this embodiment, before the loading, by the game engine, the preset first interface to be rendered and traversing the interface node of the first interface to be rendered, the method further includes: acquiring input H5 interface parameters, and generating H5 interface nodes according to the H5 interface parameters; and inserting the H5 interface node into a native interface node of the first interface to be rendered.
Specifically, the game engine is a neox game engine, and meanwhile, the scheme can be generally used in other game engines, such as a blurring engine, a unit and the like, and the game engine is not limited in the application. The interface to be rendered in the game engine comprises a plurality of interface nodes, and the interface nodes are interface codes with specific information and functions, such as common buttons, texts, input boxes and pictures. An interface node generally records information such as node position, shape, father-son node and the like to complete rendering operation of the interface node, and each interface node represents a functional module in a game engine. The game engine traverses each interface node for loading and drawing as the native interface is rendered. The invention adds an H5 page node.
102. When the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained;
In this embodiment, the game engine refreshes the display of the game picture by drawing the native interface, when the native interface is drawn, the interface node is traversed, and when the native interface node is traversed, the normal node loading and drawing process is performed to obtain the corresponding first rendering data, where the rendering data refers to the data representing the picture and the display picture in the computer system, each unit in the rendering data is a pixel point, and each pixel point records the color information of the pixel through a specific format.
103. When the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node;
in this embodiment, when an H5 page node is encountered, node resources and drawing pictures are not directly loaded, but an H5 interface rendering request is sent to the browser kernel.
104. Loading and drawing an H5 interface based on H5 interface parameters in an H5 interface rendering request through a browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to a game engine;
in this embodiment, the H5 interface parameter includes resource link information and interface size information; loading and drawing an H5 interface based on H5 interface parameters in the H5 interface rendering request through the browser kernel, and obtaining corresponding second rendering data comprises the following steps: acquiring corresponding H5 interface resources based on the resource link information in the H5 interface rendering request through the browser kernel; loading an H5 interface based on the H5 interface parameter through the browser kernel, and adjusting the interface display effect of the loaded H5 interface according to the interface size information; and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the interface node to obtain corresponding second rendering data.
Specifically, when the game engine sends an H5 interface rendering request to the browser, resource link information required by loading the H5 interface is transmitted, the browser kernel acquires H5 interface resources through resource links, after the H5 interface resources are loaded into the browser kernel, interface display effects are adjusted through interface size information, and then interface drawing is performed.
In this embodiment, before the drawing, by the browser kernel, based on the interface display effect and the H5 interface resource, to obtain the corresponding second rendering data, the method further includes: judging whether the interface node of the H5 interface comprises a native interface node or not through the browser kernel; if yes, sending a native interface rendering request to the game engine through the browser kernel; rendering and drawing a native interface based on the native interface rendering request through the game engine, generating image data of the native interface, and transmitting the image data to the browser kernel.
Specifically, the H5 interface rendered by the browser kernel also comprises interface nodes, when the interface nodes of the H5 interface comprise native interface elements, a rendering request is sent to the game engine during rendering, the game engine finishes rendering of the native interface, image data generated by rendering is transmitted to the browser kernel, the browser kernel finishes overall rendering on all the interface nodes, and the generated data is returned to the game engine.
Further, the drawing, by the browser kernel, based on the interface display effect, the H5 interface resource of the H5 interface, and the interface node, to obtain the corresponding second rendering data includes: and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the image data of the original interface node in the interface nodes to obtain corresponding second rendering data.
Specifically, the browser kernel may provide a graphics interface to draw an image by using a rendering interface or a graphics card driver of the system, and display a drawing result on a screen. Taking a windows platform as an example, the browser kernel can utilize a GDI interface of the windows to carry out graphic drawing, and a drawing result can be directly output to a screen for display or can be in a data form to a memory area.
In this embodiment, the transferring the second rendering data to the game engine includes: storing the second rendering data to a preset memory area through the browser kernel; and the second rendering data is led out from the memory area, and is recorded in the game engine.
Specifically, in this embodiment, the GDI interface is used to switch the rendering output target to output to the memory area, and after the rendering is completed, the rendering result is obtained from the memory area to derive the second rendering data, and the second rendering data is recorded in the game engine, so that the game engine obtains the rendering of the H5 interface to generate the second rendering data.
105. And drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data.
In this embodiment, the drawing, by the game engine, the first interface to be rendered on a preset front-end interface according to the first rendering data and the second rendering data includes: acquiring a native interface parameter of a native interface node corresponding to the first rendering data; determining the hierarchical relationship between the corresponding native interface node and the corresponding H5 interface node according to the native interface parameter and the H5 interface parameter; adjusting a rendering order between the first rendering data and the second rendering data according to the hierarchical relationship; and drawing the first interface to be rendered on a preset front-end interface according to the rendering sequence, the first rendering data and the second rendering data.
Specifically, after the game engine acquires the second rendering data of the H5 interface and the first rendering data of the original interface, the rendering data are redrawn to be displayed on a screen picture, the game engine adjusts the rendering sequence of the H5 interface node and the original interface node according to the position and the hierarchy relation before drawing, and shielding rejection calculation is performed by using the hierarchy relation in drawing, so that the shielding effect is ensured to be normal.
In this embodiment, loading a preset first interface to be rendered through a game engine and traversing interface nodes of the first interface to be rendered, wherein the interface nodes include a native interface node and an H5 interface node; when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained; when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node; loading and drawing an H5 interface based on H5 interface parameters in an H5 interface rendering request through a browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to a game engine; and drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data. In the method, when a browser kernel or a game engine rendering process encounters a mixed node, the other party is requested to draw the interfaces, rendering data is finally generated and transmitted back to the requesting party, and the requesting party renders the rendering data.
Referring to fig. 2, a second embodiment of an interface blending rendering method according to an embodiment of the present invention includes:
201. loading a preset second interface to be rendered through a browser kernel and traversing interface nodes of the second interface to be rendered;
in this embodiment, before loading the preset second interface to be rendered through the browser kernel and traversing the interface node of the second interface to be rendered, the method further includes: generating a DOM tree of the second interface to be rendered according to the file format of the second interface to be rendered, wherein DOM nodes in the DOM tree respectively correspond to an interface node; and acquiring the input original interface parameters, and generating DOM nodes corresponding to the H5 interface nodes in the DOM tree according to the original interface parameters.
Specifically, the H5 interface adopts an HTML rich text format, the file format is a DOM tree, each interface is a DOM node in the DOM tree, the invention defines a specific DOM node to represent a native interface node, the native interface node processes and sets node position, size and level information, a game_ui_name identifier is added as a unique identifier of the native interface, and character string information recorded by the game_ui_name is used for associating the native interface in the game,
202. When the interface node traversed by the browser kernel is an H5 interface node, rendering and drawing are carried out through the browser kernel according to the H5 interface node of the second interface to be rendered, and corresponding third rendering data are obtained;
203. when the interface node traversed by the browser kernel is a native interface node, sending a native interface rendering request to the game engine through the browser kernel, wherein the native interface rendering request comprises a native interface parameter of the native interface node;
in this embodiment, when the browser loads the native interface node, a native interface rendering request is sent to the game engine, and the game engine carries the game_ui_name record information, loads the native interface through the game_ui_name to render, returns a rendering result to the browser to render, after loading the H5 page by the browser kernel, analyzes the DOM to draw the page element, and when the native interface node is analyzed, sends the native interface rendering request to the game engine.
204. Determining and loading a designated original interface based on an interface unique identifier in the original interface parameters through a game engine to obtain fourth rendering data corresponding to the designated original interface, and transmitting the fourth rendering data to a browser kernel;
In this embodiment, when the game engine receives a request for rendering a native interface of the browser, the game engine loads and draws a designated native according to the unique interface identifier in the request. Different rendering modes can be selected according to the client operation platform, and the rendering is generally performed by utilizing a graphics principle, so that a rendering result can be output to a buffer zone by utilizing off-screen rendering of graphics, and the fourth rendering data of the rendering is read through the buffer zone.
205. And drawing the second interface to be rendered on the front-end interface through the browser kernel according to the third rendering data and the fourth rendering data.
In this embodiment, the drawing, by the browser kernel, the second interface to be rendered on the front-end interface according to the third rendering data and the fourth rendering data includes: determining corresponding DOM nodes of the third rendering data and the fourth rendering data in the DOM tree, and acquiring an interface CSS configuration table of the second interface to be rendered; and drawing the second interface to be rendered on the front end interface according to the third rendering data, the fourth rendering data, the DOM node corresponding to the third rendering data, the position relation of the DOM node corresponding to the fourth rendering data in the DOM tree and the interface CSS configuration table.
Specifically, the game engine generates resource links for the image data, the resource links are transmitted to the browser kernel, the browser kernel loads the image data through the resource links for drawing, and after the browsing kernel loads the image resources, the image data are rendered into an H5 picture according to the position of the nodes in the DOM tree, the interface CSS configuration table and other information, so that the normal shielding relation of the picture is ensured.
In this embodiment, loading a preset second interface to be rendered through a browser kernel and traversing interface nodes of the second interface to be rendered; when the interface node traversed by the browser kernel is an H5 interface node, rendering and drawing are carried out by the browser kernel according to the H5 interface node of the second interface to be rendered, so that corresponding third rendering data are obtained; when the interface node traversed by the browser kernel is a native interface node, sending a native interface rendering request to the game engine through the browser kernel, wherein the native interface rendering request comprises a native interface parameter of the native interface node; determining and loading a designated primary interface based on an interface unique identifier in the primary interface parameters through the game engine to obtain fourth rendering data corresponding to the designated primary interface, and transmitting the fourth rendering data to the browser kernel; and drawing the second interface to be rendered on the front-end interface through the browser kernel according to the third rendering data and the fourth rendering data. In the method, when a browser kernel or a game engine rendering process encounters a mixed node, the other party is requested to draw the interfaces, rendering data is finally generated and transmitted back to the requesting party, and the requesting party renders the rendering data.
The method for rendering an interface in the embodiment of the present invention is described above, and the apparatus for rendering an interface in the embodiment of the present invention is described below, referring to fig. 3, where an embodiment of the apparatus for rendering an interface in the embodiment of the present invention includes:
the node traversing module 301 is configured to load a preset first interface to be rendered through a game engine and traverse interface nodes of the first interface to be rendered, where the interface nodes include a native interface node and an H5 interface node;
the first rendering module 302 is configured to render and draw according to the native interface node by using the game engine when the interface node traversed by the game engine is the native interface node, so as to obtain corresponding first rendering data;
the request sending module 303 is configured to send, when the interface node traversed by the game engine is an H5 interface node, an H5 interface rendering request to a preset browser kernel through the game engine, where the H5 interface rendering request includes H5 interface parameters of the H5 interface node;
the second rendering module 304 is configured to load and draw an H5 interface based on an H5 interface parameter in the H5 interface rendering request through the browser kernel, obtain corresponding second rendering data, and transmit the second rendering data to the game engine;
The interface drawing module 305 is configured to draw, by the game engine, the first interface to be rendered on a preset front-end interface according to the first rendering data and the second rendering data.
In the embodiment of the invention, the interface hybrid rendering device runs the interface hybrid rendering method, loads a preset first interface to be rendered through a game engine and traverses interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node; when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained; when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node; loading and drawing an H5 interface based on H5 interface parameters in an H5 interface rendering request through a browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to a game engine; and drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data. In the method, when a browser kernel or a game engine rendering process encounters a mixed node, the other party is requested to draw the interfaces, rendering data is finally generated and transmitted back to the requesting party, and the requesting party renders the rendering data.
Referring to fig. 4, a second embodiment of an interface mixing rendering apparatus according to an embodiment of the present invention includes:
the node traversing module 301 is configured to load a preset first interface to be rendered through a game engine and traverse interface nodes of the first interface to be rendered, where the interface nodes include a native interface node and an H5 interface node;
the first rendering module 302 is configured to render and draw according to the native interface node by using the game engine when the interface node traversed by the game engine is the native interface node, so as to obtain corresponding first rendering data;
the request sending module 303 is configured to send, when the interface node traversed by the game engine is an H5 interface node, an H5 interface rendering request to a preset browser kernel through the game engine, where the H5 interface rendering request includes H5 interface parameters of the H5 interface node;
the second rendering module 304 is configured to load and draw an H5 interface based on an H5 interface parameter in the H5 interface rendering request through the browser kernel, obtain corresponding second rendering data, and transmit the second rendering data to the game engine;
the interface drawing module 305 is configured to draw, by the game engine, the first interface to be rendered on a preset front-end interface according to the first rendering data and the second rendering data.
In this embodiment, the interface hybrid rendering apparatus further includes an H5 interface node generating module 306, where the H5 interface node generating module 306 is specifically configured to:
acquiring input H5 interface parameters, and generating H5 interface nodes according to the H5 interface parameters;
and inserting the H5 interface node into a native interface node of the first interface to be rendered.
In this embodiment, the H5 interface parameter includes resource link information and interface size information; the second rendering module 304 includes:
a resource obtaining unit 3041, configured to obtain, by using the browser kernel, a corresponding H5 interface resource based on resource link information in the H5 interface rendering request;
the effect adjustment unit 3042 is configured to load an H5 interface based on the H5 interface parameter through the browser kernel, and adjust an interface display effect of the loaded H5 interface according to the interface size information;
and the H5 rendering unit 3043 is configured to draw, by using the browser kernel, based on the interface display effect, the H5 interface resource of the H5 interface, and the interface node, to obtain corresponding second rendering data.
In this embodiment, the second rendering module 304 further includes a native rendering unit 3044, where the native rendering unit 3044 is specifically configured to:
Judging whether the interface node of the H5 interface comprises a native interface node or not through the browser kernel;
if yes, sending a native interface rendering request to the game engine through the browser kernel;
rendering and drawing a native interface based on the native interface rendering request through the game engine, generating image data of the native interface, and transmitting the image data to the browser kernel.
In this embodiment, the H5 rendering unit 3043 is specifically configured to:
and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the image data of the original interface node in the interface nodes to obtain corresponding second rendering data.
In this embodiment, the transferring the second rendering data to the game engine includes:
storing the second rendering data to a preset memory area through the browser kernel;
and the second rendering data is led out from the memory area, and is recorded in the game engine.
In this embodiment, the interface drawing module 305 is specifically configured to:
acquiring a native interface parameter of a native interface node corresponding to the first rendering data;
Determining the hierarchical relationship between the corresponding native interface node and the corresponding H5 interface node according to the native interface parameter and the H5 interface parameter;
adjusting a rendering order between the first rendering data and the second rendering data according to the hierarchical relationship;
and drawing the first interface to be rendered on a preset front-end interface according to the rendering sequence, the first rendering data and the second rendering data.
In this embodiment, the interface hybrid rendering device further includes an H5 hybrid rendering module 307, where the H5 hybrid rendering module 307 is specifically configured to:
loading a preset second interface to be rendered through a browser kernel and traversing interface nodes of the second interface to be rendered;
when the interface node traversed by the browser kernel is an H5 interface node, rendering and drawing are carried out by the browser kernel according to the H5 interface node of the second interface to be rendered, so that corresponding third rendering data are obtained;
when the interface node traversed by the browser kernel is a native interface node, sending a native interface rendering request to the game engine through the browser kernel, wherein the native interface rendering request comprises a native interface parameter of the native interface node;
Determining and loading a designated primary interface based on an interface unique identifier in the primary interface parameters through the game engine to obtain fourth rendering data corresponding to the designated primary interface, and transmitting the fourth rendering data to the browser kernel;
and drawing the second interface to be rendered on the front-end interface through the browser kernel according to the third rendering data and the fourth rendering data.
In this embodiment, the H5 hybrid rendering module 307 is specifically further configured to:
generating a DOM tree of the second interface to be rendered according to the file format of the second interface to be rendered, wherein DOM nodes in the DOM tree respectively correspond to an interface node;
and acquiring the input original interface parameters, and generating DOM nodes corresponding to the H5 interface nodes in the DOM tree according to the original interface parameters.
In this embodiment, the drawing, by the browser kernel, the second interface to be rendered on the front-end interface according to the third rendering data and the fourth rendering data includes:
determining corresponding DOM nodes of the third rendering data and the fourth rendering data in the DOM tree, and acquiring an interface CSS configuration table of the second interface to be rendered;
And drawing the second interface to be rendered on the front end interface according to the third rendering data, the fourth rendering data, the DOM node corresponding to the third rendering data, the position relation of the DOM node corresponding to the fourth rendering data in the DOM tree and the interface CSS configuration table.
The embodiment describes the specific functions of each module and the unit constitution of part of the modules in detail on the basis of the previous embodiment, and controls the game engine to load the preset first interface to be rendered and traverse the interface nodes of the first interface to be rendered through the modules and the unit constitution of the modules, wherein the interface nodes comprise a native interface node and an H5 interface node; when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained; when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node; loading and drawing an H5 interface based on H5 interface parameters in an H5 interface rendering request through a browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to a game engine; and drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data. In the method, when a browser kernel or a game engine rendering process encounters a mixed node, the other party is requested to draw the interfaces, rendering data is finally generated and transmitted back to the requesting party, and the requesting party renders the rendering data.
The above fig. 3 and fig. 4 describe the middle interface hybrid rendering device in the embodiment of the present invention in detail from the point of view of modularized functional entities, and the following describes the interface hybrid rendering device in the embodiment of the present invention in detail from the point of view of hardware processing.
Fig. 5 is a schematic structural diagram of an interface hybrid rendering device according to an embodiment of the present invention, where the interface hybrid rendering device 500 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing application programs 533 or data 532. Wherein memory 520 and storage medium 530 may be transitory or persistent storage. The program stored in the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations in the interface hybrid rendering device 500. Still further, the processor 510 may be configured to communicate with the storage medium 530, and execute a series of instruction operations in the storage medium 530 on the interface hybrid rendering device 500 to implement the following steps:
Loading a preset first interface to be rendered through a game engine and traversing interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node;
when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained;
when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node;
loading and drawing an H5 interface based on H5 interface parameters in the H5 interface rendering request through the browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to the game engine;
and drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data.
Optionally, before loading a preset first interface to be rendered by the game engine and traversing the interface node of the first interface to be rendered, the method further includes:
Acquiring input H5 interface parameters, and generating H5 interface nodes according to the H5 interface parameters;
and inserting the H5 interface node into a native interface node of the first interface to be rendered.
Optionally, the H5 interface parameter includes resource link information and interface size information;
loading and drawing an H5 interface based on H5 interface parameters in the H5 interface rendering request through the browser kernel, and obtaining corresponding second rendering data comprises the following steps:
acquiring corresponding H5 interface resources based on the resource link information in the H5 interface rendering request through the browser kernel;
loading an H5 interface based on the H5 interface parameter through the browser kernel, and adjusting the interface display effect of the loaded H5 interface according to the interface size information;
and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the interface node to obtain corresponding second rendering data.
Optionally, before the drawing is performed by the browser kernel based on the interface display effect and the H5 interface resource, the method further includes:
judging whether the interface node of the H5 interface comprises a native interface node or not through the browser kernel;
If yes, sending a native interface rendering request to the game engine through the browser kernel;
rendering and drawing a native interface based on the native interface rendering request through the game engine, generating image data of the native interface, and transmitting the image data to the browser kernel.
Optionally, the drawing, by the browser kernel, based on the interface display effect, the H5 interface resource of the H5 interface, and the interface node, to obtain the corresponding second rendering data includes:
and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the image data of the original interface node in the interface nodes to obtain corresponding second rendering data.
Optionally, the transferring the second rendering data to the game engine includes:
storing the second rendering data to a preset memory area through the browser kernel;
and the second rendering data is led out from the memory area, and is recorded in the game engine.
Optionally, the drawing, by the game engine, the first interface to be rendered on a preset front-end interface according to the first rendering data and the second rendering data includes:
Acquiring a native interface parameter of a native interface node corresponding to the first rendering data;
determining the hierarchical relationship between the corresponding native interface node and the corresponding H5 interface node according to the native interface parameter and the H5 interface parameter;
adjusting a rendering order between the first rendering data and the second rendering data according to the hierarchical relationship;
and drawing the first interface to be rendered on a preset front-end interface according to the rendering sequence, the first rendering data and the second rendering data.
Optionally, the hybrid rendering method further includes:
loading a preset second interface to be rendered through a browser kernel and traversing interface nodes of the second interface to be rendered;
when the interface node traversed by the browser kernel is an H5 interface node, rendering and drawing are carried out by the browser kernel according to the H5 interface node of the second interface to be rendered, so that corresponding third rendering data are obtained;
when the interface node traversed by the browser kernel is a native interface node, sending a native interface rendering request to the game engine through the browser kernel, wherein the native interface rendering request comprises a native interface parameter of the native interface node;
Determining and loading a designated primary interface based on an interface unique identifier in the primary interface parameters through the game engine to obtain fourth rendering data corresponding to the designated primary interface, and transmitting the fourth rendering data to the browser kernel;
and drawing the second interface to be rendered on the front-end interface through the browser kernel according to the third rendering data and the fourth rendering data.
Optionally, before loading the preset second interface to be rendered through the browser kernel and traversing the interface node of the second interface to be rendered, the method further includes:
generating a DOM tree of the second interface to be rendered according to the file format of the second interface to be rendered, wherein DOM nodes in the DOM tree respectively correspond to an interface node;
and acquiring the input original interface parameters, and generating DOM nodes corresponding to the H5 interface nodes in the DOM tree according to the original interface parameters.
Optionally, the drawing, by the browser kernel, the second interface to be rendered on the front-end interface according to the third rendering data and the fourth rendering data includes:
determining corresponding DOM nodes of the third rendering data and the fourth rendering data in the DOM tree, and acquiring an interface CSS configuration table of the second interface to be rendered;
And drawing the second interface to be rendered on the front end interface according to the third rendering data, the fourth rendering data, the DOM node corresponding to the third rendering data, the position relation of the DOM node corresponding to the fourth rendering data in the DOM tree and the interface CSS configuration table.
The interface hybrid rendering device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input/output interfaces 560, and/or one or more operating systems 531, such as Windows Serve, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the interface mixing rendering device structure shown in fig. 5 is not limiting of the interface mixing rendering device provided by the present invention, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and which may also be a volatile computer readable storage medium, the computer readable storage medium having instructions stored therein which, when executed on a computer, cause the computer to perform the steps of:
Loading a preset first interface to be rendered through a game engine and traversing interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node;
when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained;
when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node;
loading and drawing an H5 interface based on H5 interface parameters in the H5 interface rendering request through the browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to the game engine;
and drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data.
Optionally, before loading a preset first interface to be rendered by the game engine and traversing the interface node of the first interface to be rendered, the method further includes:
Acquiring input H5 interface parameters, and generating H5 interface nodes according to the H5 interface parameters;
and inserting the H5 interface node into a native interface node of the first interface to be rendered.
Optionally, the H5 interface parameter includes resource link information and interface size information;
loading and drawing an H5 interface based on H5 interface parameters in the H5 interface rendering request through the browser kernel, and obtaining corresponding second rendering data comprises the following steps:
acquiring corresponding H5 interface resources based on the resource link information in the H5 interface rendering request through the browser kernel;
loading an H5 interface based on the H5 interface parameter through the browser kernel, and adjusting the interface display effect of the loaded H5 interface according to the interface size information;
and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the interface node to obtain corresponding second rendering data.
Optionally, before the drawing is performed by the browser kernel based on the interface display effect and the H5 interface resource, the method further includes:
judging whether the interface node of the H5 interface comprises a native interface node or not through the browser kernel;
If yes, sending a native interface rendering request to the game engine through the browser kernel;
rendering and drawing a native interface based on the native interface rendering request through the game engine, generating image data of the native interface, and transmitting the image data to the browser kernel.
Optionally, the drawing, by the browser kernel, based on the interface display effect, the H5 interface resource of the H5 interface, and the interface node, to obtain the corresponding second rendering data includes:
and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the image data of the original interface node in the interface nodes to obtain corresponding second rendering data.
Optionally, the transferring the second rendering data to the game engine includes:
storing the second rendering data to a preset memory area through the browser kernel;
and the second rendering data is led out from the memory area, and is recorded in the game engine.
Optionally, the drawing, by the game engine, the first interface to be rendered on a preset front-end interface according to the first rendering data and the second rendering data includes:
Acquiring a native interface parameter of a native interface node corresponding to the first rendering data;
determining the hierarchical relationship between the corresponding native interface node and the corresponding H5 interface node according to the native interface parameter and the H5 interface parameter;
adjusting a rendering order between the first rendering data and the second rendering data according to the hierarchical relationship;
and drawing the first interface to be rendered on a preset front-end interface according to the rendering sequence, the first rendering data and the second rendering data.
Optionally, the hybrid rendering method further includes:
loading a preset second interface to be rendered through a browser kernel and traversing interface nodes of the second interface to be rendered;
when the interface node traversed by the browser kernel is an H5 interface node, rendering and drawing are carried out by the browser kernel according to the H5 interface node of the second interface to be rendered, so that corresponding third rendering data are obtained;
when the interface node traversed by the browser kernel is a native interface node, sending a native interface rendering request to the game engine through the browser kernel, wherein the native interface rendering request comprises a native interface parameter of the native interface node;
Determining and loading a designated primary interface based on an interface unique identifier in the primary interface parameters through the game engine to obtain fourth rendering data corresponding to the designated primary interface, and transmitting the fourth rendering data to the browser kernel;
and drawing the second interface to be rendered on the front-end interface through the browser kernel according to the third rendering data and the fourth rendering data.
Optionally, before loading the preset second interface to be rendered through the browser kernel and traversing the interface node of the second interface to be rendered, the method further includes:
generating a DOM tree of the second interface to be rendered according to the file format of the second interface to be rendered, wherein DOM nodes in the DOM tree respectively correspond to an interface node;
and acquiring the input original interface parameters, and generating DOM nodes corresponding to the H5 interface nodes in the DOM tree according to the original interface parameters.
Optionally, the drawing, by the browser kernel, the second interface to be rendered on the front-end interface according to the third rendering data and the fourth rendering data includes:
determining corresponding DOM nodes of the third rendering data and the fourth rendering data in the DOM tree, and acquiring an interface CSS configuration table of the second interface to be rendered;
And drawing the second interface to be rendered on the front end interface according to the third rendering data, the fourth rendering data, the DOM node corresponding to the third rendering data, the position relation of the DOM node corresponding to the fourth rendering data in the DOM tree and the interface CSS configuration table.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (13)

1. An interface hybrid rendering method is characterized by comprising the following steps:
loading a preset first interface to be rendered through a game engine and traversing interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node;
when the interface node traversed by the game engine is a primary interface node, rendering and drawing are carried out by the game engine according to the primary interface node, so that corresponding first rendering data are obtained;
when the interface node traversed by the game engine is an H5 interface node, sending an H5 interface rendering request to a preset browser kernel through the game engine, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node;
Loading and drawing an H5 interface based on H5 interface parameters in the H5 interface rendering request through the browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to the game engine;
and drawing the first interface to be rendered on a preset front-end interface by the game engine according to the first rendering data and the second rendering data.
2. The interface hybrid rendering method according to claim 1, further comprising, before loading a preset first interface to be rendered by the game engine and traversing interface nodes of the first interface to be rendered:
acquiring input H5 interface parameters, and generating H5 interface nodes according to the H5 interface parameters;
and inserting the H5 interface node into a native interface node of the first interface to be rendered.
3. The interface mixing rendering method according to claim 2, wherein the H5 interface parameters include resource link information and interface size information;
loading and drawing an H5 interface based on H5 interface parameters in the H5 interface rendering request through the browser kernel, and obtaining corresponding second rendering data comprises the following steps:
Acquiring corresponding H5 interface resources based on the resource link information in the H5 interface rendering request through the browser kernel;
loading an H5 interface based on the H5 interface parameter through the browser kernel, and adjusting the interface display effect of the loaded H5 interface according to the interface size information;
and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the interface node to obtain corresponding second rendering data.
4. The method of claim 3, further comprising, before the drawing by the browser kernel based on the interface display effect and the H5 interface resource, obtaining corresponding second rendered data:
judging whether the interface node of the H5 interface comprises a native interface node or not through the browser kernel;
if yes, sending a native interface rendering request to the game engine through the browser kernel;
rendering and drawing a native interface based on the native interface rendering request through the game engine, generating image data of the native interface, and transmitting the image data to the browser kernel.
5. The method of claim 4, wherein the drawing, by the browser kernel, based on the interface display effect, the H5 interface resource of the H5 interface, and the interface node, to obtain the corresponding second rendering data includes:
and drawing by the browser kernel based on the interface display effect, the H5 interface resource of the H5 interface and the image data of the original interface node in the interface nodes to obtain corresponding second rendering data.
6. The interface hybrid rendering method of claim 1, wherein the communicating the second rendering data to the game engine comprises:
storing the second rendering data to a preset memory area through the browser kernel;
and the second rendering data is led out from the memory area, and is recorded in the game engine.
7. The interface mixing rendering method of claim 1, wherein the drawing, by the game engine, the first interface to be rendered on a preset front-end interface according to the first rendering data and the second rendering data comprises:
Acquiring a native interface parameter of a native interface node corresponding to the first rendering data;
determining the hierarchical relationship between the corresponding native interface node and the corresponding H5 interface node according to the native interface parameter and the H5 interface parameter;
adjusting a rendering order between the first rendering data and the second rendering data according to the hierarchical relationship;
and drawing the first interface to be rendered on a preset front-end interface according to the rendering sequence, the first rendering data and the second rendering data.
8. The interface hybrid rendering method of claim 1, further comprising:
loading a preset second interface to be rendered through a browser kernel and traversing interface nodes of the second interface to be rendered;
when the interface node traversed by the browser kernel is an H5 interface node, rendering and drawing are carried out by the browser kernel according to the H5 interface node of the second interface to be rendered, so that corresponding third rendering data are obtained;
when the interface node traversed by the browser kernel is a native interface node, sending a native interface rendering request to the game engine through the browser kernel, wherein the native interface rendering request comprises a native interface parameter of the native interface node;
Determining and loading a designated primary interface based on an interface unique identifier in the primary interface parameters through the game engine to obtain fourth rendering data corresponding to the designated primary interface, and transmitting the fourth rendering data to the browser kernel;
and drawing the second interface to be rendered on the front-end interface through the browser kernel according to the third rendering data and the fourth rendering data.
9. The method of claim 8, further comprising, before loading a preset second interface to be rendered by the browser kernel and traversing interface nodes of the second interface to be rendered:
generating a DOM tree of the second interface to be rendered according to the file format of the second interface to be rendered, wherein DOM nodes in the DOM tree respectively correspond to an interface node;
and acquiring the input original interface parameters, and generating DOM nodes corresponding to the H5 interface nodes in the DOM tree according to the original interface parameters.
10. The interface hybrid rendering method of claim 9, wherein the drawing, by the browser kernel, the second interface to be rendered on the front-end interface according to the third rendering data and the fourth rendering data comprises:
Determining corresponding DOM nodes of the third rendering data and the fourth rendering data in the DOM tree, and acquiring an interface CSS configuration table of the second interface to be rendered;
and drawing the second interface to be rendered on the front end interface according to the third rendering data, the fourth rendering data, the DOM node corresponding to the third rendering data, the position relation of the DOM node corresponding to the fourth rendering data in the DOM tree and the interface CSS configuration table.
11. An interface mixing rendering device, characterized in that the interface mixing rendering device comprises:
the node traversing module is used for loading a preset first interface to be rendered through the game engine and traversing interface nodes of the first interface to be rendered, wherein the interface nodes comprise a native interface node and an H5 interface node;
the first rendering module is used for rendering and drawing according to the original interface node through the game engine when the interface node traversed by the game engine is the original interface node, so as to obtain corresponding first rendering data;
the request sending module is used for sending an H5 interface rendering request to a preset browser kernel through the game engine when the interface node traversed by the game engine is an H5 interface node, wherein the H5 interface rendering request comprises H5 interface parameters of the H5 interface node;
The second rendering module is used for loading and drawing the H5 interface based on the H5 interface parameter in the H5 interface rendering request through the browser kernel to obtain corresponding second rendering data, and transmitting the second rendering data to the game engine;
and the interface drawing module is used for drawing the first interface to be rendered on a preset front-end interface through the game engine according to the first rendering data and the second rendering data.
12. An interface hybrid rendering device, characterized in that the interface hybrid rendering device comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the interface blending rendering device to perform the steps of the interface blending rendering method of any of claims 1-10.
13. A computer readable storage medium having instructions stored thereon, which when executed by a processor, implement the steps of the interface blending rendering method of any of claims 1-10.
CN202310288929.8A 2023-03-22 2023-03-22 Interface hybrid rendering method, device, equipment and storage medium Pending CN116524100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310288929.8A CN116524100A (en) 2023-03-22 2023-03-22 Interface hybrid rendering method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310288929.8A CN116524100A (en) 2023-03-22 2023-03-22 Interface hybrid rendering method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116524100A true CN116524100A (en) 2023-08-01

Family

ID=87407241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310288929.8A Pending CN116524100A (en) 2023-03-22 2023-03-22 Interface hybrid rendering method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116524100A (en)

Similar Documents

Publication Publication Date Title
US20090085921A1 (en) Populate Web-Based Content Based on Space Availability
CN110781423A (en) Webpage generation method and device and electronic equipment
US20100192071A1 (en) Client program, terminal, method, server system and server program
CN107066631A (en) Display methods, device and the electronic equipment of the page
JP2008176820A (en) System and method for content delivery over wireless communication medium to portable computing device
CN102682070A (en) Embedded display system and method used by the system
US20100146378A1 (en) Optimize View Elements Sizes to Maximize Most Data Viewed in a Multiple View Elements GUI
CN103959281A (en) Method for associating third party content with online document signing
US20050262425A1 (en) Method and system for Java Gantt/Bar chart rendering
BRPI0616400B1 (en) IMAGE PROCESSING SYSTEM AND METHOD
US9117314B2 (en) Information output apparatus, method, and recording medium for displaying information on a video display
CN106033361A (en) Method and device for showing application page, and method and device for updating application page data
CN102262515B (en) Image processing device and image processing method
US20080028307A1 (en) Image forming system and image forming method
CN110516186A (en) Page skeleton automatic generating method, equipment, storage medium and device
CN103605502A (en) Form page display method and server
CN111428168B (en) Browser front-end architecture system capable of being separately developed from rear-end architecture
US20070011336A1 (en) Method for managing contents of a web site
CN111597102A (en) Page performance testing method, terminal and storage medium
JP2010092103A (en) Web page display method, server unit, and program
CN116524100A (en) Interface hybrid rendering method, device, equipment and storage medium
US8793342B2 (en) Interpreting web application content
JP6687801B1 (en) Document display system, server device, information terminal device, document display method, and document display program
CN113656041A (en) Data processing method, device, equipment and storage medium
US20060064632A1 (en) Method and system to inverse graphs

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240205

Address after: Room 801901, building 5, No.16 Keyun Road, Tianhe District, Guangzhou City, Guangdong Province 510000

Applicant after: GUANGZHOU BOGUAN INFORMATION SCIENCE & TECHNOLOGY Co.,Ltd.

Country or region after: China

Address before: 310000 7 storeys, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: NETEASE (HANGZHOU) NETWORK Co.,Ltd.

Country or region before: China