CN113792240A - Page loading method and device and electronic equipment - Google Patents

Page loading method and device and electronic equipment Download PDF

Info

Publication number
CN113792240A
CN113792240A CN202111113546.4A CN202111113546A CN113792240A CN 113792240 A CN113792240 A CN 113792240A CN 202111113546 A CN202111113546 A CN 202111113546A CN 113792240 A CN113792240 A CN 113792240A
Authority
CN
China
Prior art keywords
rendered
data
rendering
page
task queue
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
CN202111113546.4A
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.)
Shanghai Qiyue Information Technology Co Ltd
Original Assignee
Shanghai Qiyue Information Technology 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 Shanghai Qiyue Information Technology Co Ltd filed Critical Shanghai Qiyue Information Technology Co Ltd
Priority to CN202111113546.4A priority Critical patent/CN113792240A/en
Publication of CN113792240A publication Critical patent/CN113792240A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a page loading method, a page loading device and electronic equipment, which relate to the technical field of Internet and comprise the steps of obtaining data to be rendered; segmenting a big data group in the data to be rendered to obtain a plurality of data units; dividing the data unit into rendering task queues of different frames of pages to be rendered of continuous frames; and after finishing rendering the small data group in the data to be rendered, acquiring the data unit in the rendering task queue of the page to be rendered of the current frame for rendering, and finishing the rendering of the page to be rendered of the current frame. According to the method and the device, the page can be loaded quickly, the waiting time of a user is reduced, and the use experience of the user is improved.

Description

