CN113836463A - Page generation method and device, electronic equipment and storage medium - Google Patents

Page generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113836463A
CN113836463A CN202111045758.3A CN202111045758A CN113836463A CN 113836463 A CN113836463 A CN 113836463A CN 202111045758 A CN202111045758 A CN 202111045758A CN 113836463 A CN113836463 A CN 113836463A
Authority
CN
China
Prior art keywords
page
card
rendering
target
page card
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
CN202111045758.3A
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.)
Beijing Ape Power Future Technology Co Ltd
Original Assignee
Beijing Ape Power Future 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 Beijing Ape Power Future Technology Co Ltd filed Critical Beijing Ape Power Future Technology Co Ltd
Priority to CN202111045758.3A priority Critical patent/CN113836463A/en
Publication of CN113836463A publication Critical patent/CN113836463A/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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure provides a page generation method and device, computer equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: determining the selected state of each page card in a target page to be displayed; determining a rendering mode corresponding to each page card at present according to the selected state of each page card; rendering each page card based on the current corresponding rendering mode of each page card to generate the target page. From this, through the independent rendering respectively of the first page element in the page card of will selecting, and the page card that has not selected carries out the whole rendering with picture element to reduce the page element's of the rendering quantity of page rendering in-process, avoided the card pause problem of user's loading in-process, improved the loading speed of page, improved user experience and felt.

Description

