IP Library › Granted Patent US 12,386,599
Granted Patent B2
US 12,386,599 · App. 18/189,194 · Granted Aug 12, 2025

Page rendering method, apparatus, electronic device, computer-readable storage medium, and computer program product

Inventors: Kemian Feng (Shenzhen, CN); Fengmian Guo (Shenzhen, CN); Canhui Huang (Shenzhen, CN); Ruiying Zhu (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06F8/433
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,386,599
App. No.
18/189,194
Granted
Aug 12, 2025
Kind
B2
Abstract

A page rendering method and apparatus. The method includes presenting a local compilation control, the local compilation control being directed to a page node to be locally compiled for a page to be viewed; obtaining a page node in response to a local compilation operation performed on the local compilation control; obtaining a code node corresponding to the page node of the page to be complied from a code dependency relationship, the code dependency relationship being constructed based on a dependency relationship between code files, and the code dependency relationship representing a hierarchical relationship between nodes corresponding to the code files; compiling a code file corresponding to the code node of the code to be complied to obtain a compiled code; and presenting the page to be viewed corresponding to the page node of the page to be complied based on the compiled code.

Claims (89)

1. A page rendering method, comprising:

presenting a local compilation control, the local compilation control being directed to a page node to be locally compiled for a page to be viewed, the local compilation control comprising a main node input control and a node addition control;

obtaining a node of a main page to be compiled in response to an input operation performed on the main node input control;

presenting an associated node input control of the page to be compiled in response to a node addition operation performed on the node addition control;

obtaining an associated page node of the page to be compiled in response to an associated node input operation performed on the associated node input control;

determining the main page node of the page to be compiled and the associated page node of the page to be compiled as the page node of the page to be compiled;

obtaining a code node of a code to be compiled corresponding to the page node of the page to be compiled from a code dependency relationship, the code dependency relationship being constructed based on a dependency relationship between code files, and the code dependency relationship representing a hierarchical relationship between nodes corresponding to the code files;

compiling a code file corresponding to the code node of the code to be compiled to obtain a compiled code; and

presenting the page to be viewed corresponding to the page node of the page to be compiled based on the compiled code.

2. The method according to claim 1 , wherein the method further comprises:

reading an application configuration file in an application code file to obtain a page configuration file, wherein the application code file is all code files of a functional application to be developed;

obtaining a first code file with the same name as the application configuration file from the application code file, and obtaining a second code file with the same name as the page configuration file and a dependent code file corresponding to code reference information in the second code file with the same name;

determining a page node based on a name of the page configuration file, and determining a node corresponding to the second code file with the same name and a node corresponding to the dependent code file as descendant nodes of the page node;

determining an application node based on a name of the application configuration file, and determining a node corresponding to the first code file with the same name and the page node as descendant nodes of the application node; and

determining the code dependency relationship according to the page node, the descendant nodes of the page node, the application node and the descendant nodes of the application node.

3. The method according to claim 1 , wherein the obtaining a code node of the code to be compiled corresponding to the page node of the page to be compiled from a code dependency relationship comprises:

determining a target page node corresponding to the page node of the page to be compiled from the code dependency relationship;

obtaining a descendant node of the target page node from the code dependency relationship;

determining a parent node of the target page node as an application node, and determining a non-page node referenced by the application node as a node corresponding to a first code file with the same name from the code dependency relationship; and

determining a descendant node of the target page node and the node corresponding to the first code file with the same name as the code node of the code to be compiled.

4. The method according to claim 1 , wherein the presenting the local compilation control comprises:

presenting a local compilation switch control, wherein the local compilation switch control sets a compilation mode of a code file; and

presenting the local compilation control in response to a local compilation enable operation performed on the local compilation switch control.

5. The method according to claim 4 , wherein after the presenting the local compilation control in response to a local compilation enable operation performed on the local compilation switch control, the method further comprises:

hiding the local compilation control and compiling the application code file in response to a local compilation disable operation performed on the local compilation switch control; and

presenting the page to be viewed based on the compiled application code file.

6. The method according to claim 1 , wherein the method further comprises:

in response to failure in obtaining a page node based on the presented local compilation control, compiling the application code file and presenting the page to be viewed based on the compiled application code file.

7. The method according to claim 1 , wherein the method further comprises:

presenting local compilation prompt information during compilation based on the page node of the page to be compiled, wherein the local compilation prompt information comprises at least one of local compilation title prompt information and local compilation status prompt information.

8. The method according to claim 1 , wherein the presenting the page to be viewed corresponding to the page node of the page to be compiled based on the compiled code comprises:

presenting a packaging control, wherein the packaging control is used to trigger packaging processing of the compiled code;

packaging the compiled code to obtain a code package in response to a packaging operation performed on the packaging control;

transmitting the code package to a service device, wherein the service device is configured to perform target processing based on the code package to obtain page rendering data, and the target processing comprises at least one of preview and physical device debugging; and

presenting the page to be viewed based on the page rendering data sent by the server device for the code package.

9. The method according to claim 8 , wherein the method further comprises:

presenting a file quantity of the code file to be compiled and a data length of the code package.

10. The method according to claim 1 , wherein the presenting the page to be viewed corresponding to the page node of the page to be compiled based on the compiled code comprises:

parsing the compiled code to obtain page rendering data; and

presenting the page to be viewed corresponding to the page node of the page to be compiled based on the page rendering data.

11. The method according to claim 1 , wherein the page to be viewed is a subprogram page, and running of a subprogram corresponding to the subprogram page relies on a browser environment of a master program.

12. An electronic device for page rendering, comprising:

a memory, storing executable instructions; and

a processor, configured to, by executing the executable instructions stored in the memory, implement:

presenting a local compilation control, the local compilation control being directed to a page node to be locally compiled for a page to be viewed, the local compilation control comprising a main node input control and a node addition control;

obtaining a node of a main page to be compiled in response to an input operation performed on the main node input control;

presenting an associated node input control of the page to be compiled in response to a node addition operation performed on the node addition control;

obtaining an associated page node of the page to be compiled in response to an associated node input operation performed on the associated node input control;

determining the main page node of the page to be compiled and the associated page node of the page to be compiled as the page node of the page to be compiled;

obtaining a code node of a code to be compiled corresponding to the page node of the page to be compiled from a code dependency relationship, the code dependency relationship being constructed based on a dependency relationship between code files, and the code dependency relationship representing a hierarchical relationship between nodes corresponding to the code files;

compiling a code file corresponding to the code node of the code to be compiled to obtain a compiled code; and

presenting the page to be viewed corresponding to the page node of the page to be compiled based on the compiled code.

13. The electronic device according to claim 12 , wherein the processor is further configured to implement:

reading an application configuration file in an application code file to obtain a page configuration file, wherein the application code file is all code files of a functional application to be developed;

obtaining a first code file with the same name as the application configuration file from the application code file, and obtaining a second code file with the same name as the page configuration file and a dependent code file corresponding to code reference information in the second code file with the same name;

determining a page node based on a name of the page configuration file, and determining a node corresponding to the second code file with the same name and a node corresponding to the dependent code file as descendant nodes of the page node;

determining an application node based on a name of the application configuration file, and determining a node corresponding to the first code file with the same name and the page node as descendant nodes of the application node; and

determining the code dependency relationship according to the page node, the descendant nodes of the page node, the application node and the descendant nodes of the application node.

14. The electronic device according to claim 12 , wherein the obtaining a code node of the code to be compiled corresponding to the page node of the page to be compiled from a code dependency relationship comprises:

determining a target page node corresponding to the page node of the page to be compiled from the code dependency relationship;

obtaining a descendant node of the target page node from the code dependency relationship;

determining a parent node of the target page node as an application node, and determining a non-page node referenced by the application node as a node corresponding to a first code file with the same name from the code dependency relationship; and

determining a descendant node of the target page node and the node corresponding to the first code file with the same name as the code node of the code to be compiled.

15. The electronic device according to claim 12 , wherein the presenting a local compilation control comprises:

presenting a local compilation switch control, wherein the local compilation switch control sets a compilation mode of a code file; and

presenting the local compilation control in response to a local compilation enable operation performed on the local compilation switch control.

16. The electronic device according to claim 15 , wherein the processor is further configured to implement:

hiding the local compilation control and compiling the application code file in response to a local compilation disable operation performed on the local compilation switch control; and

presenting the page to be viewed based on the compiled application code file.

17. A non-transitory computer-readable storage medium, storing executable instructions, when executed by a processor, causing the processor to implement:

presenting a local compilation control, the local compilation control being directed to a page node to be locally compiled for a page to be viewed, the local compilation control comprising a main node input control and a node addition control;

obtaining a node of a main page to be compiled in response to an input operation performed on the main node input control;

presenting an associated node input control of the page to be compiled in response to a node addition operation performed on the node addition control;

obtaining an associated page node of the page to be compiled in response to an associated node input operation performed on the associated node input control;

determining the main page node of the page to be compiled and the associated page node of the page to be compiled as the page node of the page to be compiled;

obtaining a code node of a code to be compiled corresponding to the page node of the page to be compiled from a code dependency relationship, the code dependency relationship being constructed based on a dependency relationship between code files, and the code dependency relationship representing a hierarchical relationship between nodes corresponding to the code files;

compiling a code file corresponding to the code node of the code to be compiled to obtain a compiled code; and

presenting the page to be viewed corresponding to the page node of the page to be compiled based on the compiled code.

18. The computer-readable storage medium according to claim 17 , wherein the executable instructions further cause the processor to implement:

reading an application configuration file in an application code file to obtain a page configuration file, wherein the application code file is all code files of a functional application to be developed;

obtaining a first code file with the same name as the application configuration file from the application code file, and obtaining a second code file with the same name as the page configuration file and a dependent code file corresponding to code reference information in the second code file with the same name;

determining a page node based on a name of the page configuration file, and determining a node corresponding to the second code file with the same name and a node corresponding to the dependent code file as descendant nodes of the page node;

determining an application node based on a name of the application configuration file, and determining a node corresponding to the first code file with the same name and the page node as descendant nodes of the application node; and

determining the code dependency relationship according to the page node, the descendant nodes of the page node, the application node and the descendant nodes of the application node.

19. The computer-readable storage medium according to claim 17 , wherein the obtaining a code node of the code to be compiled corresponding to the page node of the page to be compiled from a code dependency relationship comprises:

determining a target page node corresponding to the page node of the page to be compiled from the code dependency relationship;

obtaining a descendant node of the target page node from the code dependency relationship;

determining a parent node of the target page node as an application node, and determining a non-page node referenced by the application node as a node corresponding to a first code file with the same name from the code dependency relationship; and

determining a descendant node of the target page node and the node corresponding to the first code file with the same name as the code node of the code to be compiled.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 23, 2023
From: FENG, KEMIAN; GUO, FENGMIAN; HUANG, CANHUI; ZHU, RUIYING
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 063085/0861 →
Priority Claims (1)
CN 202110593334.4 · May 28, 2021 · national
Continuity (2)
Continuation PCTCN2022090979 · May 5, 2022
Related Publication 20230229406A1 · Jul 20, 2023
References Cited (23)
US 11474796B1 · Mather · 2022 [cited by examiner]
US 11815943B1 · Rosendahl · 2023 [cited by examiner]
US 20100131951A1 · Carteri et al. · 2010 [cited by applicant]
US 20150277861A1 · Jennings · 2015 [cited by examiner]
US 20180349109A1 · Brown · 2018 [cited by examiner]
US 20190073340A1 · Chuang · 2019 [cited by examiner]
US 20200104122A1 · Pechacek · 2020 [cited by examiner]
US 20200285488A1 · Yao · 2020 [cited by examiner]
US 20210049007A1 · Nelluri · 2021 [cited by examiner]
US 20210092195A1 · Fan et al. · 2021 [cited by applicant]
US 20210096825A1 · Gray et al. · 2021 [cited by applicant]
US 20210209491A1 · Liu et al. · 2021 [cited by applicant]
CN 106843869A · 2017 [cited by applicant]
CN 109358841A · 2019 [cited by applicant]
CN 109375921A · 2019 [cited by applicant]
CN 110400196A · 2019 [cited by examiner]
CN 110795353A · 2020 [cited by applicant]
CN 111045683A · 2020 [cited by applicant]
CN 111651192A · 2020 [cited by examiner]
Li, English translation of CN 110400196 A, (Year: 2019). [cited by examiner]
Ning et al, English translation of CN 111651192 A, (Year: 2020). [cited by examiner]
The European Patent Office (EPO) The Extended European Search Report for 22810323.0 Dec. 7, 2024 10 Pages. [cited by applicant]
The World Intellectual Property Organization (WIPO) International Search Report for PCT/CN2022/090979 Jul. 28, 2022 11 Pages (including translation). [cited by applicant]