Page loading method and device and electronic equipment
Technical Field
The invention relates to the technical field of internet, in particular to a page loading method and device and electronic equipment.
Background
With the rapid development of computer technology and internet technology, users have more and more demands when using pages such as browsers and application programs, and more elements are displayed by the browsers and the application programs to meet the demands of the users.
In the page display process, the page rendering time is long and the page is easy to be blocked due to the large data volume. Frame loss and the like.
Therefore, a page loading method, a page loading device and an electronic device are provided.
Disclosure of Invention
The specification provides a page loading method, a page loading device and electronic equipment, which realize rapid page loading, reduce waiting time of a user and improve use experience of the user.
The page loading method provided by the application adopts the following technical scheme that the page loading method comprises the following steps:
acquiring data to be rendered;
segmenting a big data group in the data to be rendered to obtain a plurality of data units;
dividing the data unit into rendering task queues of different frames of pages to be rendered of continuous frames;
and after finishing rendering the small data group in the data to be rendered, acquiring the data unit in the rendering task queue of the page to be rendered of the current frame for rendering, and finishing the rendering of the page to be rendered of the current frame.
Optionally, the segmenting the big data group in the data to be rendered to obtain a plurality of data units includes:
and segmenting the big data group according to the minimum granularity through an asynchronous thread to obtain a plurality of data units.
Optionally, after the rendering of the small data group in the data to be rendered is completed, obtaining the data unit in the rendering task queue of the page to be rendered of the current frame for rendering, including:
rendering a small data group in the data to be rendered through a main thread, and judging whether a rendering task queue of a page to be rendered of a current frame is empty or not after the small data group is rendered;
when the rendering task queue is not empty, extracting the data unit in the rendering task queue to be executed through the main thread until the rendering task queue is empty;
and when the rendering task queue is empty, finishing the rendering of the page to be rendered of the current frame.
Optionally, the extracting the data unit in the rendering task queue is executed by the main thread, and includes:
judging whether the rendering task queue contains macro tasks or not;
when the rendering task queue contains a macro task, executing the macro task;
and when the rendering task queue does not contain the macro task, executing the micro task.
Optionally, the method further includes:
acquiring target attributes of each group of data to be rendered;
judging whether the target attribute exceeds a preset threshold value or not;
when the target attribute is larger than a preset threshold value, the data to be rendered is the big data group;
and when the target attribute is less than or equal to a preset threshold value, the data to be rendered is a small data group.
The device for page loading provided by the application adopts the following technical scheme that the device comprises:
the acquisition module is used for acquiring data to be rendered;
the segmentation module is used for segmenting a big data group in the data to be rendered to obtain a plurality of data units;
the grouping module is used for grouping the data units into rendering task queues of different frames of pages to be rendered of continuous frames;
and the rendering module is used for acquiring the data unit in the rendering task queue of the current frame of the page to be rendered for rendering after the small data group in the data to be rendered is rendered, and completing the rendering of the current frame of the page to be rendered.
Optionally, the segmentation module is specifically configured to segment the big data group according to the minimum granularity through an asynchronous thread to obtain a plurality of data units.
Optionally, the rendering module is specifically configured to render a small data group in the data to be rendered through a main thread, and after the small data group is rendered, determine whether a rendering task queue of a page to be rendered of a current frame is empty; when the rendering task queue is not empty, extracting the data unit in the rendering task queue to be executed through the main thread until the rendering task queue is empty; and when the rendering task queue is empty, finishing the rendering of the page to be rendered of the current frame.
The present specification also provides an electronic device, wherein the electronic device includes:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present specification also provides a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement any of the methods described above.
According to the method and the device, the large data group is split through the asynchronous thread to obtain a plurality of data units, the data units are divided into the loading time period of each video frame, namely the loading process of one large data group is divided into a plurality of data units for loading, so that the problems of long page rendering time, section blocking, frame loss and the like are solved, the performance of the device is greatly improved, and the system is more smooth and stable.
Drawings
FIG. 1 is a schematic diagram illustrating a method for loading a page according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for loading a page according to an embodiment of the present specification;
fig. 3 is a schematic structural diagram of a page loading apparatus provided in an embodiment of the present specification;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
Detailed Description
The following description is presented to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The basic principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying figures 1-5. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals denote the same or similar elements, components, or parts in the drawings, and thus their repetitive description will be omitted.
Features, structures, characteristics or other details described in a particular embodiment do not preclude the fact that the features, structures, characteristics or other details may be combined in a suitable manner in one or more other embodiments in accordance with the technical idea of the invention.
In describing particular embodiments, the present invention has been described with reference to features, structures, characteristics or other details that are within the purview of one skilled in the art to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific features, structures, characteristics, or other details.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Fig. 1 is a schematic diagram of a method for page loading according to an embodiment of the present disclosure, and fig. 2 is a flowchart of the method for page loading according to the embodiment of the present disclosure, where the method may include:
s101: and acquiring data to be rendered.
In the embodiment of the present specification, data to be rendered is obtained from a database, where the database includes MySQL, HBase, and Hive. MySQL, a relational database management system; HBase, a distributed, column-oriented open source database; hive is a data warehouse tool based on Hadoop and used for data extraction, conversion and loading.
S102: and segmenting the big data group in the data to be rendered to obtain a plurality of data units.
Optionally, the segmenting the big data group in the data to be rendered to obtain a plurality of data units includes:
and segmenting the big data group according to the minimum granularity through an asynchronous thread to obtain a plurality of data units.
In the embodiment of the present specification, the big data group includes a big data list and a big data display block, and the big data group is segmented according to the minimum granularity, that is, each piece of data in the big data group is generated in a DOM (Document Object Model) corresponding to a page to be rendered, and is processed one by using a for loop to obtain a plurality of data units. Asynchronous threads, such as: and the big data group comprises data A and data B, and in the process of splitting the data A in the big data group into the data units A, the data B still executes the current task after sending the processing request until the data units A are processed, the data B finishes executing the current task, and the data B in the big data group is split into the data units B.
S103: and dividing the data unit into rendering task queues of different frames of pages to be rendered of continuous frames.
In this embodiment of the present specification, a page to be rendered is composed of consecutive frames, a rendering mode of a browser supporting a frame rate enters an Event Loop (Event Loop), a JS engine executes a split data unit into a browser execution frame (requestIdleCallback) by using an API (Application Programming Interface) of the browser, and the data unit is arranged based on a preset sequence, where the preset sequence includes a sequence of the split browser execution frame and a priority sequence set according to an experience value.
S104: and after finishing rendering the small data group in the data to be rendered, acquiring the data unit in the rendering task queue of the page to be rendered of the current frame for rendering, and finishing the rendering of the page to be rendered of the current frame.
Optionally, after the rendering of the small data group in the data to be rendered is completed, obtaining the data unit in the rendering task queue of the page to be rendered of the current frame for rendering, including:
rendering a small data group in the data to be rendered through a main thread, and judging whether a rendering task queue of a page to be rendered of a current frame is empty or not after the small data group is rendered;
when the rendering task queue is not empty, extracting the data unit in the rendering task queue to be executed through the main thread until the rendering task queue is empty;
and when the rendering task queue is empty, finishing the rendering of the page to be rendered of the current frame.
In the embodiment of the present specification, the main thread includes a JS execution stack, the task of the JS execution stack is a rendering task, and all the tasks in the JS execution stack are time-consuming synchronization tasks. The JS execution stack renders a small data group of data to be rendered in a queue mode, and meanwhile, big data of the data to be rendered are subjected to a splitting task in an asynchronous thread and enter an event loop. And after the small data group is rendered, judging whether the rendering task queue of the current frame is empty, namely whether the rendering task queue of the current frame is executed completely. And when the rendering queue is not completely executed, extracting the data units in the rendering task queue, and executing the rendering tasks by the extracted data units through the JS execution stack until the rendering task queue is completely executed. And when the rendering queue is executed, finishing the rendering work of the page to be rendered of the current frame.
Optionally, the extracting the data unit in the rendering task queue is executed by the main thread, and includes:
judging whether the rendering task queue contains macro tasks or not;
when the rendering task queue contains a macro task, executing the macro task;
and when the rendering task queue does not contain the macro task, executing the micro task.
In the embodiments of the present specification, the event loop mechanism, i.e., whether the analysis task belongs to a macro task or a micro task. The priority exists between the macro task and the micro task, the macro task is executed preferentially, and then the micro task is executed. When the rendering task queue contains the macro task, preferentially executing the macro task and then executing the micro task; and when the rendering task queue does not contain the macro task, directly executing the micro task.
Optionally, the method further includes:
acquiring target attributes of each group of data to be rendered;
judging whether the target attribute exceeds a preset threshold value or not;
when the target attribute is larger than a preset threshold value, the data to be rendered is the big data group;
and when the target attribute is less than or equal to a preset threshold value, the data to be rendered is a small data group.
In this embodiment of the present specification, the target attribute of the data to be rendered includes the number of data pieces of the data to be rendered and the size of the data amount of the data to be rendered, and corresponding preset thresholds are respectively and correspondingly set. Such as: acquiring the data size of data to be rendered, namely length (length), judging whether the length exceeds 10000, and when the length is larger than 10000, determining the data to be rendered as a big data set; when length is less than or equal to 10000, the data to be rendered is a small data group.
In the embodiment of the present specification, a large data group is split through an asynchronous thread to obtain a plurality of data units, and the data units are divided into a loading time period of each video frame, that is, a loading process of one large data group is divided into a plurality of data units to be loaded, so as to solve the problems of long page rendering time, section blocking, frame dropping and the like, greatly improve the performance of the device, and make the system more smooth and stable.
Fig. 3 is a schematic structural diagram of an apparatus for page loading provided in an embodiment of this specification, where the apparatus may include:
an obtaining module 201, configured to obtain data to be rendered;
a segmentation module 202, configured to segment a big data group in the data to be rendered to obtain a plurality of data units;
a grouping module 203, configured to group the data unit into rendering task queues of different frames of pages to be rendered of consecutive frames;
the rendering module 204 is configured to obtain the data unit in the rendering task queue of the page to be rendered of the current frame for rendering after the small data group in the data to be rendered is rendered, so as to complete the rendering of the page to be rendered of the current frame.
Optionally, the segmentation module is specifically configured to segment the big data group according to the minimum granularity through an asynchronous thread to obtain a plurality of data units.
Optionally, the rendering module is specifically configured to render a small data group in the data to be rendered through a main thread, and after the small data group is rendered, determine whether a rendering task queue of a page to be rendered of a current frame is empty; when the rendering task queue is not empty, extracting the data unit in the rendering task queue to be executed through the main thread until the rendering task queue is empty; and when the rendering task queue is empty, finishing the rendering of the page to be rendered of the current frame.
Optionally, the extracting the data unit in the rendering task queue is executed by the main thread, and specifically includes:
judging whether the rendering task queue contains macro tasks or not;
when the rendering task queue contains a macro task, executing the macro task;
and when the rendering task queue does not contain the macro task, executing the micro task.
Optionally, the apparatus further comprises:
acquiring target attributes of each group of data to be rendered;
judging whether the target attribute exceeds a preset threshold value or not;
when the target attribute is larger than a preset threshold value, the data to be rendered is the big data group;
and when the target attribute is less than or equal to a preset threshold value, the data to be rendered is a small data group.
The functions of the apparatus in the embodiment of the present invention have been described in the above method embodiments, so that reference may be made to the related descriptions in the foregoing embodiments for details that are not described in the present embodiment, and further details are not described herein.
Based on the same inventive concept, the embodiment of the specification further provides the electronic equipment.
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification. An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 4. The electronic device 300 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 4, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the various system components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code executable by the processing unit 310 to cause the processing unit 310 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned processing method section of the present specification. For example, the processing unit 310 may perform the steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache storage unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. Network adapter 360 may communicate with other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. The computer program, when executed by a data processing apparatus, enables the computer readable medium to implement the above-described method of the invention, namely: such as the method shown in fig. 1.
Fig. 5 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in embodiments in accordance with the invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP). The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for page loading, comprising:
acquiring data to be rendered;
segmenting a big data group in the data to be rendered to obtain a plurality of data units;
dividing the data unit into rendering task queues of different frames of pages to be rendered of continuous frames;
and after finishing rendering the small data group in the data to be rendered, acquiring the data unit in the rendering task queue of the page to be rendered of the current frame for rendering, and finishing the rendering of the page to be rendered of the current frame.
2. The page loading method according to claim 1, wherein the splitting the big data group in the data to be rendered to obtain a plurality of data units comprises:
and segmenting the big data group according to the minimum granularity through an asynchronous thread to obtain a plurality of data units.
3. The page loading method according to claim 1 or 2, wherein the obtaining the data unit in the rendering task queue of the page to be rendered of the current frame for rendering after the small data group in the data to be rendered is rendered, includes:
rendering a small data group in the data to be rendered through a main thread, and judging whether a rendering task queue of a page to be rendered of a current frame is empty or not after the small data group is rendered;
when the rendering task queue is not empty, extracting the data unit in the rendering task queue to be executed through the main thread until the rendering task queue is empty;
and when the rendering task queue is empty, finishing the rendering of the page to be rendered of the current frame.
4. The method for page loading according to any of claims 1-3, wherein said extracting said data units in said render task queue is performed by said main thread, comprising:
judging whether the rendering task queue contains macro tasks or not;
when the rendering task queue contains a macro task, executing the macro task;
and when the rendering task queue does not contain the macro task, executing the micro task.
5. The method for page loading according to any of claims 1-4, wherein said method further comprises:
acquiring target attributes of each group of data to be rendered;
judging whether the target attribute exceeds a preset threshold value or not;
when the target attribute is larger than a preset threshold value, the data to be rendered is the big data group;
and when the target attribute is less than or equal to a preset threshold value, the data to be rendered is a small data group.
6. An apparatus for page loading, comprising:
the acquisition module is used for acquiring data to be rendered;
the segmentation module is used for segmenting a big data group in the data to be rendered to obtain a plurality of data units;
the grouping module is used for grouping the data units into rendering task queues of different frames of pages to be rendered of continuous frames;
and the rendering module is used for acquiring the data unit in the rendering task queue of the current frame of the page to be rendered for rendering after the small data group in the data to be rendered is rendered, and completing the rendering of the current frame of the page to be rendered.
7. The method for page loading according to claim 6, wherein the segmentation module is specifically configured to segment the big data group by the asynchronous thread at a minimum granularity to obtain the plurality of data units.
8. The page loading method according to claim 7, wherein the rendering module is specifically configured to render the small data group in the data to be rendered by a main thread, and after the small data group is rendered, determine whether a rendering task queue of a page to be rendered of a current frame is empty; when the rendering task queue is not empty, extracting the data unit in the rendering task queue to be executed through the main thread until the rendering task queue is empty; and when the rendering task queue is empty, finishing the rendering of the page to be rendered of the current frame.
9. An electronic device, wherein the electronic device comprises:
a processor;
and a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-5.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-5.
CN202111113546.4A 2021-09-23 2021-09-23 Page loading method and device and electronic equipment Pending CN113792240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111113546.4A CN113792240A (en) 2021-09-23 2021-09-23 Page loading method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111113546.4A CN113792240A (en) 2021-09-23 2021-09-23 Page loading method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113792240A true CN113792240A (en) 2021-12-14