Page generation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a page generation method and apparatus, an electronic device, and a storage medium.
Background
With the continuous development and improvement of computer technology, the page content of the webpage is more and more rich. When a user browses a page with more contents, the problems of low page loading speed, blockage and even dead blockage in the loading process may occur, so that the user experience is poor. Therefore, how to solve the problem of jamming in the page loading process to improve the page loading speed becomes a problem to be solved urgently at present.
Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
An embodiment of a first aspect of the present disclosure provides a page generation method, including:
determining the selected state of each page card in a target page to be displayed;
determining a rendering mode corresponding to each page card at present according to the selected state of each page card;
rendering each page card based on the current corresponding rendering mode of each page card to generate the target page.
Optionally, the determining, according to the selected state of each page card, a rendering manner currently corresponding to each page card includes:
under the condition that any page card is in the selected state, determining that the current corresponding rendering mode of any page card is rendering a first page element contained in any page card;
and under the condition that any page card is in an unselected state, determining the current corresponding rendering mode of the any page card as rendering the any page card in a picture element mode.
Optionally, the rendering each page card based on the currently corresponding rendering manner of each page card includes:
traversing a cache pool to determine whether the cache pool contains a rendering result matched with a rendering mode currently corresponding to any page card;
and under the condition that the cache pool does not contain a rendering result matched with the rendering mode currently corresponding to any page card, rendering each page card based on the rendering mode currently corresponding to each page card.
Optionally, the method further includes:
and under the condition that the cache pool contains a rendering result matched with the rendering mode currently corresponding to any page card, loading the rendering result, and rendering the rest of the page cards based on the rendering modes currently corresponding to the rest of the page cards to generate a target page to be displayed.
Optionally, after rendering each page card based on the currently corresponding rendering manner of each page card, the method further includes:
and storing the rendering result corresponding to each page card into a cache pool.
Optionally, the method further includes:
acquiring a page loading request, wherein the loading request comprises an identifier of the target page;
acquiring a page description file corresponding to the target page according to the identification of the target page, wherein the page description file comprises picture elements corresponding to page cards;
rendering the picture elements to generate the target page.
Optionally, the page description file further includes a first page element corresponding to the page card and a second page element except the first page element, and the generating the target page includes:
and respectively rendering the picture element and the second page element to generate the target page.
Optionally, the method further includes:
acquiring a page description file generation request, wherein the generation request comprises page editing data corresponding to a target page;
identifying the page editing data to determine a page card contained in the target page and a first page element corresponding to the page card;
under the condition that the page card corresponds to at least one first page element, acquiring a picture element corresponding to the page card;
and generating a page description file corresponding to the target page based on the picture element corresponding to the page card and the first page element.
Optionally, the page editing data includes a type tag of each page content, and the identifying the page editing data to determine a page card included in the target page and a first page element corresponding to the page card includes:
identifying the page editing data to determine the type of each page content in the target page;
and determining a page card contained in the target page and a first page element corresponding to the page card according to the type of each page content.
An embodiment of a second aspect of the present disclosure provides an apparatus for generating a page, including:
the first determining module is used for determining the selected state of each page card in the target page to be displayed;
the second determining module is used for determining the current corresponding rendering mode of each page card according to the selected state of each page card;
and the first generation module is used for rendering each page card based on the current corresponding rendering mode of each page card so as to generate the target page.
Optionally, the second determining module is specifically configured to:
under the condition that any page card is in the selected state, determining that the current corresponding rendering mode of any page card is rendering a first page element contained in any page card;
and under the condition that any page card is in an unselected state, determining the current corresponding rendering mode of the any page card as rendering the any page card in a picture element mode.
Optionally, the first generating module is specifically configured to:
traversing a cache pool to determine whether the cache pool contains a rendering result matched with a rendering mode currently corresponding to any page card;
and under the condition that the cache pool does not contain a rendering result matched with the rendering mode currently corresponding to any page card, rendering each page card based on the rendering mode currently corresponding to each page card.
Optionally, the first generating module is further specifically configured to:
and under the condition that the cache pool contains a rendering result matched with the rendering mode currently corresponding to any page card, loading the rendering result, and rendering the rest of the page cards based on the rendering modes currently corresponding to the rest of the page cards to generate a target page to be displayed.
Optionally, the first generating module is further specifically configured to:
and storing the rendering result corresponding to each page card into a cache pool.
Optionally, the apparatus for generating a page further includes:
the first obtaining module is used for obtaining a page loading request, wherein the loading request comprises an identifier of the target page;
the second obtaining module is used for obtaining a page description file corresponding to the target page according to the identifier of the target page, wherein the page description file comprises picture elements corresponding to page cards;
and the second generation module is used for rendering the picture elements to generate the target page.
Optionally, the page description file further includes a first page element corresponding to the page card and a second page element except the first page element, and the second generation module is specifically configured to:
and respectively rendering the picture element and the second page element to generate the target page.
Optionally, the apparatus for generating a page further includes:
the third obtaining module is used for obtaining a page description file generating request, wherein the generating request comprises page editing data corresponding to a target page;
the third determining module is used for identifying the page editing data so as to determine a page card contained in the target page and a first page element corresponding to the page card;
the fourth obtaining module is used for obtaining the picture elements corresponding to the page card under the condition that the page card corresponds to at least one first page element;
and the third generation module is used for generating a page description file corresponding to the target page based on the picture element and the first page element corresponding to the page card.
Optionally, the page editing data includes a type tag of each page content, and the third determining module is specifically configured to:
identifying the page editing data to determine the type of each page content in the target page;
and determining a page card contained in the target page and a first page element corresponding to the page card according to the type of each page content.
An embodiment of a third aspect of the present disclosure provides an electronic device, including: the page generation method comprises the following steps of storing a page, generating a page according to the page, and generating a page according to the page generation method.
A fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method for generating a page as set forth in the first aspect of the present disclosure.
A fifth aspect of the present disclosure provides a computer program product, which when executed by an instruction processor in the computer program product, performs the method for generating a page provided in the first aspect of the present disclosure.
The page generation method, the page generation device, the electronic equipment and the storage medium have the following beneficial effects:
in the embodiment of the disclosure, the selected state of each page card in the target page to be displayed is determined first, then the rendering mode corresponding to each page card is determined according to the selected state of each page card, and finally each page card is rendered based on the rendering mode corresponding to each page card so as to generate the target page. From this, through the independent rendering respectively of the first page element in the page card of will selecting, and the page card that has not selected carries out the whole rendering with picture element to reduce the page element's of the rendering quantity of page rendering in-process, avoided the card pause problem of user's loading in-process, improved the loading speed of page, improved user experience and felt.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a page generation method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a page generation method according to another embodiment of the disclosure;
fig. 3 is a schematic flowchart of a page generation method according to another embodiment of the disclosure;
fig. 4 is a schematic flowchart of a page generation method according to another embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a page generation apparatus according to another embodiment of the present disclosure;
FIG. 6 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
A page generation method, apparatus, electronic device, and storage medium according to embodiments of the present disclosure are described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a page generation method provided in the embodiment of the present disclosure.
The embodiment of the present disclosure is exemplified by the method for generating a page being configured in a page generating device, and the page generating device may be applied to any electronic device, so that the electronic device may execute a page generating function.
As shown in fig. 1, the method for generating the page may include the following steps:
step 101, determining the selected state of each page card in the target page to be displayed.
The page card can be regarded as a small rectangular module containing contents such as characters, pictures and the like in the target page. The page card may not only show content containing different elements, but may also provide the user with access to more detailed information.
Optionally, whether the page card in the target page is selected may be determined according to the matching degree between the position of the focus in the page and the display position of each page card.
And 102, determining the current corresponding rendering mode of each page card according to the selected state of each page card.
Optionally, the rendering manner may include: rendering the page card according to the picture; and rendering specific contents in the page card according to page elements, and the like, which are not limited in the present disclosure.
Optionally, under the condition that any page card is in the selected state, it is determined that the rendering mode currently corresponding to any page card is to render the first page element included in any page card.
The first page element is specific content contained in the page card, and the number of the first page elements may be one or multiple. For example, if the first page element included in any page card includes "a sentence" and a picture, the "a sentence" and the picture can be rendered according to the independent page element, and the like, which is not limited in the present disclosure.
It can be understood that, a page card is selected, which represents that a user may want to know specific content contained in the page card in detail, so as to facilitate the user to copy, paste, and the like the specific content contained in the page card, and therefore, the first page element contained in the selected page card is rendered.
Optionally, when any page card is in the unselected state, it is determined that the rendering mode currently corresponding to any page card is to render any page card in a picture element mode.
In the disclosure, when all contents in a page card are regarded as one picture, the page card can be regarded as one picture element in a page. At this time, a first page element or a plurality of first page elements in the card are rendered as a whole picture element, so that the number of the page elements contained in the page can be reduced, and the page rendering duration is reduced.
It can be understood that the page card is not selected, and the representative user does not need to know the specific content in the page card in detail for a while, so the whole unselected page card can be rendered in the form of picture elements. Because the page rendering process is a process of respectively rendering and displaying the page elements, in the disclosure, the unselected page cards are taken as a whole page element, so that independent rendering of each first page element contained in each page card can be avoided, that is, the number of the page elements rendered in the page rendering process is reduced, the problem that a user is stuck during the process of browsing the page is avoided as much as possible, and the page loading speed is improved.
And 103, rendering each page card based on the current corresponding rendering mode of each page card to generate a target page.
It can be understood that different rendering modes are adopted to render the page card, and in the generated target page, the user can copy, paste and other operations on the page elements contained in the page card when the user selects the page card; the unselected page cards are displayed in the form of pictures, and the user cannot perform specific operation on the contents in the page cards, so that the loading speed of the page is increased under the condition that the specific operation of the user on the page is not influenced.
In the embodiment of the disclosure, the selected state of each page card in the target page to be displayed is determined first, then the rendering mode corresponding to each page card is determined according to the selected state of each page card, and finally each page card is rendered based on the rendering mode corresponding to each page card so as to generate the target page. From this, through the independent rendering respectively of the first page element in the page card of will selecting, and the page card that has not selected carries out the whole rendering with picture element to reduce the page element's of the rendering quantity of page rendering in-process, avoided the card pause problem of user's loading in-process, improved the loading speed of page, improved user experience and felt.
Fig. 2 is a schematic flowchart of a method for generating a page according to an embodiment of the present disclosure, and as shown in fig. 2, the method for generating a page may include the following steps:
step 201, determining the selected state of each page card in the target page to be displayed.
Step 202, determining a rendering mode corresponding to each page card according to the selected state of each page card.
The specific implementation forms of step 201 and step 202 may refer to detailed descriptions in other embodiments in the present disclosure, and are not described in detail here.
Step 203, traversing the cache pool to determine whether the cache pool contains a rendering result matched with the rendering mode currently corresponding to any page card.
The cache pool is used for recording whether each page card is rendered or not and a corresponding rendering result. In the process of rendering the page cards, if the cache pool contains the rendering result corresponding to any page card, the existing rendering result in the cache pool can be directly called without re-rendering each page card, so that the performance overhead during rendering is reduced, and the loading speed of the page is further increased.
And 204, under the condition that the cache pool does not contain a rendering result matched with the rendering mode currently corresponding to any page card, rendering each page card based on the rendering mode currently corresponding to each page card to generate a target page to be displayed.
Step 205, loading the rendering result under the condition that the cache pool contains the rendering result matched with the rendering mode currently corresponding to any page card.
And step 206, rendering the rest of the page cards based on the rendering modes corresponding to the rest of the page cards so as to generate the target page to be displayed.
For example, if the page card B is currently in the selected state, in the target page, the rendering manner corresponding to the page card B currently is to render each first page element included in the page card B, and the rendering manners corresponding to the other page cards except the page card B are to render each page card as one picture element. If the rendering result contained in the buffer pool is: the rendering result corresponding to the page card A is as follows: rendering results corresponding to each first page element in the page card A, and rendering results of other page cards except the page element A are as follows: and each page card is used as a rendering result corresponding to one picture element. At this time, rendering results of picture elements corresponding to other page cards except the page card a and the page card B can be directly loaded from the cache pool, then the picture elements corresponding to the page card a are rendered, and each first page element contained in the page card B is rendered, so that a target page to be displayed is generated.
And step 207, storing the rendering result corresponding to each page card into a cache pool.
It can be understood that after each page card is rendered, the rendering result corresponding to each page card generated by rendering in the rendering process can be stored in the cache pool, so that the rendering result in the cache pool is expanded, and then more usable rendering results can be directly called from the cache pool in the page loading process, so that the page loading speed is further increased.
In the embodiment of the disclosure, a rendering mode currently corresponding to each page card is determined according to a selected state of each page card, then a cache pool is traversed to determine whether the cache pool contains a rendering result matched with the rendering mode currently corresponding to any page card, under the condition that the cache pool does not contain the rendering result matched with the rendering mode currently corresponding to any page card, each page card is rendered based on the rendering mode currently corresponding to each page card to generate a target page to be displayed, under the condition that the cache pool contains the rendering result matched with the rendering mode currently corresponding to any page card, the rendering result is loaded, and based on the rendering modes currently corresponding to the other page cards, the other page cards are rendered to generate the target page to be displayed. Therefore, only the rest page cards are rendered by loading the rendering result which is contained in the cache pool and matched with the rendering mode currently corresponding to any page card, so that the number of the page cards needing to be rendered in the page rendering process is reduced, and the page loading speed is further improved.
Fig. 3 is a schematic flowchart of a method for generating a page according to an embodiment of the present disclosure, and as shown in fig. 3, the method for generating a page may include the following steps:
step 301, a page loading request is obtained, wherein the loading request includes an identifier of a target page.
The identifier of the target page is an identifier that can uniquely determine the target page, for example, a storage address, a label, and the like of the target page, which is not limited in this disclosure.
Optionally, the loading request of the page may be obtained when the user inputs the website and clicks the enter key, or when the user clicks a refresh key of the page, and the like, which is not limited in the present disclosure.
Step 302, according to the identifier of the target page, acquiring a page description file corresponding to the target page, where the page description file includes picture elements corresponding to the page card.
The page description file is a file used for describing contents included in a page and attribute information of each content, and may include one or more of a cascading style sheets (css) corresponding to the page and a layout file, for example, which is not limited in this disclosure.
Optionally, the page description file may further include a first page element corresponding to the page card, and a second page element other than the first page element.
The second page element may be other page elements included in the target page and not included in any page card, that is, the second page element is the other elements except for the picture element when each page card in the target page is respectively used as the picture element. Such as a title, a chapter number, etc., to which the present disclosure is not limited.
Step 303, rendering the picture elements to generate a target page.
It can be understood that, when the target page includes page cards, in the process of first loading the page, that is, when all the page cards are in a non-selected state, all the page cards in the target page can be rendered in the form of picture elements respectively to generate the target page, and therefore, the target page is rendered in the form of picture elements without rendering each page element included in the page cards one by one, so that the number of rendered elements in the first loading of the page is reduced, and the loading speed of the page is increased.
Optionally, under the condition that the page description file includes a first page element corresponding to the page card and a second page element except the first page element, when the page is loaded for the first time, the picture element and the second page element may be rendered respectively to generate the target page.
It can be understood that, when the target page includes a page card and a second page element other than the page card, the picture element and the second page element corresponding to the page card need to be rendered respectively, so as to ensure that the generated target page can display all page contents.
In the embodiment of the disclosure, a page loading request is first obtained, then a page description file corresponding to a target page is obtained according to an identifier of the target page included in the page loading request, where the page description file includes picture elements corresponding to page cards, and finally the picture elements corresponding to the page cards are rendered to generate the target page. Therefore, in the process of loading the target page, the page card in the target page is integrally rendered in the form of picture elements, all page elements contained in the target page do not need to be independently rendered respectively, the target page can be generated, the problem of blocking and pause in the process of loading the page by a user is avoided, the loading speed of the page is increased, and the user experience is improved.
Fig. 4 is a schematic flowchart of a method for generating a page according to an embodiment of the present disclosure, and as shown in fig. 4, the method for generating a page may include the following steps:
step 401, a page description file generation request is obtained, where the generation request includes page editing data corresponding to a target page.
The page editing data may be content data included in a page generated according to an editing operation of a user on the page.
Optionally, the page editing data may include a type tag of each page content.
The type tag of the page content may include text, image, page card, etc., which is not limited in this disclosure.
It is understood that the page card may also include page elements of text or image types, which is not limited by the present disclosure.
Optionally, the type tag of the page content may be self-contained in the page editing template, or may be manually added by the user in the page editing process, which is not limited in this disclosure.
Step 402, identifying the page editing data to determine a page card contained in the target page and a first page element corresponding to the page card.
Optionally, when the type of any page content in the page editing data is a page card, the page card may be included in the template page, and the sub-content included in the page content may be determined as the first page element corresponding to the page card.
In step 403, under the condition that the page card corresponds to at least one first page element, a picture element corresponding to the page card is obtained.
It can be understood that the page card may include a plurality of first page elements, and at this time, the plurality of first page elements in the page card may be determined as one picture element.
Optionally, a screenshot service may be called to perform screenshot on the page card to obtain a picture element corresponding to the page card.
For example, a headless browser (browser) may be used to render a first page element corresponding to a page card into a page, and then puppeteer is used to capture a screenshot of the first page element corresponding to the page card, and an API interface in the puppeteer is called to output a picture element corresponding to the page card.
It should be noted that, if the page card only includes one first page element, when the page card is regarded as a picture element, the page card is rendered as a node in the rendering process, and when the page card is still rendered in the form of a page element, the page card is also rendered as a node, so that the page card may not be determined as a picture element. Therefore, in the process of generating the target page, only one first page element in the page card can be directly rendered.
Step 404, generating a page description file corresponding to the target page based on the picture element corresponding to the page card and the first page element.
It should be noted that the page description file may include a picture element corresponding to the page card, and may also include a first page element included in the page card, a second page element other than the first page element, and the like, which is not limited in this disclosure.
The execution subject of the page generation method in this embodiment may be the same as or different from the execution subject of the page generation method in other embodiments in the present disclosure, and the present disclosure does not limit this.
According to the page description file generating method and device, firstly, a page description file generating request is obtained, then page editing data contained in the generating request is identified so as to determine a page card contained in a target page and first page elements corresponding to the page card, under the condition that the page card corresponds to at least one first page element, picture elements corresponding to the page card are obtained, and finally, a page description file corresponding to the target page is generated based on the picture elements corresponding to the page card and the first page elements. Therefore, the page card contained in the target page is determined according to the type of the page editing data, and then the page description file is generated according to the picture element corresponding to the page card and the first page element, so that conditions are provided for generating the target page.
In order to implement the above embodiment, the present disclosure further provides a page generation apparatus.
Fig. 5 is a schematic structural diagram of a page generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the page generating apparatus 500 may include: a first determining module 510, a second determining module 520, a first generating module 530.
The first determining module 510 is configured to determine a selected state of each page card in a target page to be displayed;
a second determining module 520, configured to determine, according to the selected state of each page card, a rendering manner currently corresponding to each page card;
the first generating module 530 is configured to render each page card based on a rendering manner corresponding to each page card currently, so as to generate a target page.
Optionally, the second determining module 520 is specifically configured to:
under the condition that any page card is in the selected state, determining that the current corresponding rendering mode of any page card is to render the first page element contained in any page card;
and under the condition that any page card is in an unselected state, determining the current corresponding rendering mode of any page card as rendering any page card in a picture element mode.
Optionally, the first generating module 530 is specifically configured to:
traversing the cache pool to determine whether the cache pool contains a rendering result matched with the rendering mode currently corresponding to any page card;
and under the condition that the cache pool does not contain the rendering result matched with the rendering mode currently corresponding to any page card, rendering each page card based on the rendering mode currently corresponding to each page card.
Optionally, the first generating module 530 is further specifically configured to:
and under the condition that the cache pool contains the rendering result matched with the rendering mode currently corresponding to any page card, loading the rendering result, and rendering the rest page cards based on the rendering modes currently corresponding to the rest page cards to generate the target page to be displayed.
Optionally, the first generating module 530 is further specifically configured to:
and storing the rendering result corresponding to each page card into a cache pool.
Optionally, the page generating apparatus further includes:
the first obtaining module is used for obtaining a page loading request, wherein the loading request comprises an identifier of a target page;
the second obtaining module is used for obtaining a page description file corresponding to the target page according to the identification of the target page, wherein the page description file comprises picture elements corresponding to the page card;
and the second generation module is used for rendering the picture elements to generate the target page.
Optionally, the page description file further includes a first page element corresponding to the page card and a second page element except the first page element, and the second generating module is specifically configured to:
and respectively rendering the picture element and the second page element to generate a target page.
Optionally, the page generating apparatus further includes:
the third acquisition module is used for acquiring a page description file generation request, wherein the generation request comprises page editing data corresponding to a target page;
the third determining module is used for identifying the page editing data so as to determine a page card contained in the target page and a first page element corresponding to the page card;
the fourth obtaining module is used for obtaining the picture elements corresponding to the page card under the condition that the page card corresponds to at least one first page element;
and the third generation module is used for generating a page description file corresponding to the target page based on the picture elements corresponding to the page card and the first page elements.
Optionally, the page editing data includes a type tag of each page content, and the third determining module is specifically configured to:
identifying page editing data to determine the type of each page content in a target page;
and determining page cards contained in the target page and first page elements corresponding to the page cards according to the types of the page contents.
The functions and specific implementation principles of the modules in the embodiments of the present disclosure may refer to the embodiments of the methods, and are not described herein again.
In the embodiment of the disclosure, the selected state of each page card in the target page to be displayed is determined first, then the rendering mode corresponding to each page card is determined according to the selected state of each page card, and finally each page card is rendered based on the rendering mode corresponding to each page card so as to generate the target page. From this, through the independent rendering respectively of the first page element in the page card of will selecting, and the page card that has not selected carries out the whole rendering with picture element to reduce the quantity of the page element of the rendering of page rendering in-process, avoided the card problem of pause among the user loading process, improved the loading speed of page, promoted user experience and felt.
In order to implement the above embodiments, the present disclosure also provides an electronic device, including: the page generation method comprises the following steps of storing a page, generating a page according to the page, and generating a page according to the page generation method.
In order to implement the foregoing embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium storing a computer program, which when executed by a processor implements the method for generating a page as proposed by the foregoing embodiments of the present disclosure.
In order to implement the foregoing embodiments, the present disclosure further provides a computer program product, which when executed by an instruction processor in the computer program product, performs the method for generating a page as set forth in the foregoing embodiments of the present disclosure.
FIG. 6 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure. The electronic device 12 shown in fig. 6 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present disclosure.
As shown in FIG. 6, electronic device 12 is embodied in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the disclosure.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Moreover, computer device 12 may also 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 Network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, 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.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
According to the technical scheme, the selected state of each page card in the target page to be displayed is determined, then the current corresponding rendering mode of each page card is determined according to the selected state of each page card, and finally each page card is rendered based on the current corresponding rendering mode of each page card so as to generate the target page. From this, through the independent rendering respectively of the first page element in the page card of will selecting, and the page card that has not selected carries out the whole rendering with picture element to reduce the quantity of the page element of the rendering of page rendering in-process, avoided the card problem of pause among the user loading process, improved the loading speed of page, promoted user experience and felt.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.