Family

ID=79184116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111113546.4A Pending CN113792240A (en) 2021-09-23 2021-09-23 Page loading method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113792240A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114625364A (en) * 2022-02-09 2022-06-14 北京达佳互联信息技术有限公司 Data processing method, device, equipment and storage medium
CN115469959A (en) * 2022-11-11 2022-12-13 成都摹客科技有限公司 Page rendering method, rendering device and computer storage medium
CN116822472A (en) * 2023-08-31 2023-09-29 青岛诺亚信息技术有限公司 Method and system for rapidly pulling multi-source data to fill complex interface form
CN117271936A (en) * 2023-11-22 2023-12-22 中证数智科技(深圳)有限公司 Web-based big data relation map rendering method, system and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090106651A1 (en) * 2007-10-19 2009-04-23 Gorog Christopher P Rendering Data From A Server For Display In A Web Browser On A Client Computer
CN108984714A (en) * 2018-07-09 2018-12-11 北京三快在线科技有限公司 Page rendering method, apparatus, electronic equipment and computer-readable medium
CN110020349A (en) * 2017-09-26 2019-07-16 北京京东尚科信息技术有限公司 The method and device of page rendering
CN111259636A (en) * 2020-02-07 2020-06-09 北京字节跳动网络技术有限公司 Document rendering method and device and electronic equipment
CN112328939A (en) * 2020-11-16 2021-02-05 北京沃东天骏信息技术有限公司 Page processing method and device and storage medium
CN112506581A (en) * 2020-12-17 2021-03-16 北京百度网讯科技有限公司 Method and device for rendering small program, electronic equipment and readable storage medium
CN113326115A (en) * 2021-06-21 2021-08-31 上海华客信息科技有限公司 Rendering method and system of multi-chart page, electronic device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090106651A1 (en) * 2007-10-19 2009-04-23 Gorog Christopher P Rendering Data From A Server For Display In A Web Browser On A Client Computer
CN110020349A (en) * 2017-09-26 2019-07-16 北京京东尚科信息技术有限公司 The method and device of page rendering
CN108984714A (en) * 2018-07-09 2018-12-11 北京三快在线科技有限公司 Page rendering method, apparatus, electronic equipment and computer-readable medium
CN111259636A (en) * 2020-02-07 2020-06-09 北京字节跳动网络技术有限公司 Document rendering method and device and electronic equipment
CN112328939A (en) * 2020-11-16 2021-02-05 北京沃东天骏信息技术有限公司 Page processing method and device and storage medium
CN112506581A (en) * 2020-12-17 2021-03-16 北京百度网讯科技有限公司 Method and device for rendering small program, electronic equipment and readable storage medium
CN113326115A (en) * 2021-06-21 2021-08-31 上海华客信息科技有限公司 Rendering method and system of multi-chart page, electronic device and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114625364A (en) * 2022-02-09 2022-06-14 北京达佳互联信息技术有限公司 Data processing method, device, equipment and storage medium
CN115469959A (en) * 2022-11-11 2022-12-13 成都摹客科技有限公司 Page rendering method, rendering device and computer storage medium
CN115469959B (en) * 2022-11-11 2023-01-31 成都摹客科技有限公司 Page rendering method, rendering device and computer storage medium
CN116822472A (en) * 2023-08-31 2023-09-29 青岛诺亚信息技术有限公司 Method and system for rapidly pulling multi-source data to fill complex interface form
CN116822472B (en) * 2023-08-31 2023-11-17 青岛诺亚信息技术有限公司 Method and system for rapidly pulling multi-source data to fill complex interface form
CN117271936A (en) * 2023-11-22 2023-12-22 中证数智科技(深圳)有限公司 Web-based big data relation map rendering method, system and equipment
CN117271936B (en) * 2023-11-22 2024-03-12 中证数智科技(深圳)有限公司 Web-based big data relation map rendering method, system and equipment

Similar Documents

Publication Publication Date Title
CN113792240A (en) Page loading method and device and electronic equipment
WO2019095994A1 (en) Abstract obtaining method, apparatus and device, and computer readable storage medium
US10565290B2 (en) Online displaying a document
CN107203504B (en) Character string replacing method and device
US10908930B2 (en) Hybrid interactivity in JavaScript webpage user interfaces
CN112528641A (en) Method and device for establishing information extraction model, electronic equipment and readable storage medium
CN111950600B (en) Method and device for predicting overdue user resource return performance and electronic equipment
CN115150471A (en) Data processing method, device, equipment, storage medium and program product
CN113139660A (en) Model reasoning method and device, electronic equipment and storage medium
US20220413906A1 (en) Method, device, and program product for managing multiple computing tasks based on batch
CN103577604B (en) A kind of image index structure for Hadoop distributed environments
CN113010542A (en) Service data processing method and device, computer equipment and storage medium
CN111611479A (en) Data processing method and related device for network resource recommendation
KR20200103133A (en) Method and apparatus for performing extract-transfrom-load procedures in a hadoop-based big data processing system
US20220207427A1 (en) Method for training data processing model, electronic device and storage medium
CN113360672B (en) Method, apparatus, device, medium and product for generating knowledge graph
CN115757304A (en) Log storage method, device and system, electronic equipment and storage medium
Walkowiak Web based engine for processing and clustering of Polish texts
CN112988441B (en) Exception handling method and device
CN113141407A (en) Page resource loading method and device and electronic equipment
CN110472055B (en) Method and device for marking data
CN110020359B (en) Data processing method, device and storage medium applied to front end of webpage
CN113779451A (en) Page loading method and device
CN111782426B (en) Method and device for processing client tasks and electronic equipment
EP3186731B1 (en) Array-based computations on a storage device

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