Claims (10)

1. A method for generating a page, comprising:
determining the selected state of each page card in a target page to be displayed;
determining a rendering mode corresponding to each page card at present according to the selected state of each page card;
rendering each page card based on the current corresponding rendering mode of each page card to generate the target page.
2. The method of claim 1, wherein the determining a rendering mode currently corresponding to each page card according to the selected state of each page card comprises:
under the condition that any page card is in the selected state, determining that the current corresponding rendering mode of any page card is rendering a first page element contained in any page card;
and under the condition that any page card is in an unselected state, determining the current corresponding rendering mode of the any page card as rendering the any page card in a picture element mode.
3. The method of claim 1, wherein rendering each of the page cards based on a rendering manner to which the page card currently corresponds comprises:
traversing a cache pool to determine whether the cache pool contains a rendering result matched with a rendering mode currently corresponding to any page card;
and under the condition that the cache pool does not contain a rendering result matched with the rendering mode currently corresponding to any page card, rendering each page card based on the rendering mode currently corresponding to each page card.
4. The method of claim 3, further comprising:
loading the rendering result under the condition that the cache pool contains the rendering result matched with the rendering mode currently corresponding to any page card;
and rendering the other page cards based on the rendering modes corresponding to the other page cards so as to generate a target page to be displayed.
5. The method of claim 1, wherein after rendering each of the page cards based on the rendering manner to which it currently corresponds, further comprising:
and storing the rendering result corresponding to each page card into a cache pool.
6. The method of claim 1, further comprising:
acquiring a page loading request, wherein the loading request comprises an identifier of the target page;
acquiring a page description file corresponding to the target page according to the identification of the target page, wherein the page description file comprises picture elements corresponding to page cards;
rendering the picture elements to generate the target page.
7. The method of claim 6, wherein the page description file further includes a first page element corresponding to the page card and a second page element other than the first page element, and the generating the target page includes:
and respectively rendering the picture element and the second page element to generate the target page.
8. The method of any of claims 1-7, further comprising:
acquiring a page description file generation request, wherein the generation request comprises page editing data corresponding to a target page;
identifying the page editing data to determine a page card contained in the target page and a first page element corresponding to the page card;
under the condition that the page card corresponds to at least one first page element, acquiring a picture element corresponding to the page card;
and generating a page description file corresponding to the target page based on the picture element corresponding to the page card and the first page element.
9. The method of claim 8, wherein the page-editing data includes a type tag of each page content, and the identifying the page-editing data to determine a page card included in the target page and a first page element corresponding to the page card includes:
identifying the page editing data to determine the type of each page content in the target page;
and determining a page card contained in the target page and a first page element corresponding to the page card according to the type of each page content.
10. An apparatus for generating a page, comprising:
the first determining module is used for determining the selected state of each page card in the target page to be displayed;
the second determining module is used for determining the current corresponding rendering mode of each page card according to the selected state of each page card;
and the generating module is used for rendering each page card based on the current corresponding rendering mode of each page card so as to generate the target page.
CN202111045758.3A 2021-09-07 2021-09-07 Page generation method and device, electronic equipment and storage medium Pending CN113836463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111045758.3A CN113836463A (en) 2021-09-07 2021-09-07 Page generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111045758.3A CN113836463A (en) 2021-09-07 2021-09-07 Page generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113836463A true CN113836463A (en) 2021-12-24

Family

ID=78958599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111045758.3A Pending CN113836463A (en) 2021-09-07 2021-09-07 Page generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113836463A (en)

Similar Documents

Publication Publication Date Title
US8032832B2 (en) Non-linear presentation canvas
CN107223241B (en) Contextual scaling
US8134553B2 (en) Rendering three-dimensional objects on a server computer
CN107766325B (en) Text splicing method and device
US20100122206A1 (en) Image display device and image display method
CN109960554B (en) Method, device and computer storage medium for displaying reading content
CN111310793A (en) Medical image classification method and device, mobile terminal and medium
CN110727825A (en) Animation playing control method, device, server and storage medium
US20110107256A1 (en) Zooming Task Management
US9507790B2 (en) Providing file indexes and per-file viewing modes within a file management application
US7830397B2 (en) Rendering multiple clear rectangles using a pre-rendered depth buffer
CN113518187B (en) Video editing method and device
CN114461691A (en) Control method and device of state machine, electronic equipment and storage medium
CN111428452B (en) Annotation data storage method and device
JP5271015B2 (en) Image processing apparatus, image processing method, and program
CN109740140B (en) Page typesetting method and device and computer equipment
CN102346771B (en) Information expression method and device
CN109145241B (en) Browser and content display management method of browser
CN113836463A (en) Page generation method and device, electronic equipment and storage medium
CN108197284B (en) Search processing method and device
CN113298082B (en) Dictation data processing method and device, electronic equipment and storage medium
CN115080037A (en) Method, device, equipment and storage medium for page interaction
CN110647826B (en) Method and device for acquiring commodity training picture, computer equipment and storage medium
CN109299294B (en) Resource searching method and device in application, computer equipment and storage medium
CN107741992B (en) Network storage method and device for conference records, intelligent tablet and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination